Community
Modules 3

Network.URI.Static

Absolute URIs

uri :: QuasiQuoter

uri is a quasi quoter for staticURI.

>>> [uri|http://www.google.com/|]
http://www.google.com/
>>> [uri|http://www.google.com/##|]

<interactive>...
... Invalid URI: http://www.google.com/##
...

staticURI :: String -> SpliceQ URI

staticURI parses a specified string at compile time and return an expression representing the URI when it's a valid URI. Otherwise, it emits an error.

>>> $$(staticURI "http://www.google.com/")
http://www.google.com/
>>> $$(staticURI "http://www.google.com/##")

<interactive>...
... Invalid URI: http://www.google.com/##
...

URI

String

String representation of a URI

staticURI' :: String -> ExpQ

staticURI' parses a specified string at compile time.

The typed template haskell staticURI is available only with GHC-7.8+.

String

String representation of a URI

ExpQ

URI

Relative URIs

relativeReference :: QuasiQuoter

relativeReference is a quasi quoter for staticRelativeReference.

>>> [relativeReference|/foo?bar=baz#quux|]
/foo?bar=baz#quux
>>> [relativeReference|http://www.google.com/|]

<interactive>...
... Invalid relative reference: http://www.google.com/
...

staticRelativeReference :: String -> SpliceQ URI

staticRelativeReference parses a specified string at compile time and return an expression representing the URI when it's a valid relative reference. Otherwise, it emits an error.

>>> $$(staticRelativeReference "/foo?bar=baz#quux")
/foo?bar=baz#quux
>>> $$(staticRelativeReference "http://www.google.com/")

<interactive>...
... Invalid relative reference: http://www.google.com/
...

Refererence

String

String representation of a reference

staticRelativeReference' :: String -> ExpQ

staticRelativeReference' parses a specified string at compile time and return an expression representing the URI when it's a valid relative reference. Otherwise, it emits an error.

The typed template haskell staticRelativeReference is available only with GHC-7.8+.

String

String representation of a reference

ExpQ

Refererence

Build record and source files

Community contribution. The service has not verified this documentation.

Target: Linux on x86-64. Some inferred types and resolved links are not available.

Generator: aihc-haddock-858b1951-web-1

Metadata snapshot: 3762d3e18b488be7fc7f6d4216ef0e0c1ed732a5df99f474f70a8142b30f42bc

Open the dependency plan · Download the documentation model

Import a package

Enter a package name and an exact version from Hackage. The site contains imported versions only.