diff options
Diffstat (limited to 'src/GF/Grammar')
| -rw-r--r-- | src/GF/Grammar/AbsCompute.hs | 2 | ||||
| -rw-r--r-- | src/GF/Grammar/Grammar.hs | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/GF/Grammar/AbsCompute.hs b/src/GF/Grammar/AbsCompute.hs index 52a2ca678..daa13955e 100644 --- a/src/GF/Grammar/AbsCompute.hs +++ b/src/GF/Grammar/AbsCompute.hs @@ -47,7 +47,7 @@ computeAbsTermIn gr = compt where return $ mkAbs yy $ mkApp f aa' look (Q m f) = case lookupAbsDef gr m f of - Ok (Just (Eqs [])) -> Nothing -- canonical + Ok (Just EData) -> Nothing -- canonical --- should always be QC Ok md -> md _ -> Nothing look _ = Nothing diff --git a/src/GF/Grammar/Grammar.hs b/src/GF/Grammar/Grammar.hs index 1ee5425c4..ee018791a 100644 --- a/src/GF/Grammar/Grammar.hs +++ b/src/GF/Grammar/Grammar.hs @@ -24,7 +24,7 @@ type SourceCnc = Module Ident Option Info -- judgements in abstract syntax data Info = - AbsCat (Perh Context) (Perh [Fun]) -- constructors + AbsCat (Perh Context) (Perh [Term]) -- constructors; must be Id or QId | AbsFun (Perh Type) (Perh Term) -- Yes f = canonical | AbsTrans Ident @@ -55,6 +55,7 @@ data Term = Vr Ident -- variable | Cn Ident -- constant | Con Ident -- constructor + | EData -- to mark in definition that a fun is a constructor | Sort String -- basic type | EInt Int -- integer literal | K String -- string literal or token: "foo" @@ -68,8 +69,6 @@ data Term = -- only used in internal representation | Typed Term Term -- type-annotated term - | ECase Term [Branch] -- case expression in abstract syntax à la Alfa - -- below this only for concrete syntax | RecType [Labelling] -- record type: { p : A ; ...} | R [Assign] -- record: { p = a ; ...} |
