[GHC] #8912: Documentation stale: implicit-parameter constraints seem to be allowed in instance declarations now.

GHC ghc-devs at haskell.org
Mon Aug 25 20:22:07 UTC 2014


#8912: Documentation stale: implicit-parameter constraints seem to be allowed in
instance declarations now.
-------------------------------------+-------------------------------------
              Reporter:              |            Owner:
  andreas.abel                       |           Status:  closed
                  Type:  bug         |        Milestone:
              Priority:  normal      |          Version:  7.6.3
             Component:              |         Keywords:  implicit-
  Documentation                      |  parameter instance-constraints
            Resolution:  fixed       |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Easy (less than 1
  Unknown/Multiple                   |  hour)
       Type of failure:              |       Blocked By:
  Documentation bug                  |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by dimitris):

 But it's a useful feature, although arguably a bit dangerous to use ...

 For instance I am working with a library that someone else has written
 that exposes only a type-class based interface, i.e. you provide instances
 of certain classes. Now these classes provide -- sadly -- only a
 functional interface, so the only way for me to parameterize my instance
 implementation is to use a class instance context. But if that context
 can't itself be an implicit parameter or its instances depend on an
 implicit parameter then it's pretty impossible to reconfigure my code! So
 I think there is a pretty compelling case to /omit/ that check and perhaps
 warn users that this may lead to unpredictable behaviour.

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


More information about the ghc-tickets mailing list