Skip to content

let with no bindings in do notation causes parse error #373

@ndmitchell

Description

@ndmitchell

Originally from ndmitchell/hlint#368 by @bucklereed, taking:

foo = do
  let
  Just 3

bar :: ()
bar = ()

If I run with HSE:

Prelude Language.Haskell.Exts> parse "foo = do\n let\n Just 3\n\nbar :: ()\nbar = ()" :: ParseResult (Module SrcSpanInfo)
ParseFailed (SrcLoc "<unknown>.hs" 5 1) "Parse error: bar"

This works with GHC.

Metadata

Metadata

Assignees

No one assigned

    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