git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Support new location of `otherwise` in exhaustivity checker
commit5a3cb289b96667a9844d9ca39c83c8478cb6949f authorGary Burgess <gary.burgess@gmail.com> dateFri 22 Jan 2016, 02:39 (11 years ago) parent0431499
1 file changed+1
src/Language/PureScript/Linter/Exhaustive.hs+1
src/Language/PureScript/Linter/Exhaustive.hs+1
@@ -203,6 +203,7 @@ isExhaustiveGuard (Left gs) = not . null $ filter (\(g, _) -> isOtherwise g) gs
203203 isOtherwise :: Expr -> Bool
204204 isOtherwise (TypedValue _ (BooleanLiteral True) _) = True
205205 isOtherwise (TypedValue _ (Var (Qualified (Just (ModuleName [ProperName "Prelude"])) (Ident "otherwise"))) _) = True
206+ isOtherwise (TypedValue _ (Var (Qualified (Just (ModuleName [ProperName "Data", ProperName "Boolean"])) (Ident "otherwise"))) _) = True
206207 isOtherwise _ = False
207208isExhaustiveGuard (Right _) = True
208209