How to get runtime errors in PureScript

From foldr
Jump to: navigation, search

This is a (possibly incomplete) list of ways to get runtime errors in PureScript without (indirect) use of the FFI.

  • Define otherwise = false in a module named Prelude, then cause an incomplete pattern match using a guard. The exhaustiveness checker assumes that Prelude.otherwise = true.
  • Evaluate a name before it is defined and then use it in one of various ways. For example: let x = (\_ -> x) unit in x 1.
  • Overflow the call stack.