Haskell type-level projection -
is there way of defining type level projection without using type families?
i so:
{-# language typefamilies #-} type family project t :: * type instance project [r] = r ,
but ever use 1 instance of it.
you can use multiparamtypeclass
, functionaldependencies
, though without knowing why you're using it's hard if sufficient.
class project k | k -> instance project [r] r > :t undefined :: project string r => r undefined :: project string r => r :: char
Comments
Post a Comment