Skip to content

Parse error on empty GADT #122

@cotrone

Description

@cotrone

When running stylish-haskell on GADT with no constructors fails with a parse error:

ParseFailed (SrcLoc "<unknown>.hs" 4 1) "Parse error: virtual }"

The input was

{-# LANGUAGE GADTs #-}

data SomeGADT a where

It succeeds if the where clause is removed

{-# LANGUAGE GADTs #-}

data SomeGADT a

but the where clause is valid. Unsure where the code for the parser is is but I'll look in to finding it to see if I can fix it if it should be fixed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions