Type families: fixes in flattening & finalisation
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>
Thu, 25 Sep 2008 22:53:24 +0000 (22:53 +0000)
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>
Thu, 25 Sep 2008 22:53:24 +0000 (22:53 +0000)
commit53631ec612629ad27826243d281e567c690b2051
tree424f7102bf7311e899c823f9e3a8509b82aced52
parentf599bad1330a08f66c20fa1c9094964234efcb52
Type families: fixes in flattening & finalisation
* Finalisation didn't do the right thing for equalities x ~ y, where
  x was instantiated, but not zonked and y flexible (need to do y := x)
* During flattening we weren't careful enough when turning wanteds
  intermediates into locals

Both bugs showed up in a small example of SPJ:

  linear :: HasTrie (Basis v) => (Basis v, v)
  linear =  basisValue

  class HasTrie a where

  type family Basis u :: *

  basisValue :: (Basis v,v)
  basisValue = error "urk"
compiler/typecheck/TcTyFuns.lhs