git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Remove type annotation in pretty print + add exhaustivity checker case
5618f8eBenjamin Kovach
src/Language/PureScript/Linter/Exhaustive.hs+1
@@ -160,6 +160,7 @@ missingCasesSingle _ _ (BooleanBinder bl) (BooleanBinder br)
160 | bl == br = ([], return True)
160 | bl == br = ([], return True)
161 | otherwise = ([BooleanBinder bl], return False)
161 | otherwise = ([BooleanBinder bl], return False)
162missingCasesSingle env mn b (PositionedBinder _ _ cb) = missingCasesSingle env mn b cb
162missingCasesSingle env mn b (PositionedBinder _ _ cb) = missingCasesSingle env mn b cb
163+missingCasesSingle env mn b (TypedBinder _ cb) = missingCasesSingle env mn b cb
163missingCasesSingle _ _ b _ = ([b], Left Unknown)
164missingCasesSingle _ _ b _ = ([b], Left Unknown)
164
165
165-- |
166-- |
src/Language/PureScript/Pretty/Values.hs+2−3
@@ -28,7 +28,7 @@ import Control.Arrow (second)
28import Language.PureScript.AST
28import Language.PureScript.AST
29import Language.PureScript.Names
29import Language.PureScript.Names
30import Language.PureScript.Pretty.Common
30import Language.PureScript.Pretty.Common
31−import Language.PureScript.Pretty.Types (typeAsBox, typeAtomAsBox, prettyPrintType)
31+import Language.PureScript.Pretty.Types (typeAsBox, typeAtomAsBox)
32
32
33import Text.PrettyPrint.Boxes
33import Text.PrettyPrint.Boxes
34
34
@@ -160,6 +160,5 @@ prettyPrintBinder :: Binder -> String
160prettyPrintBinder (ConstructorBinder ctor []) = runProperName (disqualify ctor)
160prettyPrintBinder (ConstructorBinder ctor []) = runProperName (disqualify ctor)
161prettyPrintBinder (ConstructorBinder ctor args) = runProperName (disqualify ctor) ++ " " ++ unwords (map prettyPrintBinderAtom args)
161prettyPrintBinder (ConstructorBinder ctor args) = runProperName (disqualify ctor) ++ " " ++ unwords (map prettyPrintBinderAtom args)
162prettyPrintBinder (PositionedBinder _ _ binder) = prettyPrintBinder binder
162prettyPrintBinder (PositionedBinder _ _ binder) = prettyPrintBinder binder
163−prettyPrintBinder (TypedBinder ty binder) =
163+prettyPrintBinder (TypedBinder _ binder) = prettyPrintBinder binder
164− prettyPrintBinder binder ++ " :: " ++ prettyPrintType ty
165prettyPrintBinder b = prettyPrintBinderAtom b
164prettyPrintBinder b = prettyPrintBinderAtom b