cvs commit: fptools/ghc/compiler/compMan CompManager.lhs

Manuel M. T. Chakravarty chak@cse.unsw.edu.au
Tue, 21 Aug 2001 23:55:04 +1000


Simon Marlow <simonmar@glass.cse.ogi.edu> wrote,

> simonmar    2001/08/21 02:25:48 PDT
> 
>   Modified files:
>     ghc/compiler/compMan CompManager.lhs 
>   Log:
>   Accept The Truth and disallow loading any home modules which don't
>   have a source file.
>   
>   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 get away with
>   just an object + interface file, but it didn't work in general.
>   Better just to disallow it altogether.
>   
>   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).

Cheers,
Manuel