Skip to content

Empty case without {} #469

@nomeata

Description

@nomeata

GHC accepts this file, using EmptyCase with “implicit” braces for:

{-# LANGUAGE EmptyCase #-}

foo b = case b of

With haskell-src-exts, I get

ghci> Language.Haskell.Exts.parseFile "/tmp/Test.hs"
ParseFailed (SrcLoc "/tmp/Test.hs" 4 12) "Parse error: ;"

It works if I write

{-# LANGUAGE EmptyCase #-}

foo b = case b of {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions