MyNixOS website logo
Description

Use web link relation types (RFC 5988) in Haskell.

This library provides access to the IANA registry of link relation types, for use in Haskell code in a type-safe manner.

The registry data can be found at https://www.iana.org/assignments/link-relations. This package is generated from that data.

To see to which revision of the registry this version of the package corresponds, look at the intro comment in Web.LinkRelations.

See the .cabal file for more info and link to project website the version control.

The official download location is Hackage.

This library is free software, and is committed to software freedom. It is released to the public domain using the CC0 Public Domain Dedication. For the boring "legal" details see the file COPYING.

See the file INSTALL for hints on installation. The file ChangeLog explains how to see the history log of the changes done in the code. NEWS.md provides a friendly overview of the changes for each release.

How to Release

This package's source code is auto-generated using 3 files:

  1. A Haskell source file template
  2. CSV file containing the IANA link relation registry data
  3. A Haskell program which embeds the data into the template as Haskell code

All 3 files are found in the util/ directory.

(1) Update the source

(2) Update version and date

If you downloaded a new CSV version, update the lastUpdated value in the generator program. You can find that date at http://www.iana.org/assignments/link-relations/link-relations.xhtml.

Update the package version number in the .cabal file. Use darcs diff to examine the changes in the generated source and pick a version number according to PVP. The most common change in the registry will probably be new link relations added, which means new API functions and therefore an increase of the minor version number (i.e. 3rd number, e.g. /0.1.5.3/ becomes /0.1.6.0/). That's because the LinkRelation constructors themselves aren't exported.

(3) Adjust other config

Near the top of the generator program file there is a configuration section (e.g. the update date, file paths, etc.). If you made any changes which require updates there, make the required modifications.

(4) Build and test

The generator program depends on the cassava package. The other dependencies are also dependencies of cassava (primarily bytestring and vector), which means you can install the dependencies like this:

$ cabal install cassava

Run the generator program from the package toplevel. Either using the interpreter:

$ runhaskell util/generate.hs

Or like this, if you installed cassava into a sandbox:

$ cabal exec runhaskell util/generate.hs

Examine the result. Switch between the old generated source and the new one (which is generated as a separate file in the same directory).

Build the library itself:

$ cabal build

(5) Record everything into the Darcs repo, make a tag, make a tarball etc.

As usual. Note that the 3 files in util/ (i.e. including the CSV data) and the generated source in src/, are all kept in the Darcs repo.

Metadata

Version

0.1.1.0

License

publicDomain

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • 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-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
  • 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-windows