[GHC] #9790: Produce coercion rules for derived Functor instances

GHC ghc-devs at haskell.org
Tue Nov 11 01:40:38 UTC 2014


#9790: Produce coercion rules for derived Functor instances
-------------------------------------+-------------------------------------
              Reporter:  dfeuer      |            Owner:
                  Type:  feature     |           Status:  new
  request                            |        Milestone:
              Priority:  normal      |          Version:  7.9
             Component:  Compiler    |         Keywords:  coercion
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:  Runtime     |  Related Tickets:
  performance bug                    |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Replying to [comment:1 goldfire]:
 > Such a rule is wrong for non-lawful functors, which is why we haven't
 done it.
 >
 > It would be nice (perhaps even very nice) if we could give users a way
 to say that a particular instance is lawful w.r.t. the appropriate laws
 and would allow magic like the proposed idea. However, I'm not
 volunteering to design and/or implement such a system...

 Right, that's why I only mentioned ''derived'' `Functor` instances. Surely
 a derived instance that does not depend on any non-derived instances
 should be lawful!

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


More information about the ghc-tickets mailing list