Fixes to datacon wrappers for indexed data types
authorsimonpj@microsoft.com <unknown>
Sun, 22 Apr 2007 21:35:03 +0000 (21:35 +0000)
committersimonpj@microsoft.com <unknown>
Sun, 22 Apr 2007 21:35:03 +0000 (21:35 +0000)
commit70918cf4a4d61d4752b18f29ce14c7d7f1fbce01
tree630ec839dc4b34800e7009b2f725bbd3870d6f25
parent490791568ac1b31fed0d049892e0853c774aa375
Fixes to datacon wrappers for indexed data types

nominolo@gmail.com pointed out (Trac #1204) that indexed data types
aren't quite right. I investigated and found that the wrapper
functions for indexed data types, generated in MkId, are really very
confusing.  In particular, we'd like these combinations to work
newtype + indexed data type
GADT + indexted data type
The wrapper situation gets a bit complicated!

I did a bit of refactoring, and improved matters, I think.  I am not
certain that I have gotten it right yet, but I think it's better.
I'm committing it now becuase it's been on my non-backed-up laptop for
a month and I want to get it into the repo. I don't think I've broken
anything, but I don't regard it as 'done'.
compiler/basicTypes/DataCon.lhs
compiler/basicTypes/MkId.lhs
compiler/main/PprTyThing.hs
compiler/typecheck/TcPat.lhs
compiler/typecheck/TcTyClsDecls.lhs
compiler/typecheck/TcType.lhs
compiler/types/TyCon.lhs
compiler/types/Unify.lhs