when is compilation necessary

Hal Daume III hdaume@ISI.EDU
Wed, 19 Jun 2002 15:46:40 -0700 (PDT)


suppose i have three modules:

> module Foo(foo) where
> foo x = x + 1

> module Bar(bar) where
> import Foo
> bar x = foo (x+1)

> module Main(main) where
> import Bar
> main = print (foo 5)

Now, suppose I change Foo.hs so that "foo x = x + 2".  If I ghc --make on 
Main, it will build Foo, then Bar, then Main, then link.  Is all of this
necessary or can I (manually) just rebuild Foo and then relink?

--
Hal Daume III

 "Computer science is no more about computers    | hdaume@isi.edu
  than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume