[GHC] #13026: RFC functions for sums and products
GHC
ghc-devs at haskell.org
Wed Dec 28 08:09:51 UTC 2016
#13026: RFC functions for sums and products
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: libraries/base | 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):
Here is an interesting one, witnessing the isomorphism between `Sum
Identity` and
[https://hackage.haskell.org/package/transformers-0.3.0.0/docs/Control-
Applicative-Lift.html Control.Applicative.Lift.Lift]
{{{#!hs
toLift :: Sum Identity g ~> Lift g
toLift = \case
InL (Identity a) -> Pure a
InR ga -> Other ga
}}}
if it ever gets added to ''base''.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13026#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list