Hello everybody
I cannot understand why I get such error when I try to import a module after I have imorted a Data.Char library? Actually when I delete module Test where everything works correctly
import Data.Char
module Test where
sayHello = putStrLn "Hello, world withoutCorona!"
lenVec3 x y z = sqrt ( x ^ 2 + y ^ 2 + z ^ 2 )
sign x = (if x > 0 then 1 else 0) + (if x < 0 then -1 else 0) + 0
twoDigits2Int x y = if isDigit x && isDigit y then digitToInt x * 10 + digitToInt y else 100
Thanks in avance
A Haskell program is a set of modules. A module is structured gramatically as:
The
import
declarations are theimportdecls
in this grammar, and thus part of thebody
. A module can exists without amodule modid …
part, but if we define a module identifier, then this precedes thebody
.You thus write such module as: