
#12772: (type f1 ~> f2 = forall a. f1 a -> f2 a) to core libraries -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by Iceland_jack: @@ -15,1 +15,1 @@ - -> (Lift f a -> Lift g a) + -> Lift f a -> Lift g a @@ -18,1 +18,1 @@ - -> (FreeT f m a -> FreeT f m' a) + -> FreeT f m a -> FreeT f m' a @@ -21,1 +21,1 @@ - -> (FreeT f m a -> FreeT f m' a) + -> FreeT f m a -> FreeT f m' a @@ -23,1 +23,1 @@ - -> (Vec a n -> Vec a' n) + -> Vec a n -> Vec a' n @@ -28,1 +28,1 @@ - -> (t m b -> t n b) + -> t m b -> t n b @@ -36,2 +36,2 @@ - mapLift :: (f ~> g) - -> (Lift f ~> Lift g) + mapLift :: f ~> g + -> Lift f ~> Lift g @@ -39,2 +39,2 @@ - => (m ~> m') - -> (FreeT f m ~> FreeT f m') + => m ~> m' + -> FreeT f m ~> FreeT f m' @@ -42,1 +42,1 @@ - -> (Vec a ~> Vec a') + -> Vec a ~> Vec a' @@ -46,2 +46,2 @@ - => (m ~> n) - -> (t m ~> t n) + => m ~> n + -> t m ~> t n New description: Is this something that belongs to core libraries (it has other names in the wild, `:~>`, `Natural`..) {{{#!hs type f1 ~> f2 = forall a. f1 a -> f2 a }}} I use it all the time and end up redefining it (it is such a short type that maybe it's not worth it) {{{#!hs unLift :: Applicative f => Lift f a -> f a mapLift :: (f a -> g a) -> Lift f a -> Lift g a mapFreeT :: (Functor f, Functor m) => (forall a. m a -> m' a) -> FreeT f m a -> FreeT f m' a mapFreeT :: (Functor f, Functor m) => (forall a. m a -> m' a) -> FreeT f m a -> FreeT f m' a vmap :: (a -> a') -> Vec a n -> Vec a' n liftIO :: MonadIO m => IO a -> m a hoist :: Monad m => (forall a. m a -> n a) -> t m b -> t n b }}} becomes {{{#!hs unLift :: Applicative f => Lift f ~> f mapLift :: f ~> g -> Lift f ~> Lift g mapFreeT :: (Functor f, Functor m) => m ~> m' -> FreeT f m ~> FreeT f m' vmap :: (a -> a') -> Vec a ~> Vec a' liftIO :: MonadIO m => IO ~> m hoist :: Monad m => m ~> n -> t m ~> t n }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12772#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler