{"id":20230805,"url":"https://github.com/sharkdp/purescript-sparkle","last_synced_at":"2026-02-04T05:32:45.294Z","repository":{"id":58242323,"uuid":"48922237","full_name":"sharkdp/purescript-sparkle","owner":"sharkdp","description":"Infer user interfaces from type signatures","archived":false,"fork":false,"pushed_at":"2018-01-30T20:15:32.000Z","size":221,"stargazers_count":77,"open_issues_count":2,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-01-15T13:41:51.587Z","etag":null,"topics":["purescript","testing"],"latest_commit_sha":null,"homepage":"http://sharkdp.github.io/purescript-sparkle/","language":"PureScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharkdp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-02T20:06:22.000Z","updated_at":"2025-01-17T10:17:40.000Z","dependencies_parsed_at":"2022-08-31T00:41:12.179Z","dependency_job_id":null,"html_url":"https://github.com/sharkdp/purescript-sparkle","commit_stats":null,"previous_names":["sharkdp/purescript-flarecheck"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/sharkdp/purescript-sparkle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fpurescript-sparkle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fpurescript-sparkle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fpurescript-sparkle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fpurescript-sparkle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharkdp","download_url":"https://codeload.github.com/sharkdp/purescript-sparkle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fpurescript-sparkle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29071002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["purescript","testing"],"created_at":"2024-11-14T07:43:47.537Z","updated_at":"2026-02-04T05:32:45.271Z","avatar_url":"https://github.com/sharkdp.png","language":"PureScript","readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003e\n\u003cimg src=\"html/sparkle.svg\"\n      alt=\"Sparkle\"\n      width=\"300\"\u003e\n\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cem\u003eAutomatically create reactive web interfaces from type signatures.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cb\u003e\u003ca href=\"http://sharkdp.github.io/purescript-sparkle/\"\u003eLive demo and tutorial\u003c/a\u003e\u003c/b\u003e\n| \u003ca href=\"https://www.youtube.com/watch?v=iTSosG7vUyI\"\u003eConference talk\u003c/a\u003e\n| \u003ca href=\"http://try.purescript.org/?backend=flare\"\u003eTry in your browser\u003c/a\u003e\n| \u003ca href=\"http://pursuit.purescript.org/packages/purescript-sparkle/\"\u003eDocumentation\u003c/a\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\nSparkle is a library that leverages the power of [PureScripts](http://purescript.org) type system to automatically create user interfaces based on type signatures.\n\nThe internal mechanism of this library is similar to [QuickCheck](https://github.com/purescript/purescript-quickcheck). However, instead of using randomly generated input data, Sparkle creates reactive web interfaces for \"interactive testing\". It uses the [Flare library](https://github.com/sharkdp/purescript-flare) to create those widgets.\n\n## Example\n\nConsider the following (hypothetic) function:\n``` purs\nformatNumber :: Number -\u003e Int -\u003e Char -\u003e Boolean -\u003e String\nformatNumber value precision decimalMark isSigned = ...\n```\nSparkle can automatically create a user interface for `formatNumber` by simply calling:\n``` purs\nsparkle \"formatNumber\" formatNumber\n```\nThe result looks like this:\n\n![Sparkle widget](https://i.imgur.com/xB13OGZ.png)\n\nNotice how each input type (`Number`, `Int`, `Char`, `Boolean`) is represented by an appropriate input field.\nCheck out the **[demo page](http://sharkdp.github.io/purescript-sparkle/)** for an interactive version.\n\n## Quick start\n\n- Start a PureScript project in a new folder:\n  ```\n  pulp init\n  ```\n\n- Install *Sparkle*:\n  ```\n  bower install --save purescript-sparkle\n  ```\n\n- Write your own code (`src/MyModule.purs`), for example:\n\n  ``` purs\n  module MyModule (substring) where\n\n  import Prelude\n  import Data.String\n\n  substring :: Int -\u003e Int -\u003e String -\u003e String\n  substring start end str = take (end - start) (drop start str)\n  ```\n\n- Write the module that creates the interactive Sparkle tests (`test/Main.purs`):\n\n  ``` purs\n  module Test.Main where\n\n  import Prelude\n  import MyModule\n  import Sparkle\n\n  main = sparkle \"substring\" substring\n  ```\n\n- Compile and bundle:\n  ```\n  pulp build -O -I test -m Test.Main -t test.js\n  ```\n\n- Copy the `index.html` and `sparkle.css` file from the `assets` folder:\n\n  ``` bash\n  cp bower_components/purescript-sparkle/assets/* .\n  ```\n\n- Open `index.html` in the browser.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharkdp%2Fpurescript-sparkle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharkdp%2Fpurescript-sparkle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharkdp%2Fpurescript-sparkle/lists"}