patch applied (ghc): Allow class and instance decls in hs-boot files
Simon Peyton Jones
simonpj at microsoft.com
Wed Aug 16 05:01:49 EDT 2006
Tue Aug 15 05:34:02 PDT 2006 simonpj at microsoft.com
* Allow class and instance decls in hs-boot files
For some reason, in 6.5 the manual said you could put a class decl in
an interface file, but not an instance decl; whereas the implementation
was exactly the othe way round.
This patch makes it possible to put *both* class and instance decls
in an interface file.
I also did a bit of re-factoring; comparing the declarations in the
hs-boot and hs file is now done by converting to IfaceSyn, because we
have good comparison operations for IfaceSyn already implemented.
This fixed a bug that previously let through an inconsistent declaration
of a data type.
The remaining infelicity concerns "abstract" TyCons. They are a bit
of a hack anyway; and Classes are not handled in the same way. Need
to think about this, but I think it's probably ok as it stands.
M ./compiler/iface/IfaceSyn.lhs -1 +43
M ./compiler/iface/TcIface.lhs +2
M ./compiler/typecheck/TcRnDriver.lhs -38 +23
M ./compiler/typecheck/TcTyClsDecls.lhs -3
M ./docs/users_guide/separate_compilation.xml -3 +5
More information about the Cvs-ghc
mailing list