haskell / haskell/haskell-mode
Indentation errors when using TypeFamilies
- Dominant language
- Emacs Lisp
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 2
Description
I am using the default `haskell-indentation-mode`, it seems to me that the parser doesn't not understand associated type family/data family in general and tries to reindent everything from the beginning of the line after the first "type|data family" declaration.
Example:
```haskell
import Data.Kind (Type)
class A a where
type family T1 a :: Type
-- from here on until the end of type class, the indentation breaks
type family T2 a :: Type
f :: a -> T1 a -> T2 a
data AA
instance A AA where
type T1 AA = String
-- from here on until the end of type class, the indentation breaks
type T2 AA = Int
f _ = length
```
Contributor guide
Assessment
This issue has not been assessed yet.