nonpop/elm-purl/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

elm-purl

A tiny library for building parameterized URLs. It is intended to be used with records to give the parameters names and therefore reducing errors.

import Url exposing (Url, (</>), (@), root, s, int)

userUrl : Url { id : Int }
userUrl = root </> s "users" </> int .id

userUrl @ { id = 42 } == "/users/42"