pads-haskell-0.1.0.0: PADS data description language for Haskell.

Copyright(c) 2011
Kathleen Fisher <kathleen.fisher@gmail.com>
John Launchbury <john.launchbury@gmail.com>
LicenseMIT
MaintainerKarl Cronburg <karl@cs.tufts.edu>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Language.Pads.BaseTypes

Contents

Description

Some useful Pads types (parsers) implemented by the code generator in lieu of writing them by hand.

Synopsis

Documentation

pm2m :: Span -> (PMaybe a, PMaybe_md a_md) -> (Maybe a, Maybe_md a_md) Source #

Pads maybe to Haskell maybe

m2pm :: (Maybe a, Maybe_md a_md) -> (PMaybe a, PMaybe_md a_md) Source #

Haskell maybe to Pads maybe

type UTCTime_md = Base_md Source #

Coordinated universal time Pads metadata type

strToUTC :: String -> Span -> (StringSE, Base_md) -> (UTCTime, Base_md) Source #

UTC parser from a string based on Haskell builtin UTC parser.

uTCTime_def :: UTCTime Source #

Default time of: 0h Nov 17, 1858

utcToStr :: String -> (UTCTime, Base_md) -> (StringSE, Base_md) Source #

Format a UTC instance as a string.

strToTz :: Span -> (StringSE, Base_md) -> (TimeZone, Base_md) Source #

Timezone parser

tzToStr :: (TimeZone, Base_md) -> (StringSE, Base_md) Source #

Timezone formatter

hexStr2Int :: Span -> (StringFW, Base_md) -> (Int, Base_md) Source #

Transform a hexadecimal string to an int

int2HexStr :: Int -> (Int, Base_md) -> (StringFW, Base_md) Source #

Transform an int into a hexadecimal string

Orphan instances

Pretty TimeZone Source # 
Instance details

Methods

ppr :: TimeZone -> Doc #

pprPrec :: Int -> TimeZone -> Doc #

pprList :: [TimeZone] -> Doc #

Pretty UTCTime Source # 
Instance details

Methods

ppr :: UTCTime -> Doc #

pprPrec :: Int -> UTCTime -> Doc #

pprList :: [UTCTime] -> Doc #