Differences From Haskell
Strictness
Function Applications
Unlike in Haskell, function applications in Plinth are strict.
In other words, when evaluating (\x -> 42) (3 + 4) the expression 3 + 4 is evaluated first, before evaluating the function body (42), even though x is not used in the function body.
Using lazy patterns on function parameters does not change this behavior: : (\(~x) -> 42) (3 + 4) still evaluates 3 + 4 strictly.
At this time, it is not possible to make function applications non-strict in Plinth.
Bindings
Bindings in Plinth are by default non-strict, but they can be made strict via the bang pattern (!), as in let !x = 3 + 4 in 42.
Conversely, in modules with the Strict language extension on, bindings are by default strict, but they can be made non-strict via the lazy pattern (~), as in let ~x = 3 + 4 in 42.