[GHC] #12040: Code that builds on 7.8.4 and 7.10.3 but fails with requiring UndecidableInstances on 8.0.1-rc4

GHC ghc-devs at haskell.org
Wed Aug 31 16:28:01 UTC 2016


#12040: Code that builds on 7.8.4 and 7.10.3 but fails with requiring
UndecidableInstances on 8.0.1-rc4
-------------------------------------+-------------------------------------
        Reporter:  dmcclean          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > Maybe a consequence of kind and type arguments being treated uniformly
 in GHC's Core language now?

 Yes, probably.  Writing the kind argument in we get
 {{{
 instance (HasDimension (Proxy * d))
       => Demotable (Dimensional Int d) where
 }}}
 and now indeed the bit before the arrow doesn't look smaller than the
 thing after.

 I think the solution here is to use `UndecideableInstances`.   One could
 wonder about some kind-aware size metric might be better --- but I don't
 know what it would be.

 I'm inclined to say "wont-fix"; but if someone has a better size-metric
 proposal, go propose it.

 Simon

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


More information about the ghc-tickets mailing list