From c985dab565416251d9973f5b3bafe4d9d205b249 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 1 Oct 2003 12:46:44 +0000 Subject: Putting def definitions in place. --- src/GF/Grammar/AbsCompute.hs | 2 +- src/GF/Grammar/Grammar.hs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/GF/Grammar') 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 ; ...} -- cgit v1.2.3