@@ -106,7 +106,7 @@ isExported (Just exps) decl = any (matches decl) exps
106106 where
107107 matches (P.TypeDeclaration ident _) (P.ValueRef ident') = ident == ident'
108108 matches (P.ExternDeclaration _ ident _ _) (P.ValueRef ident') = ident == ident'
109− matches (P.DataDeclaration ident _ _) (P.TypeRef ident' _) = ident == ident'
109+ matches (P.DataDeclaration _ ident _ _) (P.TypeRef ident' _) = ident == ident'
110110 matches (P.ExternDataDeclaration ident _) (P.TypeRef ident' _) = ident == ident'
111111 matches (P.TypeSynonymDeclaration ident _ _) (P.TypeRef ident' _) = ident == ident'
112112 matches (P.TypeClassDeclaration ident _ _ _) (P.TypeClassRef ident') = ident == ident'
@@ -138,10 +138,10 @@ renderDeclaration n _ (P.TypeDeclaration ident ty) =
138138 atIndent n $ show ident ++ " :: " ++ prettyPrintType' ty
139139renderDeclaration n _ (P.ExternDeclaration _ ident _ ty) =
140140 atIndent n $ show ident ++ " :: " ++ prettyPrintType' ty
141−renderDeclaration n exps (P.DataDeclaration name args ctors) = do
141+renderDeclaration n exps (P.DataDeclaration dtype name args ctors) = do
142142 let typeName = P.runProperName name ++ (if null args then "" else " " ++ unwords args)
143143 let exported = filter (isDctorExported name exps . fst) ctors
144− atIndent n $ "data " ++ typeName ++ (if null exported then "" else " where")
144+ atIndent n $ show dtype ++ " " ++ typeName ++ (if null exported then "" else " where")
145145 forM_ exported $ \(ctor, tys) ->
146146 atIndent (n + 2) $ P.runProperName ctor ++ " :: " ++ concatMap (\ty -> prettyPrintType' ty ++ " -> ") tys ++ typeName
147147renderDeclaration n _ (P.ExternDataDeclaration name kind) =
@@ -168,14 +168,14 @@ prettyPrintType' :: P.Type -> String
168168prettyPrintType' = P.prettyPrintType . P.everywhereOnTypes dePrim
169169 where
170170 dePrim ty@(P.TypeConstructor (P.Qualified _ name))
171− | ty == P.tyBoolean || ty == P.tyNumber || ty == P.tyString =
171+ | ty == P.tyBoolean || ty == P.tyNumber || ty == P.tyString =
172172 P.TypeConstructor $ P.Qualified Nothing name
173173 dePrim other = other
174174
175175getName :: P.Declaration -> String
176176getName (P.TypeDeclaration ident _) = show ident
177177getName (P.ExternDeclaration _ ident _ _) = show ident
178−getName (P.DataDeclaration name _ _) = P.runProperName name
178+getName (P.DataDeclaration _ name _ _) = P.runProperName name
179179getName (P.ExternDataDeclaration name _) = P.runProperName name
180180getName (P.TypeSynonymDeclaration name _ _) = P.runProperName name
181181getName (P.TypeClassDeclaration name _ _ _) = P.runProperName name