Shpadoinkle-html: A typed, template generated Html DSL, and helpers.

[ bsd3, library, web ] [ Propose Tags ]

Shpadoinkle Html is a typed template-generated Html DSL building on types provided by Shpadoinkle Core. This exports a large namespace of terms covering most of the Html specifications. Some Elm-API-style helpers are present, but as outlaw type classes.

[Skip to Readme]
Versions [faq],,,,
Change log
Dependencies base (>=4.12.0 && <4.16), bytestring, compactable, containers (>=0.6.0 && <0.7), ghcjs-base, ghcjs-dom, jsaddle (>=0.9.7 && <0.20), lens, raw-strings-qq, regex-pcre, Shpadoinkle, stm (>=2.5.0 && <2.6), template-haskell (>=2.14.0 && <2.17), text (>=1.2.3 && <1.3), time, transformers, unliftio [details]
License BSD-3-Clause
Author Isaac Shapira
Category Web
Source repo head: git clone
Uploaded by fresheyeball at 2021-01-06T22:11:16Z
Distributions NixOS:
Downloads 253 total (18 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user
Build status unknown [no reports yet]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees

Readme for Shpadoinkle-html-

[back to package description]

Shpadoinkle Html

Goldwater Haddock BSD-3 built with nix Hackage Hackage Deps Hackage CI

This module provides named functions for generating Html, and other browser utilities.

For example, instead of writing:

view = h "div" [ ("class", PText "foo") ]
  [ h "span" [] [ text "hi there" ] ]

You can write:

view = div "foo" [ span_ [ "hi there" ] ]

which is a bit nicer, and eleminates the risk of typeos in tag names. It also provies some nice IsString instances for ergonomics.


This module provides pattern synonyms for common key codes. For example:

div [ onKeyup $ \case
    Enter -> fireLazors
    UpArrow -> jump
    DownArrow -> crouch
    LeftArrow -> move -1
    RightArrow -> move 1

which is a bit nicer, and harder to get wrong than using magic int's to identify keys.

Browser utilities

We provide high-level APIs to lower-level browser APIs. Including:

  • Local Storage

I know it's just one right now. But this is the place to contribute more. Such as:

  • Scroll Position
  • XHR Requests
  • Visibility API
  • Notifications
  • ect...