Safe Haskell | None |
---|---|
Language | Haskell2010 |
Provides an example of the use of ruleTreeToCode
. You will
want to look at the source code, as it has a Template Haskell
splice that produces all of the data types that you see in the
Haddocks.
- newtype Digit = Digit Char
- data Digits = Digits Digit ([] Digit)
- newtype Letter = Letter Char
- newtype North = North Char
- newtype South = South Char
- newtype East = East Char
- newtype West = West Char
- data Direction
- data Street = Street ([] Char)
- data Avenue = Avenue ([] Char)
- data Way = Way ([] Char)
- data Boulevard = Boulevard ([] Char)
- data Suffix
- newtype Space = Space Char
- newtype Comma = Comma Char
- data PostalWord = PostalWord Letter ([] Letter)
- data PreSpacedWord = PreSpacedWord Space PostalWord
- newtype PreSpacedWords = PreSpacedWords ([] PreSpacedWord)
- data Words = Words PostalWord PreSpacedWords
- newtype Number = Number Digits
- newtype StreetName = StreetName Words
- newtype City = City Words
- newtype State = State PostalWord
- newtype ZipCode = ZipCode Digits
- data DirectionSpace = DirectionSpace Direction Space
- data SpaceSuffix = SpaceSuffix Space Suffix
- newtype MaybeDirection = MaybeDirection (Maybe DirectionSpace)
- newtype MaybeSuffix = MaybeSuffix (Maybe SpaceSuffix)
- data Address = Address Number Space MaybeDirection StreetName MaybeSuffix Comma Space City Comma Space State Space ZipCode
- postalGrammar :: Grammar r (Prod r String Char Address)
Documentation
data PostalWord Source
PostalWord Letter ([] Letter) |
data PreSpacedWord Source
newtype PreSpacedWords Source
newtype StreetName Source
data DirectionSpace Source
data SpaceSuffix Source
newtype MaybeDirection Source
newtype MaybeSuffix Source