[Haskell-cafe] higher kind in parametric type

Vanessa McHale vanessa.mchale at iohk.io
Wed Jul 11 19:42:22 UTC 2018


It seems to work with the latest GHC (8.4.3). GHC 7.4.2 is six years old :)


On 07/11/2018 02:15 PM, Olaf Klinke wrote:
> {-# LANGUAGE MultiParamTypeClasses #-}
> {-# LANGUAGE FunctionalDependencies #-}
> {-# LANGUAGE KindSignatures #-}
> {-# LANGUAGE PolyKinds #-}
>
> newtype Heading (f :: k) (p :: * -> *) = Heading (p String)
>
>
> class Config (p :: * -> *) (f :: (* -> *) -> *) | f -> p where
>  foo :: Heading f p -> String
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180711/a7bb5832/attachment.sig>


More information about the Haskell-Cafe mailing list