ditto: ditto is a type-safe HTML form generation and validation library

[ bsd3, library, web ] [ Propose Tags ] [ Report a vulnerability ]

ditto follows in the footsteps of formlets and digestive-functors <= 0.2. It provides a type-safe and composable method for generating an HTML form that includes validation.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.1.0, 0.0.1.1, 0.1.0.0, 0.1.1.0, 0.1.2.0, 0.1.3.0, 0.2, 0.3, 0.3.1, 0.4, 0.4.1, 0.5.0 (info)
Change log CHANGELOG.md
Dependencies base (>=4.14 && <5), mtl (>=2.2 && <3), text (>=1.2 && <3) [details]
Tested with ghc ==9.6.7, ghc ==9.8.4, ghc ==9.10.3, ghc ==9.12.4, ghc ==9.14.1
License BSD-3-Clause
Copyright 2012 Jeremy Shaw, Jasper Van der Jeugt, SeeReason Partners LLC, 2019 Zachary Churchill
Author Zachary Churchill <zacharyachurchill@gmail.com>
Maintainer Zachary Churchill <zacharyachurchill@gmail.com>
Uploaded by goolord at 2026-09-05T00:17:28Z
Category Web
Home page https://github.com/goolord/ditto
Bug tracker https://github.com/goolord/ditto/issues
Source repo head: git clone https://github.com/goolord/ditto.git
Distributions
Reverse Dependencies 3 direct, 0 indirect [details]
Downloads 4232 total (50 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2026-09-05 [all 1 reports]

Readme for ditto-0.5.0

[back to package description]

ditto Hackage

Image of ditto from pokemon

Its transformation ability is perfect. However, if it is made to laugh, it can't maintain its disguise.

A portable library which provides type-safe form generation and validation.

This core library is intended to be used in conjunction with other libraries such as scotty-form and ditto-lucid.

Requirements

Tested on GHC 9.6 through 9.14. GHC 9.10+ uses GHC2024 by default; older supported GHC versions fall back to GHC2021 or Haskell2010 with the required extensions enabled in the cabal file.

Cabal

Use this for day-to-day development (fast incremental rebuilds):

cabal test --enable-tests

Nix (flake)

Pinned nixpkgs and package checks:

nix build
nix flake check
nix develop
  • nix flake check — build library and run the test suite in an isolated Nix derivation (CI uses this).
  • nix develop — enter a shell with GHC, cabal-install, and HLS; run cabal test for iterative work.
  • Flake source includes all project files under the repo root (not only git-tracked paths). flake.lock pins nixpkgs.

0.5.0 upgrade notes

  • Recommended toolchain: GHC 9.10+ for GHC2024.
  • Dependency bounds are intentionally permissive (base >= 4.14); older GHC releases remain supported where possible.
  • inputFile: Default environment is an empty upload (no error on initial render); Missing on submit still errors.
  • hoistForm is exported from Ditto.Core.