File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11## Module Control.Monad.Eff.Console
22
3+ Console-related functions and effect type.
4+
35#### ` CONSOLE `
46
57``` purescript
Original file line number Diff line number Diff line change 1+ ## Module Control.Monad.Eff.Console.Unsafe
2+
3+ Unsafe functions to display arbitrary values.
4+
5+ #### ` logAny `
6+
7+ ``` purescript
8+ logAny :: forall a eff. a -> Eff (console :: CONSOLE | eff) Unit
9+ ```
10+
11+ Write a runtime representation of a value to the console.
12+
13+ #### ` errorAny `
14+
15+ ``` purescript
16+ errorAny :: forall a eff. a -> Eff (console :: CONSOLE | eff) Unit
17+ ```
18+
19+ Write an error with a runtime representation of a value to the console.
20+
21+
Original file line number Diff line number Diff line change 1+ -- | Console-related functions and effect type.
12module Control.Monad.Eff.Console where
23
34import Prelude
Original file line number Diff line number Diff line change 1+ /* global exports, console */
2+ "use strict" ;
3+
4+ // module Control.Monad.Eff.Console.Unsafe
5+
6+ exports . logAny = function ( s ) {
7+ return function ( ) {
8+ console . log ( s ) ;
9+ return { } ;
10+ } ;
11+ } ;
12+
13+ exports . errorAny = function ( s ) {
14+ return function ( ) {
15+ console . error ( s ) ;
16+ return { } ;
17+ } ;
18+ } ;
Original file line number Diff line number Diff line change 1+ -- | Unsafe functions to display arbitrary values.
2+ module Control.Monad.Eff.Console.Unsafe where
3+
4+ import Prelude
5+
6+ import Control.Monad.Eff
7+ import Control.Monad.Eff.Console (CONSOLE ())
8+
9+ -- | Write a runtime representation of a value to the console.
10+ foreign import logAny :: forall a eff . a -> Eff (console :: CONSOLE | eff ) Unit
11+
12+ -- | Write an error with a runtime representation of a value to the console.
13+ foreign import errorAny :: forall a eff . a -> Eff (console :: CONSOLE | eff ) Unit
You can’t perform that action at this time.
0 commit comments