[GHC] #8297: Allow implicit parameters to take a default value

GHC ghc-devs
Mon Oct 7 01:48:19 UTC 2013


#8297: Allow implicit parameters to take a default value
----------------------------+----------------------------------------------
        Reporter:  schyler  |            Owner:
            Type:  feature  |           Status:  closed
  request                   |        Milestone:  _|_
        Priority:  low      |          Version:
       Component:           |         Keywords:
  Compiler                  |     Architecture:  Unknown/Multiple
      Resolution:  invalid  |       Difficulty:  Moderate (less than a day)
Operating System:           |       Blocked By:
  Unknown/Multiple          |  Related Tickets:
 Type of failure:           |
  None/Unknown              |
       Test Case:           |
        Blocking:           |
----------------------------+----------------------------------------------

Comment (by schyler):

 Proved "impossible" on IRC.

 {{{
 12:40 PM <dolio> Ghoul_: By the way, I thought of an even more devious
 problem with your implicit proposal. :)
 12:41 PM <dolio> Suppose I write 'sort' such that the comparison is
 implicit (instead writing both sort and sortBy).
 12:42 PM <dolio> But, I say the default comparison is the one given by
 Ord. Now sort imposes a type class obligation iff you don't have an
 implicit argument binding in scope.
 }}}

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



More information about the ghc-tickets mailing list