-
Notifications
You must be signed in to change notification settings - Fork 85
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
With hanging kind signatures
data Thing
:: Type
-> Type
ormolu formats to unparseable code.
To Reproduce
$ 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).
Environment
current master (post-0.2) on macos
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working