[GHC] #12772: (type f1 ~> f2 = forall a. f1 a -> f2 a) to core libraries

GHC ghc-devs at haskell.org
Thu Oct 27 23:32:44 UTC 2016


#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:

@@ -16,3 +16,0 @@
- mapFreeT :: (Functor f, Functor m)
-          => (forall a. m a -> m' a)
-          -> FreeT f m a -> FreeT f m' a

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
 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:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list