git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #654 from purescript/649
4423b8cPhil Freeman
src/Language/PureScript/Sugar/CaseDeclarations.hs+1−1
@@ -91,7 +91,7 @@ toDecls ds@(ValueDeclaration ident _ bs g _ : _) = do
91 unless (all ((== length bs) . length . fst) tuples) $
91 unless (all ((== length bs) . length . fst) tuples) $
92 throwError $ mkErrorStack ("Argument list lengths differ in declaration " ++ show ident) Nothing
92 throwError $ mkErrorStack ("Argument list lengths differ in declaration " ++ show ident) Nothing
93 unless (not (null bs) || isJust g) $
93 unless (not (null bs) || isJust g) $
94− throwError $ mkErrorStack ("Top level case disallowed in declaration " ++ show ident) Nothing
94+ throwError $ mkErrorStack ("Duplicate value declaration '" ++ show ident ++ "'") Nothing
95 caseDecl <- makeCaseDeclaration ident tuples
95 caseDecl <- makeCaseDeclaration ident tuples
96 return [caseDecl]
96 return [caseDecl]
97toDecls (PositionedDeclaration pos d : ds) = do
97toDecls (PositionedDeclaration pos d : ds) = do