Re: [GHC] #7828: RebindableSyntax and Arrow

#7828: RebindableSyntax and Arrow ----------------------------------------------+---------------------------- Reporter: AlessandroVermeulen | Owner: Type: bug | jstolarek Priority: normal | Status: new Component: Compiler (Type checker) | Milestone: 7.10.1 Resolution: | Version: 7.6.2 Operating System: Unknown/Multiple | Keywords: Type of failure: GHC rejects valid program | Architecture: Test Case: | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: #1537, | #3613 ----------------------------------------------+---------------------------- Comment (by ross): Replying to [comment:39 jstolarek]:
Replying to [comment:17 ross]:
Here's a different suggestion for rebinding that is perhaps more analogous to the expression case. We could consider do and if commands as sugar for more primitive commands: {{{ do { rec { ss }; ss' } = do { vs <- (| fixA (\ ~vs -> do { ss; returnA -< vs })|); ss' } }}}
Can the desugaring of `rec` be viewed as:
{{{ do { rec { ss }; ss' } = (| fixA (\ ~vs -> do { ss; returnA -< vs })|) `bind` \ vs -> do { ss' } }}}
?
Yes, that's a combination of the above and the rule for `<-`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/7828#comment:40 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC