[GHC] #11740: RFC kind synonyms
GHC
ghc-devs at haskell.org
Fri Sep 2 16:51:04 UTC 2016
#11740: RFC kind synonyms
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Resolution: wontfix | 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: |
-------------------------------------+-------------------------------------
Comment (by Iceland_jack):
{{{#!hs
type Monadish = Type -> Type
type Transformer = Monadish -> Monadish
}}}
with many examples from Edward's work on
[https://www.reddit.com/r/haskell/comments/50rxci/edward_kmett_monad_homomorphisms_google_tech_talk/d76tmnm
monad morphisms]
{{{#!hs
newtype Tensor :: Transformer -> Transformer -> Transformer where
Tensor :: s (t m) a -> Tensor s t m a
class MonadTrans (t :: Transformer)
class Commute (s :: Transformer) (t :: Transformer) where
commute :: Monad m => s (t m) a -> t (s m) a
newtype StateT s :: Transformer where
StateT :: (s -> m (a, s)) -> StateT s m a
newtype WriterT w :: Transformer where
WriterT :: m (a, w) -> WriterT w m a
}}}
etc.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11740#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list