diff options
| author | krasimir <krasimir@chalmers.se> | 2009-05-22 21:47:32 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-05-22 21:47:32 +0000 |
| commit | a7900bfbc8e95053b161c6c1d50ada9c7859029a (patch) | |
| tree | c1f94858b819b8b9a90da8948fdc3775222983ae /src/GF/Grammar/Printer.hs | |
| parent | c520039f1c0f8b12be8291cf2c81245bd13076ad (diff) | |
fix the handling of wildcards
Diffstat (limited to 'src/GF/Grammar/Printer.hs')
| -rw-r--r-- | src/GF/Grammar/Printer.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/GF/Grammar/Printer.hs b/src/GF/Grammar/Printer.hs index b658cc9d1..383d36d4f 100644 --- a/src/GF/Grammar/Printer.hs +++ b/src/GF/Grammar/Printer.hs @@ -218,6 +218,7 @@ ppPatt q d (PChar) = char '?' ppPatt q d (PChars s) = brackets (text (show s))
ppPatt q d (PMacro id) = char '#' <> ppIdent id
ppPatt q d (PM m id) = char '#' <> ppIdent m <> char '.' <> ppIdent id
+ppPatt q d PW = char '_'
ppPatt q d (PV id) = ppIdent id
ppPatt q d (PInt n) = integer n
ppPatt q d (PFloat f) = double f
@@ -269,6 +270,8 @@ getAbs e = ([],e) getCTable :: Term -> ([Ident], Term)
getCTable (T TRaw [(PV v,e)]) = let (vs,e') = getCTable e
in (v:vs,e')
+getCTable (T TRaw [(PW, e)]) = let (vs,e') = getCTable e
+ in (identW:vs,e')
getCTable e = ([],e)
getLet :: Term -> ([LocalDef], Term)
|
