haskell-mode
haskell-mode copied to clipboard
Indentation errors when using TypeFamilies
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:
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