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

#logShow Source

logShow :: forall a. Show a => a -> a

For an argument a, calls console.log on show a, then returns a.

#taggedLog Source

taggedLog :: forall a. String -> a -> a

For a string t and value a, calls console.log(t, a), then returns a.

#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.

#dir Source

dir :: forall a. a -> a

Calls console.dir with its argument, then returns it.

#debugger Source

debugger :: forall a. a -> a

Inserts a JavaScript debugger statement, then returns its argument.

#unsafeLog Source

unsafeLog :: forall a b. a -> b

Like log except it coerces the input to any type.

#unsafeDir Source

unsafeDir :: forall a b. a -> b

Like dir except it coerces the input to any type.

#unsafeTodo Source

unsafeTodo :: forall a. a

Like todo but it doesn't throw an error.

Modules
Debug