Unsafe functions that CRASH when called.
This library is for educational purposes. Feel free to read the source and meditate on it. Don't elm install it.
There is only one legitimate use case: when you have a logical proof that calling a function is impossible.
Just x |> Maybe.withDefault (infiniteLoop "the impossible happened")Do you have a logical proof? If not, use Maybe.
If you do, you can implement an infinite loop yourself, there is no need to install this library.
Create a stack overflow which throws a javascript exception.
Briefly uses a lot of CPU and memory so interactivity suffers.
You never need this. Use Maybe.withDefault or Debug.todo.
Throws the following exception:
Internal Error: Too much recursionThrows a javascript exception immediately.
This is achieved by comparing two functions.
The error is even more cryptic than stackOverflow, but the CPU, memory and interactivity are not stressed.
You never need this. Use Maybe.withDefault or Debug.todo and see.
Throws the following exception:
Error: Trying to use `(==)` on functions.
There is no way to know if functions are "the same" in the Elm sense.
Read more about this at https://package.elm-lang.org/packages/elm/core/latest/Basics#== which describes why it is this way and what the better version will look like.
Go into an infinite loop.
The browser tab will become unresponsive. CPU use will increase, potentially impacting machine usability and battery life. Because of Tail Call Optimization, the stack will not overflow, instead the browser will show a button to reload the tab after a timeout.