@@ -32,7 +32,7 @@ import Language.PureScript.Pretty.Common
3232typeLiterals :: Pattern () Type String
3333typeLiterals = mkPattern match
3434 where
35− match (Object row) = Just $ "{ " ++ prettyPrintType row ++ " }"
35+ match (Object row) = Just $ "{ " ++ prettyPrintObjectRow row ++ " }"
3636 match (TypeVar var) = Just var
3737 match (PrettyPrintArray ty) = Just $ "[" ++ prettyPrintType ty ++ "]"
3838 match ty@(TypeConstructor ctor) = Just $ show ctor
@@ -41,9 +41,12 @@ typeLiterals = mkPattern match
4141 match (ConstrainedType deps ty) = Just $ "(" ++ intercalate "," (map (\(pn, ty') -> show pn ++ " (" ++ prettyPrintType ty' ++ ")") deps) ++ ") => " ++ prettyPrintType ty
4242 match (SaturatedTypeSynonym name args) = Just $ show name ++ "<" ++ intercalate "," (map prettyPrintType args) ++ ">"
4343 match (ForAll ident ty _) = Just $ "forall " ++ ident ++ ". " ++ prettyPrintType ty
44− match REmpty = Just $ prettyPrintRow REmpty
45− match row@(RCons _ _ _) = Just $ prettyPrintRow row
44+ match REmpty = Just $ "()"
45+ match row@(RCons _ _ _) = Just $ '(' : prettyPrintRow row ++ ")"
4646 match _ = Nothing
47+ prettyPrintObjectRow REmpty = ""
48+ prettyPrintObjectRow row@(RCons _ _ _) = prettyPrintRow row
49+ prettyPrintObjectRow _ = error "Non-row type in Object"
4750
4851-- |
4952-- Generate a pretty-printed string representing a Row