@@ -32,7 +32,7 @@ import Language.PureScript.Pretty.Common
32typeLiterals :: Pattern () Type String
32typeLiterals :: Pattern () Type String
33typeLiterals = mkPattern match
33typeLiterals = mkPattern match
35− match (Object row) = Just $ "{ " ++ prettyPrintObjectRow row ++ " }"
35+ match (Object row) = Just $ "{ " ++ prettyPrintRow row ++ " }"
36 match (TypeVar var) = Just var
36 match (TypeVar var) = Just var
37 match (PrettyPrintArray ty) = Just $ "[" ++ prettyPrintType ty ++ "]"
37 match (PrettyPrintArray ty) = Just $ "[" ++ prettyPrintType ty ++ "]"
38 match ty@(TypeConstructor ctor) = Just $ show ctor
38 match ty@(TypeConstructor ctor) = Just $ show ctor
@@ -41,12 +41,9 @@ typeLiterals = mkPattern match
41 match (ConstrainedType deps ty) = Just $ "(" ++ intercalate "," (map (\(pn, ty') -> show pn ++ " (" ++ prettyPrintType ty' ++ ")") deps) ++ ") => " ++ prettyPrintType ty
41 match (ConstrainedType deps ty) = Just $ "(" ++ intercalate "," (map (\(pn, ty') -> show pn ++ " (" ++ prettyPrintType ty' ++ ")") deps) ++ ") => " ++ prettyPrintType ty
42 match (SaturatedTypeSynonym name args) = Just $ show name ++ "<" ++ intercalate "," (map prettyPrintType args) ++ ">"
42 match (SaturatedTypeSynonym name args) = Just $ show name ++ "<" ++ intercalate "," (map prettyPrintType args) ++ ">"
43 match (ForAll ident ty _) = Just $ "forall " ++ ident ++ ". " ++ prettyPrintType ty
43 match (ForAll ident ty _) = Just $ "forall " ++ ident ++ ". " ++ prettyPrintType ty
44− match REmpty = Just $ "()"
44+ match REmpty = Just "()"
45 match row@(RCons _ _ _) = Just $ '(' : prettyPrintRow row ++ ")"
45 match row@(RCons _ _ _) = Just $ '(' : prettyPrintRow row ++ ")"
46 match _ = Nothing
46 match _ = Nothing
47− prettyPrintObjectRow REmpty = ""
48− prettyPrintObjectRow row@(RCons _ _ _) = prettyPrintRow row
49− prettyPrintObjectRow _ = error "Non-row type in Object"
52-- Generate a pretty-printed string representing a Row
49-- Generate a pretty-printed string representing a Row