diff options
| author | aarne <unknown> | 2003-11-10 07:55:45 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2003-11-10 07:55:45 +0000 |
| commit | 249d506f58a8b5f8ef87295ab3dde2d13ddd3885 (patch) | |
| tree | 658679a324c4f360901c38637464e8f63b59515d /src/GF/Source | |
| parent | 4c99687f217ce258f821d55e68f5403233f6dea7 (diff) | |
Morphological analysis and glueing.
Diffstat (limited to 'src/GF/Source')
| -rw-r--r-- | src/GF/Source/AbsGF.hs | 2 | ||||
| -rw-r--r-- | src/GF/Source/PrintGF.hs | 2 | ||||
| -rw-r--r-- | src/GF/Source/SourceToGrammar.hs | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/GF/Source/AbsGF.hs b/src/GF/Source/AbsGF.hs index 8acf35349..28313c5ce 100644 --- a/src/GF/Source/AbsGF.hs +++ b/src/GF/Source/AbsGF.hs @@ -172,6 +172,8 @@ data Exp = | EConcat Exp Exp | EGlue Exp Exp | ELet [LocDef] Exp + | ELetb [LocDef] Exp + | EWhere Exp [LocDef] | EEqs [Equation] | ELString LString | ELin Ident diff --git a/src/GF/Source/PrintGF.hs b/src/GF/Source/PrintGF.hs index b406f1935..e4238ceff 100644 --- a/src/GF/Source/PrintGF.hs +++ b/src/GF/Source/PrintGF.hs @@ -321,6 +321,8 @@ instance Print Exp where EConcat exp0 exp -> prPrec i 0 (concat [prt 1 exp0 , ["++"] , prt 0 exp]) EGlue exp0 exp -> prPrec i 0 (concat [prt 1 exp0 , ["+"] , prt 0 exp]) ELet locdefs exp -> prPrec i 0 (concat [["let"] , ["{"] , prt 0 locdefs , ["}"] , ["in"] , prt 0 exp]) + ELetb locdefs exp -> prPrec i 0 (concat [["let"] , prt 0 locdefs , ["in"] , prt 0 exp]) + EWhere exp locdefs -> prPrec i 0 (concat [prt 1 exp , ["where"] , ["{"] , prt 0 locdefs , ["}"]]) EEqs equations -> prPrec i 0 (concat [["fn"] , ["{"] , prt 0 equations , ["}"]]) ELString lstring -> prPrec i 4 (concat [prt 0 lstring]) ELin id -> prPrec i 2 (concat [["Lin"] , prt 0 id]) diff --git a/src/GF/Source/SourceToGrammar.hs b/src/GF/Source/SourceToGrammar.hs index 4c4bc93a6..53681104c 100644 --- a/src/GF/Source/SourceToGrammar.hs +++ b/src/GF/Source/SourceToGrammar.hs @@ -357,6 +357,8 @@ transExp x = case x of where tryLoc (c,(mty,Just e)) = return (c,(mty,e)) tryLoc (c,_) = Bad $ "local definition of" +++ GP.prt c +++ "without value" + ELetb defs exp -> transExp $ ELet defs exp + EWhere exp defs -> transExp $ ELet defs exp ELString (LString str) -> return $ G.K str ELin id -> liftM G.LiT $ transIdent id |
