Idris2Doc : JS.Util

JS.Util

(source)
Javascript utilities. If these prove to be useful in
applications, they should eventually go into their
own package.

Reexports

import public Control.Monad.Either

Definitions

typeof : a -> String
  Inspect the type of a value at runtime by means of
Javascript function `typeof`.

Totality: total
Visibility: export
eqv : a -> b -> Bool
  Heterogeneous pointer equality. This calls the Javascript
`===` operator internally.

Totality: total
Visibility: export
jsShow : a -> String
  Displays a JS value by passing it to `String(...)`.

Totality: total
Visibility: export
consoleLog : HasIO io => String -> io ()
Totality: total
Visibility: export
data JSErr : Type
Totality: total
Visibility: public export
Constructors:
Caught : String -> JSErr
CastErr : String -> a -> JSErr
IsNothing : String -> JSErr
dispErr : JSErr -> String
Totality: total
Visibility: export
JSIO : Type -> Type
Totality: total
Visibility: public export
interface LiftJSIO : (Type -> Type) -> Type
Parameters: io
Constraints: HasIO io
Methods:
liftJSIO : JSIO a -> io a

Implementations:
LiftJSIO JSIO
LiftJSIO m => LiftJSIO (StateT s m)
LiftJSIO m => LiftJSIO (ReaderT e m)
LiftJSIO m => LiftJSIO (WriterT w m)
LiftJSIO m => LiftJSIO (RWST r w w m)
liftJSIO : LiftJSIO io => JSIO a -> io a
Totality: total
Visibility: public export
runJSWith : Lazy (JSErr -> IO a) -> JSIO a -> IO a
Totality: total
Visibility: export
runJS : JSIO () -> IO ()
Totality: total
Visibility: export
runJSWithDefault : Lazy a -> JSIO a -> IO a
Totality: total
Visibility: export
primJS : PrimIO a -> JSIO a
Totality: total
Visibility: export
unMaybe : String -> JSIO (Maybe a) -> JSIO a
Totality: total
Visibility: export
tryIO : IO a -> JSIO a
  Tries to execute an IO action, wrapping any runtime exception
in its stringified version in a `Left . Caught`.

Totality: total
Visibility: export
try : (a -> b) -> a -> Either JSErr b
  Error handling in pure functions. This should only be used
in foreign function calls that might fail but or otherwise
pure calculations.

Totality: total
Visibility: export
data WindowProxy : Type
  See [spec](https://html.spec.whatwg.org/#windowproxy)

Totality: total
Visibility: export
Hints:
FromFFI WindowProxy WindowProxy
ToFFI WindowProxy WindowProxy