Purescript Sparkle
Infer user interfaces from type signatures
Install / Use
npx skills add sharkdp/purescript-sparkleInstalls into whichever agent you are using.
README
Sparkle is a library that leverages the power of PureScripts type system to automatically create user interfaces based on type signatures.
The internal mechanism of this library is similar to QuickCheck. However, instead of using randomly generated input data, Sparkle creates reactive web interfaces for "interactive testing". It uses the Flare library to create those widgets.
Example
Consider the following (hypothetic) function:
formatNumber :: Number -> Int -> Char -> Boolean -> String
formatNumber value precision decimalMark isSigned = ...
Sparkle can automatically create a user interface for formatNumber by simply calling:
sparkle "formatNumber" formatNumber
The result looks like this:

Notice how each input type (Number, Int, Char, Boolean) is represented by an appropriate input field.
Check out the demo page for an interactive version.
Quick start
-
Start a PureScript project in a new folder:
pulp init -
Install Sparkle:
bower install --save purescript-sparkle -
Write your own code (
src/MyModule.purs), for example:module MyModule (substring) where import Prelude import Data.String substring :: Int -> Int -> String -> String substring start end str = take (end - start) (drop start str) -
Write the module that creates the interactive Sparkle tests (
test/Main.purs):module Test.Main where import Prelude import MyModule import Sparkle main = sparkle "substring" substring -
Compile and bundle:
pulp build -O -I test -m Test.Main -t test.js -
Copy the
index.htmlandsparkle.cssfile from theassetsfolder:cp bower_components/purescript-sparkle/assets/* . -
Open
index.htmlin the browser.
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
Writing Hookify Rules
140.7kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Agent Development
140.7kThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or…
Command Development
140.7kThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs gu…
