File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,8 @@ renderDeclaration n exps (P.DataDeclaration dtype name args ctors) = do
144144 let exported = filter (isDctorExported name exps . fst ) ctors
145145 atIndent n $ show dtype ++ " " ++ typeName ++ (if null exported then " " else " where" )
146146 forM_ exported $ \ (ctor, tys) ->
147- atIndent (n + 2 ) $ P. runProperName ctor ++ " :: " ++ concatMap (\ ty -> prettyPrintType' ty ++ " -> " ) tys ++ typeName
147+ let ctorTy = foldr P. function (P. TypeConstructor (P. Qualified Nothing name)) tys
148+ in atIndent (n + 2 ) $ P. runProperName ctor ++ " :: " ++ prettyPrintType' ctorTy
148149renderDeclaration n _ (P. ExternDataDeclaration name kind) =
149150 atIndent n $ " data " ++ P. runProperName name ++ " :: " ++ P. prettyPrintKind kind
150151renderDeclaration n _ (P. TypeSynonymDeclaration name args ty) = do
You can’t perform that action at this time.
0 commit comments