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

GHC ghc-devs
Sat Oct 5 03:40:36 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:           |
----------------------------+----------------------------------------------
Changes (by carter):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 this seems more a case  for using the convention of having a function with
 a default config, and a more general version that takes a config record,
 rather than requiring implicit parameters, which are in some sense a way
 to do dynamic scoping (which is unrelated to type holes)

 eg
 {{{
 sieve :: In -> Out

 sieveWithConfig :: In -> Config -> Out


 }}}

 i'm closing this for now, because there doesn't seem to be a strong use
 case that isn't covered by the *WithConfig idiom.

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



More information about the ghc-tickets mailing list