summaryrefslogtreecommitdiff
path: root/src/LambdaCube/Compiler/DesugaredSource.hs
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-05-02 17:52:01 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-05-02 17:52:01 +0200
commit438e4a1b062a73b667adf0fd94167dcc311929d3 (patch)
treef2bed41f845106c51d36f048a0e23d5f27064fa2 /src/LambdaCube/Compiler/DesugaredSource.hs
parent769c7ac09e66bcae5ca34009734b5e184ce2e0f0 (diff)
more list syntax in pretty print
Diffstat (limited to 'src/LambdaCube/Compiler/DesugaredSource.hs')
-rw-r--r--src/LambdaCube/Compiler/DesugaredSource.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/LambdaCube/Compiler/DesugaredSource.hs b/src/LambdaCube/Compiler/DesugaredSource.hs
index 5d3a70f3..f0af5437 100644
--- a/src/LambdaCube/Compiler/DesugaredSource.hs
+++ b/src/LambdaCube/Compiler/DesugaredSource.hs
@@ -453,7 +453,7 @@ instance PShow Stmt where
453 pShow stmt = DResetFreshNames $ case stmt of 453 pShow stmt = DResetFreshNames $ case stmt of
454 Primitive n t -> shAnn (pShow n) (pShow t) 454 Primitive n t -> shAnn (pShow n) (pShow t)
455 Let n ty e -> DLet "=" (pShow n) $ maybe (pShow e) (\ty -> shAnn (pShow e) (pShow ty)) ty 455 Let n ty e -> DLet "=" (pShow n) $ maybe (pShow e) (\ty -> shAnn (pShow e) (pShow ty)) ty
456 Data n ps ty cs -> nest 2 $ "data" <+> nest 2 (shAnn (foldl dApp (DTypeNamespace True $ pShow n) [shAnn (text "_") (pShow t) | (v, t) <- ps]) (pShow ty)) </> "where" <> nest 2 (hardline <> vcat [shAnn (pShow n) $ pShow t | (n, t) <- cs]) 456 Data n ps ty cs -> nest 2 $ "data" <+> nest 2 (shAnn (foldl dApp (DTypeNamespace True $ pShow n) [shAnn (text "_") (pShow t) | (v, t) <- ps]) (pShow ty)) </> "where" <> nest 2 (hardline <> vcat [shAnn (pShow n) $ pShow $ UncurryS (first (const Hidden) <$> ps) t | (n, t) <- cs])
457 PrecDef n i -> pShow i <+> shortForm (pShow n) --DOp0 (sName n) i 457 PrecDef n i -> pShow i <+> shortForm (pShow n) --DOp0 (sName n) i
458 458
459instance DeBruijnify SIName Stmt where 459instance DeBruijnify SIName Stmt where