stylish-haskell icon indicating copy to clipboard operation
stylish-haskell copied to clipboard

Parser errors for `newtype` GADTs

Open riz0id opened this issue 2 years ago • 0 comments

Attempting to format a newtype with -XGADTSyntax or -XGADTs such as:

import Data.Kind

newtype T (a :: Type) :: Type where 
  T :: {unT :: a -> a} -> T a 

fails for stylish-haskell-0.14.3.0 with the following error:

CallStack (from HasCallStack):
  error, called at lib/Language/Haskell/Stylish/Step/Data.hs:463:5 in stylish-haskell-0.14.3.0:Language.Haskell.Stylish.Step.Data

The failure is due to this line.

riz0id avatar Jan 20 '23 20:01 riz0id