diff options
author | Tom Smeding <t.j.smeding@uu.nl> | 2024-09-03 17:00:08 +0200 |
---|---|---|
committer | Tom Smeding <t.j.smeding@uu.nl> | 2024-09-03 17:00:08 +0200 |
commit | 40a6868ed5960d381359541975272483747808b4 (patch) | |
tree | aeda3bdf22bd3fef5366b37cb78b5cbf8c7018c7 /src/AST/Pretty.hs | |
parent | e281439863d7e760a60b573f53604aac5e737984 (diff) |
Inching towards drev of build
Diffstat (limited to 'src/AST/Pretty.hs')
-rw-r--r-- | src/AST/Pretty.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/AST/Pretty.hs b/src/AST/Pretty.hs index ba1b756..1dc9dd3 100644 --- a/src/AST/Pretty.hs +++ b/src/AST/Pretty.hs @@ -133,6 +133,10 @@ ppExpr' d val = \case showString ("fold1 (\\" ++ name1 ++ " " ++ name2 ++ " -> ") . a' . showString ") " . b' + EUnit _ e -> do + e' <- ppExpr' 11 val e + return $ showParen (d > 10) $ showString "unit " . e' + EConst _ ty v -> return $ showString $ case ty of STI32 -> show v ; STI64 -> show v ; STF32 -> show v ; STF64 -> show v ; STBool -> show v @@ -176,12 +180,12 @@ ppExpr' d val = \case showString "with " . e1' . showString (" (\\" ++ name ++ " -> ") . e2' . showString ")" - EAccum e1 e2 e3 -> do + EAccum1 e1 e2 e3 -> do e1' <- ppExpr' 11 val e1 e2' <- ppExpr' 11 val e2 e3' <- ppExpr' 11 val e3 return $ showParen (d > 10) $ - showString "accum " . e1' . showString " " . e2' . showString " " . e3' + showString "accum1 " . e1' . showString " " . e2' . showString " " . e3' EError _ s -> return $ showParen (d > 10) $ showString ("error " ++ show s) |