Deriving tagged instances requires the PolyKinds or TypeInType extension to be enabled. E.g. the following code
newtype MyState a = MyState (State Int a)
deriving (Functor, Applicative, Monad)
deriving (HasState "foo" Int) via
MonadState (State Int)
raises compiler errors of the form
Illegal kind: ([] :: [] ghc-prim-0.5.3:GHC.Types.RuntimeRep)
Did you mean to enable PolyKinds?
This is likely due to the use of Proxy# in HasState's methods. #15073 might be related.
Having to enable PolyKinds can be a nuisance, because it may require the user to provide additional kind signatures in the affected module. See #4 (comment).
Deriving tagged instances requires the
PolyKindsorTypeInTypeextension to be enabled. E.g. the following coderaises compiler errors of the form
This is likely due to the use of
Proxy#inHasState's methods. #15073 might be related.Having to enable
PolyKindscan be a nuisance, because it may require the user to provide additional kind signatures in the affected module. See #4 (comment).