
Untitled
By: a guest on
Jun 13th, 2012 | syntax:
None | size: 0.46 KB | hits: 13 | expires: Never
Haskell import and export
t1.hs-----
module t1 (add1) where
add1 :: Int -> Int
add1 x = x + 1
t2.hs-----
module t2 where
import t1
add1 2
module T1 (add1) where
add1 :: Int -> Int
add1 x = x + 1
module T2 where
import T1
main = do
let x = add1 2
putStrLn (show x)
t1.hs-----
module T1 (add1) where
add1 :: Int -> Int
add1 x = x + 1
t2.hs-----
module T2 where
import T1
add1 2
t2.hs-----
module t2 where
import t1
add1to2 = add1 2