Closed Classes...

MR K P SCHUPKE k.schupke at imperial.ac.uk
Thu Aug 12 08:53:42 EDT 2004


Been having a bit of a discussion in the Cafe... Just wondered what
GHC specific issues would be involved with assuming all classes are closed.

I am thinking that there is no real dis-advantage to considering all
classes closed within their current context (IE all the imports to
the current module).

It seems to me that the argument about breaking code is wrong, as 
any changes to modules not imported into this module cannot have
any affect on the code in this module. The only changes that
can affect this module are changes to modules imported into
this module - which of course can break things in many ways 
(like changing the type of a function)... In other words when
the instances visible in a module change - all modules importing
that module need to be recompiled (which is what happens when you
use 'make' anyway).

Can somebody either convince me their is a real problem with 
the 'closed' assumption, otherwise can GHC be changes to 
do this? Maybe an intermediate step would be to have a command
line flag (-fall-closed ?)

	Keean.


More information about the Glasgow-haskell-users mailing list