[GHC] #15016: Referencing a do-bound variable in a rec block with ApplicativeDo results in variable not in scope during type checking

GHC ghc-devs at haskell.org
Wed Apr 11 12:53:29 UTC 2018


#15016: Referencing a do-bound variable in a rec block with ApplicativeDo results
in variable not in scope during type checking
-------------------------------------+-------------------------------------
        Reporter:  rjmk              |                Owner:  sighingnow
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.4.3
       Component:  Compiler          |              Version:  8.2.2
      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 rjmk):

 I'm not sure I understand you correctly when you say

 > When we use rec in do blocks, rather than mdo blocks, the outer
 variables won't be included into the scope of rec block.

 so this may not be relevant, but removing the ApplicativeDo allows the
 code to compile.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15016#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list