In the first code snippet of myProgram.hs, there is a typo in the definition addTwo x = addone (addone x).
addone has not been previously defined, but addOne has been. Trying to load the file in ghci as requested provides a nice error message suggesting that this is the problem, but I wonder if this is the intended point of that part of the text? (It's the first time the user has been asked to load in a *.hs file into ghci)
Copied the code snippet for convenience (since I can't work out how to link to the actual file in the repo)
-- myProgram.hs
addOne :: Int -> Int
addOne x = x + 1
addTwo :: Int -> Int
addTwo x = addone (addone x)
That was definitely not the intention! Should be fixed, thanks. I really need to setup a way to test all the test programs at once to be sure they compile
In the first code snippet of myProgram.hs, there is a typo in the definition
addTwo x = addone (addone x)
.addone
has not been previously defined, butaddOne
has been. Trying to load the file in ghci as requested provides a nice error message suggesting that this is the problem, but I wonder if this is the intended point of that part of the text? (It's the first time the user has been asked to load in a *.hs file into ghci)Copied the code snippet for convenience (since I can't work out how to link to the actual file in the repo)