[GHC] #11982: Typechecking fails for parallel monad comprehensions with polymorphic let (GHC 7.10.3 through 8.6.3)

GHC ghc-devs at haskell.org
Fri Jan 25 19:05:26 UTC 2019


#11982: Typechecking fails for parallel monad comprehensions with polymorphic let
(GHC 7.10.3 through 8.6.3)
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  josefs
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:  ApplicativeDo
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by vdukhovni):

 Indeed changing the last line from:
 {{{
     f line locker
 }}}
 to
 {{{
     ret <- f line locker
     return ret
 }}}
 resolves the bug for my code example. I hope this generalizes. Don't know
 how it applies to the original parallel list comprehension example.

 I did not expect the "where" alternative to generalize, but note that in
 this case I was able to arrange for all the relevant variables to be in
 scope by passing them into a closure precisely for that purpose. The idea
 was mostly to highlight the discrepancy in the behaviour between a "let"
 and a "where" that should ideally behave identically.

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


More information about the ghc-tickets mailing list