Changes between Initial Version and Version 1 of Ticket #11523, comment 14


Ignore:
Timestamp:
Mar 16, 2016 5:28:28 PM (4 years ago)
Author:
simonpj
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11523, comment 14

    initial v1  
    44* and you have an infinite number of superclasses
    55
    6 then the typechecker will diverge, or at least complain about too many iterations.
     6then the typechecker will take a long time and then complain about too many iterations.  (This is not great, but I don't know how to do better, and it's a hard problem.)  Which is exactly what happens
     7{{{
     8T11523b.hs:1:1: error:
     9    solveWanteds: too many iterations (limit = 4)
     10      Unsolved: WC {wc_simple =
     11                      [D] _ :: Functor p_a1EY (CDictCan)
     12                      [D] _ :: Functor (Nat p_a1EY (->)) (CDictCan)
     13                      [D] _ :: Functor (Y (Nat p_a1EY (->))) (CDictCan)
     14                      [D] _ :: Functor (Nat (Nat p_a1EY (->)) (->)) (CDictCan)
     15... blah
     16}}}
     17
    718
    819In this case, do you think that there is a finite tower of superclasses?  I get
     
    2132and now we merrily go round.  Adding `p ~ Op (Op p)` will help, because `Dom p ~ Op p`.  But we are still going to get `Cateogry (Cod p)`, `Category (Cod (Cod p))` and so on.  Is that really what you intend?
    2233
    23 Actually we get a hand without "too many iterations", which is odd, but still I'd like to know the answer to the above.
     34