2014-02-17 2 views

Antwort

8

AFAK -c behandelt keine Abhängigkeiten. Z.B.

Main.hs:

module Main 
where 

import Test 

main :: IO() 
main = test 

Test.hs:

module Test 
where 

test :: IO() 
test = print 123 

mit -c zu kompilieren Versuch:

$ ghc -c Main.hs 

Main.hs:5:1: 
    Failed to load interface for `Test' 
    Use -v to see a list of the files searched for. 

Mit -no-link:

$ ghc -no-link Main.hs 
[1 of 2] Compiling Test    (Test.hs, Test.o) 
[2 of 2] Compiling Main    (Main.hs, Main.o) 
Verwandte Themen