$ cat test.hs
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
module Vec where
import Data.Kind
data Ze
data Su n
data Vec
:: Type
-> Type
-> Type
where
Nil :: Vec a Ze
Cons :: a -> Vec a n -> Vec a (Su n)
$ ormolu test.hs
test.hs:13:1
Parsing of formatted code failed: parse error (possibly incorrect indentation or mismatched brackets)
$ ormolu -u test.hs
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
module Vec where
import Data.Kind
data Ze
data Su n
data Vec :: Type ->
Type ->
Type where
Nil :: Vec a Ze
Cons :: a -> Vec a n -> Vec a (Su n)
Expected behavior
The code should be formatted to parseable code (with the same AST).
Describe the bug
With hanging kind signatures
ormolu formats to unparseable code.
To Reproduce
Expected behavior The code should be formatted to parseable code (with the same AST).
Environment current master (post-0.2) on macos