[GHC] #12418: Make `MonadCont (ContT r m)` polykinded (r::k), (m::k -> Type)
GHC
ghc-devs at haskell.org
Thu Aug 11 11:37:35 UTC 2016
#12418: Make `MonadCont (ContT r m)` polykinded (r::k), (m::k -> Type)
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Core Libraries | 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: |
-------------------------------------+-------------------------------------
Comment (by Iceland_jack):
Replying to [comment:7 ekmett]:
> @Iceland_jack, I'm sorry, but would you object terribly strongly to that
resolution?
I would not, I didn't expect such far-reaching implications.
{{{#!hs
label :: ContT r m (ContT r m a)
label = callCC $ \k -> [ m | let m = k m ]
}}}
It's unfortunate that `↑` doesn't type check with `PolyKinds` and that the
inferred type of `↓` doesn't either, that's somewhat rare
{{{#!hs
-- foo :: Cont r m a
foo = do
l <- label
l
}}}
but seems like it can't be helped.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12418#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list