Modulenetwork-uri-2.6.4.2Haskell98
Network.URI.Static
- 6 values
- Packagenetwork-uri-2.6.4.2
- Exports6
- LanguageHaskell98
- LicenceBSD-3-Clause
- SourceStatic.hs
Absolute URIs
3 declarationsstaticURI 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/##...
staticURI' parses a specified string at compile time.
The typed template haskell staticURI is available only with GHC-7.8+.
Relative URIs
3 declarationsrelativeReference 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 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/...
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+.