Skip to content

fluffynukeit/purescript-foreign-callbacks

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
 
 
 
 
 
 
 
 
 
 

purescript-foreign-callbacks

Helper functions that make writing callbacks for JS libraries in purescript easier.

A lot of JS libraries allow callback actions to be defined, such as in response to click events, etc. These are effectful functions that accept input and perform some kind of action (e.g. update the DOM, send a message, whatever).
This library defines purescript types for these kinds of callbacks. JS library callbacks that are not effectful can be handled with the FnX types in the Data.Function module of the prelude.

Usage

See the doc for full list of functions.

Each CallbackX type is analogous to the FnX types of the prelude. The callbackX functions are analogous to the mkFnX functions of the prelude. callbackX_ functions can be used to ignore the input arguments of the callback and run the effect.

About

Helper functions that make writing callbacks for JS libraries in purescript easier.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •