Because Haskell.org is down I cannot read what the report says about this
case, but logic tells me that hug's typechecker is mishandling @ patterns
this function typechecks:
----------------------------------------------------------------------
replace :: (Register r, Register r') => RAT s r (VirtualReg r r') ->
Cell r ->
ST s (Cell (VirtualReg r r'))
replace r (Reg r x) = .........
replace r (PC x) = return $ PC x
----------------------------------------------------------------------
but this one does not:
----------------------------------------------------------------------
replace :: (Register r, Register r') => RAT s r (VirtualReg r r') ->
Cell r ->
ST s (Cell (VirtualReg r r'))
replace r (Reg r x) = .........
replace r y@(PC x) = return y
----------------------------------------------------------------------
Cell is a polymorphic datatype that is not polymorphic in the PC
constructor:
data Cell r = Reg r Int
| PC Int
.
.
.
.
thanks... :-)
byron