[GHC] #2550: Add an option to use manifest files instead of filesystem hierarchy to find modules

GHC trac at galois.com
Thu Aug 28 07:46:45 EDT 2008


#2550: Add an option to use manifest files instead of filesystem hierarchy to find
modules
-----------------------------+----------------------------------------------
 Reporter:  YitzGale         |          Owner:         
     Type:  feature request  |         Status:  new    
 Priority:  normal           |      Milestone:         
Component:  Compiler         |        Version:  6.9    
 Severity:  normal           |     Resolution:         
 Keywords:                   |     Difficulty:  Unknown
 Testcase:                   |   Architecture:  Unknown
       Os:  Unknown          |  
-----------------------------+----------------------------------------------
Changes (by simonmar):

  * difficulty:  => Unknown

Comment:

 You can choose your own mapping between filenames and module names as long
 as you tell GHC about all the filenames in your project.  For example:

 {{{
 $ cat >Foo.Burble.hs
 module Foo.Burble where
 $ cat >Bar.Mumble.hs
 module Bar.Mumble where
 import Foo.Burble
 $ cat >MyProg.hs
 module Main where
 import Foo.Burble
 import Bar.Mumble
 main = print "hello"
 $ ghc --make MyProg.hs Foo.Burble.hs Bar.Mumble.hs
 [1 of 3] Compiling Foo.Burble       ( Foo.Burble.hs, Foo.Burble.o )
 [2 of 3] Compiling Bar.Mumble       ( Bar.Mumble.hs, Bar.Mumble.o )
 [3 of 3] Compiling Main             ( MyProg.hs, MyProg.o )
 Linking MyProg ...
 }}}

 So your "manifest" might just be a list of filenames that you pass to ghc
 using {{{ghc --make `cat manifest`}}}.

 This doesn't let you put multiple modules in one file, of course.  Also, I
 don't think you can do this with Cabal (or maybe you can?).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2550#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list