Hi,
just a question about calling a module from another module which is located in a different directory. For instance imagine I have a module mytypes.jl
module myTypes
export CROCO, krok1
export bite
abstract type CROCO end
struct krok1
x :: Int64
end
function bite(x)
return x*x
end
end
in folder /home/animals/modules/Reptiles
Now I have a second folder /home/animals/modules/Beasts
where I have a second mudule that has to use the myTypes module
module myFuncs
push!(LOAD_PATH,"/home/animals/modules/Reptiles");
using myTypes
function cayman(c::CROCO)
return c.x
end
end
My problem is that, when trying to load myFuncs, it fails and complains because it can’t understand the CROCO variable, as if the module myTypes.jl has not been loaded -or maybe is a scoping problem (?)
Bottom line is: how can I make myFuncs module load and understand the data and function in myTypes modules, both being in different directories?
Best regards and thanks,
Ferran.