summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilFreeman <>2014-10-06 16:01:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2014-10-06 16:01:00 (GMT)
commit471ca956685a226af1c5c8734f340c50bf74051b (patch)
treef29bd6e9f84c9e63c8122972be6444c9cbeac76b
parenta2194c2f01c27a565573668f0a42cbbe76ffcbe9 (diff)
version 0.5.6.30.5.6.3
-rw-r--r--docgen/Main.hs10
-rw-r--r--purescript.cabal2
2 files changed, 7 insertions, 5 deletions
diff --git a/docgen/Main.hs b/docgen/Main.hs
index da98d75..d3d5ccb 100644
--- a/docgen/Main.hs
+++ b/docgen/Main.hs
@@ -1,4 +1,4 @@
------------------------------------------------------------------------------
+----------------------------------------------------------------------------
--
-- Module : Main
-- Copyright : (c) Phil Freeman 2013
@@ -140,11 +140,13 @@ renderDeclaration n _ (P.TypeDeclaration ident ty) =
renderDeclaration n _ (P.ExternDeclaration _ ident _ ty) =
atIndent n $ show ident ++ " :: " ++ prettyPrintType' ty
renderDeclaration n exps (P.DataDeclaration dtype name args ctors) = do
- let typeName = P.runProperName name ++ (if null args then "" else " " ++ unwords args)
- let exported = filter (isDctorExported name exps . fst) ctors
+ let
+ typeApp = foldl P.TypeApp (P.TypeConstructor (P.Qualified Nothing name)) (map P.TypeVar args)
+ typeName = prettyPrintType' typeApp
+ exported = filter (isDctorExported name exps . fst) ctors
atIndent n $ show dtype ++ " " ++ typeName ++ (if null exported then "" else " where")
forM_ exported $ \(ctor, tys) ->
- let ctorTy = foldr P.function (P.TypeConstructor (P.Qualified Nothing name)) tys
+ let ctorTy = foldr P.function typeApp tys
in atIndent (n + 2) $ P.runProperName ctor ++ " :: " ++ prettyPrintType' ctorTy
renderDeclaration n _ (P.ExternDataDeclaration name kind) =
atIndent n $ "data " ++ P.runProperName name ++ " :: " ++ P.prettyPrintKind kind
diff --git a/purescript.cabal b/purescript.cabal
index 1fac9c2..8fb3219 100644
--- a/purescript.cabal
+++ b/purescript.cabal
@@ -1,5 +1,5 @@
name: purescript
-version: 0.5.6.2
+version: 0.5.6.3
cabal-version: >=1.8
build-type: Custom
license: MIT