cvs commit: fptools/ghc/compiler/compMan CompManager.lhs
Tue, 21 Aug 2001 15:11:27 +0100
> Simon Marlow <firstname.lastname@example.org> wrote,
> > simonmar 2001/08/21 02:25:48 PDT
> > Modified files:
> > ghc/compiler/compMan CompManager.lhs=20
> > Log:
> > Accept The Truth and disallow loading any home modules which don't
> > have a source file.
> > =20
> > The reason is that the compilation manager can't figure out
> > dependencies unless it has the source file to browse through -
> > previously there was a half-hearted attempt to let you=20
> get away with
> > just an object + interface file, but it didn't work in general.
> > Better just to disallow it altogether.
> > =20
> > Note that this applies to --make too.
> What's missing in the interface file to make this work?
> Can't we put the necessary information in? Pre-compiled
> .o/.hi files are quite nice for computing assignments. For
> example, you can give students a pre-compiled library and in
> a first stage of an assignment, they then have to implement
> some program using the library. In the second stage, they
> get to implement the actual library (so, you obviously don't
> want to hand out the library source).
> I realise that you can achieve a similar effect using
> libraries and maybe even a GHC package, but that makes it
> harder for students to set the environment up on their
> machines at home (especially, for the beginners, which get
> taught Haskell as their first language at UNSW).
The interface file has all the information, it's just that the
compilation manager doesn't know how to read it. It probably wouldn't
be a lot of work to do it.
However, I'd like to investigate whether packages can be made to do the
job just as well, so we don't have to complicate the compilation manager
any further. Now that GHC can read multiple package files, can't you
just provide your library with a package config and instruct the
students to run GHC like this:
ghc -package-conf <config-file> -package <package-name>