diff options
| author | aarne <unknown> | 2005-02-05 20:52:31 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2005-02-05 20:52:31 +0000 |
| commit | a1e8229910bbd01135d0e71c459872f87785a291 (patch) | |
| tree | 16612ffa6d974da1fb8e4234f134e5f97c0ad9af /src/GF/Source | |
| parent | 45f3b7d5e74dde250a3e0eb92469efc22479cd30 (diff) | |
cleand up Structural
Diffstat (limited to 'src/GF/Source')
| -rw-r--r-- | src/GF/Source/GrammarToSource.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GF/Source/GrammarToSource.hs b/src/GF/Source/GrammarToSource.hs index 346af7101..24826c7f7 100644 --- a/src/GF/Source/GrammarToSource.hs +++ b/src/GF/Source/GrammarToSource.hs @@ -9,7 +9,7 @@ -- > CVS $Author $ -- > CVS $Revision $ -- --- (Description of the module) +-- From internal source syntax to BNFC-generated (used for printing). ----------------------------------------------------------------------------- module GrammarToSource where @@ -139,6 +139,7 @@ trt trm = case trm of P t l -> P.EProj (trt t) (trLabel l) Q t l -> P.EQCons (tri t) (tri l) QC t l -> P.EQConstr (tri t) (tri l) + TSh (TComp ty) cc -> P.ETTable (trt ty) (map trCases cc) T (TTyped ty) cc -> P.ETTable (trt ty) (map trCase cc) T (TComp ty) cc -> P.ETTable (trt ty) (map trCase cc) T (TWild ty) cc -> P.ETTable (trt ty) (map trCase cc) @@ -192,7 +193,8 @@ trAssign (lab, (mty, t)) = maybe (P.LDDef x t') (\ty -> P.LDFull x (trt ty) t') trLabelling (lab,ty) = P.LDDecl [trLabelIdent lab] (trt ty) -trCase (patt,trm) = P.Case [P.AltP (trp patt)] (trt trm) +trCase (patt, trm) = P.Case [P.AltP (trp patt)] (trt trm) +trCases (patts,trm) = P.Case (map (P.AltP . trp) patts) (trt trm) trDecl (x,ty) = P.DDDec [trb x] (trt ty) |
