Skip to content

Commit d81ea93

Browse files
committed
Fix prettyprinting of dictionaries
1 parent edcefcb commit d81ea93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Language/PureScript/Pretty/Values.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import Control.Applicative
2929
import Language.PureScript.AST
3030
import Language.PureScript.Names
3131
import Language.PureScript.Pretty.Common
32-
import Language.PureScript.Pretty.Types (prettyPrintType)
32+
import Language.PureScript.Pretty.Types (prettyPrintType, prettyPrintTypeAtom)
3333

3434
literals :: Pattern PrinterState Expr String
3535
literals = mkPattern' match
@@ -76,7 +76,7 @@ literals = mkPattern' match
7676
]
7777
match (OperatorSection op (Right val)) = return $ "(" ++ prettyPrintValue op ++ " " ++ prettyPrintValue val ++ ")"
7878
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) ++ ">>"
8080
match (SuperClassDictionary name _) = return $ "<<superclass dict " ++ show name ++ ">>"
8181
match (TypedValue _ val _) = prettyPrintValue' val
8282
match (PositionedValue _ _ val) = prettyPrintValue' val

0 commit comments

Comments
 (0)