burrito-1.0.2.0: Parse and render URI templates.

Safe HaskellSafe
LanguageHaskell98

Burrito.Type.LitChar

Description

Warning: This module is not considered part of Burrito's public API. As such, it may change at any time. Use it with caution!

Synopsis

Documentation

data LitChar Source #

Represents a character in a literal. Although encoded characters are allowed to have any value, typically they will not include most ASCII printable characters. In other words A is more likely than %41.

Constructors

Encoded Word8

This deliberately is not case sensitive. The tokens %aa and %AA are both represented as Encoded 0xAA.

Unencoded Char

This assumes that the character passes the isLiteral predicate. You should prefer using makeUnencoded to create these values.

Instances
Eq LitChar Source # 
Instance details

Defined in Burrito.Type.LitChar

Methods

(==) :: LitChar -> LitChar -> Bool #

(/=) :: LitChar -> LitChar -> Bool #

Show LitChar Source # 
Instance details

Defined in Burrito.Type.LitChar

Lift LitChar Source # 
Instance details

Defined in Burrito.Type.LitChar

Methods

lift :: LitChar -> Q Exp #

isLiteral :: Char -> Bool Source #

Returns true if the given character is in the literal range defined by section 2.1 of the RFC.

makeUnencoded :: Char -> Maybe LitChar Source #

If the character passes isLiteral, returns an Unencoded character. Otherwise returns nothing.