on master help sign in
Prettier error on mutually recursive type aliases
702f99cEvan Czaplicki
compiler/Transform/Canonicalize/Setup.hs+2−2
@@ -166,9 +166,9 @@ addTypeAliases moduleName nodes environ =
166 datatype (n,ts,t) = D.Datatype n ts [(n,[t])]
166 datatype (n,ts,t) = D.Datatype n ts [(n,[t])]
167
167
168 indented :: [D.ValidDecl] -> Doc
168 indented :: [D.ValidDecl] -> Doc
169− indented decls = P.vcat (map prty decls)
169+ indented decls = P.vcat (map prty decls) <> P.text "\n"
170 where
170 where
171− prty decl = P.text "\n " <> pretty decl <> P.text "\n"
171+ prty decl = P.text "\n " <> pretty decl
172
172
173 msg1 = "The following type aliases are mutually recursive, forming an \
173 msg1 = "The following type aliases are mutually recursive, forming an \
174 \infinite type. When you expand them, they just keep getting bigger:"
174 \infinite type. When you expand them, they just keep getting bigger:"