Hello,
I’m learning Type Families of Haskell now.And in GHC’s related docs ,it has example like this:
data family GMap k :: Type -> Type
And I have got the annotation Type
is supported by language extension [PolyKinds](https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/poly_kinds.html)
now.But when I try the code above like this:
{-# LANGUAGE PolyKinds,TypeFamilies,DataKinds #-}
data family GMap k :: Type -> Type
It throw errors:
temp.hs:3:23: error: Not in scope: type constructor or class ‘Type’
|
3 | data family GMap k :: Type -> Type
That makes me confused.Could someone tell me why?