GHC parses the following file just fine, but using haskell-src-exts' parseFile results in a Parse Error:
{-# LANGUAGE TypeFamilies #-}
type family Test where
If you add a line like
Test = ()
To the end of this file, parseFile works.
Empty closed type families can be useful when the return type is void, as in
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
import Data.Type.Equality
import Data.Void
type family OneIsn'tZero (p :: 1 :~: 0) :: Void where
GHC parses the following file just fine, but using haskell-src-exts'
parseFile
results in a Parse Error:If you add a line like
To the end of this file,
parseFile
works.Empty closed type families can be useful when the return type is void, as in
This is also how I encountered this bug.
This might be related to https://github.com/haskell-suite/haskell-src-exts/issues/358
Version: Both 1.21.0 on hackage and the master branch.