diff --git a/purescript.cabal b/purescript.cabal
--- a/purescript.cabal
+++ b/purescript.cabal
@@ -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
diff --git a/src/Language/PureScript/Sugar/CaseDeclarations.hs b/src/Language/PureScript/Sugar/CaseDeclarations.hs
--- a/src/Language/PureScript/Sugar/CaseDeclarations.hs
+++ b/src/Language/PureScript/Sugar/CaseDeclarations.hs
@@ -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]
