[GHC] #11581: TypeError requires UndecidableInstances unnecessarily

GHC ghc-devs at haskell.org
Wed Feb 17 09:38:36 UTC 2016


#11581: TypeError requires UndecidableInstances unnecessarily
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  low               |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1-rc2
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         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):

 In the (necessarily conservative) story about the "size" of the RHS, we
 could certainly ignore all definitely-non-recursive type functions.
 `TypeError` is a case in point.

 By "recursive" I mean: given
 {{{
   F t1 ... tn = ...(G s1 .. sm)...
 }}}
 can `G s1 .. sm` ever rewrite to call of `F` that is no smaller than the
 LHS?

 For open families `G` we can't know for sure, because `G` might get new
 RHSs.  For closed `G` we could make a stab, perhaps.

 For `TypeError` we know for sure since it is built in.  For now we could
 make it a special case: easy to do and useful.

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


More information about the ghc-tickets mailing list