git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix prettyprinting of dictionaries
d81ea93Gary Burgess
src/Language/PureScript/Pretty/Values.hs+2−2
@@ -29,7 +29,7 @@ import Control.Applicative
29import Language.PureScript.AST
29import Language.PureScript.AST
30import Language.PureScript.Names
30import Language.PureScript.Names
31import Language.PureScript.Pretty.Common
31import Language.PureScript.Pretty.Common
32−import Language.PureScript.Pretty.Types (prettyPrintType)
32+import Language.PureScript.Pretty.Types (prettyPrintType, prettyPrintTypeAtom)
33
33
34literals :: Pattern PrinterState Expr String
34literals :: Pattern PrinterState Expr String
35literals = mkPattern' match
35literals = mkPattern' match
@@ -76,7 +76,7 @@ literals = mkPattern' match
76 ]
76 ]
77 match (OperatorSection op (Right val)) = return $ "(" ++ prettyPrintValue op ++ " " ++ prettyPrintValue val ++ ")"
77 match (OperatorSection op (Right val)) = return $ "(" ++ prettyPrintValue op ++ " " ++ prettyPrintValue val ++ ")"
78 match (OperatorSection op (Left val)) = return $ "(" ++ prettyPrintValue val ++ " " ++ prettyPrintValue op ++ ")"
78 match (OperatorSection op (Left val)) = return $ "(" ++ prettyPrintValue val ++ " " ++ prettyPrintValue op ++ ")"
79− match (TypeClassDictionary name _ _) = return $ "<<dict " ++ show name ++ ">>"
79+ match (TypeClassDictionary _ (name, tys) _) = return $ "<<dict " ++ show name ++ " " ++ unwords (map prettyPrintTypeAtom tys) ++ ">>"
80 match (SuperClassDictionary name _) = return $ "<<superclass dict " ++ show name ++ ">>"
80 match (SuperClassDictionary name _) = return $ "<<superclass dict " ++ show name ++ ">>"
81 match (TypedValue _ val _) = prettyPrintValue' val
81 match (TypedValue _ val _) = prettyPrintValue' val
82 match (PositionedValue _ _ val) = prettyPrintValue' val
82 match (PositionedValue _ _ val) = prettyPrintValue' val