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

Indentation errors when using TypeFamilies

Open hellwolf opened this issue 2 years ago • 0 comments

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

hellwolf avatar Jul 12 '22 17:07 hellwolf