mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-23 16:28:02 +03:00
642 B
642 B
The todo
and bug
builtin
todo
and bug
have type a -> b
. They take a message or a value of type a
and crash during runtime displaying a
in ucm.
> todo "implement me later"
> bug "there's a bug in my code"
Todo
todo
is useful if you want to come back to a piece of code later but you want your project to compile.
complicatedMathStuff x = todo "Come back and to something with x here"
Bug
bug
is used to indicate that a particular branch is not expected to execute.
test = case true of
true -> "Yay"
false -> bug "Wow, that's unexpected"