@@ -45,15 +45,17 @@ typeLiterals = mkPattern match
45 match (TypeConstructor ctor) = Just $ text $ runProperName $ disqualify ctor
45 match (TypeConstructor ctor) = Just $ text $ runProperName $ disqualify ctor
46 match (TUnknown u) = Just $ text $ '_' : show u
46 match (TUnknown u) = Just $ text $ '_' : show u
47 match (Skolem name s _) = Just $ text $ name ++ show s
47 match (Skolem name s _) = Just $ text $ name ++ show s
48− match (ConstrainedType deps ty) = Just $ constraintsAsBox deps `before` (text ") => " <> typeAsBox ty)
48+ match (ConstrainedType deps ty) = Just $ constraintsAsBox deps ty
49 match REmpty = Just $ text "()"
49 match REmpty = Just $ text "()"
50 match row@RCons{} = Just $ prettyPrintRowWith '(' ')' row
50 match row@RCons{} = Just $ prettyPrintRowWith '(' ')' row
51 match _ = Nothing
51 match _ = Nothing
53−constraintsAsBox :: [(Qualified ProperName, [Type])] -> Box
53+constraintsAsBox :: [(Qualified ProperName, [Type])] -> Type -> Box
54+constraintsAsBox [(pn, tys)] ty = text "(" <> constraintAsBox pn tys <> text ") => " <> typeAsBox ty
54−constraintsAsBox = vcat left . zipWith (\i (pn, tys) -> text (if i == 0 then "( " else ", ") <> constraintAsBox pn tys) [0 :: Int ..]
55+constraintsAsBox xs ty = vcat left (zipWith (\i (pn, tys) -> text (if i == 0 then "( " else ", ") <> constraintAsBox pn tys) [0 :: Int ..] xs) `before` (text ") => " <> typeAsBox ty)
57+constraintAsBox :: Qualified ProperName -> [Type] -> Box
56− constraintAsBox pn tys = hsep 1 left (text (runProperName (disqualify pn)) : map typeAtomAsBox tys)
58+constraintAsBox pn tys = hsep 1 left (text (runProperName (disqualify pn)) : map typeAtomAsBox tys)
59-- Generate a pretty-printed string representing a Row
61-- Generate a pretty-printed string representing a Row