ekmett / kan-extensions

Kan extensions, Kan lifts, the Yoneda lemma, and (co)monads generated by a functor
Other
78 stars 33 forks source link

Make ‘Ran’, ‘Lan’ kind polymorphic #31

Closed Icelandjack closed 7 years ago

Icelandjack commented 7 years ago
data Lan :: (k -> Type) -> (k -> Type) -> (Type -> Type) where
  Lan :: (g b -> a) -> (h b) -> Lan g h a

newtype Ran :: (k -> Type) -> (k -> Type) -> (Type -> Type) where
  Ran :: { runRan :: forall b. (a -> g b) -> h b } -> Ran g h a
RyanGlScott commented 7 years ago

Sounds reasonable. Pull requests welcome.

RyanGlScott commented 7 years ago

Fixed in #40.