git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #654 from purescript/649

Tweak error message for nullary top level cases

commit4423b8c56568c2dd899dab4e4ef2833c01c5f42a authorPhil Freeman <paf31@cantab.net> dateTue 28 Oct 2014, 16:00 (12 years ago) parentd88199e74b628d
1 file changed+1−1
src/Language/PureScript/Sugar/CaseDeclarations.hs+1−1
src/Language/PureScript/Sugar/CaseDeclarations.hs+1−1
@@ -91,7 +91,7 @@ toDecls ds@(ValueDeclaration ident _ bs g _ : _) = do
9191 unless (all ((== length bs) . length . fst) tuples) $
9292 throwError $ mkErrorStack ("Argument list lengths differ in declaration " ++ show ident) Nothing
9393 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
9595 caseDecl <- makeCaseDeclaration ident tuples
9696 return [caseDecl]
9797toDecls (PositionedDeclaration pos d : ds) = do