for self-test examples, I got the following code:
assert :: Bool -> Bool -> String -> IO () assert actual expected description | expected == actual = do { print "" } -- need a better way to do nothing | otherwise = error description main _ = do assert (odd 2) false "2 is not odd" assert (odd 3) true "3 is odd"
I know this is not ideal (and tips are more than welcome), but the current problem is that when I put the assert definition in the util.Assertions module, then using two statements will not compile with
build/realworld/chapter2/FunctionApplication.java:168: error: cannot access ? Assertions.?._assert?.apply( ^ class file for util.Assertions$? not found 1 error E .../Real_World_Frege/chapter2/FunctionApplication.fr:24: java compiler errors are most likely caused by erronous native definitions
This works when I have only one statement, so the class itself is on CP, and importing the module works in principle. What's wrong?
Dierk source share