path-pieces-0.2.1: Components of paths.
Safe HaskellSafe-Inferred
LanguageHaskell98

Web.PathPieces

Contents

Synopsis

Documentation

class PathPiece s where Source #

Methods

fromPathPiece :: Text -> Maybe s Source #

toPathPiece :: s -> Text Source #

Instances

Instances details
PathPiece Int16 Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Int16 Source #

toPathPiece :: Int16 -> Text Source #

PathPiece Int32 Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Int32 Source #

toPathPiece :: Int32 -> Text Source #

PathPiece Int64 Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Int64 Source #

toPathPiece :: Int64 -> Text Source #

PathPiece Int8 Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Int8 Source #

toPathPiece :: Int8 -> Text Source #

PathPiece Word16 Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Word16 Source #

toPathPiece :: Word16 -> Text Source #

PathPiece Word32 Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Word32 Source #

toPathPiece :: Word32 -> Text Source #

PathPiece Word64 Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Word64 Source #

toPathPiece :: Word64 -> Text Source #

PathPiece Word8 Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Word8 Source #

toPathPiece :: Word8 -> Text Source #

PathPiece Text Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Text Source #

toPathPiece :: Text -> Text Source #

PathPiece Text Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text0 -> Maybe Text Source #

toPathPiece :: Text -> Text0 Source #

PathPiece Day Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Day Source #

toPathPiece :: Day -> Text Source #

PathPiece String Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe String Source #

toPathPiece :: String -> Text Source #

PathPiece Integer Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Integer Source #

toPathPiece :: Integer -> Text Source #

PathPiece () Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe () Source #

toPathPiece :: () -> Text Source #

PathPiece Bool Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Bool Source #

toPathPiece :: Bool -> Text Source #

PathPiece Int Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Int Source #

toPathPiece :: Int -> Text Source #

PathPiece Word Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe Word Source #

toPathPiece :: Word -> Text Source #

PathPiece a => PathPiece (Maybe a) Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe (Maybe a) Source #

toPathPiece :: Maybe a -> Text Source #

class PathMultiPiece s where Source #

Methods

fromPathMultiPiece :: [Text] -> Maybe s Source #

toPathMultiPiece :: s -> [Text] Source #

Instances

Instances details
PathPiece a => PathMultiPiece [a] Source # 
Instance details

Defined in Web.PathPieces

Methods

fromPathMultiPiece :: [Text] -> Maybe [a] Source #

toPathMultiPiece :: [a] -> [Text] Source #

readFromPathPiece :: Read s => Text -> Maybe s Source #

A function for helping generate free PathPiece instances for enumeration data types that have derived Read and Show instances. Intended to be used like this:

data MyData = Foo | Bar | Baz
  deriving (Read,Show)
instance PathPiece MyData where
  fromPathPiece = readFromPathPiece
  toPathPiece = showToPathPiece

Since 0.2.1.

showToPathPiece :: Show s => s -> Text Source #

See the documentation for readFromPathPiece.

Since 0.2.1.

Deprecated

toSinglePiece :: PathPiece p => p -> Text Source #

Deprecated: Use toPathPiece instead of toSinglePiece

toMultiPiece :: PathMultiPiece ps => ps -> [Text] Source #

Deprecated: Use toPathMultiPiece instead of toMultiPiece

fromSinglePiece :: PathPiece p => Text -> Maybe p Source #

Deprecated: Use fromPathPiece instead of fromSinglePiece

fromMultiPiece :: PathMultiPiece ps => [Text] -> Maybe ps Source #

Deprecated: Use fromPathMultiPiece instead of fromMultiPiece