diff options
| author | hallgren <hallgren@chalmers.se> | 2015-09-28 22:23:56 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2015-09-28 22:23:56 +0000 |
| commit | 35be1828241bb8dacdf326810af388b7b349e591 (patch) | |
| tree | 78ff946a0726e39c7eb5d871d903b9bdcd06520a /src/compiler/GF/Grammar | |
| parent | 82f238fe2b418a715fef52abc7136551fa535aac (diff) | |
Preliminary new shell feature: cc -trace.
You can now do things like
cc -trace mkV "debug"
to see a trace of all opers with their arguments and results during the
computation of mkV "debug".
Diffstat (limited to 'src/compiler/GF/Grammar')
| -rw-r--r-- | src/compiler/GF/Grammar/Grammar.hs | 4 | ||||
| -rw-r--r-- | src/compiler/GF/Grammar/Predef.hs | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/GF/Grammar/Grammar.hs b/src/compiler/GF/Grammar/Grammar.hs index 6f254e7d3..587b09a9f 100644 --- a/src/compiler/GF/Grammar/Grammar.hs +++ b/src/compiler/GF/Grammar/Grammar.hs @@ -291,7 +291,7 @@ greatestResource :: Grammar -> Maybe ModuleName greatestResource gr = case allResources gr of [] -> Nothing - a -> return $ head a ---- why not last as in Abstract? works though AR 24/5/2008 + mo:_ -> Just mo ---- why not last as in Abstract? works though AR 24/5/2008 -- | all concretes for a given abstract allConcretes :: Grammar -> ModuleName -> [ModuleName] @@ -455,7 +455,7 @@ type Equation = ([Patt],Term) type Labelling = (Label, Type) type Assign = (Label, (Maybe Type, Term)) type Case = (Patt, Term) -type Cases = ([Patt], Term) +--type Cases = ([Patt], Term) type LocalDef = (Ident, (Maybe Type, Term)) type Param = (Ident, Context) diff --git a/src/compiler/GF/Grammar/Predef.hs b/src/compiler/GF/Grammar/Predef.hs index e330f583c..95bdb1101 100644 --- a/src/compiler/GF/Grammar/Predef.hs +++ b/src/compiler/GF/Grammar/Predef.hs @@ -61,6 +61,7 @@ cRead = identS "read" cToStr = identS "toStr" cMapStr = identS "mapStr" cError = identS "error" +cTrace = identS "trace" -- * Hacks: dummy identifiers used in various places. -- Not very nice! |
