MyNixOS website logo
Description

Worse Haskell documentation.

Scrod

CI

:fish: Worse Haskell documentation.

Summary

Scrod is a documentation generator for Haskell modules, similar to Haddock.

  • Produces JSON or HTML output
  • Supports Literate Haskell (Bird and LaTeX style), Backpack signatures, and CPP
  • Uses GHC and Haddock (the library) behind the scenes
  • Only parses the module; it doesn't rename or type check, so it's fast but limited

You can try it out in the browser at scrod.fyi.

Installation

Download the latest release from GitHub Releases. Each release includes:

AssetDescription
scrod-*-linux-x86_64.tar.gzLinux x86_64 binary
scrod-*-linux-aarch64.tar.gzLinux AArch64 binary
scrod-*-darwin-aarch64.tar.gzmacOS binary
scrod-*-win32-x86_64.tar.gzWindows binary
scrod-*.vsixVSCode extension for live documentation preview
scrod-*-wasm.tar.gzWASM build (for use in browsers)
scrod-*-wasi.tar.gzWASI build (for use with runtimes like Wasmtime)
scrod-*-schema.jsonJSON schema for the JSON output format
scrod-*.tar.gzSource tarball

Or build from source with GHC 9.14 and Cabal:

cabal install scrod

Usage

Scrod reads from stdin and writes to stdout:

scrod < MyModule.hs                # JSON output (default)
scrod --format html < MyModule.hs  # HTML output

Options

$ scrod --help
scrod version 0.2026.2.18
<https://scrod.fyi>

  -h[BOOL]  --help[=BOOL]           Shows the help.
            --version[=BOOL]        Shows the version.
            --format=FORMAT         Sets the output format (json or html).
            --ghc-option=OPTION     Sets a GHC option (e.g. -XOverloadedStrings).
            --literate[=BOOL]       Treats the input as Literate Haskell.
            --schema[=BOOL]         Shows the JSON output schema.
            --signature[=BOOL]      Treats the input as a Backpack signature.
  • -h, --help: Prints the help then exits.
  • --version: Prints the version then exits.
  • --format: Sets the output format. Either json (the default) or html.
  • --ghc-option: Passes an option to the GHC parser (e.g. -XOverloadedStrings). Can be given multiple times.
  • --literate: Treats the input as literate Haskell, either Bird or LaTeX style.
  • --schema: Prints the JSON output schema then exits.
  • --signature: Treats the input as a Backpack signature.

Boolean flags accept an optional =BOOL argument (True or False). Without the argument, the flag is set to True. This lets you override earlier flags, e.g. --literate --literate=False.

Metadata

Version

1.1.0.0

License

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows