Module
Debug
- Package
- purescript-debuggest
- Repository
- ursi/purescript-debuggest
#todo Source
todo :: forall a. a
A placeholder to use when you want your code to compile without finishing something. You will immediately get an error when trying to run any code with a todo
, so you won't forget about it and run into errors later.
#log Source
log :: forall a. a -> a
Calls console.log
with its argument, then returns it.
-- log a value as it's used
func a = todo $ log a
-- explicitly log an argument because it may not be used
func a =
let
_ = log a
in
todo
-- log the value inside a functor
func ma = do
a <- log <$> pure ma
todo
#taggedLogShow Source
taggedLogShow :: forall a. Show a => String -> a -> a
For a string t
and value a
, calls console.log(t, (show a))
, then returns a
.
#debugger Source
debugger :: forall a. a -> a
Inserts a JavaScript debugger
statement, then returns its argument.
#unsafeTodo Source
unsafeTodo :: forall a. a
Like todo
but it doesn't throw an error.
- Modules
- Debug