purescript 0.5.6.1 → 0.5.6.2
raw patch · 2 files changed
+4/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
purescript.cabal view
@@ -1,5 +1,5 @@ name: purescript-version: 0.5.6.1+version: 0.5.6.2 cabal-version: >=1.8 build-type: Custom license: MIT
src/Language/PureScript/Sugar/CaseDeclarations.hs view
@@ -19,6 +19,7 @@ desugarCasesModule ) where +import Data.Maybe (isJust) import Data.Monoid ((<>)) import Data.List (nub, groupBy) @@ -85,11 +86,11 @@ body = foldr (Abs . Left) val args guardWith (strMsg "Overlapping function argument names") $ length (nub args) == length args return [ValueDeclaration ident nameKind [] Nothing body]-toDecls ds@(ValueDeclaration ident _ bs _ _ : _) = do+toDecls ds@(ValueDeclaration ident _ bs g _ : _) = do let tuples = map toTuple ds unless (all ((== length bs) . length . fst) tuples) $ throwError $ mkErrorStack ("Argument list lengths differ in declaration " ++ show ident) Nothing- unless (not $ null bs) $+ unless (not (null bs) || isJust g) $ throwError $ mkErrorStack ("Top level case disallowed in declaration " ++ show ident) Nothing caseDecl <- makeCaseDeclaration ident tuples return [caseDecl]