[GHC] #9773: Binding ImplicitParams in lambda results in parse error

GHC ghc-devs at haskell.org
Wed Nov 5 10:50:53 UTC 2014


#9773: Binding ImplicitParams in lambda results in parse error
-------------------------------------+-------------------------------------
              Reporter:              |            Owner:
  SimonHengel                        |           Status:  closed
                  Type:  bug         |        Milestone:
              Priority:  normal      |          Version:  7.8.3
             Component:  Compiler    |         Keywords:
  (Parser)                           |     Architecture:  Unknown/Multiple
            Resolution:  invalid     |       Difficulty:  Unknown
      Operating System:              |       Blocked By:
  Unknown/Multiple                   |  Related Tickets:
       Type of failure:  GHC         |
  rejects valid program              |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by SimonHengel):

 As I understand it I have to explicitly bind an implicit parameter
 somewhere to bring it "into scope".  At least intuitively I would assume
 that if

 {{{
 forM_ [1..3] $ \ bar -> let ?bar = bar in foo
 }}}

 works, then

 {{{
 forM_ [1..3] $ \ ?bar -> let ?bar = bar in foo
 }}}

 should work too.

 But I realize that the current behavior is clearly laid out in the User's
 Guide.  So it's certainly not a bug, but (if anything) a feature request.

 Are there any fundamental limitations that would prevent us to make this
 work?

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


More information about the ghc-tickets mailing list