This translates incorrectly. We should look at the type signature, and if there are extra arguments in its type that are not in the function arguments, it should be rewritten as pointful.
Save this as test.hs:
module Test()
where
-- error.hs:49
isHardError :: (Error ex) => ex -> Bool
isHardError = ( > LevelWarn) . errorLevel
Running cargo run --manifest-path corollary/Cargo.toml -- test.hs currently outputs this:
// Original file: "test.hs"
// File auto-generated using Corollary.
#[macro_use] use corollary_support::*;
pub fn isHardError() -> bool {
((() > LevelWarn(errorLevel)))
}
This translates incorrectly. We should look at the type signature, and if there are extra arguments in its type that are not in the function arguments, it should be rewritten as pointful.
Save this as
test.hs
:Running
cargo run --manifest-path corollary/Cargo.toml -- test.hs
currently outputs this:Expected output: