[clean-list] question about implicit imports of definition
Jigang Sun
Jigang.Sun at student.paisley.ac.uk
Thu Dec 7 01:04:58 MET 2006
I am studying Clean module system. What I know is that function definition can be pass-through (downwards) via definition module by importing. For example,
definition module aa
import StdEnv
implementation module aa
//empty body
//Start module
module try
import aa
Start = (+) 1 2
works OK.
But I found imported definitions could not be passed horizontally to corresponding implementation module as showed by the following example. StdEnv is imported in definition module aa, in implementation module aa I turned off "import StdEnv", then "Error [aa.icl,4,]: + undefined" error message is given.
definition module aa
import StdEnv
add2 :: Int Int -> Int
implementation module aa
//import StdEnv
add2 ::Int Int -> Int
add2 x y = x+y //line 4, + is considered undefined
module try //Start module
import aa
Start = add2 1 2
I wonder if definitions imported into a definition module should be available to its corresponding implemtation module?
Thanks.
Jigang
More information about the clean-list
mailing list