@hackage / network-uri-static

A small utility to declare type-safe static URIs

Latest0.1.2.2

About

Metadata

  • Last updated , by snak
  • License MIT
  • Categories Network Development
  • Maintained by: snak@snak.org

  • Lottery factor: 0

Links

Installation

Package Flags

Use the -f option with cabal commands to enable flags

    defer-to-network-uri (off by default)

Readme

This library helps you declare type-safe static URIs by parsing URIs at compile time.

You can write static URIs using typed template haskell:

url :: URI
url = $$(staticURI "http://www.google.com/")

or using QuasiQuote:

url :: URI
url = [uri|http://www.google.com/|]

When you pass a malformed URI to these expressions, they emit an error at compile time.