pinchot 0.14.0.0 → 0.16.0.0
raw patch · 33 files changed
+2150/−2016 lines, 33 filesdep +ListLikedep −pretty-showdep ~Earleynew-component:exe:newmanPVP ok
version bump matches the API change (PVP)
Dependencies added: ListLike
Dependencies removed: pretty-show
Dependency ranges changed: Earley
API changes (from Hackage documentation)
- Pinchot: allEarleyGrammars :: Lift t => Qualifier -> Name -> Pinchot t a -> DecsQ
- Pinchot: allRulesToTypes :: Lift t => MakeOptics -> Name -> Seq Name -> Pinchot t a -> DecsQ
- Pinchot: data Pinchot t a
- Pinchot: earleyGrammar :: Lift t => Qualifier -> Pinchot t (Rule t) -> Q Exp
- Pinchot: list :: Rule t -> Pinchot t (Rule t)
- Pinchot: list1 :: Rule t -> Pinchot t (Rule t)
- Pinchot: makeOptics :: MakeOptics
- Pinchot: noOptics :: MakeOptics
- Pinchot: option :: Rule t -> Pinchot t (Rule t)
- Pinchot: ruleTreeToTypes :: Lift t => MakeOptics -> Name -> Seq Name -> Pinchot t (Rule t) -> DecsQ
- Pinchot: terminalSeq :: RuleName -> Seq t -> Pinchot t (Rule t)
- Pinchot: type AlternativeName = String
- Pinchot: type MakeOptics = Bool
- Pinchot.Examples.AllEarleyGrammars: g'Address :: Grammar r (Prod r String Char Address)
- Pinchot.Examples.AllEarleyGrammars: g'Avenue :: Grammar r (Prod r String Char Avenue)
- Pinchot.Examples.AllEarleyGrammars: g'Boulevard :: Grammar r (Prod r String Char Boulevard)
- Pinchot.Examples.AllEarleyGrammars: g'City :: Grammar r (Prod r String Char City)
- Pinchot.Examples.AllEarleyGrammars: g'Comma :: Grammar r (Prod r String Char Comma)
- Pinchot.Examples.AllEarleyGrammars: g'Digit :: Grammar r (Prod r String Char Digit)
- Pinchot.Examples.AllEarleyGrammars: g'Digit'Seq1 :: Grammar r (Prod r String Char Digit'Seq1)
- Pinchot.Examples.AllEarleyGrammars: g'Direction :: Grammar r (Prod r String Char Direction)
- Pinchot.Examples.AllEarleyGrammars: g'DirectionSpace :: Grammar r (Prod r String Char DirectionSpace)
- Pinchot.Examples.AllEarleyGrammars: g'DirectionSpace'Maybe :: Grammar r (Prod r String Char DirectionSpace'Maybe)
- Pinchot.Examples.AllEarleyGrammars: g'East :: Grammar r (Prod r String Char East)
- Pinchot.Examples.AllEarleyGrammars: g'Letter :: Grammar r (Prod r String Char Letter)
- Pinchot.Examples.AllEarleyGrammars: g'Letters :: Grammar r (Prod r String Char Letters)
- Pinchot.Examples.AllEarleyGrammars: g'North :: Grammar r (Prod r String Char North)
- Pinchot.Examples.AllEarleyGrammars: g'Number :: Grammar r (Prod r String Char Number)
- Pinchot.Examples.AllEarleyGrammars: g'PostalWord :: Grammar r (Prod r String Char PostalWord)
- Pinchot.Examples.AllEarleyGrammars: g'PreSpacedWord :: Grammar r (Prod r String Char PreSpacedWord)
- Pinchot.Examples.AllEarleyGrammars: g'PreSpacedWord'Seq :: Grammar r (Prod r String Char PreSpacedWord'Seq)
- Pinchot.Examples.AllEarleyGrammars: g'South :: Grammar r (Prod r String Char South)
- Pinchot.Examples.AllEarleyGrammars: g'Space :: Grammar r (Prod r String Char Space)
- Pinchot.Examples.AllEarleyGrammars: g'SpaceSuffix :: Grammar r (Prod r String Char SpaceSuffix)
- Pinchot.Examples.AllEarleyGrammars: g'SpaceSuffix'Maybe :: Grammar r (Prod r String Char SpaceSuffix'Maybe)
- Pinchot.Examples.AllEarleyGrammars: g'State :: Grammar r (Prod r String Char State)
- Pinchot.Examples.AllEarleyGrammars: g'Street :: Grammar r (Prod r String Char Street)
- Pinchot.Examples.AllEarleyGrammars: g'StreetName :: Grammar r (Prod r String Char StreetName)
- Pinchot.Examples.AllEarleyGrammars: g'Suffix :: Grammar r (Prod r String Char Suffix)
- Pinchot.Examples.AllEarleyGrammars: g'Way :: Grammar r (Prod r String Char Way)
- Pinchot.Examples.AllEarleyGrammars: g'West :: Grammar r (Prod r String Char West)
- Pinchot.Examples.AllEarleyGrammars: g'Words :: Grammar r (Prod r String Char Words)
- Pinchot.Examples.AllEarleyGrammars: g'ZipCode :: Grammar r (Prod r String Char ZipCode)
- Pinchot.Examples.AllRulesRecord: [a'Digit'Seq1] :: Productions r -> Prod r String Char Digit'Seq1
- Pinchot.Examples.AllRulesRecord: [a'DirectionSpace'Maybe] :: Productions r -> Prod r String Char DirectionSpace'Maybe
- Pinchot.Examples.AllRulesRecord: [a'PreSpacedWord'Seq] :: Productions r -> Prod r String Char PreSpacedWord'Seq
- Pinchot.Examples.AllRulesRecord: [a'SpaceSuffix'Maybe] :: Productions r -> Prod r String Char SpaceSuffix'Maybe
- Pinchot.Examples.EarleyProduct: addressParser :: Grammar r (Prod r String Char Address)
- Pinchot.Examples.EarleyProduct: allProductions :: Grammar r (Productions r)
- Pinchot.Examples.Postal: postal :: Pinchot Char (Rule Char)
- Pinchot.Examples.PostalAstAllRules: Address :: Number -> Space -> DirectionSpace'Maybe -> StreetName -> SpaceSuffix'Maybe -> Comma -> Space -> City -> Comma -> Space -> State -> Space -> ZipCode -> Address
- Pinchot.Examples.PostalAstAllRules: Avenue :: Seq Char -> Avenue
- Pinchot.Examples.PostalAstAllRules: Boulevard :: Seq Char -> Boulevard
- Pinchot.Examples.PostalAstAllRules: City :: Words -> City
- Pinchot.Examples.PostalAstAllRules: Comma :: Char -> Comma
- Pinchot.Examples.PostalAstAllRules: ConsLetter :: Letter -> Letters -> Letters
- Pinchot.Examples.PostalAstAllRules: Digit :: Char -> Digit
- Pinchot.Examples.PostalAstAllRules: Digit'Seq1 :: (Digit, Seq Digit) -> Digit'Seq1
- Pinchot.Examples.PostalAstAllRules: Direction'East :: East -> Direction
- Pinchot.Examples.PostalAstAllRules: Direction'North :: North -> Direction
- Pinchot.Examples.PostalAstAllRules: Direction'South :: South -> Direction
- Pinchot.Examples.PostalAstAllRules: Direction'West :: West -> Direction
- Pinchot.Examples.PostalAstAllRules: DirectionSpace :: Direction -> Space -> DirectionSpace
- Pinchot.Examples.PostalAstAllRules: DirectionSpace'Maybe :: Maybe DirectionSpace -> DirectionSpace'Maybe
- Pinchot.Examples.PostalAstAllRules: East :: Char -> East
- Pinchot.Examples.PostalAstAllRules: Letter :: Char -> Letter
- Pinchot.Examples.PostalAstAllRules: NoLetter :: Letters
- Pinchot.Examples.PostalAstAllRules: North :: Char -> North
- Pinchot.Examples.PostalAstAllRules: Number :: Digit'Seq1 -> Number
- Pinchot.Examples.PostalAstAllRules: PostalWord :: Letter -> Letters -> PostalWord
- Pinchot.Examples.PostalAstAllRules: PreSpacedWord :: Space -> PostalWord -> PreSpacedWord
- Pinchot.Examples.PostalAstAllRules: PreSpacedWord'Seq :: Seq PreSpacedWord -> PreSpacedWord'Seq
- Pinchot.Examples.PostalAstAllRules: South :: Char -> South
- Pinchot.Examples.PostalAstAllRules: Space :: Char -> Space
- Pinchot.Examples.PostalAstAllRules: SpaceSuffix :: Space -> Suffix -> SpaceSuffix
- Pinchot.Examples.PostalAstAllRules: SpaceSuffix'Maybe :: Maybe SpaceSuffix -> SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstAllRules: State :: PostalWord -> State
- Pinchot.Examples.PostalAstAllRules: Street :: Seq Char -> Street
- Pinchot.Examples.PostalAstAllRules: StreetName :: Words -> StreetName
- Pinchot.Examples.PostalAstAllRules: Suffix'Avenue :: Avenue -> Suffix
- Pinchot.Examples.PostalAstAllRules: Suffix'Boulevard :: Boulevard -> Suffix
- Pinchot.Examples.PostalAstAllRules: Suffix'Street :: Street -> Suffix
- Pinchot.Examples.PostalAstAllRules: Suffix'Way :: Way -> Suffix
- Pinchot.Examples.PostalAstAllRules: Way :: Seq Char -> Way
- Pinchot.Examples.PostalAstAllRules: West :: Char -> West
- Pinchot.Examples.PostalAstAllRules: Words :: PostalWord -> PreSpacedWord'Seq -> Words
- Pinchot.Examples.PostalAstAllRules: ZipCode :: Digit'Seq1 -> ZipCode
- Pinchot.Examples.PostalAstAllRules: [_r'Address'0'Number] :: Address -> Number
- Pinchot.Examples.PostalAstAllRules: [_r'Address'1'Space] :: Address -> Space
- Pinchot.Examples.PostalAstAllRules: [_r'Address'10'State] :: Address -> State
- Pinchot.Examples.PostalAstAllRules: [_r'Address'11'Space] :: Address -> Space
- Pinchot.Examples.PostalAstAllRules: [_r'Address'12'ZipCode] :: Address -> ZipCode
- Pinchot.Examples.PostalAstAllRules: [_r'Address'2'DirectionSpace'Maybe] :: Address -> DirectionSpace'Maybe
- Pinchot.Examples.PostalAstAllRules: [_r'Address'3'StreetName] :: Address -> StreetName
- Pinchot.Examples.PostalAstAllRules: [_r'Address'4'SpaceSuffix'Maybe] :: Address -> SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstAllRules: [_r'Address'5'Comma] :: Address -> Comma
- Pinchot.Examples.PostalAstAllRules: [_r'Address'6'Space] :: Address -> Space
- Pinchot.Examples.PostalAstAllRules: [_r'Address'7'City] :: Address -> City
- Pinchot.Examples.PostalAstAllRules: [_r'Address'8'Comma] :: Address -> Comma
- Pinchot.Examples.PostalAstAllRules: [_r'Address'9'Space] :: Address -> Space
- Pinchot.Examples.PostalAstAllRules: [_r'DirectionSpace'0'Direction] :: DirectionSpace -> Direction
- Pinchot.Examples.PostalAstAllRules: [_r'DirectionSpace'1'Space] :: DirectionSpace -> Space
- Pinchot.Examples.PostalAstAllRules: [_r'PostalWord'0'Letter] :: PostalWord -> Letter
- Pinchot.Examples.PostalAstAllRules: [_r'PostalWord'1'Letters] :: PostalWord -> Letters
- Pinchot.Examples.PostalAstAllRules: [_r'PreSpacedWord'0'Space] :: PreSpacedWord -> Space
- Pinchot.Examples.PostalAstAllRules: [_r'PreSpacedWord'1'PostalWord] :: PreSpacedWord -> PostalWord
- Pinchot.Examples.PostalAstAllRules: [_r'SpaceSuffix'0'Space] :: SpaceSuffix -> Space
- Pinchot.Examples.PostalAstAllRules: [_r'SpaceSuffix'1'Suffix] :: SpaceSuffix -> Suffix
- Pinchot.Examples.PostalAstAllRules: [_r'Words'0'PostalWord] :: Words -> PostalWord
- Pinchot.Examples.PostalAstAllRules: [_r'Words'1'PreSpacedWord'Seq] :: Words -> PreSpacedWord'Seq
- Pinchot.Examples.PostalAstAllRules: _Avenue :: Prism' (Seq Char) Avenue
- Pinchot.Examples.PostalAstAllRules: _Boulevard :: Prism' (Seq Char) Boulevard
- Pinchot.Examples.PostalAstAllRules: _Comma :: Prism' Char Comma
- Pinchot.Examples.PostalAstAllRules: _ConsLetter :: Prism' Letters (Letter, Letters)
- Pinchot.Examples.PostalAstAllRules: _Digit :: Prism' Char Digit
- Pinchot.Examples.PostalAstAllRules: _Direction'East :: Prism' Direction East
- Pinchot.Examples.PostalAstAllRules: _Direction'North :: Prism' Direction North
- Pinchot.Examples.PostalAstAllRules: _Direction'South :: Prism' Direction South
- Pinchot.Examples.PostalAstAllRules: _Direction'West :: Prism' Direction West
- Pinchot.Examples.PostalAstAllRules: _East :: Prism' Char East
- Pinchot.Examples.PostalAstAllRules: _Letter :: Prism' Char Letter
- Pinchot.Examples.PostalAstAllRules: _NoLetter :: Prism' Letters ()
- Pinchot.Examples.PostalAstAllRules: _North :: Prism' Char North
- Pinchot.Examples.PostalAstAllRules: _South :: Prism' Char South
- Pinchot.Examples.PostalAstAllRules: _Space :: Prism' Char Space
- Pinchot.Examples.PostalAstAllRules: _Street :: Prism' (Seq Char) Street
- Pinchot.Examples.PostalAstAllRules: _Suffix'Avenue :: Prism' Suffix Avenue
- Pinchot.Examples.PostalAstAllRules: _Suffix'Boulevard :: Prism' Suffix Boulevard
- Pinchot.Examples.PostalAstAllRules: _Suffix'Street :: Prism' Suffix Street
- Pinchot.Examples.PostalAstAllRules: _Suffix'Way :: Prism' Suffix Way
- Pinchot.Examples.PostalAstAllRules: _Way :: Prism' (Seq Char) Way
- Pinchot.Examples.PostalAstAllRules: _West :: Prism' Char West
- Pinchot.Examples.PostalAstAllRules: data Address
- Pinchot.Examples.PostalAstAllRules: data Direction
- Pinchot.Examples.PostalAstAllRules: data DirectionSpace
- Pinchot.Examples.PostalAstAllRules: data Letters
- Pinchot.Examples.PostalAstAllRules: data PostalWord
- Pinchot.Examples.PostalAstAllRules: data PreSpacedWord
- Pinchot.Examples.PostalAstAllRules: data SpaceSuffix
- Pinchot.Examples.PostalAstAllRules: data Suffix
- Pinchot.Examples.PostalAstAllRules: data Words
- Pinchot.Examples.PostalAstAllRules: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstAllRules.City
- Pinchot.Examples.PostalAstAllRules: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstAllRules.Digit'Seq1
- Pinchot.Examples.PostalAstAllRules: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstAllRules.DirectionSpace'Maybe
- Pinchot.Examples.PostalAstAllRules: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstAllRules.Number
- Pinchot.Examples.PostalAstAllRules: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstAllRules.PreSpacedWord'Seq
- Pinchot.Examples.PostalAstAllRules: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstAllRules.SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstAllRules: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstAllRules.State
- Pinchot.Examples.PostalAstAllRules: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstAllRules.StreetName
- Pinchot.Examples.PostalAstAllRules: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstAllRules.ZipCode
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Address
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Avenue
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Boulevard
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.City
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Comma
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Digit
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Digit'Seq1
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Direction
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.DirectionSpace
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.DirectionSpace'Maybe
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.East
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Letter
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Letters
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.North
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Number
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.PostalWord
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.PreSpacedWord
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.PreSpacedWord'Seq
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.South
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Space
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.SpaceSuffix
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.State
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Street
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.StreetName
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Suffix
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Way
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.West
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.Words
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Eq Pinchot.Examples.PostalAstAllRules.ZipCode
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Address
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Avenue
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Boulevard
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.City
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Comma
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Digit
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Digit'Seq1
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Direction
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.DirectionSpace
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.DirectionSpace'Maybe
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.East
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Letter
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Letters
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.North
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Number
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.PostalWord
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.PreSpacedWord
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.PreSpacedWord'Seq
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.South
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Space
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.SpaceSuffix
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.State
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Street
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.StreetName
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Suffix
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Way
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.West
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.Words
- Pinchot.Examples.PostalAstAllRules: instance GHC.Classes.Ord Pinchot.Examples.PostalAstAllRules.ZipCode
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Address
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Avenue
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Boulevard
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.City
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Comma
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Digit
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Digit'Seq1
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Direction
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.DirectionSpace
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.DirectionSpace'Maybe
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.East
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Letter
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Letters
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.North
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Number
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.PostalWord
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.PreSpacedWord
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.PreSpacedWord'Seq
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.South
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Space
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.SpaceSuffix
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.State
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Street
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.StreetName
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Suffix
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Way
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.West
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.Words
- Pinchot.Examples.PostalAstAllRules: instance GHC.Show.Show Pinchot.Examples.PostalAstAllRules.ZipCode
- Pinchot.Examples.PostalAstAllRules: newtype Avenue
- Pinchot.Examples.PostalAstAllRules: newtype Boulevard
- Pinchot.Examples.PostalAstAllRules: newtype City
- Pinchot.Examples.PostalAstAllRules: newtype Comma
- Pinchot.Examples.PostalAstAllRules: newtype Digit
- Pinchot.Examples.PostalAstAllRules: newtype Digit'Seq1
- Pinchot.Examples.PostalAstAllRules: newtype DirectionSpace'Maybe
- Pinchot.Examples.PostalAstAllRules: newtype East
- Pinchot.Examples.PostalAstAllRules: newtype Letter
- Pinchot.Examples.PostalAstAllRules: newtype North
- Pinchot.Examples.PostalAstAllRules: newtype Number
- Pinchot.Examples.PostalAstAllRules: newtype PreSpacedWord'Seq
- Pinchot.Examples.PostalAstAllRules: newtype South
- Pinchot.Examples.PostalAstAllRules: newtype Space
- Pinchot.Examples.PostalAstAllRules: newtype SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstAllRules: newtype State
- Pinchot.Examples.PostalAstAllRules: newtype Street
- Pinchot.Examples.PostalAstAllRules: newtype StreetName
- Pinchot.Examples.PostalAstAllRules: newtype Way
- Pinchot.Examples.PostalAstAllRules: newtype West
- Pinchot.Examples.PostalAstAllRules: newtype ZipCode
- Pinchot.Examples.PostalAstAllRules: postalGrammar :: Grammar r (Prod r String Char Address)
- Pinchot.Examples.PostalAstAllRules: r'Address'0'Number :: Lens' Address Number
- Pinchot.Examples.PostalAstAllRules: r'Address'1'Space :: Lens' Address Space
- Pinchot.Examples.PostalAstAllRules: r'Address'10'State :: Lens' Address State
- Pinchot.Examples.PostalAstAllRules: r'Address'11'Space :: Lens' Address Space
- Pinchot.Examples.PostalAstAllRules: r'Address'12'ZipCode :: Lens' Address ZipCode
- Pinchot.Examples.PostalAstAllRules: r'Address'2'DirectionSpace'Maybe :: Lens' Address DirectionSpace'Maybe
- Pinchot.Examples.PostalAstAllRules: r'Address'3'StreetName :: Lens' Address StreetName
- Pinchot.Examples.PostalAstAllRules: r'Address'4'SpaceSuffix'Maybe :: Lens' Address SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstAllRules: r'Address'5'Comma :: Lens' Address Comma
- Pinchot.Examples.PostalAstAllRules: r'Address'6'Space :: Lens' Address Space
- Pinchot.Examples.PostalAstAllRules: r'Address'7'City :: Lens' Address City
- Pinchot.Examples.PostalAstAllRules: r'Address'8'Comma :: Lens' Address Comma
- Pinchot.Examples.PostalAstAllRules: r'Address'9'Space :: Lens' Address Space
- Pinchot.Examples.PostalAstAllRules: r'DirectionSpace'0'Direction :: Lens' DirectionSpace Direction
- Pinchot.Examples.PostalAstAllRules: r'DirectionSpace'1'Space :: Lens' DirectionSpace Space
- Pinchot.Examples.PostalAstAllRules: r'PostalWord'0'Letter :: Lens' PostalWord Letter
- Pinchot.Examples.PostalAstAllRules: r'PostalWord'1'Letters :: Lens' PostalWord Letters
- Pinchot.Examples.PostalAstAllRules: r'PreSpacedWord'0'Space :: Lens' PreSpacedWord Space
- Pinchot.Examples.PostalAstAllRules: r'PreSpacedWord'1'PostalWord :: Lens' PreSpacedWord PostalWord
- Pinchot.Examples.PostalAstAllRules: r'SpaceSuffix'0'Space :: Lens' SpaceSuffix Space
- Pinchot.Examples.PostalAstAllRules: r'SpaceSuffix'1'Suffix :: Lens' SpaceSuffix Suffix
- Pinchot.Examples.PostalAstAllRules: r'Words'0'PostalWord :: Lens' Words PostalWord
- Pinchot.Examples.PostalAstAllRules: r'Words'1'PreSpacedWord'Seq :: Lens' Words PreSpacedWord'Seq
- Pinchot.Examples.PostalAstAllRules: t'Address :: Address -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Avenue :: Avenue -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Boulevard :: Boulevard -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'City :: City -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Comma :: Comma -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Digit :: Digit -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Digit'Seq1 :: Digit'Seq1 -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Direction :: Direction -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'DirectionSpace :: DirectionSpace -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'DirectionSpace'Maybe :: DirectionSpace'Maybe -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'East :: East -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Letter :: Letter -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Letters :: Letters -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'North :: North -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Number :: Number -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'PostalWord :: PostalWord -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'PreSpacedWord :: PreSpacedWord -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'PreSpacedWord'Seq :: PreSpacedWord'Seq -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'South :: South -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Space :: Space -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'SpaceSuffix :: SpaceSuffix -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'SpaceSuffix'Maybe :: SpaceSuffix'Maybe -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'State :: State -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Street :: Street -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'StreetName :: StreetName -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Suffix :: Suffix -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Way :: Way -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'West :: West -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'Words :: Words -> Seq Char
- Pinchot.Examples.PostalAstAllRules: t'ZipCode :: ZipCode -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: Address :: Number -> Space -> DirectionSpace'Maybe -> StreetName -> SpaceSuffix'Maybe -> Comma -> Space -> City -> Comma -> Space -> State -> Space -> ZipCode -> Address
- Pinchot.Examples.PostalAstNoLenses: Avenue :: Seq Char -> Avenue
- Pinchot.Examples.PostalAstNoLenses: Boulevard :: Seq Char -> Boulevard
- Pinchot.Examples.PostalAstNoLenses: City :: Words -> City
- Pinchot.Examples.PostalAstNoLenses: Comma :: Char -> Comma
- Pinchot.Examples.PostalAstNoLenses: ConsLetter :: Letter -> Letters -> Letters
- Pinchot.Examples.PostalAstNoLenses: Digit :: Char -> Digit
- Pinchot.Examples.PostalAstNoLenses: Digit'Seq1 :: (Digit, Seq Digit) -> Digit'Seq1
- Pinchot.Examples.PostalAstNoLenses: Direction'East :: East -> Direction
- Pinchot.Examples.PostalAstNoLenses: Direction'North :: North -> Direction
- Pinchot.Examples.PostalAstNoLenses: Direction'South :: South -> Direction
- Pinchot.Examples.PostalAstNoLenses: Direction'West :: West -> Direction
- Pinchot.Examples.PostalAstNoLenses: DirectionSpace :: Direction -> Space -> DirectionSpace
- Pinchot.Examples.PostalAstNoLenses: DirectionSpace'Maybe :: Maybe DirectionSpace -> DirectionSpace'Maybe
- Pinchot.Examples.PostalAstNoLenses: East :: Char -> East
- Pinchot.Examples.PostalAstNoLenses: Letter :: Char -> Letter
- Pinchot.Examples.PostalAstNoLenses: NoLetter :: Letters
- Pinchot.Examples.PostalAstNoLenses: North :: Char -> North
- Pinchot.Examples.PostalAstNoLenses: Number :: Digit'Seq1 -> Number
- Pinchot.Examples.PostalAstNoLenses: PostalWord :: Letter -> Letters -> PostalWord
- Pinchot.Examples.PostalAstNoLenses: PreSpacedWord :: Space -> PostalWord -> PreSpacedWord
- Pinchot.Examples.PostalAstNoLenses: PreSpacedWord'Seq :: Seq PreSpacedWord -> PreSpacedWord'Seq
- Pinchot.Examples.PostalAstNoLenses: South :: Char -> South
- Pinchot.Examples.PostalAstNoLenses: Space :: Char -> Space
- Pinchot.Examples.PostalAstNoLenses: SpaceSuffix :: Space -> Suffix -> SpaceSuffix
- Pinchot.Examples.PostalAstNoLenses: SpaceSuffix'Maybe :: Maybe SpaceSuffix -> SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstNoLenses: State :: PostalWord -> State
- Pinchot.Examples.PostalAstNoLenses: Street :: Seq Char -> Street
- Pinchot.Examples.PostalAstNoLenses: StreetName :: Words -> StreetName
- Pinchot.Examples.PostalAstNoLenses: Suffix'Avenue :: Avenue -> Suffix
- Pinchot.Examples.PostalAstNoLenses: Suffix'Boulevard :: Boulevard -> Suffix
- Pinchot.Examples.PostalAstNoLenses: Suffix'Street :: Street -> Suffix
- Pinchot.Examples.PostalAstNoLenses: Suffix'Way :: Way -> Suffix
- Pinchot.Examples.PostalAstNoLenses: Way :: Seq Char -> Way
- Pinchot.Examples.PostalAstNoLenses: West :: Char -> West
- Pinchot.Examples.PostalAstNoLenses: Words :: PostalWord -> PreSpacedWord'Seq -> Words
- Pinchot.Examples.PostalAstNoLenses: ZipCode :: Digit'Seq1 -> ZipCode
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'0'Number] :: Address -> Number
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'1'Space] :: Address -> Space
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'10'State] :: Address -> State
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'11'Space] :: Address -> Space
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'12'ZipCode] :: Address -> ZipCode
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'2'DirectionSpace'Maybe] :: Address -> DirectionSpace'Maybe
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'3'StreetName] :: Address -> StreetName
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'4'SpaceSuffix'Maybe] :: Address -> SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'5'Comma] :: Address -> Comma
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'6'Space] :: Address -> Space
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'7'City] :: Address -> City
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'8'Comma] :: Address -> Comma
- Pinchot.Examples.PostalAstNoLenses: [_r'Address'9'Space] :: Address -> Space
- Pinchot.Examples.PostalAstNoLenses: [_r'DirectionSpace'0'Direction] :: DirectionSpace -> Direction
- Pinchot.Examples.PostalAstNoLenses: [_r'DirectionSpace'1'Space] :: DirectionSpace -> Space
- Pinchot.Examples.PostalAstNoLenses: [_r'PostalWord'0'Letter] :: PostalWord -> Letter
- Pinchot.Examples.PostalAstNoLenses: [_r'PostalWord'1'Letters] :: PostalWord -> Letters
- Pinchot.Examples.PostalAstNoLenses: [_r'PreSpacedWord'0'Space] :: PreSpacedWord -> Space
- Pinchot.Examples.PostalAstNoLenses: [_r'PreSpacedWord'1'PostalWord] :: PreSpacedWord -> PostalWord
- Pinchot.Examples.PostalAstNoLenses: [_r'SpaceSuffix'0'Space] :: SpaceSuffix -> Space
- Pinchot.Examples.PostalAstNoLenses: [_r'SpaceSuffix'1'Suffix] :: SpaceSuffix -> Suffix
- Pinchot.Examples.PostalAstNoLenses: [_r'Words'0'PostalWord] :: Words -> PostalWord
- Pinchot.Examples.PostalAstNoLenses: [_r'Words'1'PreSpacedWord'Seq] :: Words -> PreSpacedWord'Seq
- Pinchot.Examples.PostalAstNoLenses: data Address
- Pinchot.Examples.PostalAstNoLenses: data Direction
- Pinchot.Examples.PostalAstNoLenses: data DirectionSpace
- Pinchot.Examples.PostalAstNoLenses: data Letters
- Pinchot.Examples.PostalAstNoLenses: data PostalWord
- Pinchot.Examples.PostalAstNoLenses: data PreSpacedWord
- Pinchot.Examples.PostalAstNoLenses: data SpaceSuffix
- Pinchot.Examples.PostalAstNoLenses: data Suffix
- Pinchot.Examples.PostalAstNoLenses: data Words
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Address
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Avenue
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Boulevard
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.City
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Comma
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Digit
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Digit'Seq1
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Direction
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.DirectionSpace
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.DirectionSpace'Maybe
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.East
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Letter
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Letters
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.North
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Number
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.PostalWord
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.PreSpacedWord
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.PreSpacedWord'Seq
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.South
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Space
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.SpaceSuffix
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.State
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Street
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.StreetName
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Suffix
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Way
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.West
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.Words
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Eq Pinchot.Examples.PostalAstNoLenses.ZipCode
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Address
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Avenue
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Boulevard
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.City
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Comma
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Digit
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Digit'Seq1
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Direction
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.DirectionSpace
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.DirectionSpace'Maybe
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.East
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Letter
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Letters
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.North
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Number
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.PostalWord
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.PreSpacedWord
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.PreSpacedWord'Seq
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.South
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Space
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.SpaceSuffix
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.State
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Street
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.StreetName
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Suffix
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Way
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.West
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.Words
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Classes.Ord Pinchot.Examples.PostalAstNoLenses.ZipCode
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Address
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Avenue
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Boulevard
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.City
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Comma
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Digit
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Digit'Seq1
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Direction
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.DirectionSpace
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.DirectionSpace'Maybe
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.East
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Letter
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Letters
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.North
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Number
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.PostalWord
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.PreSpacedWord
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.PreSpacedWord'Seq
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.South
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Space
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.SpaceSuffix
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.State
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Street
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.StreetName
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Suffix
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Way
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.West
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.Words
- Pinchot.Examples.PostalAstNoLenses: instance GHC.Show.Show Pinchot.Examples.PostalAstNoLenses.ZipCode
- Pinchot.Examples.PostalAstNoLenses: newtype Avenue
- Pinchot.Examples.PostalAstNoLenses: newtype Boulevard
- Pinchot.Examples.PostalAstNoLenses: newtype City
- Pinchot.Examples.PostalAstNoLenses: newtype Comma
- Pinchot.Examples.PostalAstNoLenses: newtype Digit
- Pinchot.Examples.PostalAstNoLenses: newtype Digit'Seq1
- Pinchot.Examples.PostalAstNoLenses: newtype DirectionSpace'Maybe
- Pinchot.Examples.PostalAstNoLenses: newtype East
- Pinchot.Examples.PostalAstNoLenses: newtype Letter
- Pinchot.Examples.PostalAstNoLenses: newtype North
- Pinchot.Examples.PostalAstNoLenses: newtype Number
- Pinchot.Examples.PostalAstNoLenses: newtype PreSpacedWord'Seq
- Pinchot.Examples.PostalAstNoLenses: newtype South
- Pinchot.Examples.PostalAstNoLenses: newtype Space
- Pinchot.Examples.PostalAstNoLenses: newtype SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstNoLenses: newtype State
- Pinchot.Examples.PostalAstNoLenses: newtype Street
- Pinchot.Examples.PostalAstNoLenses: newtype StreetName
- Pinchot.Examples.PostalAstNoLenses: newtype Way
- Pinchot.Examples.PostalAstNoLenses: newtype West
- Pinchot.Examples.PostalAstNoLenses: newtype ZipCode
- Pinchot.Examples.PostalAstNoLenses: postalGrammar :: Grammar r (Prod r String Char Address)
- Pinchot.Examples.PostalAstNoLenses: t'Address :: Address -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Avenue :: Avenue -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Boulevard :: Boulevard -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'City :: City -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Comma :: Comma -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Digit :: Digit -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Digit'Seq1 :: Digit'Seq1 -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Direction :: Direction -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'DirectionSpace :: DirectionSpace -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'DirectionSpace'Maybe :: DirectionSpace'Maybe -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'East :: East -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Letter :: Letter -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Letters :: Letters -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'North :: North -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Number :: Number -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'PostalWord :: PostalWord -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'PreSpacedWord :: PreSpacedWord -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'PreSpacedWord'Seq :: PreSpacedWord'Seq -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'South :: South -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Space :: Space -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'SpaceSuffix :: SpaceSuffix -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'SpaceSuffix'Maybe :: SpaceSuffix'Maybe -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'State :: State -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Street :: Street -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'StreetName :: StreetName -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Suffix :: Suffix -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Way :: Way -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'West :: West -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'Words :: Words -> Seq Char
- Pinchot.Examples.PostalAstNoLenses: t'ZipCode :: ZipCode -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: Address :: Number -> Space -> DirectionSpace'Maybe -> StreetName -> SpaceSuffix'Maybe -> Comma -> Space -> City -> Comma -> Space -> State -> Space -> ZipCode -> Address
- Pinchot.Examples.PostalAstRuleTree: Avenue :: Seq Char -> Avenue
- Pinchot.Examples.PostalAstRuleTree: Boulevard :: Seq Char -> Boulevard
- Pinchot.Examples.PostalAstRuleTree: City :: Words -> City
- Pinchot.Examples.PostalAstRuleTree: Comma :: Char -> Comma
- Pinchot.Examples.PostalAstRuleTree: ConsLetter :: Letter -> Letters -> Letters
- Pinchot.Examples.PostalAstRuleTree: Digit :: Char -> Digit
- Pinchot.Examples.PostalAstRuleTree: Digit'Seq1 :: (Digit, Seq Digit) -> Digit'Seq1
- Pinchot.Examples.PostalAstRuleTree: Direction'East :: East -> Direction
- Pinchot.Examples.PostalAstRuleTree: Direction'North :: North -> Direction
- Pinchot.Examples.PostalAstRuleTree: Direction'South :: South -> Direction
- Pinchot.Examples.PostalAstRuleTree: Direction'West :: West -> Direction
- Pinchot.Examples.PostalAstRuleTree: DirectionSpace :: Direction -> Space -> DirectionSpace
- Pinchot.Examples.PostalAstRuleTree: DirectionSpace'Maybe :: Maybe DirectionSpace -> DirectionSpace'Maybe
- Pinchot.Examples.PostalAstRuleTree: East :: Char -> East
- Pinchot.Examples.PostalAstRuleTree: Letter :: Char -> Letter
- Pinchot.Examples.PostalAstRuleTree: NoLetter :: Letters
- Pinchot.Examples.PostalAstRuleTree: North :: Char -> North
- Pinchot.Examples.PostalAstRuleTree: Number :: Digit'Seq1 -> Number
- Pinchot.Examples.PostalAstRuleTree: PostalWord :: Letter -> Letters -> PostalWord
- Pinchot.Examples.PostalAstRuleTree: PreSpacedWord :: Space -> PostalWord -> PreSpacedWord
- Pinchot.Examples.PostalAstRuleTree: PreSpacedWord'Seq :: Seq PreSpacedWord -> PreSpacedWord'Seq
- Pinchot.Examples.PostalAstRuleTree: South :: Char -> South
- Pinchot.Examples.PostalAstRuleTree: Space :: Char -> Space
- Pinchot.Examples.PostalAstRuleTree: SpaceSuffix :: Space -> Suffix -> SpaceSuffix
- Pinchot.Examples.PostalAstRuleTree: SpaceSuffix'Maybe :: Maybe SpaceSuffix -> SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstRuleTree: State :: PostalWord -> State
- Pinchot.Examples.PostalAstRuleTree: Street :: Seq Char -> Street
- Pinchot.Examples.PostalAstRuleTree: StreetName :: Words -> StreetName
- Pinchot.Examples.PostalAstRuleTree: Suffix'Avenue :: Avenue -> Suffix
- Pinchot.Examples.PostalAstRuleTree: Suffix'Boulevard :: Boulevard -> Suffix
- Pinchot.Examples.PostalAstRuleTree: Suffix'Street :: Street -> Suffix
- Pinchot.Examples.PostalAstRuleTree: Suffix'Way :: Way -> Suffix
- Pinchot.Examples.PostalAstRuleTree: Way :: Seq Char -> Way
- Pinchot.Examples.PostalAstRuleTree: West :: Char -> West
- Pinchot.Examples.PostalAstRuleTree: Words :: PostalWord -> PreSpacedWord'Seq -> Words
- Pinchot.Examples.PostalAstRuleTree: ZipCode :: Digit'Seq1 -> ZipCode
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'0'Number] :: Address -> Number
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'1'Space] :: Address -> Space
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'10'State] :: Address -> State
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'11'Space] :: Address -> Space
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'12'ZipCode] :: Address -> ZipCode
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'2'DirectionSpace'Maybe] :: Address -> DirectionSpace'Maybe
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'3'StreetName] :: Address -> StreetName
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'4'SpaceSuffix'Maybe] :: Address -> SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'5'Comma] :: Address -> Comma
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'6'Space] :: Address -> Space
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'7'City] :: Address -> City
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'8'Comma] :: Address -> Comma
- Pinchot.Examples.PostalAstRuleTree: [_r'Address'9'Space] :: Address -> Space
- Pinchot.Examples.PostalAstRuleTree: [_r'DirectionSpace'0'Direction] :: DirectionSpace -> Direction
- Pinchot.Examples.PostalAstRuleTree: [_r'DirectionSpace'1'Space] :: DirectionSpace -> Space
- Pinchot.Examples.PostalAstRuleTree: [_r'PostalWord'0'Letter] :: PostalWord -> Letter
- Pinchot.Examples.PostalAstRuleTree: [_r'PostalWord'1'Letters] :: PostalWord -> Letters
- Pinchot.Examples.PostalAstRuleTree: [_r'PreSpacedWord'0'Space] :: PreSpacedWord -> Space
- Pinchot.Examples.PostalAstRuleTree: [_r'PreSpacedWord'1'PostalWord] :: PreSpacedWord -> PostalWord
- Pinchot.Examples.PostalAstRuleTree: [_r'SpaceSuffix'0'Space] :: SpaceSuffix -> Space
- Pinchot.Examples.PostalAstRuleTree: [_r'SpaceSuffix'1'Suffix] :: SpaceSuffix -> Suffix
- Pinchot.Examples.PostalAstRuleTree: [_r'Words'0'PostalWord] :: Words -> PostalWord
- Pinchot.Examples.PostalAstRuleTree: [_r'Words'1'PreSpacedWord'Seq] :: Words -> PreSpacedWord'Seq
- Pinchot.Examples.PostalAstRuleTree: _Avenue :: Prism' (Seq Char) Avenue
- Pinchot.Examples.PostalAstRuleTree: _Boulevard :: Prism' (Seq Char) Boulevard
- Pinchot.Examples.PostalAstRuleTree: _Comma :: Prism' Char Comma
- Pinchot.Examples.PostalAstRuleTree: _ConsLetter :: Prism' Letters (Letter, Letters)
- Pinchot.Examples.PostalAstRuleTree: _Digit :: Prism' Char Digit
- Pinchot.Examples.PostalAstRuleTree: _Direction'East :: Prism' Direction East
- Pinchot.Examples.PostalAstRuleTree: _Direction'North :: Prism' Direction North
- Pinchot.Examples.PostalAstRuleTree: _Direction'South :: Prism' Direction South
- Pinchot.Examples.PostalAstRuleTree: _Direction'West :: Prism' Direction West
- Pinchot.Examples.PostalAstRuleTree: _East :: Prism' Char East
- Pinchot.Examples.PostalAstRuleTree: _Letter :: Prism' Char Letter
- Pinchot.Examples.PostalAstRuleTree: _NoLetter :: Prism' Letters ()
- Pinchot.Examples.PostalAstRuleTree: _North :: Prism' Char North
- Pinchot.Examples.PostalAstRuleTree: _South :: Prism' Char South
- Pinchot.Examples.PostalAstRuleTree: _Space :: Prism' Char Space
- Pinchot.Examples.PostalAstRuleTree: _Street :: Prism' (Seq Char) Street
- Pinchot.Examples.PostalAstRuleTree: _Suffix'Avenue :: Prism' Suffix Avenue
- Pinchot.Examples.PostalAstRuleTree: _Suffix'Boulevard :: Prism' Suffix Boulevard
- Pinchot.Examples.PostalAstRuleTree: _Suffix'Street :: Prism' Suffix Street
- Pinchot.Examples.PostalAstRuleTree: _Suffix'Way :: Prism' Suffix Way
- Pinchot.Examples.PostalAstRuleTree: _Way :: Prism' (Seq Char) Way
- Pinchot.Examples.PostalAstRuleTree: _West :: Prism' Char West
- Pinchot.Examples.PostalAstRuleTree: data Address
- Pinchot.Examples.PostalAstRuleTree: data Direction
- Pinchot.Examples.PostalAstRuleTree: data DirectionSpace
- Pinchot.Examples.PostalAstRuleTree: data Letters
- Pinchot.Examples.PostalAstRuleTree: data PostalWord
- Pinchot.Examples.PostalAstRuleTree: data PreSpacedWord
- Pinchot.Examples.PostalAstRuleTree: data SpaceSuffix
- Pinchot.Examples.PostalAstRuleTree: data Suffix
- Pinchot.Examples.PostalAstRuleTree: data Words
- Pinchot.Examples.PostalAstRuleTree: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstRuleTree.City
- Pinchot.Examples.PostalAstRuleTree: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstRuleTree.Digit'Seq1
- Pinchot.Examples.PostalAstRuleTree: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstRuleTree.DirectionSpace'Maybe
- Pinchot.Examples.PostalAstRuleTree: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstRuleTree.Number
- Pinchot.Examples.PostalAstRuleTree: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstRuleTree.PreSpacedWord'Seq
- Pinchot.Examples.PostalAstRuleTree: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstRuleTree.SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstRuleTree: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstRuleTree.State
- Pinchot.Examples.PostalAstRuleTree: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstRuleTree.StreetName
- Pinchot.Examples.PostalAstRuleTree: instance Control.Lens.Wrapped.Wrapped Pinchot.Examples.PostalAstRuleTree.ZipCode
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Address
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Avenue
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Boulevard
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.City
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Comma
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Digit
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Digit'Seq1
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Direction
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.DirectionSpace
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.DirectionSpace'Maybe
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.East
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Letter
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Letters
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.North
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Number
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.PostalWord
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.PreSpacedWord
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.PreSpacedWord'Seq
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.South
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Space
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.SpaceSuffix
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.State
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Street
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.StreetName
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Suffix
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Way
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.West
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.Words
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Eq Pinchot.Examples.PostalAstRuleTree.ZipCode
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Address
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Avenue
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Boulevard
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.City
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Comma
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Digit
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Digit'Seq1
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Direction
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.DirectionSpace
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.DirectionSpace'Maybe
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.East
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Letter
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Letters
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.North
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Number
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.PostalWord
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.PreSpacedWord
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.PreSpacedWord'Seq
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.South
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Space
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.SpaceSuffix
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.State
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Street
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.StreetName
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Suffix
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Way
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.West
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.Words
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Classes.Ord Pinchot.Examples.PostalAstRuleTree.ZipCode
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Address
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Avenue
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Boulevard
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.City
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Comma
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Digit
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Digit'Seq1
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Direction
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.DirectionSpace
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.DirectionSpace'Maybe
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.East
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Letter
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Letters
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.North
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Number
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.PostalWord
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.PreSpacedWord
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.PreSpacedWord'Seq
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.South
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Space
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.SpaceSuffix
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.State
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Street
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.StreetName
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Suffix
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Way
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.West
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.Words
- Pinchot.Examples.PostalAstRuleTree: instance GHC.Show.Show Pinchot.Examples.PostalAstRuleTree.ZipCode
- Pinchot.Examples.PostalAstRuleTree: newtype Avenue
- Pinchot.Examples.PostalAstRuleTree: newtype Boulevard
- Pinchot.Examples.PostalAstRuleTree: newtype City
- Pinchot.Examples.PostalAstRuleTree: newtype Comma
- Pinchot.Examples.PostalAstRuleTree: newtype Digit
- Pinchot.Examples.PostalAstRuleTree: newtype Digit'Seq1
- Pinchot.Examples.PostalAstRuleTree: newtype DirectionSpace'Maybe
- Pinchot.Examples.PostalAstRuleTree: newtype East
- Pinchot.Examples.PostalAstRuleTree: newtype Letter
- Pinchot.Examples.PostalAstRuleTree: newtype North
- Pinchot.Examples.PostalAstRuleTree: newtype Number
- Pinchot.Examples.PostalAstRuleTree: newtype PreSpacedWord'Seq
- Pinchot.Examples.PostalAstRuleTree: newtype South
- Pinchot.Examples.PostalAstRuleTree: newtype Space
- Pinchot.Examples.PostalAstRuleTree: newtype SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstRuleTree: newtype State
- Pinchot.Examples.PostalAstRuleTree: newtype Street
- Pinchot.Examples.PostalAstRuleTree: newtype StreetName
- Pinchot.Examples.PostalAstRuleTree: newtype Way
- Pinchot.Examples.PostalAstRuleTree: newtype West
- Pinchot.Examples.PostalAstRuleTree: newtype ZipCode
- Pinchot.Examples.PostalAstRuleTree: postalGrammar :: Grammar r (Prod r String Char Address)
- Pinchot.Examples.PostalAstRuleTree: r'Address'0'Number :: Lens' Address Number
- Pinchot.Examples.PostalAstRuleTree: r'Address'1'Space :: Lens' Address Space
- Pinchot.Examples.PostalAstRuleTree: r'Address'10'State :: Lens' Address State
- Pinchot.Examples.PostalAstRuleTree: r'Address'11'Space :: Lens' Address Space
- Pinchot.Examples.PostalAstRuleTree: r'Address'12'ZipCode :: Lens' Address ZipCode
- Pinchot.Examples.PostalAstRuleTree: r'Address'2'DirectionSpace'Maybe :: Lens' Address DirectionSpace'Maybe
- Pinchot.Examples.PostalAstRuleTree: r'Address'3'StreetName :: Lens' Address StreetName
- Pinchot.Examples.PostalAstRuleTree: r'Address'4'SpaceSuffix'Maybe :: Lens' Address SpaceSuffix'Maybe
- Pinchot.Examples.PostalAstRuleTree: r'Address'5'Comma :: Lens' Address Comma
- Pinchot.Examples.PostalAstRuleTree: r'Address'6'Space :: Lens' Address Space
- Pinchot.Examples.PostalAstRuleTree: r'Address'7'City :: Lens' Address City
- Pinchot.Examples.PostalAstRuleTree: r'Address'8'Comma :: Lens' Address Comma
- Pinchot.Examples.PostalAstRuleTree: r'Address'9'Space :: Lens' Address Space
- Pinchot.Examples.PostalAstRuleTree: r'DirectionSpace'0'Direction :: Lens' DirectionSpace Direction
- Pinchot.Examples.PostalAstRuleTree: r'DirectionSpace'1'Space :: Lens' DirectionSpace Space
- Pinchot.Examples.PostalAstRuleTree: r'PostalWord'0'Letter :: Lens' PostalWord Letter
- Pinchot.Examples.PostalAstRuleTree: r'PostalWord'1'Letters :: Lens' PostalWord Letters
- Pinchot.Examples.PostalAstRuleTree: r'PreSpacedWord'0'Space :: Lens' PreSpacedWord Space
- Pinchot.Examples.PostalAstRuleTree: r'PreSpacedWord'1'PostalWord :: Lens' PreSpacedWord PostalWord
- Pinchot.Examples.PostalAstRuleTree: r'SpaceSuffix'0'Space :: Lens' SpaceSuffix Space
- Pinchot.Examples.PostalAstRuleTree: r'SpaceSuffix'1'Suffix :: Lens' SpaceSuffix Suffix
- Pinchot.Examples.PostalAstRuleTree: r'Words'0'PostalWord :: Lens' Words PostalWord
- Pinchot.Examples.PostalAstRuleTree: r'Words'1'PreSpacedWord'Seq :: Lens' Words PreSpacedWord'Seq
- Pinchot.Examples.PostalAstRuleTree: t'Address :: Address -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Avenue :: Avenue -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Boulevard :: Boulevard -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'City :: City -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Comma :: Comma -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Digit :: Digit -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Digit'Seq1 :: Digit'Seq1 -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Direction :: Direction -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'DirectionSpace :: DirectionSpace -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'DirectionSpace'Maybe :: DirectionSpace'Maybe -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'East :: East -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Letter :: Letter -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Letters :: Letters -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'North :: North -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Number :: Number -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'PostalWord :: PostalWord -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'PreSpacedWord :: PreSpacedWord -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'PreSpacedWord'Seq :: PreSpacedWord'Seq -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'South :: South -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Space :: Space -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'SpaceSuffix :: SpaceSuffix -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'SpaceSuffix'Maybe :: SpaceSuffix'Maybe -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'State :: State -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Street :: Street -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'StreetName :: StreetName -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Suffix :: Suffix -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Way :: Way -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'West :: West -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'Words :: Words -> Seq Char
- Pinchot.Examples.PostalAstRuleTree: t'ZipCode :: ZipCode -> Seq Char
- Pinchot.Examples.QualifiedImport: myParser :: Grammar r (Prod r String Char Address)
- Pinchot.Internal: (<?>) :: Pinchot t (Rule t) -> String -> Pinchot t (Rule t)
- Pinchot.Internal: Branch :: String -> (Seq (Rule t)) -> Branch t
- Pinchot.Internal: EmptyNonTerminal :: String -> Error
- Pinchot.Internal: InvalidName :: String -> Error
- Pinchot.Internal: Names :: Set RuleName -> Set String -> Int -> Map Int (Rule t) -> Names t
- Pinchot.Internal: Pinchot :: ExceptT Error (State (Names t)) a -> Pinchot t a
- Pinchot.Internal: RBranch :: (Branch t, Seq (Branch t)) -> RuleType t
- Pinchot.Internal: RList :: (Rule t) -> RuleType t
- Pinchot.Internal: RList1 :: (Rule t) -> RuleType t
- Pinchot.Internal: ROptional :: (Rule t) -> RuleType t
- Pinchot.Internal: RRecord :: (Seq (Rule t)) -> RuleType t
- Pinchot.Internal: RSeqTerm :: (Seq t) -> RuleType t
- Pinchot.Internal: RTerminal :: (Intervals t) -> RuleType t
- Pinchot.Internal: RUnion :: (Rule t, Seq (Rule t)) -> RuleType t
- Pinchot.Internal: RWrap :: (Rule t) -> RuleType t
- Pinchot.Internal: Rule :: String -> (Maybe String) -> (RuleType t) -> Rule t
- Pinchot.Internal: [allRules] :: Names t -> Map Int (Rule t)
- Pinchot.Internal: [dataConNames] :: Names t -> Set String
- Pinchot.Internal: [nextIndex] :: Names t -> Int
- Pinchot.Internal: [runPinchot] :: Pinchot t a -> ExceptT Error (State (Names t)) a
- Pinchot.Internal: [tyConNames] :: Names t -> Set RuleName
- Pinchot.Internal: addDataConName :: AlternativeName -> Pinchot t ()
- Pinchot.Internal: addDataConNames :: Rule t -> Pinchot t ()
- Pinchot.Internal: addIndices :: Foldable c => c a -> [(Int, a)]
- Pinchot.Internal: addPrefix :: String -> String -> String
- Pinchot.Internal: addRuleName :: RuleName -> Pinchot t ()
- Pinchot.Internal: allEarleyGrammars :: Lift t => Qualifier -> Name -> Pinchot t a -> DecsQ
- Pinchot.Internal: allRulesRecord :: Qualifier -> Name -> Pinchot t a -> DecsQ
- Pinchot.Internal: allRulesToTypes :: Lift t => MakeOptics -> Name -> Seq Name -> Pinchot t a -> DecsQ
- Pinchot.Internal: bigTuple :: Foldable c => ExpQ -> c ExpQ -> ExpQ
- Pinchot.Internal: branchToClause :: Branch t -> ClauseQ
- Pinchot.Internal: branchToParser :: Lift t => String -> Branch t -> ExpQ
- Pinchot.Internal: branchesToOptics :: String -> Branch t -> Seq (Branch t) -> [Dec]
- Pinchot.Internal: constructorName :: String -> String -> ExpQ
- Pinchot.Internal: data Branch t
- Pinchot.Internal: data Error
- Pinchot.Internal: data Names t
- Pinchot.Internal: data Rule t
- Pinchot.Internal: data RuleType t
- Pinchot.Internal: dynP :: String -> PatQ
- Pinchot.Internal: earleyGrammar :: Lift t => Qualifier -> Pinchot t (Rule t) -> Q Exp
- Pinchot.Internal: earleyGrammarFromRule :: Lift t => String -> Rule t -> Q Exp
- Pinchot.Internal: earleyProduct :: Lift t => Qualifier -> Qualifier -> Pinchot t a -> ExpQ
- Pinchot.Internal: fieldName :: Int -> String -> String -> String
- Pinchot.Internal: getAncestors :: Rule t -> State (Set String) (Seq (Rule t))
- Pinchot.Internal: goPinchot :: Pinchot t a -> Q (Names t, a)
- Pinchot.Internal: helperName :: String -> Name
- Pinchot.Internal: instance Control.Monad.Fix.MonadFix (Pinchot.Internal.Pinchot t)
- Pinchot.Internal: instance GHC.Base.Applicative (Pinchot.Internal.Pinchot t)
- Pinchot.Internal: instance GHC.Base.Functor (Pinchot.Internal.Pinchot t)
- Pinchot.Internal: instance GHC.Base.Monad (Pinchot.Internal.Pinchot t)
- Pinchot.Internal: instance GHC.Classes.Eq t => GHC.Classes.Eq (Pinchot.Internal.Branch t)
- Pinchot.Internal: instance GHC.Classes.Eq t => GHC.Classes.Eq (Pinchot.Internal.Names t)
- Pinchot.Internal: instance GHC.Classes.Eq t => GHC.Classes.Eq (Pinchot.Internal.Rule t)
- Pinchot.Internal: instance GHC.Classes.Eq t => GHC.Classes.Eq (Pinchot.Internal.RuleType t)
- Pinchot.Internal: instance GHC.Classes.Ord t => GHC.Classes.Ord (Pinchot.Internal.Branch t)
- Pinchot.Internal: instance GHC.Classes.Ord t => GHC.Classes.Ord (Pinchot.Internal.Names t)
- Pinchot.Internal: instance GHC.Classes.Ord t => GHC.Classes.Ord (Pinchot.Internal.Rule t)
- Pinchot.Internal: instance GHC.Classes.Ord t => GHC.Classes.Ord (Pinchot.Internal.RuleType t)
- Pinchot.Internal: instance GHC.Exception.Exception Pinchot.Internal.Error
- Pinchot.Internal: instance GHC.Show.Show Pinchot.Internal.Error
- Pinchot.Internal: instance GHC.Show.Show t => GHC.Show.Show (Pinchot.Internal.Branch t)
- Pinchot.Internal: instance GHC.Show.Show t => GHC.Show.Show (Pinchot.Internal.Names t)
- Pinchot.Internal: instance GHC.Show.Show t => GHC.Show.Show (Pinchot.Internal.Rule t)
- Pinchot.Internal: instance GHC.Show.Show t => GHC.Show.Show (Pinchot.Internal.RuleType t)
- Pinchot.Internal: label :: String -> Rule t -> Rule t
- Pinchot.Internal: lazyPattern :: Foldable c => c Name -> Q Pat
- Pinchot.Internal: list :: Rule t -> Pinchot t (Rule t)
- Pinchot.Internal: list1 :: Rule t -> Pinchot t (Rule t)
- Pinchot.Internal: makeOptics :: MakeOptics
- Pinchot.Internal: makeType :: Name -> Seq Name -> String -> RuleType t -> Q Dec
- Pinchot.Internal: makeWrapped :: Type -> String -> Dec
- Pinchot.Internal: many1ToOptics :: String -> String -> Dec
- Pinchot.Internal: manyToOptics :: String -> String -> Dec
- Pinchot.Internal: newRule :: RuleName -> RuleType t -> Pinchot t (Rule t)
- Pinchot.Internal: newtype Pinchot t a
- Pinchot.Internal: noOptics :: MakeOptics
- Pinchot.Internal: nonTerminal :: RuleName -> Seq (AlternativeName, Seq (Rule t)) -> Pinchot t (Rule t)
- Pinchot.Internal: option :: Rule t -> Pinchot t (Rule t)
- Pinchot.Internal: optionalToOptics :: String -> String -> Dec
- Pinchot.Internal: prodDeclName :: String -> Name
- Pinchot.Internal: prodFn :: String -> ExpQ
- Pinchot.Internal: productionDecl :: String -> Name -> RuleType t -> DecsQ
- Pinchot.Internal: record :: RuleName -> Seq (Rule t) -> Pinchot t (Rule t)
- Pinchot.Internal: recordsToOptics :: String -> Seq (Rule t) -> [Dec]
- Pinchot.Internal: recursiveDo :: [(Name, ExpQ)] -> ExpQ -> ExpQ
- Pinchot.Internal: ruleAndAncestors :: Rule t -> Seq (Rule t)
- Pinchot.Internal: ruleConstructorNames :: Rule t -> Seq AlternativeName
- Pinchot.Internal: ruleName :: String -> Name
- Pinchot.Internal: ruleToOptics :: Lift t => Name -> String -> RuleType t -> DecsQ
- Pinchot.Internal: ruleToParser :: Lift t => String -> Rule t -> [(Name, ExpQ)]
- Pinchot.Internal: ruleTreeToTypes :: Lift t => MakeOptics -> Name -> Seq Name -> Pinchot t (Rule t) -> DecsQ
- Pinchot.Internal: rulesDemandedBeforeDefined :: Foldable f => f (Rule t) -> Set Name
- Pinchot.Internal: seqTermToOptics :: Lift t => Name -> String -> Seq t -> Q [Dec]
- Pinchot.Internal: splitNonTerminal :: String -> Seq (String, Seq (Rule t)) -> Pinchot t ((String, Seq (Rule t)), Seq (String, Seq (Rule t)))
- Pinchot.Internal: terminal :: RuleName -> Intervals t -> Pinchot t (Rule t)
- Pinchot.Internal: terminalSeq :: RuleName -> Seq t -> Pinchot t (Rule t)
- Pinchot.Internal: terminalSeqToOptics :: Name -> String -> Dec
- Pinchot.Internal: terminalToOptics :: Lift t => Name -> String -> Intervals t -> Q [Dec]
- Pinchot.Internal: thAllRules :: Lift t => Bool -> Name -> Seq Name -> Map Int (Rule t) -> DecsQ
- Pinchot.Internal: thBranch :: Branch t -> ConQ
- Pinchot.Internal: thRule :: Lift t => Bool -> Name -> Seq Name -> Rule t -> Q [Dec]
- Pinchot.Internal: thUnionBranch :: RuleName -> Rule t -> ConQ
- Pinchot.Internal: type AlternativeName = String
- Pinchot.Internal: type MakeOptics = Bool
- Pinchot.Internal: type Qualifier = String
- Pinchot.Internal: type RuleName = String
- Pinchot.Internal: union :: RuleName -> Seq (Rule t) -> Pinchot t (Rule t)
- Pinchot.Internal: unionBranchName :: RuleName -> RuleName -> AlternativeName
- Pinchot.Internal: unionToOptics :: String -> Rule t -> Seq (Rule t) -> DecsQ
- Pinchot.Internal: wrap :: RuleName -> Rule t -> Pinchot t (Rule t)
- Pinchot.Internal: wrapToOptics :: String -> String -> Dec
- Pinchot.Intervals: [excluded] :: Intervals a -> Seq (a, a)
- Pinchot.Intervals: [included] :: Intervals a -> Seq (a, a)
+ Pinchot: Loc :: Int -> Int -> Int -> Loc
+ Pinchot: NonEmpty :: a -> Seq a -> NonEmpty a
+ Pinchot: [_col] :: Loc -> Int
+ Pinchot: [_front] :: NonEmpty a -> a
+ Pinchot: [_line] :: Loc -> Int
+ Pinchot: [_pos] :: Loc -> Int
+ Pinchot: [_rest] :: NonEmpty a -> Seq a
+ Pinchot: append :: NonEmpty a -> NonEmpty a -> NonEmpty a
+ Pinchot: appendSeq :: NonEmpty a -> Seq a -> NonEmpty a
+ Pinchot: col :: Lens' Loc Int
+ Pinchot: data Loc
+ Pinchot: data NonEmpty a
+ Pinchot: earleyGrammarFromRule :: Lift t => Qualifier -> Rule t -> Q Exp
+ Pinchot: flatten :: NonEmpty a -> Seq a
+ Pinchot: front :: Lens' (NonEmpty a_aa3u) a_aa3u
+ Pinchot: line :: Lens' Loc Int
+ Pinchot: locatedFullParses :: FoldableLL full Char => (forall r. Grammar r (Prod r String (Char, Loc) (p Char Loc))) -> full -> ([p Char Loc], Report String (Seq (Char, Loc)))
+ Pinchot: locations :: FoldableLL full Char => full -> Seq (Char, Loc)
+ Pinchot: noLocations :: FoldableLL full item => full -> Seq (item, ())
+ Pinchot: opt :: Rule t -> Rule t
+ Pinchot: plus :: Rule t -> Rule t
+ Pinchot: pos :: Lens' Loc Int
+ Pinchot: prependSeq :: Seq a -> NonEmpty a -> NonEmpty a
+ Pinchot: rest :: Lens' (NonEmpty a_aa3u) (Seq a_aa3u)
+ Pinchot: rulesToOptics :: Lift t => Qualifier -> Name -> Seq (Rule t) -> Q [Dec]
+ Pinchot: seqToNonEmpty :: Seq a -> Maybe (NonEmpty a)
+ Pinchot: singleton :: a -> NonEmpty a
+ Pinchot: star :: Rule t -> Rule t
+ Pinchot: syntaxTrees :: Name -> [Name] -> Seq (Rule t) -> DecsQ
+ Pinchot: terminalizeRuleExp :: Qualifier -> Rule t -> Q Exp
+ Pinchot: terminalizers :: Qualifier -> Name -> Seq (Rule t) -> Q [Dec]
+ Pinchot: terminals :: RuleName -> String -> Rule Char
+ Pinchot: type BranchName = String
+ Pinchot: wrappedInstances :: Seq (Rule t) -> DecsQ
+ Pinchot.Earley: allRulesRecord :: Qualifier -> Name -> Seq (Rule t) -> DecsQ
+ Pinchot.Earley: branchToParser :: Lift t => String -> Branch t -> ExpQ
+ Pinchot.Earley: earleyGrammarFromRule :: Lift t => Qualifier -> Rule t -> Q Exp
+ Pinchot.Earley: earleyProduct :: Lift t => Qualifier -> Qualifier -> Seq (Rule t) -> ExpQ
+ Pinchot.Earley: helperName :: String -> Name
+ Pinchot.Earley: localRuleName :: String -> Name
+ Pinchot.Earley: ruleToParser :: Lift t => String -> Rule t -> [(Name, ExpQ)]
+ Pinchot.Examples.AllRulesRecord: [a'Avenue'0] :: Productions r t a -> Prod r String (t, a) (Avenue'0 t a)
+ Pinchot.Examples.AllRulesRecord: [a'Avenue'1] :: Productions r t a -> Prod r String (t, a) (Avenue'1 t a)
+ Pinchot.Examples.AllRulesRecord: [a'Avenue'2] :: Productions r t a -> Prod r String (t, a) (Avenue'2 t a)
+ Pinchot.Examples.AllRulesRecord: [a'Boulevard'0] :: Productions r t a -> Prod r String (t, a) (Boulevard'0 t a)
+ Pinchot.Examples.AllRulesRecord: [a'Boulevard'1] :: Productions r t a -> Prod r String (t, a) (Boulevard'1 t a)
+ Pinchot.Examples.AllRulesRecord: [a'Boulevard'2] :: Productions r t a -> Prod r String (t, a) (Boulevard'2 t a)
+ Pinchot.Examples.AllRulesRecord: [a'Boulevard'3] :: Productions r t a -> Prod r String (t, a) (Boulevard'3 t a)
+ Pinchot.Examples.AllRulesRecord: [a'CityLine] :: Productions r t a -> Prod r String (t, a) (CityLine t a)
+ Pinchot.Examples.AllRulesRecord: [a'CommaSpace] :: Productions r t a -> Prod r String (t, a) (CommaSpace t a)
+ Pinchot.Examples.AllRulesRecord: [a'Digit'Plus] :: Productions r t a -> Prod r String (t, a) (Digit'Plus t a)
+ Pinchot.Examples.AllRulesRecord: [a'DirectionSpace'Opt] :: Productions r t a -> Prod r String (t, a) (DirectionSpace'Opt t a)
+ Pinchot.Examples.AllRulesRecord: [a'NE'0] :: Productions r t a -> Prod r String (t, a) (NE'0 t a)
+ Pinchot.Examples.AllRulesRecord: [a'NE'1] :: Productions r t a -> Prod r String (t, a) (NE'1 t a)
+ Pinchot.Examples.AllRulesRecord: [a'NE] :: Productions r t a -> Prod r String (t, a) (NE t a)
+ Pinchot.Examples.AllRulesRecord: [a'NW'0] :: Productions r t a -> Prod r String (t, a) (NW'0 t a)
+ Pinchot.Examples.AllRulesRecord: [a'NW'1] :: Productions r t a -> Prod r String (t, a) (NW'1 t a)
+ Pinchot.Examples.AllRulesRecord: [a'NW] :: Productions r t a -> Prod r String (t, a) (NW t a)
+ Pinchot.Examples.AllRulesRecord: [a'NameLine] :: Productions r t a -> Prod r String (t, a) (NameLine t a)
+ Pinchot.Examples.AllRulesRecord: [a'Newline'Opt] :: Productions r t a -> Prod r String (t, a) (Newline'Opt t a)
+ Pinchot.Examples.AllRulesRecord: [a'Newline] :: Productions r t a -> Prod r String (t, a) (Newline t a)
+ Pinchot.Examples.AllRulesRecord: [a'PreSpacedWord'Star] :: Productions r t a -> Prod r String (t, a) (PreSpacedWord'Star t a)
+ Pinchot.Examples.AllRulesRecord: [a'SE'0] :: Productions r t a -> Prod r String (t, a) (SE'0 t a)
+ Pinchot.Examples.AllRulesRecord: [a'SE'1] :: Productions r t a -> Prod r String (t, a) (SE'1 t a)
+ Pinchot.Examples.AllRulesRecord: [a'SE] :: Productions r t a -> Prod r String (t, a) (SE t a)
+ Pinchot.Examples.AllRulesRecord: [a'SW'0] :: Productions r t a -> Prod r String (t, a) (SW'0 t a)
+ Pinchot.Examples.AllRulesRecord: [a'SW'1] :: Productions r t a -> Prod r String (t, a) (SW'1 t a)
+ Pinchot.Examples.AllRulesRecord: [a'SW] :: Productions r t a -> Prod r String (t, a) (SW t a)
+ Pinchot.Examples.AllRulesRecord: [a'Separator] :: Productions r t a -> Prod r String (t, a) (Separator t a)
+ Pinchot.Examples.AllRulesRecord: [a'SpaceSuffix'Opt] :: Productions r t a -> Prod r String (t, a) (SpaceSuffix'Opt t a)
+ Pinchot.Examples.AllRulesRecord: [a'Street'0] :: Productions r t a -> Prod r String (t, a) (Street'0 t a)
+ Pinchot.Examples.AllRulesRecord: [a'Street'1] :: Productions r t a -> Prod r String (t, a) (Street'1 t a)
+ Pinchot.Examples.AllRulesRecord: [a'StreetLine] :: Productions r t a -> Prod r String (t, a) (StreetLine t a)
+ Pinchot.Examples.AllRulesRecord: [a'Way'0] :: Productions r t a -> Prod r String (t, a) (Way'0 t a)
+ Pinchot.Examples.AllRulesRecord: [a'Way'1] :: Productions r t a -> Prod r String (t, a) (Way'1 t a)
+ Pinchot.Examples.AllRulesRecord: [a'Way'2] :: Productions r t a -> Prod r String (t, a) (Way'2 t a)
+ Pinchot.Examples.Earley: addressAllProductions :: Grammar r (Productions r Char a)
+ Pinchot.Examples.Earley: addressGrammar :: Grammar r (Prod r String (Char, a) (Address Char a))
+ Pinchot.Examples.Newman: address :: String -> IO ()
+ Pinchot.Examples.Newman: addressFromFile :: String -> IO ()
+ Pinchot.Examples.Newman: labelLoc :: Loc -> String
+ Pinchot.Examples.Newman: labelNE :: String -> NonEmpty (Char, Loc) -> String
+ Pinchot.Examples.Newman: labelOpt :: String -> Seq (Char, Loc) -> String
+ Pinchot.Examples.Newman: showAddress :: Address Char Loc -> String
+ Pinchot.Examples.Newman: showParseResult :: ([Address Char Loc], Report String (Seq (Char, Loc))) -> String
+ Pinchot.Examples.Postal: rAddress :: Rule Char
+ Pinchot.Examples.Postal: rAvenue :: Rule Char
+ Pinchot.Examples.Postal: rBoulevard :: Rule Char
+ Pinchot.Examples.Postal: rCity :: Rule Char
+ Pinchot.Examples.Postal: rCityLine :: Rule Char
+ Pinchot.Examples.Postal: rComma :: Rule Char
+ Pinchot.Examples.Postal: rCommaSpace :: Rule Char
+ Pinchot.Examples.Postal: rDigit :: Rule Char
+ Pinchot.Examples.Postal: rDigits :: Rule Char
+ Pinchot.Examples.Postal: rDirection :: Rule Char
+ Pinchot.Examples.Postal: rDirectionSpace :: Rule Char
+ Pinchot.Examples.Postal: rEast :: Rule Char
+ Pinchot.Examples.Postal: rLetter :: Rule Char
+ Pinchot.Examples.Postal: rLetters :: Rule Char
+ Pinchot.Examples.Postal: rNE :: Rule Char
+ Pinchot.Examples.Postal: rNW :: Rule Char
+ Pinchot.Examples.Postal: rNameLine :: Rule Char
+ Pinchot.Examples.Postal: rNewline :: Rule Char
+ Pinchot.Examples.Postal: rNorth :: Rule Char
+ Pinchot.Examples.Postal: rNumber :: Rule Char
+ Pinchot.Examples.Postal: rOptDirection :: Rule Char
+ Pinchot.Examples.Postal: rOptNewline :: Rule Char
+ Pinchot.Examples.Postal: rOptSuffix :: Rule Char
+ Pinchot.Examples.Postal: rPostalWord :: Rule Char
+ Pinchot.Examples.Postal: rPreSpacedWord :: Rule Char
+ Pinchot.Examples.Postal: rPreSpacedWords :: Rule Char
+ Pinchot.Examples.Postal: rSE :: Rule Char
+ Pinchot.Examples.Postal: rSW :: Rule Char
+ Pinchot.Examples.Postal: rSeparator :: Rule Char
+ Pinchot.Examples.Postal: rSouth :: Rule Char
+ Pinchot.Examples.Postal: rSpace :: Rule Char
+ Pinchot.Examples.Postal: rSpaceSuffix :: Rule Char
+ Pinchot.Examples.Postal: rState :: Rule Char
+ Pinchot.Examples.Postal: rStreet :: Rule Char
+ Pinchot.Examples.Postal: rStreetLine :: Rule Char
+ Pinchot.Examples.Postal: rStreetName :: Rule Char
+ Pinchot.Examples.Postal: rSuffix :: Rule Char
+ Pinchot.Examples.Postal: rWay :: Rule Char
+ Pinchot.Examples.Postal: rWest :: Rule Char
+ Pinchot.Examples.Postal: rWords :: Rule Char
+ Pinchot.Examples.Postal: rZipCode :: Rule Char
+ Pinchot.Examples.RulesToOptics: _Avenue'0 :: Prism' (Char, a) (Avenue'0 Char a)
+ Pinchot.Examples.RulesToOptics: _Avenue'1 :: Prism' (Char, a) (Avenue'1 Char a)
+ Pinchot.Examples.RulesToOptics: _Avenue'2 :: Prism' (Char, a) (Avenue'2 Char a)
+ Pinchot.Examples.RulesToOptics: _Boulevard'0 :: Prism' (Char, a) (Boulevard'0 Char a)
+ Pinchot.Examples.RulesToOptics: _Boulevard'1 :: Prism' (Char, a) (Boulevard'1 Char a)
+ Pinchot.Examples.RulesToOptics: _Boulevard'2 :: Prism' (Char, a) (Boulevard'2 Char a)
+ Pinchot.Examples.RulesToOptics: _Boulevard'3 :: Prism' (Char, a) (Boulevard'3 Char a)
+ Pinchot.Examples.RulesToOptics: _Comma :: Prism' (Char, a) (Comma Char a)
+ Pinchot.Examples.RulesToOptics: _ConsLetter :: Prism' (Letters t a) (Letter t a, Letters t a)
+ Pinchot.Examples.RulesToOptics: _Digit :: Prism' (Char, a) (Digit Char a)
+ Pinchot.Examples.RulesToOptics: _Direction'East :: Prism' (Direction t a) (East t a)
+ Pinchot.Examples.RulesToOptics: _Direction'NE :: Prism' (Direction t a) (NE t a)
+ Pinchot.Examples.RulesToOptics: _Direction'NW :: Prism' (Direction t a) (NW t a)
+ Pinchot.Examples.RulesToOptics: _Direction'North :: Prism' (Direction t a) (North t a)
+ Pinchot.Examples.RulesToOptics: _Direction'SE :: Prism' (Direction t a) (SE t a)
+ Pinchot.Examples.RulesToOptics: _Direction'SW :: Prism' (Direction t a) (SW t a)
+ Pinchot.Examples.RulesToOptics: _Direction'South :: Prism' (Direction t a) (South t a)
+ Pinchot.Examples.RulesToOptics: _Direction'West :: Prism' (Direction t a) (West t a)
+ Pinchot.Examples.RulesToOptics: _East :: Prism' (Char, a) (East Char a)
+ Pinchot.Examples.RulesToOptics: _Letter :: Prism' (Char, a) (Letter Char a)
+ Pinchot.Examples.RulesToOptics: _NE'0 :: Prism' (Char, a) (NE'0 Char a)
+ Pinchot.Examples.RulesToOptics: _NE'1 :: Prism' (Char, a) (NE'1 Char a)
+ Pinchot.Examples.RulesToOptics: _NW'0 :: Prism' (Char, a) (NW'0 Char a)
+ Pinchot.Examples.RulesToOptics: _NW'1 :: Prism' (Char, a) (NW'1 Char a)
+ Pinchot.Examples.RulesToOptics: _Newline :: Prism' (Char, a) (Newline Char a)
+ Pinchot.Examples.RulesToOptics: _NoLetter :: Prism' (Letters t a) ()
+ Pinchot.Examples.RulesToOptics: _North :: Prism' (Char, a) (North Char a)
+ Pinchot.Examples.RulesToOptics: _SE'0 :: Prism' (Char, a) (SE'0 Char a)
+ Pinchot.Examples.RulesToOptics: _SE'1 :: Prism' (Char, a) (SE'1 Char a)
+ Pinchot.Examples.RulesToOptics: _SW'0 :: Prism' (Char, a) (SW'0 Char a)
+ Pinchot.Examples.RulesToOptics: _SW'1 :: Prism' (Char, a) (SW'1 Char a)
+ Pinchot.Examples.RulesToOptics: _Separator'CommaSpace :: Prism' (Separator t a) (CommaSpace t a)
+ Pinchot.Examples.RulesToOptics: _Separator'Newline :: Prism' (Separator t a) (Newline t a)
+ Pinchot.Examples.RulesToOptics: _South :: Prism' (Char, a) (South Char a)
+ Pinchot.Examples.RulesToOptics: _Space :: Prism' (Char, a) (Space Char a)
+ Pinchot.Examples.RulesToOptics: _Street'0 :: Prism' (Char, a) (Street'0 Char a)
+ Pinchot.Examples.RulesToOptics: _Street'1 :: Prism' (Char, a) (Street'1 Char a)
+ Pinchot.Examples.RulesToOptics: _Suffix'Avenue :: Prism' (Suffix t a) (Avenue t a)
+ Pinchot.Examples.RulesToOptics: _Suffix'Boulevard :: Prism' (Suffix t a) (Boulevard t a)
+ Pinchot.Examples.RulesToOptics: _Suffix'Street :: Prism' (Suffix t a) (Street t a)
+ Pinchot.Examples.RulesToOptics: _Suffix'Way :: Prism' (Suffix t a) (Way t a)
+ Pinchot.Examples.RulesToOptics: _Way'0 :: Prism' (Char, a) (Way'0 Char a)
+ Pinchot.Examples.RulesToOptics: _Way'1 :: Prism' (Char, a) (Way'1 Char a)
+ Pinchot.Examples.RulesToOptics: _Way'2 :: Prism' (Char, a) (Way'2 Char a)
+ Pinchot.Examples.RulesToOptics: _West :: Prism' (Char, a) (West Char a)
+ Pinchot.Examples.RulesToOptics: r'Address'0'NameLine :: Lens' (Address t a) (NameLine t a)
+ Pinchot.Examples.RulesToOptics: r'Address'1'StreetLine :: Lens' (Address t a) (StreetLine t a)
+ Pinchot.Examples.RulesToOptics: r'Address'2'CityLine :: Lens' (Address t a) (CityLine t a)
+ Pinchot.Examples.RulesToOptics: r'Avenue'0'Avenue'0 :: Lens' (Avenue t a) (Avenue'0 t a)
+ Pinchot.Examples.RulesToOptics: r'Avenue'1'Avenue'1 :: Lens' (Avenue t a) (Avenue'1 t a)
+ Pinchot.Examples.RulesToOptics: r'Avenue'2'Avenue'2 :: Lens' (Avenue t a) (Avenue'2 t a)
+ Pinchot.Examples.RulesToOptics: r'Boulevard'0'Boulevard'0 :: Lens' (Boulevard t a) (Boulevard'0 t a)
+ Pinchot.Examples.RulesToOptics: r'Boulevard'1'Boulevard'1 :: Lens' (Boulevard t a) (Boulevard'1 t a)
+ Pinchot.Examples.RulesToOptics: r'Boulevard'2'Boulevard'2 :: Lens' (Boulevard t a) (Boulevard'2 t a)
+ Pinchot.Examples.RulesToOptics: r'Boulevard'3'Boulevard'3 :: Lens' (Boulevard t a) (Boulevard'3 t a)
+ Pinchot.Examples.RulesToOptics: r'CityLine'0'City :: Lens' (CityLine t a) (City t a)
+ Pinchot.Examples.RulesToOptics: r'CityLine'1'Comma :: Lens' (CityLine t a) (Comma t a)
+ Pinchot.Examples.RulesToOptics: r'CityLine'2'Space :: Lens' (CityLine t a) (Space t a)
+ Pinchot.Examples.RulesToOptics: r'CityLine'3'State :: Lens' (CityLine t a) (State t a)
+ Pinchot.Examples.RulesToOptics: r'CityLine'4'Space :: Lens' (CityLine t a) (Space t a)
+ Pinchot.Examples.RulesToOptics: r'CityLine'5'ZipCode :: Lens' (CityLine t a) (ZipCode t a)
+ Pinchot.Examples.RulesToOptics: r'CityLine'6'Newline'Opt :: Lens' (CityLine t a) (Newline'Opt t a)
+ Pinchot.Examples.RulesToOptics: r'CommaSpace'0'Comma :: Lens' (CommaSpace t a) (Comma t a)
+ Pinchot.Examples.RulesToOptics: r'CommaSpace'1'Space :: Lens' (CommaSpace t a) (Space t a)
+ Pinchot.Examples.RulesToOptics: r'DirectionSpace'0'Direction :: Lens' (DirectionSpace t a) (Direction t a)
+ Pinchot.Examples.RulesToOptics: r'DirectionSpace'1'Space :: Lens' (DirectionSpace t a) (Space t a)
+ Pinchot.Examples.RulesToOptics: r'NE'0'NE'0 :: Lens' (NE t a) (NE'0 t a)
+ Pinchot.Examples.RulesToOptics: r'NE'1'NE'1 :: Lens' (NE t a) (NE'1 t a)
+ Pinchot.Examples.RulesToOptics: r'NW'0'NW'0 :: Lens' (NW t a) (NW'0 t a)
+ Pinchot.Examples.RulesToOptics: r'NW'1'NW'1 :: Lens' (NW t a) (NW'1 t a)
+ Pinchot.Examples.RulesToOptics: r'NameLine'0'Words :: Lens' (NameLine t a) (Words t a)
+ Pinchot.Examples.RulesToOptics: r'NameLine'1'Separator :: Lens' (NameLine t a) (Separator t a)
+ Pinchot.Examples.RulesToOptics: r'PostalWord'0'Letter :: Lens' (PostalWord t a) (Letter t a)
+ Pinchot.Examples.RulesToOptics: r'PostalWord'1'Letters :: Lens' (PostalWord t a) (Letters t a)
+ Pinchot.Examples.RulesToOptics: r'PreSpacedWord'0'Space :: Lens' (PreSpacedWord t a) (Space t a)
+ Pinchot.Examples.RulesToOptics: r'PreSpacedWord'1'PostalWord :: Lens' (PreSpacedWord t a) (PostalWord t a)
+ Pinchot.Examples.RulesToOptics: r'SE'0'SE'0 :: Lens' (SE t a) (SE'0 t a)
+ Pinchot.Examples.RulesToOptics: r'SE'1'SE'1 :: Lens' (SE t a) (SE'1 t a)
+ Pinchot.Examples.RulesToOptics: r'SW'0'SW'0 :: Lens' (SW t a) (SW'0 t a)
+ Pinchot.Examples.RulesToOptics: r'SW'1'SW'1 :: Lens' (SW t a) (SW'1 t a)
+ Pinchot.Examples.RulesToOptics: r'SpaceSuffix'0'Space :: Lens' (SpaceSuffix t a) (Space t a)
+ Pinchot.Examples.RulesToOptics: r'SpaceSuffix'1'Suffix :: Lens' (SpaceSuffix t a) (Suffix t a)
+ Pinchot.Examples.RulesToOptics: r'Street'0'Street'0 :: Lens' (Street t a) (Street'0 t a)
+ Pinchot.Examples.RulesToOptics: r'Street'1'Street'1 :: Lens' (Street t a) (Street'1 t a)
+ Pinchot.Examples.RulesToOptics: r'StreetLine'0'Number :: Lens' (StreetLine t a) (Number t a)
+ Pinchot.Examples.RulesToOptics: r'StreetLine'1'Space :: Lens' (StreetLine t a) (Space t a)
+ Pinchot.Examples.RulesToOptics: r'StreetLine'2'DirectionSpace'Opt :: Lens' (StreetLine t a) (DirectionSpace'Opt t a)
+ Pinchot.Examples.RulesToOptics: r'StreetLine'3'StreetName :: Lens' (StreetLine t a) (StreetName t a)
+ Pinchot.Examples.RulesToOptics: r'StreetLine'4'SpaceSuffix'Opt :: Lens' (StreetLine t a) (SpaceSuffix'Opt t a)
+ Pinchot.Examples.RulesToOptics: r'StreetLine'5'Separator :: Lens' (StreetLine t a) (Separator t a)
+ Pinchot.Examples.RulesToOptics: r'Way'0'Way'0 :: Lens' (Way t a) (Way'0 t a)
+ Pinchot.Examples.RulesToOptics: r'Way'1'Way'1 :: Lens' (Way t a) (Way'1 t a)
+ Pinchot.Examples.RulesToOptics: r'Way'2'Way'2 :: Lens' (Way t a) (Way'2 t a)
+ Pinchot.Examples.RulesToOptics: r'Words'0'PostalWord :: Lens' (Words t a) (PostalWord t a)
+ Pinchot.Examples.RulesToOptics: r'Words'1'PreSpacedWord'Star :: Lens' (Words t a) (PreSpacedWord'Star t a)
+ Pinchot.Examples.RulesToOptics: r'ZipCode'0'Digit :: Lens' (ZipCode t a) (Digit t a)
+ Pinchot.Examples.RulesToOptics: r'ZipCode'1'Digit :: Lens' (ZipCode t a) (Digit t a)
+ Pinchot.Examples.RulesToOptics: r'ZipCode'2'Digit :: Lens' (ZipCode t a) (Digit t a)
+ Pinchot.Examples.RulesToOptics: r'ZipCode'3'Digit :: Lens' (ZipCode t a) (Digit t a)
+ Pinchot.Examples.RulesToOptics: r'ZipCode'4'Digit :: Lens' (ZipCode t a) (Digit t a)
+ Pinchot.Examples.SyntaxTrees: Address :: NameLine t a -> StreetLine t a -> CityLine t a -> Address t a
+ Pinchot.Examples.SyntaxTrees: Avenue :: Avenue'0 t a -> Avenue'1 t a -> Avenue'2 t a -> Avenue t a
+ Pinchot.Examples.SyntaxTrees: Avenue'0 :: (t, a) -> Avenue'0 t a
+ Pinchot.Examples.SyntaxTrees: Avenue'1 :: (t, a) -> Avenue'1 t a
+ Pinchot.Examples.SyntaxTrees: Avenue'2 :: (t, a) -> Avenue'2 t a
+ Pinchot.Examples.SyntaxTrees: Boulevard :: Boulevard'0 t a -> Boulevard'1 t a -> Boulevard'2 t a -> Boulevard'3 t a -> Boulevard t a
+ Pinchot.Examples.SyntaxTrees: Boulevard'0 :: (t, a) -> Boulevard'0 t a
+ Pinchot.Examples.SyntaxTrees: Boulevard'1 :: (t, a) -> Boulevard'1 t a
+ Pinchot.Examples.SyntaxTrees: Boulevard'2 :: (t, a) -> Boulevard'2 t a
+ Pinchot.Examples.SyntaxTrees: Boulevard'3 :: (t, a) -> Boulevard'3 t a
+ Pinchot.Examples.SyntaxTrees: City :: Words t a -> City t a
+ Pinchot.Examples.SyntaxTrees: CityLine :: City t a -> Comma t a -> Space t a -> State t a -> Space t a -> ZipCode t a -> Newline'Opt t a -> CityLine t a
+ Pinchot.Examples.SyntaxTrees: Comma :: (t, a) -> Comma t a
+ Pinchot.Examples.SyntaxTrees: CommaSpace :: Comma t a -> Space t a -> CommaSpace t a
+ Pinchot.Examples.SyntaxTrees: ConsLetter :: Letter t a -> Letters t a -> Letters t a
+ Pinchot.Examples.SyntaxTrees: Digit :: (t, a) -> Digit t a
+ Pinchot.Examples.SyntaxTrees: Digit'Plus :: NonEmpty (Digit t a) -> Digit'Plus t a
+ Pinchot.Examples.SyntaxTrees: Direction'East :: East t a -> Direction t a
+ Pinchot.Examples.SyntaxTrees: Direction'NE :: NE t a -> Direction t a
+ Pinchot.Examples.SyntaxTrees: Direction'NW :: NW t a -> Direction t a
+ Pinchot.Examples.SyntaxTrees: Direction'North :: North t a -> Direction t a
+ Pinchot.Examples.SyntaxTrees: Direction'SE :: SE t a -> Direction t a
+ Pinchot.Examples.SyntaxTrees: Direction'SW :: SW t a -> Direction t a
+ Pinchot.Examples.SyntaxTrees: Direction'South :: South t a -> Direction t a
+ Pinchot.Examples.SyntaxTrees: Direction'West :: West t a -> Direction t a
+ Pinchot.Examples.SyntaxTrees: DirectionSpace :: Direction t a -> Space t a -> DirectionSpace t a
+ Pinchot.Examples.SyntaxTrees: DirectionSpace'Opt :: Maybe (DirectionSpace t a) -> DirectionSpace'Opt t a
+ Pinchot.Examples.SyntaxTrees: East :: (t, a) -> East t a
+ Pinchot.Examples.SyntaxTrees: Letter :: (t, a) -> Letter t a
+ Pinchot.Examples.SyntaxTrees: NE :: NE'0 t a -> NE'1 t a -> NE t a
+ Pinchot.Examples.SyntaxTrees: NE'0 :: (t, a) -> NE'0 t a
+ Pinchot.Examples.SyntaxTrees: NE'1 :: (t, a) -> NE'1 t a
+ Pinchot.Examples.SyntaxTrees: NW :: NW'0 t a -> NW'1 t a -> NW t a
+ Pinchot.Examples.SyntaxTrees: NW'0 :: (t, a) -> NW'0 t a
+ Pinchot.Examples.SyntaxTrees: NW'1 :: (t, a) -> NW'1 t a
+ Pinchot.Examples.SyntaxTrees: NameLine :: Words t a -> Separator t a -> NameLine t a
+ Pinchot.Examples.SyntaxTrees: Newline :: (t, a) -> Newline t a
+ Pinchot.Examples.SyntaxTrees: Newline'Opt :: Maybe (Newline t a) -> Newline'Opt t a
+ Pinchot.Examples.SyntaxTrees: NoLetter :: Letters t a
+ Pinchot.Examples.SyntaxTrees: North :: (t, a) -> North t a
+ Pinchot.Examples.SyntaxTrees: Number :: Digit'Plus t a -> Number t a
+ Pinchot.Examples.SyntaxTrees: PostalWord :: Letter t a -> Letters t a -> PostalWord t a
+ Pinchot.Examples.SyntaxTrees: PreSpacedWord :: Space t a -> PostalWord t a -> PreSpacedWord t a
+ Pinchot.Examples.SyntaxTrees: PreSpacedWord'Star :: Seq (PreSpacedWord t a) -> PreSpacedWord'Star t a
+ Pinchot.Examples.SyntaxTrees: SE :: SE'0 t a -> SE'1 t a -> SE t a
+ Pinchot.Examples.SyntaxTrees: SE'0 :: (t, a) -> SE'0 t a
+ Pinchot.Examples.SyntaxTrees: SE'1 :: (t, a) -> SE'1 t a
+ Pinchot.Examples.SyntaxTrees: SW :: SW'0 t a -> SW'1 t a -> SW t a
+ Pinchot.Examples.SyntaxTrees: SW'0 :: (t, a) -> SW'0 t a
+ Pinchot.Examples.SyntaxTrees: SW'1 :: (t, a) -> SW'1 t a
+ Pinchot.Examples.SyntaxTrees: Separator'CommaSpace :: CommaSpace t a -> Separator t a
+ Pinchot.Examples.SyntaxTrees: Separator'Newline :: Newline t a -> Separator t a
+ Pinchot.Examples.SyntaxTrees: South :: (t, a) -> South t a
+ Pinchot.Examples.SyntaxTrees: Space :: (t, a) -> Space t a
+ Pinchot.Examples.SyntaxTrees: SpaceSuffix :: Space t a -> Suffix t a -> SpaceSuffix t a
+ Pinchot.Examples.SyntaxTrees: SpaceSuffix'Opt :: Maybe (SpaceSuffix t a) -> SpaceSuffix'Opt t a
+ Pinchot.Examples.SyntaxTrees: State :: Words t a -> State t a
+ Pinchot.Examples.SyntaxTrees: Street :: Street'0 t a -> Street'1 t a -> Street t a
+ Pinchot.Examples.SyntaxTrees: Street'0 :: (t, a) -> Street'0 t a
+ Pinchot.Examples.SyntaxTrees: Street'1 :: (t, a) -> Street'1 t a
+ Pinchot.Examples.SyntaxTrees: StreetLine :: Number t a -> Space t a -> DirectionSpace'Opt t a -> StreetName t a -> SpaceSuffix'Opt t a -> Separator t a -> StreetLine t a
+ Pinchot.Examples.SyntaxTrees: StreetName :: Words t a -> StreetName t a
+ Pinchot.Examples.SyntaxTrees: Suffix'Avenue :: Avenue t a -> Suffix t a
+ Pinchot.Examples.SyntaxTrees: Suffix'Boulevard :: Boulevard t a -> Suffix t a
+ Pinchot.Examples.SyntaxTrees: Suffix'Street :: Street t a -> Suffix t a
+ Pinchot.Examples.SyntaxTrees: Suffix'Way :: Way t a -> Suffix t a
+ Pinchot.Examples.SyntaxTrees: Way :: Way'0 t a -> Way'1 t a -> Way'2 t a -> Way t a
+ Pinchot.Examples.SyntaxTrees: Way'0 :: (t, a) -> Way'0 t a
+ Pinchot.Examples.SyntaxTrees: Way'1 :: (t, a) -> Way'1 t a
+ Pinchot.Examples.SyntaxTrees: Way'2 :: (t, a) -> Way'2 t a
+ Pinchot.Examples.SyntaxTrees: West :: (t, a) -> West t a
+ Pinchot.Examples.SyntaxTrees: Words :: PostalWord t a -> PreSpacedWord'Star t a -> Words t a
+ Pinchot.Examples.SyntaxTrees: ZipCode :: Digit t a -> Digit t a -> Digit t a -> Digit t a -> Digit t a -> ZipCode t a
+ Pinchot.Examples.SyntaxTrees: [_r'Address'0'NameLine] :: Address t a -> NameLine t a
+ Pinchot.Examples.SyntaxTrees: [_r'Address'1'StreetLine] :: Address t a -> StreetLine t a
+ Pinchot.Examples.SyntaxTrees: [_r'Address'2'CityLine] :: Address t a -> CityLine t a
+ Pinchot.Examples.SyntaxTrees: [_r'Avenue'0'Avenue'0] :: Avenue t a -> Avenue'0 t a
+ Pinchot.Examples.SyntaxTrees: [_r'Avenue'1'Avenue'1] :: Avenue t a -> Avenue'1 t a
+ Pinchot.Examples.SyntaxTrees: [_r'Avenue'2'Avenue'2] :: Avenue t a -> Avenue'2 t a
+ Pinchot.Examples.SyntaxTrees: [_r'Boulevard'0'Boulevard'0] :: Boulevard t a -> Boulevard'0 t a
+ Pinchot.Examples.SyntaxTrees: [_r'Boulevard'1'Boulevard'1] :: Boulevard t a -> Boulevard'1 t a
+ Pinchot.Examples.SyntaxTrees: [_r'Boulevard'2'Boulevard'2] :: Boulevard t a -> Boulevard'2 t a
+ Pinchot.Examples.SyntaxTrees: [_r'Boulevard'3'Boulevard'3] :: Boulevard t a -> Boulevard'3 t a
+ Pinchot.Examples.SyntaxTrees: [_r'CityLine'0'City] :: CityLine t a -> City t a
+ Pinchot.Examples.SyntaxTrees: [_r'CityLine'1'Comma] :: CityLine t a -> Comma t a
+ Pinchot.Examples.SyntaxTrees: [_r'CityLine'2'Space] :: CityLine t a -> Space t a
+ Pinchot.Examples.SyntaxTrees: [_r'CityLine'3'State] :: CityLine t a -> State t a
+ Pinchot.Examples.SyntaxTrees: [_r'CityLine'4'Space] :: CityLine t a -> Space t a
+ Pinchot.Examples.SyntaxTrees: [_r'CityLine'5'ZipCode] :: CityLine t a -> ZipCode t a
+ Pinchot.Examples.SyntaxTrees: [_r'CityLine'6'Newline'Opt] :: CityLine t a -> Newline'Opt t a
+ Pinchot.Examples.SyntaxTrees: [_r'CommaSpace'0'Comma] :: CommaSpace t a -> Comma t a
+ Pinchot.Examples.SyntaxTrees: [_r'CommaSpace'1'Space] :: CommaSpace t a -> Space t a
+ Pinchot.Examples.SyntaxTrees: [_r'DirectionSpace'0'Direction] :: DirectionSpace t a -> Direction t a
+ Pinchot.Examples.SyntaxTrees: [_r'DirectionSpace'1'Space] :: DirectionSpace t a -> Space t a
+ Pinchot.Examples.SyntaxTrees: [_r'NE'0'NE'0] :: NE t a -> NE'0 t a
+ Pinchot.Examples.SyntaxTrees: [_r'NE'1'NE'1] :: NE t a -> NE'1 t a
+ Pinchot.Examples.SyntaxTrees: [_r'NW'0'NW'0] :: NW t a -> NW'0 t a
+ Pinchot.Examples.SyntaxTrees: [_r'NW'1'NW'1] :: NW t a -> NW'1 t a
+ Pinchot.Examples.SyntaxTrees: [_r'NameLine'0'Words] :: NameLine t a -> Words t a
+ Pinchot.Examples.SyntaxTrees: [_r'NameLine'1'Separator] :: NameLine t a -> Separator t a
+ Pinchot.Examples.SyntaxTrees: [_r'PostalWord'0'Letter] :: PostalWord t a -> Letter t a
+ Pinchot.Examples.SyntaxTrees: [_r'PostalWord'1'Letters] :: PostalWord t a -> Letters t a
+ Pinchot.Examples.SyntaxTrees: [_r'PreSpacedWord'0'Space] :: PreSpacedWord t a -> Space t a
+ Pinchot.Examples.SyntaxTrees: [_r'PreSpacedWord'1'PostalWord] :: PreSpacedWord t a -> PostalWord t a
+ Pinchot.Examples.SyntaxTrees: [_r'SE'0'SE'0] :: SE t a -> SE'0 t a
+ Pinchot.Examples.SyntaxTrees: [_r'SE'1'SE'1] :: SE t a -> SE'1 t a
+ Pinchot.Examples.SyntaxTrees: [_r'SW'0'SW'0] :: SW t a -> SW'0 t a
+ Pinchot.Examples.SyntaxTrees: [_r'SW'1'SW'1] :: SW t a -> SW'1 t a
+ Pinchot.Examples.SyntaxTrees: [_r'SpaceSuffix'0'Space] :: SpaceSuffix t a -> Space t a
+ Pinchot.Examples.SyntaxTrees: [_r'SpaceSuffix'1'Suffix] :: SpaceSuffix t a -> Suffix t a
+ Pinchot.Examples.SyntaxTrees: [_r'Street'0'Street'0] :: Street t a -> Street'0 t a
+ Pinchot.Examples.SyntaxTrees: [_r'Street'1'Street'1] :: Street t a -> Street'1 t a
+ Pinchot.Examples.SyntaxTrees: [_r'StreetLine'0'Number] :: StreetLine t a -> Number t a
+ Pinchot.Examples.SyntaxTrees: [_r'StreetLine'1'Space] :: StreetLine t a -> Space t a
+ Pinchot.Examples.SyntaxTrees: [_r'StreetLine'2'DirectionSpace'Opt] :: StreetLine t a -> DirectionSpace'Opt t a
+ Pinchot.Examples.SyntaxTrees: [_r'StreetLine'3'StreetName] :: StreetLine t a -> StreetName t a
+ Pinchot.Examples.SyntaxTrees: [_r'StreetLine'4'SpaceSuffix'Opt] :: StreetLine t a -> SpaceSuffix'Opt t a
+ Pinchot.Examples.SyntaxTrees: [_r'StreetLine'5'Separator] :: StreetLine t a -> Separator t a
+ Pinchot.Examples.SyntaxTrees: [_r'Way'0'Way'0] :: Way t a -> Way'0 t a
+ Pinchot.Examples.SyntaxTrees: [_r'Way'1'Way'1] :: Way t a -> Way'1 t a
+ Pinchot.Examples.SyntaxTrees: [_r'Way'2'Way'2] :: Way t a -> Way'2 t a
+ Pinchot.Examples.SyntaxTrees: [_r'Words'0'PostalWord] :: Words t a -> PostalWord t a
+ Pinchot.Examples.SyntaxTrees: [_r'Words'1'PreSpacedWord'Star] :: Words t a -> PreSpacedWord'Star t a
+ Pinchot.Examples.SyntaxTrees: [_r'ZipCode'0'Digit] :: ZipCode t a -> Digit t a
+ Pinchot.Examples.SyntaxTrees: [_r'ZipCode'1'Digit] :: ZipCode t a -> Digit t a
+ Pinchot.Examples.SyntaxTrees: [_r'ZipCode'2'Digit] :: ZipCode t a -> Digit t a
+ Pinchot.Examples.SyntaxTrees: [_r'ZipCode'3'Digit] :: ZipCode t a -> Digit t a
+ Pinchot.Examples.SyntaxTrees: [_r'ZipCode'4'Digit] :: ZipCode t a -> Digit t a
+ Pinchot.Examples.SyntaxTrees: data Address t a
+ Pinchot.Examples.SyntaxTrees: data Avenue t a
+ Pinchot.Examples.SyntaxTrees: data Boulevard t a
+ Pinchot.Examples.SyntaxTrees: data CityLine t a
+ Pinchot.Examples.SyntaxTrees: data CommaSpace t a
+ Pinchot.Examples.SyntaxTrees: data Direction t a
+ Pinchot.Examples.SyntaxTrees: data DirectionSpace t a
+ Pinchot.Examples.SyntaxTrees: data Letters t a
+ Pinchot.Examples.SyntaxTrees: data NE t a
+ Pinchot.Examples.SyntaxTrees: data NW t a
+ Pinchot.Examples.SyntaxTrees: data NameLine t a
+ Pinchot.Examples.SyntaxTrees: data PostalWord t a
+ Pinchot.Examples.SyntaxTrees: data PreSpacedWord t a
+ Pinchot.Examples.SyntaxTrees: data SE t a
+ Pinchot.Examples.SyntaxTrees: data SW t a
+ Pinchot.Examples.SyntaxTrees: data Separator t a
+ Pinchot.Examples.SyntaxTrees: data SpaceSuffix t a
+ Pinchot.Examples.SyntaxTrees: data Street t a
+ Pinchot.Examples.SyntaxTrees: data StreetLine t a
+ Pinchot.Examples.SyntaxTrees: data Suffix t a
+ Pinchot.Examples.SyntaxTrees: data Way t a
+ Pinchot.Examples.SyntaxTrees: data Words t a
+ Pinchot.Examples.SyntaxTrees: data ZipCode t a
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Address t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Avenue t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Avenue'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Avenue'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Avenue'2 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Boulevard t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Boulevard'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Boulevard'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Boulevard'2 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Boulevard'3 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.City t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.CityLine t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Comma t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.CommaSpace t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Digit t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Digit'Plus t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Direction t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.DirectionSpace t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.DirectionSpace'Opt t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.East t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Letter t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Letters t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.NE t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.NE'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.NE'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.NW t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.NW'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.NW'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.NameLine t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Newline t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Newline'Opt t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.North t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Number t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.PostalWord t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.PreSpacedWord t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.PreSpacedWord'Star t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.SE t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.SE'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.SE'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.SW t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.SW'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.SW'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Separator t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.South t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Space t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.SpaceSuffix t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.SpaceSuffix'Opt t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.State t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Street t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Street'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Street'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.StreetLine t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.StreetName t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Suffix t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Way t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Way'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Way'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Way'2 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.West t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.Words t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Pinchot.Examples.SyntaxTrees.ZipCode t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Address t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Avenue t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Avenue'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Avenue'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Avenue'2 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Boulevard t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Boulevard'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Boulevard'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Boulevard'2 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Boulevard'3 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.City t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.CityLine t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Comma t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.CommaSpace t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Digit t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Digit'Plus t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Direction t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.DirectionSpace t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.DirectionSpace'Opt t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.East t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Letter t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Letters t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.NE t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.NE'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.NE'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.NW t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.NW'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.NW'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.NameLine t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Newline t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Newline'Opt t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.North t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Number t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.PostalWord t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.PreSpacedWord t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.PreSpacedWord'Star t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.SE t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.SE'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.SE'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.SW t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.SW'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.SW'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Separator t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.South t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Space t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.SpaceSuffix t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.SpaceSuffix'Opt t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.State t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Street t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Street'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Street'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.StreetLine t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.StreetName t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Suffix t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Way t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Way'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Way'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Way'2 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.West t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.Words t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (Pinchot.Examples.SyntaxTrees.ZipCode t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Address t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Avenue t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Avenue'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Avenue'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Avenue'2 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Boulevard t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Boulevard'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Boulevard'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Boulevard'2 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Boulevard'3 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.City t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.CityLine t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Comma t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.CommaSpace t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Digit t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Digit'Plus t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Direction t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.DirectionSpace t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.DirectionSpace'Opt t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.East t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Letter t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Letters t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.NE t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.NE'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.NE'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.NW t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.NW'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.NW'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.NameLine t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Newline t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Newline'Opt t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.North t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Number t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.PostalWord t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.PreSpacedWord t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.PreSpacedWord'Star t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.SE t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.SE'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.SE'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.SW t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.SW'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.SW'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Separator t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.South t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Space t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.SpaceSuffix t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.SpaceSuffix'Opt t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.State t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Street t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Street'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Street'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.StreetLine t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.StreetName t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Suffix t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Way t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Way'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Way'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Way'2 t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.West t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.Words t a)
+ Pinchot.Examples.SyntaxTrees: instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Pinchot.Examples.SyntaxTrees.ZipCode t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Avenue'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Avenue'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Avenue'2 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Boulevard'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Boulevard'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Boulevard'2 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Boulevard'3 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.City t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Comma t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Digit t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Digit'Plus t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.DirectionSpace'Opt t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.East t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Letter t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.NE'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.NE'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.NW'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.NW'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Newline t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Newline'Opt t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.North t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Number t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.PreSpacedWord'Star t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.SE'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.SE'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.SW'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.SW'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.South t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Space t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.SpaceSuffix'Opt t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.State t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Street'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Street'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.StreetName t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Way'0 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Way'1 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.Way'2 t a)
+ Pinchot.Examples.SyntaxTrees: instance Control.Lens.Wrapped.Wrapped (Pinchot.Examples.SyntaxTrees.West t a)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Address t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Avenue t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Avenue'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Avenue'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Avenue'2 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Boulevard t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Boulevard'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Boulevard'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Boulevard'2 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Boulevard'3 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.City t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.CityLine t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Comma t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.CommaSpace t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Digit t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Digit'Plus t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Direction t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.DirectionSpace t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.DirectionSpace'Opt t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.East t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Letter t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Letters t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.NE t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.NE'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.NE'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.NW t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.NW'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.NW'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.NameLine t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Newline t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Newline'Opt t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.North t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Number t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.PostalWord t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.PreSpacedWord t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.PreSpacedWord'Star t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.SE t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.SE'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.SE'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.SW t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.SW'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.SW'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Separator t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.South t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Space t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.SpaceSuffix t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.SpaceSuffix'Opt t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.State t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Street t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Street'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Street'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.StreetLine t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.StreetName t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Suffix t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Way t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Way'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Way'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Way'2 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.West t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.Words t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Foldable.Foldable (Pinchot.Examples.SyntaxTrees.ZipCode t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Address t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Avenue t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Avenue'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Avenue'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Avenue'2 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Boulevard t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Boulevard'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Boulevard'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Boulevard'2 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Boulevard'3 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.City t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.CityLine t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Comma t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.CommaSpace t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Digit t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Digit'Plus t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Direction t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.DirectionSpace t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.DirectionSpace'Opt t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.East t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Letter t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Letters t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.NE t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.NE'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.NE'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.NW t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.NW'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.NW'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.NameLine t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Newline t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Newline'Opt t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.North t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Number t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.PostalWord t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.PreSpacedWord t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.PreSpacedWord'Star t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.SE t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.SE'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.SE'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.SW t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.SW'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.SW'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Separator t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.South t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Space t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.SpaceSuffix t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.SpaceSuffix'Opt t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.State t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Street t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Street'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Street'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.StreetLine t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.StreetName t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Suffix t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Way t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Way'0 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Way'1 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Way'2 t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.West t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.Words t)
+ Pinchot.Examples.SyntaxTrees: instance Data.Traversable.Traversable (Pinchot.Examples.SyntaxTrees.ZipCode t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Address t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Avenue t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Avenue'0 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Avenue'1 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Avenue'2 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Boulevard t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Boulevard'0 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Boulevard'1 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Boulevard'2 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Boulevard'3 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.City t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.CityLine t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Comma t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.CommaSpace t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Digit t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Digit'Plus t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Direction t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.DirectionSpace t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.DirectionSpace'Opt t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.East t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Letter t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Letters t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.NE t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.NE'0 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.NE'1 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.NW t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.NW'0 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.NW'1 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.NameLine t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Newline t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Newline'Opt t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.North t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Number t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.PostalWord t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.PreSpacedWord t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.PreSpacedWord'Star t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.SE t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.SE'0 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.SE'1 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.SW t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.SW'0 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.SW'1 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Separator t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.South t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Space t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.SpaceSuffix t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.SpaceSuffix'Opt t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.State t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Street t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Street'0 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Street'1 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.StreetLine t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.StreetName t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Suffix t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Way t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Way'0 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Way'1 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Way'2 t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.West t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.Words t)
+ Pinchot.Examples.SyntaxTrees: instance GHC.Base.Functor (Pinchot.Examples.SyntaxTrees.ZipCode t)
+ Pinchot.Examples.SyntaxTrees: newtype Avenue'0 t a
+ Pinchot.Examples.SyntaxTrees: newtype Avenue'1 t a
+ Pinchot.Examples.SyntaxTrees: newtype Avenue'2 t a
+ Pinchot.Examples.SyntaxTrees: newtype Boulevard'0 t a
+ Pinchot.Examples.SyntaxTrees: newtype Boulevard'1 t a
+ Pinchot.Examples.SyntaxTrees: newtype Boulevard'2 t a
+ Pinchot.Examples.SyntaxTrees: newtype Boulevard'3 t a
+ Pinchot.Examples.SyntaxTrees: newtype City t a
+ Pinchot.Examples.SyntaxTrees: newtype Comma t a
+ Pinchot.Examples.SyntaxTrees: newtype Digit t a
+ Pinchot.Examples.SyntaxTrees: newtype Digit'Plus t a
+ Pinchot.Examples.SyntaxTrees: newtype DirectionSpace'Opt t a
+ Pinchot.Examples.SyntaxTrees: newtype East t a
+ Pinchot.Examples.SyntaxTrees: newtype Letter t a
+ Pinchot.Examples.SyntaxTrees: newtype NE'0 t a
+ Pinchot.Examples.SyntaxTrees: newtype NE'1 t a
+ Pinchot.Examples.SyntaxTrees: newtype NW'0 t a
+ Pinchot.Examples.SyntaxTrees: newtype NW'1 t a
+ Pinchot.Examples.SyntaxTrees: newtype Newline t a
+ Pinchot.Examples.SyntaxTrees: newtype Newline'Opt t a
+ Pinchot.Examples.SyntaxTrees: newtype North t a
+ Pinchot.Examples.SyntaxTrees: newtype Number t a
+ Pinchot.Examples.SyntaxTrees: newtype PreSpacedWord'Star t a
+ Pinchot.Examples.SyntaxTrees: newtype SE'0 t a
+ Pinchot.Examples.SyntaxTrees: newtype SE'1 t a
+ Pinchot.Examples.SyntaxTrees: newtype SW'0 t a
+ Pinchot.Examples.SyntaxTrees: newtype SW'1 t a
+ Pinchot.Examples.SyntaxTrees: newtype South t a
+ Pinchot.Examples.SyntaxTrees: newtype Space t a
+ Pinchot.Examples.SyntaxTrees: newtype SpaceSuffix'Opt t a
+ Pinchot.Examples.SyntaxTrees: newtype State t a
+ Pinchot.Examples.SyntaxTrees: newtype Street'0 t a
+ Pinchot.Examples.SyntaxTrees: newtype Street'1 t a
+ Pinchot.Examples.SyntaxTrees: newtype StreetName t a
+ Pinchot.Examples.SyntaxTrees: newtype Way'0 t a
+ Pinchot.Examples.SyntaxTrees: newtype Way'1 t a
+ Pinchot.Examples.SyntaxTrees: newtype Way'2 t a
+ Pinchot.Examples.SyntaxTrees: newtype West t a
+ Pinchot.Examples.Terminalize: t'Address :: Address t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Avenue :: Avenue t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Avenue'0 :: Avenue'0 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Avenue'1 :: Avenue'1 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Avenue'2 :: Avenue'2 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Boulevard :: Boulevard t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Boulevard'0 :: Boulevard'0 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Boulevard'1 :: Boulevard'1 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Boulevard'2 :: Boulevard'2 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Boulevard'3 :: Boulevard'3 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'City :: City t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'CityLine :: CityLine t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Comma :: Comma t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'CommaSpace :: CommaSpace t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Digit :: Digit t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Digit'Plus :: Digit'Plus t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Direction :: Direction t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'DirectionSpace :: DirectionSpace t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'DirectionSpace'Opt :: DirectionSpace'Opt t a -> Seq (t, a)
+ Pinchot.Examples.Terminalize: t'East :: East t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Letter :: Letter t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Letters :: Letters t a -> Seq (t, a)
+ Pinchot.Examples.Terminalize: t'NE :: NE t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'NE'0 :: NE'0 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'NE'1 :: NE'1 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'NW :: NW t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'NW'0 :: NW'0 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'NW'1 :: NW'1 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'NameLine :: NameLine t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Newline :: Newline t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Newline'Opt :: Newline'Opt t a -> Seq (t, a)
+ Pinchot.Examples.Terminalize: t'North :: North t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Number :: Number t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'PostalWord :: PostalWord t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'PreSpacedWord :: PreSpacedWord t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'PreSpacedWord'Star :: PreSpacedWord'Star t a -> Seq (t, a)
+ Pinchot.Examples.Terminalize: t'SE :: SE t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'SE'0 :: SE'0 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'SE'1 :: SE'1 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'SW :: SW t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'SW'0 :: SW'0 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'SW'1 :: SW'1 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Separator :: Separator t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'South :: South t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Space :: Space t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'SpaceSuffix :: SpaceSuffix t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'SpaceSuffix'Opt :: SpaceSuffix'Opt t a -> Seq (t, a)
+ Pinchot.Examples.Terminalize: t'State :: State t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Street :: Street t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Street'0 :: Street'0 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Street'1 :: Street'1 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'StreetLine :: StreetLine t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'StreetName :: StreetName t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Suffix :: Suffix t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Way :: Way t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Way'0 :: Way'0 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Way'1 :: Way'1 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Way'2 :: Way'2 t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'West :: West t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'Words :: Words t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: t'ZipCode :: ZipCode t a -> NonEmpty (t, a)
+ Pinchot.Examples.Terminalize: terminalizeAddress :: Address t a -> NonEmpty (t, a)
+ Pinchot.Intervals: [_excluded] :: Intervals a -> Seq (a, a)
+ Pinchot.Intervals: [_included] :: Intervals a -> Seq (a, a)
+ Pinchot.Intervals: excluded :: Lens' (Intervals a_aeOE) (Seq (a_aeOE, a_aeOE))
+ Pinchot.Intervals: included :: Lens' (Intervals a_aeOE) (Seq (a_aeOE, a_aeOE))
+ Pinchot.Locator: advanceChar :: Char -> Loc -> Loc
+ Pinchot.Locator: locatedFullParses :: FoldableLL full Char => (forall r. Grammar r (Prod r String (Char, Loc) (p Char Loc))) -> full -> ([p Char Loc], Report String (Seq (Char, Loc)))
+ Pinchot.Locator: locations :: FoldableLL full Char => full -> Seq (Char, Loc)
+ Pinchot.Locator: noLocations :: FoldableLL full item => full -> Seq (item, ())
+ Pinchot.NonEmpty: NonEmpty :: a -> Seq a -> NonEmpty a
+ Pinchot.NonEmpty: [_front] :: NonEmpty a -> a
+ Pinchot.NonEmpty: [_rest] :: NonEmpty a -> Seq a
+ Pinchot.NonEmpty: append :: NonEmpty a -> NonEmpty a -> NonEmpty a
+ Pinchot.NonEmpty: appendSeq :: NonEmpty a -> Seq a -> NonEmpty a
+ Pinchot.NonEmpty: data NonEmpty a
+ Pinchot.NonEmpty: flatten :: NonEmpty a -> Seq a
+ Pinchot.NonEmpty: front :: Lens' (NonEmpty a_aa3u) a_aa3u
+ Pinchot.NonEmpty: instance Data.Foldable.Foldable Pinchot.NonEmpty.NonEmpty
+ Pinchot.NonEmpty: instance Data.Traversable.Traversable Pinchot.NonEmpty.NonEmpty
+ Pinchot.NonEmpty: instance GHC.Base.Applicative Pinchot.NonEmpty.NonEmpty
+ Pinchot.NonEmpty: instance GHC.Base.Functor Pinchot.NonEmpty.NonEmpty
+ Pinchot.NonEmpty: instance GHC.Base.Monad Pinchot.NonEmpty.NonEmpty
+ Pinchot.NonEmpty: instance GHC.Classes.Eq a => GHC.Classes.Eq (Pinchot.NonEmpty.NonEmpty a)
+ Pinchot.NonEmpty: instance GHC.Classes.Ord a => GHC.Classes.Ord (Pinchot.NonEmpty.NonEmpty a)
+ Pinchot.NonEmpty: instance GHC.Show.Show a => GHC.Show.Show (Pinchot.NonEmpty.NonEmpty a)
+ Pinchot.NonEmpty: prependSeq :: Seq a -> NonEmpty a -> NonEmpty a
+ Pinchot.NonEmpty: rest :: Lens' (NonEmpty a_aa3u) (Seq a_aa3u)
+ Pinchot.NonEmpty: seqToNonEmpty :: Seq a -> Maybe (NonEmpty a)
+ Pinchot.NonEmpty: singleton :: a -> NonEmpty a
+ Pinchot.RecursiveDo: bigTuple :: Foldable c => ExpQ -> c ExpQ -> ExpQ
+ Pinchot.RecursiveDo: lazyPattern :: Foldable c => c Name -> Q Pat
+ Pinchot.RecursiveDo: recursiveDo :: [(Name, ExpQ)] -> ExpQ -> ExpQ
+ Pinchot.Rules: (<?>) :: Rule t -> String -> Rule t
+ Pinchot.Rules: families :: Seq (Rule t) -> Seq (Rule t)
+ Pinchot.Rules: family :: Rule t -> Seq (Rule t)
+ Pinchot.Rules: getAncestors :: Rule t -> State (Set RuleName) (Seq (Rule t))
+ Pinchot.Rules: label :: Rule t -> String -> Rule t
+ Pinchot.Rules: nonTerminal :: RuleName -> Seq (BranchName, Seq (Rule t)) -> Rule t
+ Pinchot.Rules: opt :: Rule t -> Rule t
+ Pinchot.Rules: plus :: Rule t -> Rule t
+ Pinchot.Rules: record :: RuleName -> Seq (Rule t) -> Rule t
+ Pinchot.Rules: rule :: RuleName -> RuleType t -> Rule t
+ Pinchot.Rules: star :: Rule t -> Rule t
+ Pinchot.Rules: terminal :: RuleName -> Intervals t -> Rule t
+ Pinchot.Rules: terminals :: RuleName -> String -> Rule Char
+ Pinchot.Rules: union :: RuleName -> Seq (Rule t) -> Rule t
+ Pinchot.Rules: wrap :: RuleName -> Rule t -> Rule t
+ Pinchot.SyntaxTree: branchConstructor :: Branch t -> ConQ
+ Pinchot.SyntaxTree: ruleToType :: Name -> [Name] -> Rule t -> Q Dec
+ Pinchot.SyntaxTree: syntaxTrees :: Name -> [Name] -> Seq (Rule t) -> DecsQ
+ Pinchot.SyntaxTree.Optics: forallA :: TypeQ -> TypeQ
+ Pinchot.SyntaxTree.Optics: nonTerminalToOptics :: Qualifier -> String -> Branch t -> Seq (Branch t) -> [Q Dec]
+ Pinchot.SyntaxTree.Optics: recordsToOptics :: Qualifier -> String -> Seq (Rule t) -> [Q Dec]
+ Pinchot.SyntaxTree.Optics: ruleToOptics :: Lift t => Qualifier -> Name -> Rule t -> Q [Dec]
+ Pinchot.SyntaxTree.Optics: rulesToOptics :: Lift t => Qualifier -> Name -> Seq (Rule t) -> Q [Dec]
+ Pinchot.SyntaxTree.Optics: terminalToOptics :: Lift t => Qualifier -> Name -> String -> Intervals t -> Q [Dec]
+ Pinchot.SyntaxTree.Wrappers: makeWrapped :: TypeQ -> String -> Q Dec
+ Pinchot.SyntaxTree.Wrappers: singleWrappedInstance :: Rule t -> Maybe (Q Dec)
+ Pinchot.SyntaxTree.Wrappers: wrappedInstances :: Seq (Rule t) -> DecsQ
+ Pinchot.SyntaxTree.Wrappers: wrappedOpt :: String -> String -> Q Dec
+ Pinchot.SyntaxTree.Wrappers: wrappedPlus :: String -> String -> Q Dec
+ Pinchot.SyntaxTree.Wrappers: wrappedStar :: String -> String -> Q Dec
+ Pinchot.SyntaxTree.Wrappers: wrappedTerminal :: String -> Q Dec
+ Pinchot.SyntaxTree.Wrappers: wrappedTerminals :: String -> Q Dec
+ Pinchot.SyntaxTree.Wrappers: wrappedWrap :: String -> String -> Q Dec
+ Pinchot.Terminalize: atLeastOne :: Rule t -> Bool
+ Pinchot.Terminalize: lookupName :: Map RuleName Name -> RuleName -> Name
+ Pinchot.Terminalize: ruleLookupMap :: Foldable c => c (Rule t) -> Q (Map RuleName (Name))
+ Pinchot.Terminalize: terminalizeProductAllowsZero :: Qualifier -> Map RuleName Name -> String -> Seq (Rule t) -> Q (PatQ, ExpQ)
+ Pinchot.Terminalize: terminalizeProductAtLeastOne :: Qualifier -> Map RuleName Name -> String -> Seq (Rule t) -> Q (PatQ, ExpQ)
+ Pinchot.Terminalize: terminalizeProductRule :: Map RuleName Name -> Rule t -> Q (Rule t, (Q Pat, Q Exp))
+ Pinchot.Terminalize: terminalizeRuleExp :: Qualifier -> Rule t -> Q Exp
+ Pinchot.Terminalize: terminalizeSingleRule :: Qualifier -> Map RuleName Name -> Rule t -> Q Exp
+ Pinchot.Terminalize: terminalizer :: Qualifier -> Name -> Rule t -> Q [Dec]
+ Pinchot.Terminalize: terminalizers :: Qualifier -> Name -> Seq (Rule t) -> Q [Dec]
+ Pinchot.Types: Branch :: BranchName -> Seq (Rule t) -> Branch t
+ Pinchot.Types: Loc :: Int -> Int -> Int -> Loc
+ Pinchot.Types: NonTerminal :: (Branch t) -> (Seq (Branch t)) -> RuleType t
+ Pinchot.Types: Opt :: (Rule t) -> RuleType t
+ Pinchot.Types: Plus :: (Rule t) -> RuleType t
+ Pinchot.Types: Record :: (Seq (Rule t)) -> RuleType t
+ Pinchot.Types: Rule :: RuleName -> Maybe String -> RuleType t -> Rule t
+ Pinchot.Types: Star :: (Rule t) -> RuleType t
+ Pinchot.Types: Terminal :: (Intervals t) -> RuleType t
+ Pinchot.Types: Wrap :: (Rule t) -> RuleType t
+ Pinchot.Types: [_branchName] :: Branch t -> BranchName
+ Pinchot.Types: [_branches] :: Branch t -> Seq (Rule t)
+ Pinchot.Types: [_col] :: Loc -> Int
+ Pinchot.Types: [_line] :: Loc -> Int
+ Pinchot.Types: [_pos] :: Loc -> Int
+ Pinchot.Types: [_ruleDescription] :: Rule t -> Maybe String
+ Pinchot.Types: [_ruleName] :: Rule t -> RuleName
+ Pinchot.Types: [_ruleType] :: Rule t -> RuleType t
+ Pinchot.Types: _NonTerminal :: Prism' (RuleType t) (Branch t, Seq (Branch t))
+ Pinchot.Types: _Opt :: Prism' (RuleType t) (Rule t)
+ Pinchot.Types: _Plus :: Prism' (RuleType t) (Rule t)
+ Pinchot.Types: _Record :: Prism' (RuleType t) (Seq (Rule t))
+ Pinchot.Types: _Star :: Prism' (RuleType t) (Rule t)
+ Pinchot.Types: _Terminal :: Prism' (RuleType t) (Intervals t)
+ Pinchot.Types: _Wrap :: Prism' (RuleType t) (Rule t)
+ Pinchot.Types: branchName :: Lens' (Branch t) BranchName
+ Pinchot.Types: branches :: Lens' (Branch t) (Seq (Rule t))
+ Pinchot.Types: col :: Lens' Loc Int
+ Pinchot.Types: data Branch t
+ Pinchot.Types: data Loc
+ Pinchot.Types: data Rule t
+ Pinchot.Types: data RuleType t
+ Pinchot.Types: instance GHC.Classes.Eq Pinchot.Types.Loc
+ Pinchot.Types: instance GHC.Classes.Eq t => GHC.Classes.Eq (Pinchot.Types.Branch t)
+ Pinchot.Types: instance GHC.Classes.Eq t => GHC.Classes.Eq (Pinchot.Types.Rule t)
+ Pinchot.Types: instance GHC.Classes.Eq t => GHC.Classes.Eq (Pinchot.Types.RuleType t)
+ Pinchot.Types: instance GHC.Classes.Ord Pinchot.Types.Loc
+ Pinchot.Types: instance GHC.Classes.Ord t => GHC.Classes.Ord (Pinchot.Types.Branch t)
+ Pinchot.Types: instance GHC.Classes.Ord t => GHC.Classes.Ord (Pinchot.Types.Rule t)
+ Pinchot.Types: instance GHC.Classes.Ord t => GHC.Classes.Ord (Pinchot.Types.RuleType t)
+ Pinchot.Types: instance GHC.Read.Read Pinchot.Types.Loc
+ Pinchot.Types: instance GHC.Show.Show Pinchot.Types.Loc
+ Pinchot.Types: instance GHC.Show.Show t => GHC.Show.Show (Pinchot.Types.Branch t)
+ Pinchot.Types: instance GHC.Show.Show t => GHC.Show.Show (Pinchot.Types.Rule t)
+ Pinchot.Types: instance GHC.Show.Show t => GHC.Show.Show (Pinchot.Types.RuleType t)
+ Pinchot.Types: line :: Lens' Loc Int
+ Pinchot.Types: pos :: Lens' Loc Int
+ Pinchot.Types: quald :: Qualifier -> String -> Name
+ Pinchot.Types: recordFieldName :: Int -> String -> String -> String
+ Pinchot.Types: ruleDescription :: Lens' (Rule t) (Maybe String)
+ Pinchot.Types: ruleName :: Lens' (Rule t) RuleName
+ Pinchot.Types: ruleType :: Lens' (Rule t) (RuleType t)
+ Pinchot.Types: type BranchName = String
+ Pinchot.Types: type Qualifier = String
+ Pinchot.Types: type RuleName = String
- Pinchot: (<?>) :: Pinchot t (Rule t) -> String -> Pinchot t (Rule t)
+ Pinchot: (<?>) :: Rule t -> String -> Rule t
- Pinchot: allRulesRecord :: Qualifier -> Name -> Pinchot t a -> DecsQ
+ Pinchot: allRulesRecord :: Qualifier -> Name -> Seq (Rule t) -> DecsQ
- Pinchot: earleyProduct :: Lift t => Qualifier -> Qualifier -> Pinchot t a -> ExpQ
+ Pinchot: earleyProduct :: Lift t => Qualifier -> Qualifier -> Seq (Rule t) -> ExpQ
- Pinchot: label :: String -> Rule t -> Rule t
+ Pinchot: label :: Rule t -> String -> Rule t
- Pinchot: nonTerminal :: RuleName -> Seq (AlternativeName, Seq (Rule t)) -> Pinchot t (Rule t)
+ Pinchot: nonTerminal :: RuleName -> Seq (BranchName, Seq (Rule t)) -> Rule t
- Pinchot: record :: RuleName -> Seq (Rule t) -> Pinchot t (Rule t)
+ Pinchot: record :: RuleName -> Seq (Rule t) -> Rule t
- Pinchot: terminal :: RuleName -> Intervals t -> Pinchot t (Rule t)
+ Pinchot: terminal :: RuleName -> Intervals t -> Rule t
- Pinchot: union :: RuleName -> Seq (Rule t) -> Pinchot t (Rule t)
+ Pinchot: union :: RuleName -> Seq (Rule t) -> Rule t
- Pinchot: wrap :: RuleName -> Rule t -> Pinchot t (Rule t)
+ Pinchot: wrap :: RuleName -> Rule t -> Rule t
- Pinchot.Examples.AllRulesRecord: Productions :: Prod r String Char Digit -> Prod r String Char Digit'Seq1 -> Prod r String Char Letter -> Prod r String Char North -> Prod r String Char South -> Prod r String Char East -> Prod r String Char West -> Prod r String Char Direction -> Prod r String Char Street -> Prod r String Char Avenue -> Prod r String Char Way -> Prod r String Char Boulevard -> Prod r String Char Suffix -> Prod r String Char Space -> Prod r String Char Comma -> Prod r String Char Letters -> Prod r String Char PostalWord -> Prod r String Char PreSpacedWord -> Prod r String Char PreSpacedWord'Seq -> Prod r String Char Words -> Prod r String Char Number -> Prod r String Char StreetName -> Prod r String Char City -> Prod r String Char State -> Prod r String Char ZipCode -> Prod r String Char DirectionSpace -> Prod r String Char SpaceSuffix -> Prod r String Char DirectionSpace'Maybe -> Prod r String Char SpaceSuffix'Maybe -> Prod r String Char Address -> Productions r
+ Pinchot.Examples.AllRulesRecord: Productions :: Prod r String (t, a) (Address t a) -> Prod r String (t, a) (NameLine t a) -> Prod r String (t, a) (Words t a) -> Prod r String (t, a) (PostalWord t a) -> Prod r String (t, a) (Letter t a) -> Prod r String (t, a) (Letters t a) -> Prod r String (t, a) (PreSpacedWord'Star t a) -> Prod r String (t, a) (PreSpacedWord t a) -> Prod r String (t, a) (Space t a) -> Prod r String (t, a) (Separator t a) -> Prod r String (t, a) (CommaSpace t a) -> Prod r String (t, a) (Comma t a) -> Prod r String (t, a) (Newline t a) -> Prod r String (t, a) (StreetLine t a) -> Prod r String (t, a) (Number t a) -> Prod r String (t, a) (Digit'Plus t a) -> Prod r String (t, a) (Digit t a) -> Prod r String (t, a) (DirectionSpace'Opt t a) -> Prod r String (t, a) (DirectionSpace t a) -> Prod r String (t, a) (Direction t a) -> Prod r String (t, a) (North t a) -> Prod r String (t, a) (South t a) -> Prod r String (t, a) (East t a) -> Prod r String (t, a) (West t a) -> Prod r String (t, a) (NE t a) -> Prod r String (t, a) (NE'0 t a) -> Prod r String (t, a) (NE'1 t a) -> Prod r String (t, a) (NW t a) -> Prod r String (t, a) (NW'0 t a) -> Prod r String (t, a) (NW'1 t a) -> Prod r String (t, a) (SE t a) -> Prod r String (t, a) (SE'0 t a) -> Prod r String (t, a) (SE'1 t a) -> Prod r String (t, a) (SW t a) -> Prod r String (t, a) (SW'0 t a) -> Prod r String (t, a) (SW'1 t a) -> Prod r String (t, a) (StreetName t a) -> Prod r String (t, a) (SpaceSuffix'Opt t a) -> Prod r String (t, a) (SpaceSuffix t a) -> Prod r String (t, a) (Suffix t a) -> Prod r String (t, a) (Street t a) -> Prod r String (t, a) (Street'0 t a) -> Prod r String (t, a) (Street'1 t a) -> Prod r String (t, a) (Avenue t a) -> Prod r String (t, a) (Avenue'0 t a) -> Prod r String (t, a) (Avenue'1 t a) -> Prod r String (t, a) (Avenue'2 t a) -> Prod r String (t, a) (Way t a) -> Prod r String (t, a) (Way'0 t a) -> Prod r String (t, a) (Way'1 t a) -> Prod r String (t, a) (Way'2 t a) -> Prod r String (t, a) (Boulevard t a) -> Prod r String (t, a) (Boulevard'0 t a) -> Prod r String (t, a) (Boulevard'1 t a) -> Prod r String (t, a) (Boulevard'2 t a) -> Prod r String (t, a) (Boulevard'3 t a) -> Prod r String (t, a) (CityLine t a) -> Prod r String (t, a) (City t a) -> Prod r String (t, a) (State t a) -> Prod r String (t, a) (ZipCode t a) -> Prod r String (t, a) (Newline'Opt t a) -> Productions r t a
- Pinchot.Examples.AllRulesRecord: [a'Address] :: Productions r -> Prod r String Char Address
+ Pinchot.Examples.AllRulesRecord: [a'Address] :: Productions r t a -> Prod r String (t, a) (Address t a)
- Pinchot.Examples.AllRulesRecord: [a'Avenue] :: Productions r -> Prod r String Char Avenue
+ Pinchot.Examples.AllRulesRecord: [a'Avenue] :: Productions r t a -> Prod r String (t, a) (Avenue t a)
- Pinchot.Examples.AllRulesRecord: [a'Boulevard] :: Productions r -> Prod r String Char Boulevard
+ Pinchot.Examples.AllRulesRecord: [a'Boulevard] :: Productions r t a -> Prod r String (t, a) (Boulevard t a)
- Pinchot.Examples.AllRulesRecord: [a'City] :: Productions r -> Prod r String Char City
+ Pinchot.Examples.AllRulesRecord: [a'City] :: Productions r t a -> Prod r String (t, a) (City t a)
- Pinchot.Examples.AllRulesRecord: [a'Comma] :: Productions r -> Prod r String Char Comma
+ Pinchot.Examples.AllRulesRecord: [a'Comma] :: Productions r t a -> Prod r String (t, a) (Comma t a)
- Pinchot.Examples.AllRulesRecord: [a'Digit] :: Productions r -> Prod r String Char Digit
+ Pinchot.Examples.AllRulesRecord: [a'Digit] :: Productions r t a -> Prod r String (t, a) (Digit t a)
- Pinchot.Examples.AllRulesRecord: [a'DirectionSpace] :: Productions r -> Prod r String Char DirectionSpace
+ Pinchot.Examples.AllRulesRecord: [a'DirectionSpace] :: Productions r t a -> Prod r String (t, a) (DirectionSpace t a)
- Pinchot.Examples.AllRulesRecord: [a'Direction] :: Productions r -> Prod r String Char Direction
+ Pinchot.Examples.AllRulesRecord: [a'Direction] :: Productions r t a -> Prod r String (t, a) (Direction t a)
- Pinchot.Examples.AllRulesRecord: [a'East] :: Productions r -> Prod r String Char East
+ Pinchot.Examples.AllRulesRecord: [a'East] :: Productions r t a -> Prod r String (t, a) (East t a)
- Pinchot.Examples.AllRulesRecord: [a'Letter] :: Productions r -> Prod r String Char Letter
+ Pinchot.Examples.AllRulesRecord: [a'Letter] :: Productions r t a -> Prod r String (t, a) (Letter t a)
- Pinchot.Examples.AllRulesRecord: [a'Letters] :: Productions r -> Prod r String Char Letters
+ Pinchot.Examples.AllRulesRecord: [a'Letters] :: Productions r t a -> Prod r String (t, a) (Letters t a)
- Pinchot.Examples.AllRulesRecord: [a'North] :: Productions r -> Prod r String Char North
+ Pinchot.Examples.AllRulesRecord: [a'North] :: Productions r t a -> Prod r String (t, a) (North t a)
- Pinchot.Examples.AllRulesRecord: [a'Number] :: Productions r -> Prod r String Char Number
+ Pinchot.Examples.AllRulesRecord: [a'Number] :: Productions r t a -> Prod r String (t, a) (Number t a)
- Pinchot.Examples.AllRulesRecord: [a'PostalWord] :: Productions r -> Prod r String Char PostalWord
+ Pinchot.Examples.AllRulesRecord: [a'PostalWord] :: Productions r t a -> Prod r String (t, a) (PostalWord t a)
- Pinchot.Examples.AllRulesRecord: [a'PreSpacedWord] :: Productions r -> Prod r String Char PreSpacedWord
+ Pinchot.Examples.AllRulesRecord: [a'PreSpacedWord] :: Productions r t a -> Prod r String (t, a) (PreSpacedWord t a)
- Pinchot.Examples.AllRulesRecord: [a'South] :: Productions r -> Prod r String Char South
+ Pinchot.Examples.AllRulesRecord: [a'South] :: Productions r t a -> Prod r String (t, a) (South t a)
- Pinchot.Examples.AllRulesRecord: [a'SpaceSuffix] :: Productions r -> Prod r String Char SpaceSuffix
+ Pinchot.Examples.AllRulesRecord: [a'SpaceSuffix] :: Productions r t a -> Prod r String (t, a) (SpaceSuffix t a)
- Pinchot.Examples.AllRulesRecord: [a'Space] :: Productions r -> Prod r String Char Space
+ Pinchot.Examples.AllRulesRecord: [a'Space] :: Productions r t a -> Prod r String (t, a) (Space t a)
- Pinchot.Examples.AllRulesRecord: [a'State] :: Productions r -> Prod r String Char State
+ Pinchot.Examples.AllRulesRecord: [a'State] :: Productions r t a -> Prod r String (t, a) (State t a)
- Pinchot.Examples.AllRulesRecord: [a'StreetName] :: Productions r -> Prod r String Char StreetName
+ Pinchot.Examples.AllRulesRecord: [a'StreetName] :: Productions r t a -> Prod r String (t, a) (StreetName t a)
- Pinchot.Examples.AllRulesRecord: [a'Street] :: Productions r -> Prod r String Char Street
+ Pinchot.Examples.AllRulesRecord: [a'Street] :: Productions r t a -> Prod r String (t, a) (Street t a)
- Pinchot.Examples.AllRulesRecord: [a'Suffix] :: Productions r -> Prod r String Char Suffix
+ Pinchot.Examples.AllRulesRecord: [a'Suffix] :: Productions r t a -> Prod r String (t, a) (Suffix t a)
- Pinchot.Examples.AllRulesRecord: [a'Way] :: Productions r -> Prod r String Char Way
+ Pinchot.Examples.AllRulesRecord: [a'Way] :: Productions r t a -> Prod r String (t, a) (Way t a)
- Pinchot.Examples.AllRulesRecord: [a'West] :: Productions r -> Prod r String Char West
+ Pinchot.Examples.AllRulesRecord: [a'West] :: Productions r t a -> Prod r String (t, a) (West t a)
- Pinchot.Examples.AllRulesRecord: [a'Words] :: Productions r -> Prod r String Char Words
+ Pinchot.Examples.AllRulesRecord: [a'Words] :: Productions r t a -> Prod r String (t, a) (Words t a)
- Pinchot.Examples.AllRulesRecord: [a'ZipCode] :: Productions r -> Prod r String Char ZipCode
+ Pinchot.Examples.AllRulesRecord: [a'ZipCode] :: Productions r t a -> Prod r String (t, a) (ZipCode t a)
- Pinchot.Examples.AllRulesRecord: data Productions r
+ Pinchot.Examples.AllRulesRecord: data Productions r t a
Files
- exe/newman.hs +9/−0
- exe/parakeet.hs +0/−26
- exe/parrot.hs +0/−24
- exe/postal-parser.hs +0/−24
- exe/print-postal-grammar.hs +0/−14
- lib/Pinchot.hs +61/−24
- lib/Pinchot/Earley.hs +248/−0
- lib/Pinchot/Examples.hs +23/−39
- lib/Pinchot/Examples/AllEarleyGrammars.hs +0/−12
- lib/Pinchot/Examples/AllRulesRecord.hs +10/−8
- lib/Pinchot/Examples/Earley.hs +21/−0
- lib/Pinchot/Examples/EarleyProduct.hs +0/−32
- lib/Pinchot/Examples/Newman.hs +130/−0
- lib/Pinchot/Examples/Postal.hs +97/−50
- lib/Pinchot/Examples/PostalAstAllRules.hs +0/−27
- lib/Pinchot/Examples/PostalAstNoLenses.hs +0/−24
- lib/Pinchot/Examples/PostalAstRuleTree.hs +0/−28
- lib/Pinchot/Examples/QualifiedImport.hs +0/−19
- lib/Pinchot/Examples/RulesToOptics.hs +15/−0
- lib/Pinchot/Examples/SyntaxTrees.hs +29/−0
- lib/Pinchot/Examples/Terminalize.hs +16/−0
- lib/Pinchot/Internal.hs +0/−1535
- lib/Pinchot/Intervals.hs +9/−4
- lib/Pinchot/Locator.hs +59/−0
- lib/Pinchot/NonEmpty.hs +61/−0
- lib/Pinchot/RecursiveDo.hs +76/−0
- lib/Pinchot/Rules.hs +223/−0
- lib/Pinchot/SyntaxTree.hs +113/−0
- lib/Pinchot/SyntaxTree/Optics.hs +246/−0
- lib/Pinchot/SyntaxTree/Wrappers.hs +161/−0
- lib/Pinchot/Terminalize.hs +323/−0
- lib/Pinchot/Types.hs +180/−0
- pinchot.cabal +40/−126
+ exe/newman.hs view
@@ -0,0 +1,9 @@+module Main where++import Pinchot.Examples.Newman+import System.Environment (getArgs)++main :: IO ()+main = do+ a1:[] <- getArgs+ address a1
− exe/parakeet.hs
@@ -1,26 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE OverloadedLists #-}---- | Like @parrot@ but uses--- 'Pinchot.Examples.EarleyProduct.addressParser'.--- --- Reads the string given as the first argument. Parses it and--- then, for each parse result, uses 'terminals' to print the--- terminals. Each result output should be the same as the input.-module Main where--import Data.Foldable (toList)-import Pinchot-import Pinchot.Examples.Postal-import Pinchot.Examples.EarleyProduct-import Pinchot.Examples.PostalAstAllRules-import System.Environment (getArgs)--import Text.Earley (parser, fullParses)--main :: IO ()-main = do- a1:[] <- getArgs- let (ls, _) = fullParses (parser addressParser) a1- printSeq = putStrLn . toList . t'Address- mapM_ printSeq ls
− exe/parrot.hs
@@ -1,24 +0,0 @@-{-# LANGUAGE OverloadedLists #-}-{-# LANGUAGE TemplateHaskell #-}---- Reads the string given as the first argument. Parses it and--- then, for each parse result, uses 't'Address' to print the--- terminals. Each result output should be the same as the input.-module Main where--import Pinchot-import Data.Foldable (toList)-import Pinchot.Examples.Postal-import Pinchot.Examples.EarleyProduct-import System.Environment (getArgs)--import Text.Earley (parser, fullParses)--ruleTreeToTypes noOptics ''Char [] postal--main :: IO ()-main = do- a1:[] <- getArgs- let (ls, _) = fullParses (parser $(earleyGrammar "" postal)) a1 - printSeq = putStrLn . toList . t'Address- mapM_ printSeq ls
− exe/postal-parser.hs
@@ -1,24 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE OverloadedLists #-}---- | Creates a Template Haskell parser. Parses strings in the postal--- language and pretty-prints the result.-module Main where--import Pinchot-import Pinchot.Examples.Postal-import System.Environment (getArgs)-import Text.Show.Pretty (ppShow)--import Text.Earley (Prod, Grammar, parser, fullParses)--ruleTreeToTypes makeOptics ''Char [''Show] postal--postalGrammar :: Grammar r (Prod r String Char Address)-postalGrammar = $(earleyGrammar "" postal)--main :: IO ()-main = do- a1:[] <- getArgs- putStrLn . ppShow $ fullParses (parser postalGrammar) a1
− exe/print-postal-grammar.hs
@@ -1,14 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# OPTIONS_GHC -Wall #-}---- | Creates a Template Haskell AST for a parser--- and pretty-prints it to standard output.-module Main where--import Language.Haskell.TH-import Pinchot-import Pinchot.Examples.Postal---main :: IO ()-main = runQ [| $(earleyGrammar "" postal) |] >>= putStrLn . pprint
lib/Pinchot.hs view
@@ -1,13 +1,17 @@ {- | Pinchot provides a simple language that you use to write a Haskell-program that describes a context-free grammar. When run, this program-creates a value that stores your context-free grammar. You can then+values that describes a context-free grammar. You can then use Template Haskell to take this value and generate a series of data types that correspond to your context-free grammar. You can also use Template Haskell to create an Earley parser that will parse all-strings in the context-free language.+strings in the context-free language. Other handy utilities generate+functions that will return all the terminal characters from a parsed+production rule. It is also possible to easily determine the location+(line, column, and position) of any parsed production or character. +Everything you typically need should be in this module.+ For examples, please consult "Pinchot.Examples". You should also look at the BNF Converter.@@ -43,40 +47,73 @@ , solo , pariah - -- * Simple production rules- , Pinchot+ -- * Non-empty+ , NonEmpty(..)+ , front+ , rest+ , flatten+ , seqToNonEmpty+ , prependSeq+ , appendSeq+ , append+ , singleton+ + -- * Production rules , RuleName- , AlternativeName , Rule+ , BranchName , terminal- , terminalSeq , nonTerminal , union+ , terminals+ , wrap , record+ , opt+ , star+ , plus - -- * Rules that modify other rules- , list- , list1- , option- , wrap+ -- ** Errors , label , (<?>) - -- * Transforming a Pinchot value to code- -- ** Creating data types- , MakeOptics- , makeOptics- , noOptics- , allRulesToTypes- , ruleTreeToTypes+ -- * Qualifiers+ , Qualifier++ -- * Creating data types corresponding to grammars+ , syntaxTrees , allRulesRecord - -- ** Creating Earley grammars- , Qualifier- , earleyGrammar- , allEarleyGrammars+ -- ** Wrappers and optics+ , wrappedInstances+ , rulesToOptics++ -- * Creating Earley grammars+ , earleyGrammarFromRule , earleyProduct++ -- * Terminalizers+ , terminalizeRuleExp+ , terminalizers++ -- * Locations+ , Loc(..)+ , line+ , col+ , pos+ , locations+ , noLocations++ -- * Running parsers with locations+ , locatedFullParses ) where -import Pinchot.Internal+import Pinchot.Earley+import Pinchot.Locator import Pinchot.Intervals+import Pinchot.NonEmpty+import Pinchot.Rules+import Pinchot.SyntaxTree+import Pinchot.SyntaxTree.Optics+import Pinchot.SyntaxTree.Wrappers+import Pinchot.Terminalize+import Pinchot.Types
+ lib/Pinchot/Earley.hs view
@@ -0,0 +1,248 @@+{-# OPTIONS_HADDOCK not-home #-}+{-# LANGUAGE TemplateHaskell #-}+-- | Creating Earley parsers.++module Pinchot.Earley where++import Pinchot.NonEmpty+import Pinchot.RecursiveDo+import Pinchot.Rules+import Pinchot.Types+import Pinchot.Intervals++import Control.Applicative ((<|>), liftA2)+import Data.Foldable (toList)+import Data.Sequence ((<|), viewl, ViewL(EmptyL, (:<)), Seq)+import qualified Data.Sequence as Seq+import qualified Language.Haskell.TH as T+import qualified Language.Haskell.TH.Syntax as Syntax+import qualified Text.Earley++-- | Creates a list of pairs. Each list represents a statement in+-- @do@ notation. The first element of the pair is the name of the+-- variable to which to bind the result of the expression, which is+-- the second element of the pair.+ruleToParser+ :: Syntax.Lift t+ => String+ -- ^ Module prefix+ -> Rule t+ -> [(T.Name, T.ExpQ)]+ruleToParser prefix (Rule nm mayDescription rt) = case rt of++ Terminal ivls -> [makeRule expression]+ where+ expression =+ [| let f (c, a)+ | inIntervals ivls c = Just+ ($(T.conE (quald prefix nm)) (c, a))+ | otherwise = Nothing+ in Text.Earley.terminal f |]++ NonTerminal b1 bs -> [makeRule expression]+ where+ expression = foldl addBranch (branchToParser prefix b1) bs+ where+ addBranch tree branch =+ [| $tree <|> $(branchToParser prefix branch) |]++ Wrap (Rule innerNm _ _) -> [makeRule expression]+ where+ expression = [|fmap $constructor $(T.varE (localRuleName innerNm)) |]++ Record sq -> [makeRule expression]+ where+ expression = case viewl sq of+ EmptyL -> [| pure $constructor |]+ Rule r1 _ _ :< restFields -> foldl addField fstField restFields+ where+ fstField = [| $constructor <$> $(T.varE (localRuleName r1)) |]+ addField soFar (Rule r _ _)+ = [| $soFar <*> $(T.varE (localRuleName r)) |]+ + Opt (Rule innerNm _ _) -> [makeRule expression]+ where+ expression = [| fmap $constructor (pure Nothing <|> $(just)) |]+ where+ just = [| fmap Just $(T.varE (localRuleName innerNm)) |]++ Star (Rule innerNm _ _) -> [nestRule, makeRule (wrapper helper)]+ where+ nestRule = (helper, ([|Text.Earley.rule|] `T.appE` parseSeq))+ where+ parseSeq = T.uInfixE [|pure Seq.empty|] [|(<|>)|] pSeq+ where+ pSeq = [|liftA2 (<|)+ $(T.varE (localRuleName innerNm)) $(T.varE helper) |]++ Plus (Rule innerNm _ _) -> [nestRule, makeRule topExpn]+ where+ nestRule = (helper, [|Text.Earley.rule $(parseSeq)|])+ where+ parseSeq = [| pure Seq.empty <|> $pSeq |]+ where+ pSeq = [| (<|) <$> $(T.varE (localRuleName innerNm))+ <*> $(T.varE helper) |]+ topExpn = [| $constructor <$>+ ( NonEmpty <$> $(T.varE (localRuleName innerNm))+ <*> $(T.varE helper)) |]+++ where+ makeRule expression = (localRuleName nm,+ [|Text.Earley.rule ($expression Text.Earley.<?> $(textToExp desc))|])+ desc = maybe nm id mayDescription+ textToExp txt = [| $(Syntax.lift txt) |]+ constructor = T.conE (quald prefix nm)+ wrapper wrapRule = [|fmap $constructor $(T.varE wrapRule) |]+ helper = helperName nm++localRuleName :: String -> T.Name+localRuleName suffix = T.mkName ("_rule'" ++ suffix)++helperName :: String -> T.Name+helperName suffix = T.mkName ("_helper'" ++ suffix)++branchToParser+ :: Syntax.Lift t+ => String+ -- ^ Module prefix+ -> Branch t+ -> T.ExpQ+branchToParser prefix (Branch name rules) = case viewl rules of+ EmptyL -> [| pure $constructor |]+ (Rule rule1 _ _) :< xs -> foldl f z xs+ where+ z = [| $constructor <$> $(T.varE (localRuleName rule1)) |]+ f soFar (Rule rule2 _ _) = [| $soFar <*> $(T.varE (localRuleName rule2)) |]+ where+ constructor = T.conE (quald prefix name)++-- | Creates an expression that has type+--+-- 'Text.Earley.Grammar' r (Prod r String (c, a) (p c a))+--+-- where @r@ is left universally quantified; @c@ is the terminal+-- type (often 'Char'), @a@ is arbitrary metadata about each token+-- (often 'Loc') and @p@ is the data type corresponding to+-- the given 'Rule'.+--+-- Example: 'Pinchot.Examples.Earley.addressGrammar'.+earleyGrammarFromRule+ :: Syntax.Lift t+ => Qualifier+ -- ^ Module prefix holding the data types created with+ -- 'Pinchot.syntaxTrees'+ -> Rule t+ -- ^ Create a grammar for this 'Rule'+ -> T.Q T.Exp+earleyGrammarFromRule prefix r@(Rule top _ _) = recursiveDo binds final+ where+ binds = concatMap (ruleToParser prefix) . toList . family $ r+ final = [| return $(T.varE $ localRuleName top) |]++-- | Creates a record data type that holds a value of type+--+-- @'Text.Earley.Prod' r 'String' (t, a) (p t a)@+--+-- where+--+-- * @r@ is left universally quantified+--+-- * @t@ is the token type (often 'Char')+--+-- * @a@ is any additional information about each token (often+-- 'Pinchot.Loc')+--+-- * @p@ is the type of the particular production+--+-- This always creates a single product type whose name is+-- @Productions@; currently the name cannot be configured.+--+-- Example: "Pinchot.Examples.SyntaxTrees".+allRulesRecord+ :: Qualifier+ -- ^ Qualifier for data types corresponding to those created from+ -- the 'Rule's+ -> T.Name+ -- ^ Name of terminal type. Typically you will get this through+ -- the Template Haskell quoting mechanism, such as @''Char@.+ -> Seq (Rule t)+ -- ^ A record is created that holds a value for each 'Rule'+ -- in the 'Seq', as well as for every ancestor of these 'Rule's.+ -> T.DecsQ+ -- ^ When spliced, this will create a single declaration that is a+ -- record with the name @Productions@.+ --+ -- @a'NAME@+ --+ -- where @NAME@ is the name of the type. Don't count on these+ -- records being in any particular order.+allRulesRecord prefix termName ruleSeq+ = sequence [T.dataD (return []) (T.mkName nameStr) tys [con] []]+ where+ nameStr = "Productions"+ tys = [T.PlainTV (T.mkName "r"), T.PlainTV (T.mkName "t"),+ T.PlainTV (T.mkName "a")]+ con = T.recC (T.mkName nameStr)+ (fmap mkRecord . toList . families $ ruleSeq)+ mkRecord (Rule ruleNm _ _) = T.varStrictType recName st+ where+ recName = T.mkName ("a'" ++ ruleNm)+ st = T.strictType T.notStrict ty+ where+ ty = [t| Text.Earley.Prod $(T.varT (T.mkName "r"))+ String+ ( $(T.varT (T.mkName "t")), $(T.varT (T.mkName "a")))+ ( $(T.conT (T.mkName nameWithPrefix))+ $(T.varT (T.mkName "t"))+ $(T.varT (T.mkName "a"))) |]+ nameWithPrefix = case prefix of+ [] -> ruleNm+ _ -> prefix ++ '.' : ruleNm++-- | Creates a 'Text.Earley.Grammar' that contains a+-- 'Text.Earley.Prod' for every given 'Rule' and its ancestors.+-- Example: 'Pinchot.Examples.Earley.addressAllProductions'.+earleyProduct+ :: Syntax.Lift t++ => Qualifier+ -- ^ Qualifier for data types corresponding to those created from+ -- the 'Rule's++ -> Qualifier+ -- ^ Qualifier for the type created with 'allRulesRecord'++ -> Seq (Rule t)+ -- ^ Creates an Earley grammar that contains a 'Text.Earley.Prod'+ -- for each 'Rule' in this 'Seq', as well as all the ancestors of+ -- these 'Rule's.++ -> T.ExpQ+ -- ^ When spliced, 'earleyProduct' creates an expression whose+ -- type is @'Text.Earley.Grammar' r (Productions r t a)@, where+ -- @Productions@ is+ -- the type created by 'allRulesRecord'; @r@ is left universally+ -- quantified; @t@ is the token type (often 'Char'), and @a@ is+ -- any additional information about each token (often+ -- 'Pinchot.Loc').+earleyProduct pfxRule pfxRec ruleSeq = do+ let binds = concatMap (ruleToParser pfxRule)+ . toList . families $ ruleSeq+ final = [| return+ $(T.recConE (T.mkName rulesRecName)+ (fmap mkRec . toList . families $ ruleSeq)) |]+ + recursiveDo binds final+ where+ rulesRecName+ | null pfxRec = "Productions"+ | otherwise = pfxRec ++ ".Productions"+ mkRec (Rule n _ _) = return (T.mkName recName, recVal)+ where+ recName+ | null pfxRec = "a'" ++ n+ | otherwise = pfxRec ++ ".a'" ++ n+ recVal = T.VarE . localRuleName $ n+
lib/Pinchot/Examples.hs view
@@ -1,44 +1,28 @@-{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# LANGUAGE TypeFamilies #-}---- | Examples for the use of Pinchot.--- You wil want to look at the source code for the modules; examining--- just the Haddocks shows you the code that the Template Haskell--- ultimately generates.------ In "Pinchot.Examples.Postal" is an example grammar for US postal--- addresses.------ "Pinchot.Examples.PostalAstAllRules" shows you how to use--- 'allRulesToTypes' and 'earleyGrammar', while--- "Pinchot.Examples.PostalAstRuleTree" shows you how to use--- 'ruleTreeToTypes' and 'earleyGrammar'.------ "Pinchot.Examples.AllEarleyGrammars" shows you how to use--- 'allEarleyGrammars'.------ "Pinchot.Examples.AllRulesRecord" and--- "Pinchot.Examples.EarleyProduct" show you how to use--- 'allRulesRecord' and 'earleyProduct'.------ Three executables are included in the @pinchot@ package. To get--- them, compile @pinchot@ with the @executables@ Cabal flag.+-- | Examples for Pinchot are in this hierarchy. Start out with+-- "Pinchot.Examples.Postal", which contains a sample grammar.+-- Next, "Pinchot.Examples.SyntaxTrees" shows you how to convert+-- your grammar to data types, and "Pinchot.Examples.AllRulesRecord"+-- shows how to make a product type holding an Earley+-- 'Text.Earley.Prod' for every 'Rule' in your grammar. Then,+-- "Pinchot.Earley" shows how to generate the Earley+-- 'Text.Earley.Grammar' you need to actually parse strings. ----- The @print-postal-grammar@ executable will pretty print the Haskell--- source that results from applying 'earleyGrammar' to the 'postal'--- grammar.+-- "Pinchot.Examples.Terminalize" shows you how to generate data+-- types that will reduce any 'Rule' to the sequence of terminal+-- tokens from which it came. This can be useful not only for+-- reconstructing the source text, but also for determining where in+-- the source text a production was found. ----- The @postal-parser@ executable takes as its first and sole argument--- a string. It parses the string using the 'postal' grammar and--- pretty prints the resultin parses to standard output.+-- "Pinchot.Examples.RulesToOptics" shows how to generate lenses and+-- isos, which are valuable for navigating and manipulating large trees. ----- The @parrot@ executable takes as its first and sole argument a--- string. It parses the string using the 'postal' grammar. For--- every result that is returned (there might be zero, or one, or more--- than one) the result is reduced to terminal symbols using the--- 'terminals' function and the result is printed to standard output.+-- Finally, "Pinchot.Examples.Newman" shows how to actually run the+-- Earley parsers, find the locations of various productions, and+-- show the results on-screen. You can play with+-- 'Pinchot.Examples.Newman.address' and+-- 'Pinchot.Examples.Newman.addressFromFile' in GHCi. Or, if you+-- compile the Pinchot package using the @executables@ flag, you+-- will get an executable named @newman@ that you can play with from+-- the command line. module Pinchot.Examples where--import Pinchot-import Pinchot.Examples.Postal
− lib/Pinchot/Examples/AllEarleyGrammars.hs
@@ -1,12 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}--- | Provides an example of the use of 'Pinchot.AllEarleyGrammars'.--- You will want to look at the source code, as it shows what sort--- of Template Haskell splice to use.--module Pinchot.Examples.AllEarleyGrammars where--import qualified Pinchot-import qualified Pinchot.Examples.Postal as Postal-import qualified Pinchot.Examples.PostalAstAllRules as PostalAstAllRules--Pinchot.allEarleyGrammars "PostalAstAllRules" ''Char Postal.postal
lib/Pinchot/Examples/AllRulesRecord.hs view
@@ -1,12 +1,14 @@--- | Provides an example of the use of 'Pinchot.allRulesRecord'.--- You will want to look at the source code to see how to write the--- Template Haskell splice.- {-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE OverloadedLists #-}++-- | This module shows how to generate a product type holding all+-- the productions that result from a given 'Rule'. You wil want to+-- look at the source code, as the Haddocks will show you only the+-- generated type, not the Template Haskell used to generate it. module Pinchot.Examples.AllRulesRecord where -import qualified Pinchot-import qualified Pinchot.Examples.Postal as Postal-import qualified Pinchot.Examples.PostalAstAllRules as AllRules+import Pinchot+import Pinchot.Examples.Postal+import qualified Pinchot.Examples.SyntaxTrees as SyntaxTrees -Pinchot.allRulesRecord "AllRules" ''Char Postal.postal+$(allRulesRecord "SyntaxTrees" ''Char [rAddress])
+ lib/Pinchot/Examples/Earley.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE OverloadedLists #-}++-- | This module shows how to generate Earley grammars for your+-- context-free grammar. You will want to look at the source code.+module Pinchot.Examples.Earley where++import Pinchot+import Pinchot.Examples.Postal+import qualified Pinchot.Examples.SyntaxTrees as SyntaxTrees+import qualified Pinchot.Examples.AllRulesRecord as AllRulesRecord+import Text.Earley++addressGrammar+ :: Grammar r (Prod r String (Char, a) (SyntaxTrees.Address Char a))+addressGrammar = $(earleyGrammarFromRule "SyntaxTrees" rAddress)++addressAllProductions+ :: Grammar r (AllRulesRecord.Productions r Char a)+addressAllProductions = $(earleyProduct "SyntaxTrees" "AllRulesRecord"+ [rAddress])
− lib/Pinchot/Examples/EarleyProduct.hs
@@ -1,32 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}---- | Provides an example of the use of 'Pinchot.earleyProduct'. You--- will want to look at the source code, as looking at only the--- Haddocks will show you only the result of all the Template--- Haskell splices.-module Pinchot.Examples.EarleyProduct where--import qualified Pinchot---- You will need to import your Pinchot grammar-import qualified Pinchot.Examples.Postal as Postal---- And import the types that result from applying--- 'Pinchot.allRulesToTypes' to the Pinchot grammar-import qualified Pinchot.Examples.PostalAstAllRules as AllRules---- And, import the product type that results from applying--- 'Pinchot.allRulesRecord' to your grammar-import qualified Pinchot.Examples.AllRulesRecord as Record--import qualified Text.Earley as Earley---- | 'Pinchot.earleyProduct' gives you a big product type that has--- every rule that is in your Pinchot grammar.-allProductions :: Earley.Grammar r (Record.Productions r)-allProductions = $(Pinchot.earleyProduct "AllRules" "Record" Postal.postal)---- | To get the exact production you're interested in, just use--- 'fmap'. Then you can use this value for 'Earley.parser'.-addressParser :: Earley.Grammar r (Earley.Prod r String Char AllRules.Address)-addressParser = fmap Record.a'Address allProductions
+ lib/Pinchot/Examples/Newman.hs view
@@ -0,0 +1,130 @@+-- | This module provides a simple example of use of everything in+-- Pinchot. 'address' parses a postal address from a string and+-- prints a simple report showing some of the elements of the+-- address and their locations.+module Pinchot.Examples.Newman where++import Pinchot++import Pinchot.Examples.Earley+import Pinchot.Examples.SyntaxTrees+import Pinchot.Examples.Terminalize+import Pinchot.Examples.RulesToOptics++import qualified Control.Lens as Lens+import Data.Foldable (toList)+import Data.List (intersperse)+import Data.Sequence (Seq)+import qualified Data.Sequence as Seq+import qualified Text.Earley as Earley++-- | Formats a 'Loc' for nice on-screen display.+labelLoc :: Loc -> String+labelLoc (Loc l c p)+ = "(line: " ++ show l ++ " col: " ++ show c ++ " pos: "+ ++ show p ++ ")"++-- | Labels a single field, where the field may or may not appear in+-- a parsed result.+labelOpt :: String -> Seq (Char, Loc) -> String+labelOpt l sq+ = l ++ ": " ++ show (toList . fmap fst $ sq)+ ++ " " ++ loc ++ "\n"+ where+ loc = case Lens.uncons sq of+ Nothing -> "(no location)"+ Just ((_, loc), _) -> labelLoc loc++-- | Labels a single field, where the field will always appear in a+-- parsed result.+labelNE :: String -> NonEmpty (Char, Loc) -> String+labelNE l sq+ = l ++ ": " ++ show (toList . fmap fst $ sq)+ ++ " " ++ loc ++ "\n"+ where+ loc = labelLoc . snd . _front $ sq++-- | Formats a single 'Address' for nice on-screen display.+showAddress :: Address Char Loc -> String+showAddress a = name ++ street ++ city+ where+ name = labelNE "Name" . t'Words+ . _r'NameLine'0'Words . _r'Address'0'NameLine $ a+ street = number ++ pre ++ streetName ++ suf+ where+ number = labelNE "Number" . t'Number . _r'StreetLine'0'Number+ . _r'Address'1'StreetLine $ a++ pre = labelOpt "Direction prefix"+ . maybe Seq.empty flatten+ . Lens.preview (r'Address'1'StreetLine+ . r'StreetLine'2'DirectionSpace'Opt+ . Lens._Wrapped'+ . Lens._Just+ . r'DirectionSpace'0'Direction+ . Lens.to t'Direction)+ $ a++ streetName = labelNE "Street"+ . t'StreetName+ . _r'StreetLine'3'StreetName+ . _r'Address'1'StreetLine+ $ a++ suf = labelOpt "Street suffix"+ . maybe Seq.empty flatten+ . Lens.preview (r'Address'1'StreetLine+ . r'StreetLine'4'SpaceSuffix'Opt+ . Lens._Wrapped'+ . Lens._Just+ . r'SpaceSuffix'1'Suffix+ . Lens.to t'Suffix)+ $ a+ city = cty ++ st ++ zip+ where+ cty = labelNE "City"+ . t'City+ . _r'CityLine'0'City+ . _r'Address'2'CityLine+ $ a++ st = labelNE "State"+ . t'State+ . _r'CityLine'3'State+ . _r'Address'2'CityLine+ $ a++ zip = labelNE "Zip"+ . t'ZipCode+ . _r'CityLine'5'ZipCode+ . _r'Address'2'CityLine+ $ a++-- | Formats successful 'Address' parses and the 'Earley.Report' for+-- nice on-screen display.+showParseResult+ :: ([Address Char Loc], Earley.Report String (Seq (Char, Loc)))+ -> String+showParseResult (addresses, report) = addresses' ++ "\n" ++ report'+ where+ addresses' = ("Full parses:\n\n" ++)+ . concat . intersperse "---\n" . map showAddress+ $ addresses+ report' = ("Earley report:\n\n" ++) . show+ $ report { Earley.unconsumed = toList . fmap fst+ . Earley.unconsumed $ report }++-- | Parse an address and print the resulting report. Good for use+-- in GHCi.+address :: String -> IO ()+address = putStrLn . showParseResult . locatedFullParses addressGrammar++-- | Read an address from a file and print the resulting report.+-- Good for use in GHCi.+addressFromFile+ :: String+ -- ^ Filename+ -> IO ()+addressFromFile fn = do+ str <- readFile fn+ putStrLn . showParseResult . locatedFullParses addressGrammar $ str
lib/Pinchot/Examples/Postal.hs view
@@ -1,58 +1,105 @@-{-# LANGUAGE OverloadedStrings, OverloadedLists, RecursiveDo #-}+{-# LANGUAGE OverloadedLists #-}+{-# OPTIONS_GHC -fno-warn-missing-signatures #-}++-- | This module contains a context-free grammar for U.S. postal+-- addresses. It would never hold up to real-world use but it gives+-- you a good idea of how to write grammars in Pinchot.+--+-- The grammar is ambiguous.+--+-- There are no signatures; the type of every declaration in the+-- module is 'Rule' 'Char'. module Pinchot.Examples.Postal where import Pinchot- import Data.Monoid ((<>)) --- | A grammar for simple U.S. postal addresses. This example would never--- hold up to real-world usage but it gives you a flavor of how--- Pinchot works.------ The grammar is ambiguous.-postal :: Pinchot Char (Rule Char)-postal = mdo- digit <- terminal "Digit" (include '0' '9') <?> "digit from 0 to 9"- digits <- list1 digit- letter <- terminal "Letter" (include 'a' 'z' <> include 'A' 'Z')- <?> "letter from A to Z"- north <- terminal "North" (solo 'N')- south <- terminal "South" (solo 'S')- east <- terminal "East" (solo 'E')- west <- terminal "West" (solo 'W')- direction <- union "Direction" [north, south, east, west]- street <- terminalSeq "Street" ['S', 't']- avenue <- terminalSeq "Avenue" ['A', 'v', 'e']- way <- terminalSeq "Way" ['W', 'a', 'y']- boulevard <- terminalSeq "Boulevard" ['B', 'l', 'v', 'd']- suffix <- union "Suffix" [street, avenue, way, boulevard]- space <- terminal "Space" (solo ' ')- comma <- terminal "Comma" (solo ',')+rDigit = terminal "Digit" (include '0' '9') <?> "digit from 0 to 9" - -- You could do this with 'list' but this demonstrates how to write- -- a recurvsive rule.- letters <- nonTerminal "Letters"- [ ("NoLetter", [])- , ("ConsLetter", [letter, letters])- ]+rDigits = plus rDigit - -- Named "PostalWord" to avoid clash with Prelude.Word- word <- record "PostalWord" [letter, letters]- preSpacedWord <- record "PreSpacedWord" [space, word]- preSpacedWords <- list preSpacedWord- words <- record "Words" [word, preSpacedWords]+rLetter = terminal "Letter" (include 'a' 'z' <> include 'A' 'Z')+ <?> "letter from A to Z" - number <- wrap "Number" digits- streetName <- wrap "StreetName" words- city <- wrap "City" words- state <- wrap "State" word- zipCode <- wrap "ZipCode" digits- directionSpace <- record "DirectionSpace" [direction, space]- spaceSuffix <- record "SpaceSuffix" [space, suffix]- optDirection <- option directionSpace- optSuffix <- option spaceSuffix- address <- record "Address"- [ number, space, optDirection, streetName, optSuffix,- comma, space, city, comma, space, state, space, zipCode- ]- return address+rNorth = terminal "North" (solo 'N')++rSouth = terminal "South" (solo 'S')++rEast = terminal "East" (solo 'E')++rWest = terminal "West" (solo 'W')++rNE = terminals "NE" "NE"++rNW = terminals "NW" "NW"++rSW = terminals "SW" "SW"++rSE = terminals "SE" "SE"++rDirection = union "Direction"+ [rNorth, rSouth, rEast, rWest, rNE, rNW, rSE, rSW]++rStreet = terminals "Street" "St"++rAvenue = terminals "Avenue" "Ave"++rWay = terminals "Way" "Way"++rBoulevard = terminals "Boulevard" "Blvd"++rSuffix = union "Suffix" [rStreet, rAvenue, rWay, rBoulevard]++rSpace = terminal "Space" (solo ' ')++rComma = terminal "Comma" (solo ',')++rNewline = terminal "Newline" (solo '\n')++rCommaSpace = record "CommaSpace" [rComma, rSpace]++rSeparator = union "Separator" [rCommaSpace, rNewline]++rLetters = nonTerminal "Letters"+ [ ("NoLetter", [])+ , ("ConsLetter", [rLetter, rLetters])+ ]++-- Named "PostalWord" to avoid clash with Prelude.Word+rPostalWord = record "PostalWord" [rLetter, rLetters]++rPreSpacedWord = record "PreSpacedWord" [rSpace, rPostalWord]++rPreSpacedWords = star rPreSpacedWord++rWords = record "Words" [rPostalWord, rPreSpacedWords]++rNumber = wrap "Number" rDigits++rStreetName = wrap "StreetName" rWords++rCity = wrap "City" rWords++rState = wrap "State" rWords++rZipCode = record "ZipCode" [rDigit, rDigit, rDigit, rDigit, rDigit]++rDirectionSpace = record "DirectionSpace" [rDirection, rSpace]++rSpaceSuffix = record "SpaceSuffix" [rSpace, rSuffix]++rOptDirection = opt rDirectionSpace++rOptSuffix = opt rSpaceSuffix++rOptNewline = opt rNewline++rNameLine = record "NameLine" [rWords, rSeparator]++rStreetLine = record "StreetLine" [rNumber, rSpace, rOptDirection,+ rStreetName, rOptSuffix, rSeparator]++rCityLine = record "CityLine" [rCity, rComma, rSpace, rState,+ rSpace, rZipCode, rOptNewline]++rAddress = record "Address" [rNameLine, rStreetLine, rCityLine]
− lib/Pinchot/Examples/PostalAstAllRules.hs
@@ -1,27 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE OverloadedLists #-}---- | Provides an example of the use of 'ruleTreeToTypes'. 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.-module Pinchot.Examples.PostalAstAllRules where--import Pinchot-import Pinchot.Examples.Postal---- Earley is imported only for the type signature for 'postalGrammar'. The--- Template Haskell does not need the import.-import Text.Earley (Grammar, Prod)---- This Template Haskell splice will produce a list of declarations,--- with one declaration for each production rule in the grammar.--- Unlike 'ruleTreeToTypes', this splice will contain every rule that--- was defined in the 'Pinchot'.-allRulesToTypes makeOptics ''Char [''Eq, ''Ord, ''Show] postal---- | Earley grammar created using Template Haskell.--postalGrammar :: Grammar r (Prod r String Char Address)-postalGrammar = $(earleyGrammar "" postal)
− lib/Pinchot/Examples/PostalAstNoLenses.hs
@@ -1,24 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE OverloadedLists #-}--- | Provides an example of 'ruleTreeToTypes', but unlike--- "Pinchot.Examples.PostalAstAllRules", does not make optics.--module Pinchot.Examples.PostalAstNoLenses where--import Pinchot-import Pinchot.Examples.Postal---- Earley is imported only for the type signature for 'myParser'. The--- Template Haskell does not need the import.-import Text.Earley (Grammar, Prod)---- This Template Haskell splice will produce a list of declarations,--- with one declaration for each production rule in the grammar.--- Unlike 'ruleTreeToTypes', this splice will contain every rule that--- was defined in the 'Pinchot'.-allRulesToTypes noOptics ''Char [''Eq, ''Ord, ''Show] postal---- | Earley grammar created using Template Haskell.--postalGrammar :: Grammar r (Prod r String Char Address)-postalGrammar = $(earleyGrammar "" postal)
− lib/Pinchot/Examples/PostalAstRuleTree.hs
@@ -1,28 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE OverloadedLists #-}---- | Provides an example of the use of 'ruleTreeToTypes'. 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.-module Pinchot.Examples.PostalAstRuleTree where--import Pinchot-import Pinchot.Examples.Postal---- Earley is imported only for the type signature for 'myParser'. The--- Template Haskell does not need the import.-import Text.Earley (Grammar, Prod)---- This Template Haskell splice will produce a list of declarations,--- with one declaration for each production rule in the grammar.--- Unlike 'allRulesToTypes', this splice will contain only the--- 'Address' rule and its ancestors.--ruleTreeToTypes makeOptics ''Char [''Eq, ''Ord, ''Show] postal---- | Earley grammar created using Template Haskell.--postalGrammar :: Grammar r (Prod r String Char Address)-postalGrammar = $(earleyGrammar "" postal)
− lib/Pinchot/Examples/QualifiedImport.hs
@@ -1,19 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}---- | Provides an example of the use of 'earleyParser' with a qualified--- import of the data types that comprise the grammar.--module Pinchot.Examples.QualifiedImport where--import Pinchot-import qualified Pinchot.Examples.PostalAstRuleTree as Ast-import qualified Pinchot.Examples.Postal as Postal---- Earley is imported only for the type signature for 'myParser'. The--- Template Haskell does not need the import.-import Text.Earley (Grammar, Prod)---- | Earley parser created using Template Haskell.--myParser :: Grammar r (Prod r String Char Ast.Address)-myParser = $(earleyGrammar "Ast" Postal.postal)
+ lib/Pinchot/Examples/RulesToOptics.hs view
@@ -0,0 +1,15 @@+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE OverloadedLists #-}++-- | This module shows how to use Template Haskell to generate+-- optics (lenses, prisms, and isos) for the rules in your grammar.+-- You will want to look at the source code, as the Haddocks will+-- show the generated types but it will not show the Template+-- Haskell used to generate them.+module Pinchot.Examples.RulesToOptics where++import Pinchot+import Pinchot.Examples.Postal+import qualified Pinchot.Examples.SyntaxTrees as SyntaxTrees++$(rulesToOptics "SyntaxTrees" ''Char [rAddress])
+ lib/Pinchot/Examples/SyntaxTrees.hs view
@@ -0,0 +1,29 @@+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE OverloadedLists #-}+{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-}++-- The following extension is required only for the splice of Lens wrapped+-- instances in 'wrappedInstances'+{-# LANGUAGE TypeFamilies #-}++-- | This module shows how to use Template Haskell to generate the+-- data types corresponding to your context-free grammar. You will+-- want to look at the source; the Haddocks will show only the+-- generated types and not the Template Haskell that was used to+-- generate them.+module Pinchot.Examples.SyntaxTrees where++import Pinchot+import Pinchot.SyntaxTree.Wrappers+import Pinchot.Examples.Postal++import qualified Control.Lens as Lens++-- This generates the data types corresponding to the 'rAddress'+-- 'Rule', as well as all the ancestors of that 'Rule'.+$(syntaxTrees ''Char+ [''Eq, ''Ord, ''Show, ''Foldable, ''Traversable, ''Functor]+ [rAddress])++-- This generates intances of the Lens Wrapped typeclass.+$(wrappedInstances [rAddress])
+ lib/Pinchot/Examples/Terminalize.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE OverloadedLists #-}++-- | This module shows how to use Template Haskell to generate+-- functions that will reduce any production to the terminal tokens+-- that were used to create it.+module Pinchot.Examples.Terminalize where++import Pinchot+import Pinchot.Examples.Postal+import qualified Pinchot.Examples.SyntaxTrees as SyntaxTrees++terminalizeAddress :: SyntaxTrees.Address t a -> NonEmpty (t, a)+terminalizeAddress = $(terminalizeRuleExp "SyntaxTrees" rAddress)++$(terminalizers "SyntaxTrees" ''Char [rAddress])
− lib/Pinchot/Internal.hs
@@ -1,1535 +0,0 @@-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE TypeFamilies #-}--- | Pinchot internals. Ordinarily the "Pinchot" module should have--- everything you need.--module Pinchot.Internal where--import Pinchot.Intervals--import Control.Applicative ((<|>), liftA2)-import Control.Exception (Exception)-import qualified Control.Lens as Lens-import Control.Monad (join, when)-import Control.Monad.Fix (MonadFix, mfix)-import Control.Monad.Trans.Class (lift)-import Control.Monad.Trans.Except (ExceptT, throwE, runExceptT)-import Control.Monad.Trans.State (State, runState, get, put)-import Data.Char (isUpper)-import Data.Foldable (toList)-import Data.Map (Map)-import qualified Data.Map as M-import Data.Monoid ((<>))-import Data.Set (Set)-import Data.Sequence (Seq, ViewL(EmptyL, (:<)), viewl, (<|))-import qualified Data.Sequence as Seq-import qualified Data.Set as Set-import Data.Typeable (Typeable)-import Language.Haskell.TH- (ExpQ, ConQ, normalC, mkName, strictType, notStrict, newtypeD,- cxt, conT, Name, dataD, appT, DecsQ, appE, Q, uInfixE,- varE, varP, conE, Pat, Exp, recC, varStrictType, dyn)-import qualified Language.Haskell.TH as TH-import qualified Language.Haskell.TH.Syntax as Syntax-import Text.Earley (satisfy, rule, symbol)-import qualified Text.Earley---- | Type synonym for the name of a production rule. This will be the--- name of the type constructor for the corresponding type that will--- be created, so this must be a valid Haskell type constructor name.------ If you are creating a 'terminal', 'option', 'list', 'list1', or--- 'wrap', the 'RuleName' will also be used for the name of the single--- data construtor. If you are creating a 'nonTerminal', you will--- specify the name of each data constructor with 'AlternativeName'.-type RuleName = String---- | Type synonym the the name of an alternative in a 'nonTerminal'.--- This name must not conflict with any other data constructor, either--- one specified as an 'AlternativeName' or one that was created using--- 'terminal', 'option', 'list', or 'list1'.-type AlternativeName = String---- | A branch in a sum rule. In @Branch s ls@, @s@ is the name of the--- data constructor, and @ls@ is the list of rules that this branch--- produces.-data Branch t = Branch String (Seq (Rule t))- deriving (Eq, Ord, Show)--data RuleType t- = RTerminal (Intervals t)- | RBranch (Branch t, Seq (Branch t))- | RUnion (Rule t, Seq (Rule t))- | RSeqTerm (Seq t)- | ROptional (Rule t)- | RList (Rule t)- | RList1 (Rule t)- | RWrap (Rule t)- | RRecord (Seq (Rule t))- deriving (Eq, Ord, Show)---- Rule n d t, where------ n is the name of the rule. This is used as the name of the--- corresponding data type.------ d is the description of the rule. This is optional and is used for--- the parser's error messages. If there is no description, the name--- is used for error messages.------ t is the type of rule (terminal, branch, etc.)---- | A single production rule. It may be a terminal or a non-terminal.-data Rule t = Rule String (Maybe String) (RuleType t)- deriving (Eq, Ord, Show)---- | Name a 'Rule' for use in error messages. If you do not name a--- rule using this combinator, the rule's type name will be used in--- error messages.-label :: String -> Rule t -> Rule t-label s (Rule n _ t) = Rule n (Just s) t---- | Infix form of 'label' for use in a 'Pinchot'; handy for use in--- @do@ or @mdo@ notation.-(<?>) :: Pinchot t (Rule t) -> String -> Pinchot t (Rule t)-p <?> s = fmap (label s) p-infixr 0 <?>--data Names t = Names- { tyConNames :: Set RuleName- , dataConNames :: Set String- , nextIndex :: Int- , allRules :: Map Int (Rule t)- } deriving (Eq, Ord, Show)---- | Errors that may arise when constructing an AST.-data Error- = InvalidName String- -- ^ A name was invalid. The field is the invalid name. The name- -- might be invalid because it was already used, or because it does- -- not begin with a capital letter.- | EmptyNonTerminal String- -- ^ A non-terminal must have at least one summand. The field is- -- the name of the empty non-terminal.- deriving (Show, Typeable)--instance Exception Error---- | Constructs new 'Rule's. @t@ is the type of the token; often this--- will be 'Char'.------ 'Pinchot' is a 'Monad' and an 'Applicative' so you can combine--- computations using the usual methods of those classes. Also,--- 'Pinchot' is a 'MonadFix'. This allows you to construct a 'Rule'--- that depends on itself, and to construct sets of 'Rule's that have--- mutually recursive dependencies. 'MonadFix' also allows you to use--- the GHC @RecursiveDo@ extension. Put------ @--- {-\# LANGUAGE RecursiveDo \#-}--- @------ at the top of your module, then use @mdo@ instead of @do@. Because--- an @mdo@ block is recursive, you can use a binding before it is--- defined, just as you can in a set of @let@ bindings.--newtype Pinchot t a- = Pinchot { runPinchot :: ExceptT Error (State (Names t)) a }- deriving (Functor, Applicative, Monad, MonadFix)---- | Runs a 'Pinchot' with a starting empty state. Fails in the Q--- monad if the grammar is bad.-goPinchot :: Pinchot t a -> Q (Names t, a)-goPinchot (Pinchot pinc) = case fst pair of- Left err -> fail $ "pinchot: bad grammar: " ++ show err- Right g -> return (snd pair, g)- where- pair = runState (runExceptT pinc)- (Names Set.empty Set.empty 0 M.empty)--addRuleName- :: RuleName- -> Pinchot t ()-addRuleName name = Pinchot $ do- old@(Names tyNames _ _ _) <- lift get- case name of- [] -> throw- x:_ -> do- when (not (isUpper x)) throw- when (Set.member name tyNames) throw- lift $ put (old { tyConNames = Set.insert name tyNames })- where- throw = throwE $ InvalidName name--addDataConName- :: AlternativeName- -> Pinchot t ()-addDataConName name = Pinchot $ do- old@(Names _ dcNames _ _) <- lift get- case name of- [] -> throw- x:_ -> do- when (not (isUpper x)) throw- when (Set.member name dcNames) throw- lift $ put (old { dataConNames = Set.insert name dcNames })- where- throw = throwE $ InvalidName name--newRule- :: RuleName- -> RuleType t- -> Pinchot t (Rule t)-newRule name ty = Pinchot $ do- runPinchot (addRuleName name)- st <- lift get- let r = Rule name Nothing ty- newSt = st { nextIndex = succ (nextIndex st)- , allRules = M.insert (nextIndex st) r- (allRules st)- }- lift (put newSt)- runPinchot $ addDataConNames r- return r---- | Creates a terminal production rule.-terminal-- :: RuleName-- -> Intervals t- -- ^ Valid terminal symbols-- -> Pinchot t (Rule t)--terminal name ivls = newRule name (RTerminal ivls)--splitNonTerminal- :: String- -> Seq (String, Seq (Rule t))- -> Pinchot t ((String, Seq (Rule t)), Seq (String, Seq (Rule t)))-splitNonTerminal n sq = Pinchot $ case viewl sq of- EmptyL -> throwE $ EmptyNonTerminal n- x :< xs -> return (x, xs)---- | Creates a production for a sequence of terminals. Useful for--- parsing specific words.-terminalSeq-- :: RuleName-- -> Seq t- -- ^ Sequence of terminal symbols to recognize-- -> Pinchot t (Rule t)--terminalSeq name sq = newRule name (RSeqTerm sq)---- | Creates a new non-terminal production rule.-nonTerminal-- :: RuleName-- -> Seq (AlternativeName, Seq (Rule t))- -- ^ Alternatives. There must be at least one alternative;- -- otherwise, an error will result. In each pair @(a, b)@, @a@ will- -- be the data constructor, so this must be a valid Haskell data- -- constructor name. @b@ is the sequence of production rules, which- -- can be empty (this is how to create an epsilon production).-- -> Pinchot t (Rule t)--nonTerminal name sq = do- (b1, bs) <- splitNonTerminal name sq- let branches = RBranch (uncurry Branch b1, fmap (uncurry Branch) bs)- newRule name branches--ruleConstructorNames- :: Rule t- -> Seq AlternativeName-ruleConstructorNames (Rule n _ t) = case t of- RTerminal _ -> Seq.singleton n- RBranch (b1, bs) -> branchName b1 <| fmap branchName bs- where- branchName (Branch x _) = x- RUnion (b1, bs) -> branchName b1 <| fmap branchName bs- where- branchName (Rule x _ _) = unionBranchName n x- RSeqTerm _ -> Seq.singleton n- ROptional _ -> Seq.singleton n- RList _ -> Seq.singleton n- RList1 _ -> Seq.singleton n- RWrap _ -> Seq.singleton n- RRecord _ -> Seq.singleton n--unionBranchName- :: RuleName- -- ^ Name of the parent rule- -> RuleName- -- ^ Name of the branch rule- -> AlternativeName-unionBranchName p b = p ++ '\'' : b--addDataConNames :: Rule t -> Pinchot t ()-addDataConNames = mapM_ addDataConName . ruleConstructorNames---- | Creates a new non-terminal production rule where each alternative--- produces only one rule. The constructor name for each alternative--- is------ @RULE_NAME'PRODUCTION_NAME@------ where @RULE_NAME@ is the name of the rule itself, and--- @PRODUCTION_NAME@ is the rule name for what is being produced. For--- an example, see 'Pinchot.Examples.PostalAstAllRules.Suffix'.------ Currently there is no way to change the names of the constructors;--- however, you can use 'nonTerminal', which is more flexible.-union- :: RuleName- -> Seq (Rule t)- -- ^ List of alternatives. There must be at least one alternative;- -- otherwise a compile-time error will occur.- -> Pinchot t (Rule t)-union name sq = Pinchot $ case viewl sq of- EmptyL -> throwE $ EmptyNonTerminal name- x :< xs -> runPinchot $ newRule name (RUnion (x, xs))---- | Creates a new non-terminal production rule with only one--- alternative where each field has a record name. The name of each--- record is:------ @_r\'RULE_NAME\'INDEX\'FIELD_TYPE@------ where @RULE_NAME@ is the name of this rule, @INDEX@ is the index number--- for this field (starting with 0), and @FIELD_TYPE@ is the type of the--- field itself. For an example, see--- 'Pinchot.Examples.PostalAstAllRules.Address'.------ Currently there is no way to change the names of the record fields.-record- :: RuleName- -- ^ The name of this rule, which is used both as the type name and- -- the name of the sole data constructor.- -> Seq (Rule t)- -- ^ The right-hand side of this rule. This sequence can be empty,- -- which results in an epsilon production.- -> Pinchot t (Rule t)-record name sq = newRule name (RRecord sq)----- | Creates a rule for the production of a sequence of other rules.--- The name for the created 'Rule' is the name of the 'Rule' to which--- this function is applied, with @'Seq@ appended.-list- :: Rule t- -- ^ The resulting 'Rule' is a sequence of productions of this- -- 'Rule'; that is, this 'Rule' may appear zero or more times.-- -> Pinchot t (Rule t)-list r@(Rule inner _ _) = newRule name (RList r)- where- name = inner ++ "'Seq"---- | Creates a rule for a production that appears at least once. The--- name for the created 'Rule' is the name of the 'Rule' to which this--- function is applied, with @'Seq1@ appended.-list1- :: Rule t- -- ^ The resulting 'Rule' produces this 'Rule' at least once.- -> Pinchot t (Rule t)-list1 r@(Rule inner _ _) = newRule name (RList1 r)- where- name = inner ++ "'Seq1"---- | Creates a rule for a production that optionally produces another--- rule. The name for the created 'Rule' is the name of the 'Rule' to--- which this function is applied, with @'Maybe@ appended to the end.-option- :: Rule t- -- ^ The resulting 'Rule' optionally produces this 'Rule'; that is,- -- this 'Rule' may appear once or not at all.-- -> Pinchot t (Rule t)-option r@(Rule inner _ _) = newRule name (ROptional r)- where- name = inner ++ "'Maybe"---- | Creates a newtype wrapper.--wrap- :: RuleName- -> Rule t- -- ^ The resulting 'Rule' simply wraps this 'Rule'.- -> Pinchot t (Rule t)-wrap name r = newRule name (RWrap r)---- | Gets all ancestor 'Rule's. Skips duplicates.-getAncestors- :: Rule t- -> State (Set String) (Seq (Rule t))-getAncestors r@(Rule name _ ei) = do- set <- get- if Set.member name set- then return Seq.empty- else do- put (Set.insert name set)- case ei of- RTerminal _ -> return (Seq.singleton r)- RBranch (b1, bs) -> do- as1 <- branchAncestors b1- ass <- fmap join . mapM branchAncestors $ bs- return $ r <| as1 <> ass- RUnion (b1, bs) -> do- c1 <- getAncestors b1- cs <- fmap join . mapM getAncestors $ bs- return $ r <| c1 <> cs- RSeqTerm _ -> return (Seq.singleton r)- ROptional c -> do- cs <- getAncestors c- return $ r <| cs- RList c -> do- cs <- getAncestors c- return $ r <| cs- RList1 c -> do- cs <- getAncestors c- return $ r <| cs- RWrap c -> do- cs <- getAncestors c- return $ r <| cs- RRecord ls -> do- cs <- fmap join . mapM getAncestors $ ls- return $ r <| cs- where- branchAncestors (Branch _ rs) = fmap join . mapM getAncestors $ rs---- | Returns both this 'Rule' and any 'Rule's that are ancestors.-ruleAndAncestors- :: Rule t- -> Seq (Rule t)-ruleAndAncestors r = fst $ runState (getAncestors r) Set.empty---- | Given a sequence of 'Rule', determine which rules are on a--- right-hand side before they are defined.-rulesDemandedBeforeDefined :: Foldable f => f (Rule t) -> Set Name-rulesDemandedBeforeDefined = snd . foldl f (Set.empty, Set.empty)- where- f (lhsDefined, results) (Rule nm _ ty)- = (Set.insert nm lhsDefined, results')- where- results' = case ty of- RTerminal _ -> results- RBranch (b1, bs) -> foldr checkBranch (checkBranch b1 results) bs- where- checkBranch (Branch _ rls) rslts = foldr checkRule rslts rls- RUnion (b1, bs) -> foldr checkRule (checkRule b1 results) bs- RSeqTerm _ -> results- ROptional r -> checkRule r results- RList r -> addHelper $ checkRule r results- RList1 r -> addHelper $ checkRule r results- RWrap r -> checkRule r results- RRecord sq -> foldr checkRule results $ sq- checkRule (Rule name _ _) rslts- | Set.member name lhsDefined = rslts- | otherwise = Set.insert (ruleName name) rslts- addHelper = Set.insert (helperName nm)- --thBranch :: Branch t -> ConQ-thBranch (Branch nm rules) = normalC name fields- where- name = mkName nm- mkField (Rule n _ _) = strictType notStrict (conT (mkName n))- fields = toList . fmap mkField $ rules--thUnionBranch- :: RuleName- -- ^ Parent rule name- -> Rule t- -- ^ Child rule- -> ConQ-thUnionBranch parent (Rule child _ _) = normalC name fields- where- name = mkName (unionBranchName parent child)- fields = [strictType notStrict (conT (mkName child))]--thRule- :: Syntax.Lift t- => Bool- -- ^ If True, make lenses.- -> Name- -- ^ Name of terminal type- -> Seq Name- -- ^ What to derive- -> Rule t- -> TH.Q [TH.Dec]-thRule doLenses typeName derives (Rule nm _ ruleType) = do- ty <- makeType typeName derives nm ruleType- lenses <- if doLenses then ruleToOptics typeName nm ruleType- else return []- inst <- productionDecl nm typeName ruleType- return (ty : inst ++ lenses)---makeType- :: Name- -- ^ Name of terminal type- -> Seq Name- -- ^ What to derive- -> String- -- ^ Name of rule- -> RuleType t- -> TH.Q TH.Dec-makeType typeName derivesSeq nm ruleType = case ruleType of- RTerminal _ -> newtypeD (cxt []) name [] newtypeCon derives- where- newtypeCon = normalC name- [strictType notStrict (conT typeName)]-- RBranch (b1, bs) -> dataD (cxt []) name [] cons derives- where- cons = thBranch b1 : toList (fmap thBranch bs)-- RUnion (b1, bs) -> dataD (cxt []) name [] cons derives- where- cons = thUnionBranch nm b1 : toList (fmap (thUnionBranch nm) bs)-- RSeqTerm _ -> newtypeD (cxt []) name [] cons derives- where- cons = normalC name- [strictType notStrict (appT [t| Seq |]- (conT typeName))]-- ROptional (Rule inner _ _) -> newtypeD (cxt []) name [] newtypeCon derives- where- newtypeCon = normalC name- [strictType notStrict (appT [t| Maybe |]- (conT (mkName inner)))]-- RList (Rule inner _ _) -> newtypeD (cxt []) name [] newtypeCon derives- where- newtypeCon = normalC name- [strictType notStrict (appT [t| Seq |]- (conT (mkName inner)))]-- RList1 (Rule inner _ _) -> newtypeD (cxt []) name [] cons derives- where- cons = normalC name- [ strictType notStrict (TH.tupleT 2 `appT` (conT (mkName inner))- `appT` ([t| Seq |] `appT` (conT (mkName inner)))) ]-- RWrap (Rule inner _ _) -> newtypeD (cxt []) name [] newtypeCon derives- where- newtypeCon = normalC name- [ strictType notStrict (conT (mkName inner)) ]-- RRecord sq -> dataD (cxt []) name [] [ctor] derives- where- ctor = recC name . zipWith mkField [(0 :: Int) ..] . toList $ sq- mkField num (Rule rn _ _) = varStrictType (mkName fldNm)- (strictType notStrict (conT (mkName rn)))- where- fldNm = '_' : fieldName num nm rn-- where- name = mkName nm- derives = toList derivesSeq---- | Field name - without a leading underscore-fieldName- :: Int- -- ^ Index- -> String- -- ^ Parent type name- -> String- -- ^ Inner type name- -> String-fieldName idx par inn = "r'" ++ par ++ "'" ++ show idx ++ "'" ++ inn--thAllRules- :: Syntax.Lift t- => Bool- -- ^ If True, make optics as well.- -> Name- -- ^ Terminal type constructor name- -> Seq Name- -- ^ What to derive- -> Map Int (Rule t)- -> DecsQ-thAllRules doOptics typeName derives- = fmap join- . sequence- . fmap (thRule doOptics typeName derives)- . fmap snd- . M.toAscList--makeWrapped- :: TH.Type- -- ^ Name of wrapped type- -> String- -- ^ Name of wrapper type- -> TH.Dec-makeWrapped wrappedType nm = TH.InstanceD [] typ decs- where- name = TH.mkName nm- local = mkName "_x"- typ = (TH.ConT ''Lens.Wrapped) `TH.AppT` (TH.ConT name)- decs = [assocType, wrapper]- where- assocType = TH.TySynInstD ''Lens.Unwrapped- (TH.TySynEqn [TH.ConT name] wrappedType)- wrapper = TH.FunD 'Lens._Wrapped- [TH.Clause [] (TH.NormalB body) []]- where- body = (TH.VarE 'Lens.iso)- `TH.AppE` unwrap- `TH.AppE` doWrap- where- unwrap = TH.LamE [lambPat] (TH.VarE local)- where- lambPat = TH.ConP name [TH.VarP local]- doWrap = TH.LamE [lambPat] expn- where- expn = (TH.ConE name)- `TH.AppE` (TH.VarE local)- lambPat = TH.VarP local---- | TH helper like 'dyn' but for patterns-dynP :: String -> TH.PatQ-dynP = TH.varP . TH.mkName--seqTermToOptics- :: Syntax.Lift t- => Name- -- ^ Terminal type name- -> String- -- ^ Rule name- -> Seq t- -> TH.Q [TH.Dec]-seqTermToOptics termName nm sq = do- e1 <- TH.sigD (TH.mkName ('_':nm)) (TH.conT ''Lens.Prism'- `TH.appT` (TH.conT ''Seq `TH.appT` TH.conT termName)- `TH.appT` TH.conT (TH.mkName nm))- e2 <- TH.valD prismName (TH.normalB expn) []- return [e1, e2]- where- prismName = TH.varP (TH.mkName ('_' : nm))- fetchPat = TH.conP (TH.mkName nm) [TH.varP (TH.mkName "_x")]- fetchName = TH.varE (TH.mkName "_x")- ctor = TH.conE (TH.mkName nm)- expn = [| let fetch $fetchPat = $fetchName- store _term- | $(liftSeq sq) == _term = Right ($ctor _term)- | otherwise = Left _term- in Lens.prism fetch store- |]---- | Creates a prism for a terminal type. Although a newtype wraps--- each terminal, do not make a Wrapped or an Iso, because the--- relationship between the outer type and the type that it wraps--- typically is not isometric. Thus, use a Prism instead, which--- captures this relationship properly.-terminalToOptics- :: Syntax.Lift t- => Name- -- ^ Terminal type name- -> String- -- ^ Rule name- -> Intervals t- -> TH.Q [TH.Dec]-terminalToOptics termName nm ivls = do- e1 <- TH.sigD (TH.mkName ('_':nm)) (TH.conT ''Lens.Prism'- `TH.appT` TH.conT termName- `TH.appT` TH.conT (TH.mkName nm))- e2 <- TH.valD prismName (TH.normalB expn) []- return [e1, e2]- where- prismName = TH.varP (TH.mkName ('_' : nm))- fetchPat = TH.conP (TH.mkName nm) [TH.varP (TH.mkName "_x")]- fetchName = TH.varE (TH.mkName "_x")- ctor = TH.conE (TH.mkName nm)- expn = [| let fetch $fetchPat = $fetchName- store _term- | inIntervals ivls _term = Right ($ctor _term)- | otherwise = Left _term- in Lens.prism fetch store- |]- --optionalToOptics- :: String- -- ^ Wrapped rule name- -> String- -- ^ Wrapping Rule name- -> TH.Dec-optionalToOptics wrappedName = makeWrapped maybeName- where- maybeName = (TH.ConT ''Maybe) `TH.AppT` (TH.ConT (TH.mkName wrappedName))--many1ToOptics- :: String- -- ^ Wrapped rule name- -> String- -- ^ Wrapping Rule name- -> TH.Dec-many1ToOptics wrappedName = makeWrapped tupName- where- tupName = (TH.TupleT 2)- `TH.AppT` (TH.ConT (TH.mkName wrappedName))- `TH.AppT` ((TH.ConT ''Seq) `TH.AppT` (TH.ConT (TH.mkName wrappedName)))--manyToOptics- :: String- -- ^ Wrapped rule name- -> String- -- ^ Wrapping Rule name- -> TH.Dec-manyToOptics wrappedName = makeWrapped innerName- where- innerName = (TH.ConT ''Seq) `TH.AppT` (TH.ConT (TH.mkName wrappedName))--wrapToOptics- :: String- -- ^ Wrapped rule name- -> String- -- ^ Wrapping Rule name- -> TH.Dec-wrapToOptics wrappedName = makeWrapped innerName- where- innerName = TH.ConT (TH.mkName wrappedName)--terminalSeqToOptics- :: Name- -- ^ Terminal type name- -> String- -- ^ Rule name- -> TH.Dec-terminalSeqToOptics terminalName = makeWrapped sqType- where- sqType = (TH.ConT ''Seq) `TH.AppT` (TH.ConT terminalName)--branchesToOptics- :: String- -- ^ Rule name- -> Branch t- -> Seq (Branch t)- -> [TH.Dec]-branchesToOptics nm b1 bsSeq = concat $ makePrism b1 : fmap makePrism bs- where- bs = toList bsSeq- makePrism (Branch inner rulesSeq) = [ signature, binding ]- where- rules = toList rulesSeq- prismName = TH.mkName ('_' : inner)- signature = TH.SigD prismName- $ (TH.ConT ''Lens.Prism')- `TH.AppT` (TH.ConT (TH.mkName nm))- `TH.AppT` fieldsType- where- fieldsType = case rules of- [] -> TH.TupleT 0- Rule r1 _ _ : [] -> TH.ConT (TH.mkName r1)- rs -> foldl addType (TH.TupleT (length rs)) rs- where- addType soFar (Rule r _ _) = soFar `TH.AppT`- (TH.ConT (TH.mkName r))- binding = TH.ValD (TH.VarP prismName) body []- where- body = TH.NormalB- $ (TH.VarE 'Lens.prism)- `TH.AppE` setter- `TH.AppE` getter- where- setter = TH.LamE [pat] expn- where- (pat, expn) = case rules of- [] -> (TH.TupP [], TH.ConE (TH.mkName inner))- _ : [] -> (TH.VarP local,- TH.ConE (TH.mkName inner)- `TH.AppE` TH.VarE local)- where- local = TH.mkName "_x"- ls -> (TH.TupP pats, set)- where- pats = fmap (\i -> TH.VarP (mkName ("_x" ++ show i)))- . take (length ls) $ [(0 :: Int) ..]- set = foldl addVar start . take (length ls)- $ [(0 :: Int) ..]- where- addVar acc i = acc `TH.AppE`- (TH.VarE (TH.mkName ("_x" ++ show i)))- start = TH.ConE (TH.mkName inner)-- getter = TH.LamE [pat] expn- where- local = TH.mkName "_x"- pat = TH.VarP local- expn = TH.CaseE (TH.VarE (TH.mkName "_x")) $- TH.Match patCtor bodyCtor []- : rest- where- patCtor = TH.ConP (TH.mkName inner)- . fmap (\i -> TH.VarP (TH.mkName $ "_y" ++ show i))- . take (length rules)- $ [(0 :: Int) ..]- bodyCtor = TH.NormalB . (TH.ConE 'Right `TH.AppE`)- $ case rules of- [] -> TH.TupE []- _:[] -> TH.VarE (TH.mkName "_y0")- _ -> TH.TupE- . fmap (\i -> TH.VarE (TH.mkName $ "_y" ++ show i))- . take (length rules)- $ [(0 :: Int) ..]- rest = case bs of- [] -> []- _ -> [TH.Match patBlank bodyBlank []]- where- patBlank = TH.VarP (TH.mkName "_z")- bodyBlank = TH.NormalB- $ TH.ConE ('Left)- `TH.AppE` TH.VarE (TH.mkName "_z")--unionToOptics- :: String- -- ^ Rule name- -> Rule t- -- ^ First rule- -> Seq (Rule t)- -- ^ Remaining rules- -> TH.DecsQ-unionToOptics parentName r1 rs- = fmap concat . sequence $ optics r1 : fmap optics (toList rs)- where- optics (Rule r _ _) = sequence $ sig : prism : []- where- sig = TH.sigD prismName [t| Lens.Prism' $bigType $innerType |]- prismName = TH.mkName $ "_" ++ parentName ++ "'" ++ r- bigType = TH.conT (TH.mkName parentName)- innerType = TH.conT (TH.mkName r)- prism = TH.valD (TH.varP prismName)- (TH.normalB [| Lens.prism $dataCtor $sToA |] ) []- sToA = TH.lamE [pat] expn- where- pat = dynP "_x"- expn = TH.caseE (dyn "_x")- [ TH.match (TH.conP (TH.mkName (unionBranchName parentName r))- [TH.varP (TH.mkName "_a")])- (TH.normalB [| Right $(dyn "_a") |]) []- , TH.match (dynP "_b")- (TH.normalB [| Left $(dyn "_b") |]) []- ]- dataCtor = TH.conE (TH.mkName (unionBranchName parentName r))--recordsToOptics- :: String- -- ^ Rule name- -> Seq (Rule t)- -> [TH.Dec]-recordsToOptics nm- = concat . zipWith makeLens [(0 :: Int) ..] . toList- where- makeLens index (Rule inner _ _) = [ signature, function ]- where- fieldNm = fieldName index nm inner- lensName = mkName fieldNm- signature = TH.SigD lensName- $ (TH.ConT ''Lens.Lens')- `TH.AppT` (TH.ConT (TH.mkName nm))- `TH.AppT` (TH.ConT (TH.mkName inner))-- function = TH.FunD lensName [TH.Clause [] (TH.NormalB body) []]- where- namedRec = TH.mkName "_namedRec"- namedNewVal = TH.mkName "_namedNewVal"- body = (TH.VarE 'Lens.lens) `TH.AppE` getter `TH.AppE` setter- where- getter = TH.LamE [pat] expn- where- pat = TH.VarP namedRec- expn = (TH.VarE (TH.mkName ('_' : fieldNm)))- `TH.AppE` (TH.VarE namedRec)-- setter = TH.LamE [patRec, patNewVal] expn- where- patRec = TH.VarP namedRec- patNewVal = TH.VarP namedNewVal- expn = TH.RecUpdE (TH.VarE namedRec)- [ (TH.mkName ('_' : fieldNm), TH.VarE namedNewVal) ]---ruleToOptics- :: Syntax.Lift t- => Name- -- ^ Terminal type name- -> String- -- ^ Rule name- -> RuleType t- -> TH.DecsQ-ruleToOptics terminalName nm ty = case ty of- RTerminal ivl -> terminalToOptics terminalName nm ivl- RBranch (b1, bs) -> return $ branchesToOptics nm b1 bs- RUnion (r1, rs) -> unionToOptics nm r1 rs- RSeqTerm sq -> seqTermToOptics terminalName nm sq- ROptional (Rule inner _ _) -> return [optionalToOptics inner nm]- RList (Rule inner _ _) -> return [manyToOptics inner nm]- RList1 (Rule inner _ _) -> return [many1ToOptics inner nm]- RWrap (Rule inner _ _) -> return [wrapToOptics inner nm]- RRecord recs -> return $ recordsToOptics nm recs---- | Should optics be made?-type MakeOptics = Bool---- | Creates optics.------ If you use this option, you will need--- @--- \{\-\# LANGUAGE TypeFamilies \#\-\}--- @------ at the top of the module into which you splice in the--- declarations, because you will get instances of 'Lens.Wrapped'.------ Creates the listed optics for each kind of--- 'Rule', as follows:------ * 'terminal': @'Lens.Prism'' a b@, where @a@ is the type of the--- terminal token (often 'Char') and @b@ is the type of this--- particular production. For an example, see--- 'Pinchot.Examples.PostalAstAllRules._Comma'.------ >>> ',' ^? _Comma--- Just (Comma ',')--- >>> 'a' ^? _Comma--- Nothing--- >>> Comma ',' ^. re _Comma--- ','------ Thus this gives you a safe way to insert tokens into types made--- with 'terminal' (useful if you want to construct a syntax tree.)------ * 'terminalSeq': @'Lens.Prism'' ('Seq' a) b@, where @a@ is the type--- of the terminal token (often 'Char') and @b@ is the type of this--- particular production. As with 'terminal' this gives you a safe--- way to insert values into the types made with 'terminalSeq'.------ * 'nonTerminal': one 'Lens.Prism'' for each data constructor (even if--- there is only one data constructor)------ * 'union': one 'Lens.Prism' for each data constructor (even if--- there is only one data constructor)------ * 'record': one 'Lens.Lens' for each field------ * 'list': 'Lens.Wrapped', wrapping a @'Seq' a@------ * 'list1': 'Lens.Wrapped', wrapping a pair @(a, 'Seq' a)@------ * 'option': 'Lens.Wrapped', wrapping a @'Maybe' a@------ * 'wrap': 'Lens.Wrapped', wrapping the underlying type-makeOptics :: MakeOptics-makeOptics = True---- | Do not make any optics.-noOptics :: MakeOptics-noOptics = False---- | Creates data types for every 'Rule' created in the 'Pinchot'. The data--- types are created in the same order in which they were created in--- the 'Pinchot'. When spliced, the 'DecsQ' is a list of--- declarations, each of which is an appropriate @data@ or @newtype@.--- For an example use of 'allRulesToTypes', see--- "Pinchot.Examples.PostalAstAllRules".------ Also creates bindings whose names are prefixed with @t'@. Each--- of these is a function that, when given a particular production,--- reduces it to a sequence of terminal symbols.--allRulesToTypes- :: Syntax.Lift t- => MakeOptics-- -> Name- -- ^ Terminal type constructor name. Typically you will use the- -- Template Haskell quoting mechanism to get this.-- -> Seq Name- -- ^ What to derive. For instance, you might use @Eq@, @Ord@, and- -- @Show@ here. Each created data type will derive these instances.-- -> Pinchot t a- -- ^ The return value from the 'Pinchot' is ignored.-- -> DecsQ-allRulesToTypes doOptics typeName derives pinchot = do- st' <- fmap fst $ goPinchot pinchot- thAllRules doOptics typeName derives (allRules st')---- | Creates data types only for the 'Rule' returned from the 'Pinchot', and--- for its ancestors.------ Also creates bindings whose names are prefixed with @t'@. Each--- of these is a function that, when given a particular production,--- reduces it to a sequence of terminal symbols.-ruleTreeToTypes- :: Syntax.Lift t- => MakeOptics-- -> Name- -- ^ Terminal type constructor name. Typically you will use the- -- Template Haskell quoting mechanism to get this.-- -> Seq Name- -- ^ What to derive. For instance, you might use @Eq@, @Ord@, and- -- @Show@ here. Each created data type will derive these instances.-- -> Pinchot t (Rule t)- -- ^ A data type is created for the 'Rule' that the 'Pinchot'- -- returns, and for the ancestors of the 'Rule'.- -> DecsQ-ruleTreeToTypes doOptics typeName derives pinchot = do- r <- fmap snd $ goPinchot pinchot- fmap join . sequence . toList- . fmap (thRule doOptics typeName derives)- . runCalc . getAncestors $ r- where- runCalc stateCalc = fst $ runState stateCalc Set.empty--addPrefix- :: String- -> String- -> String-addPrefix pfx suf- | null pfx = suf- | otherwise = pfx ++ '.':suf--ruleToParser- :: Syntax.Lift t- => String- -- ^ Module prefix- -> Rule t- -> [(Name, ExpQ)]-ruleToParser prefix (Rule nm mayDescription rt) = case rt of-- RTerminal ivls -> [makeRule expression]- where- expression = [| fmap $constructor (satisfy (inIntervals ivls)) |]-- RBranch (b1, bs) -> [makeRule expression]- where- expression = foldl addBranch (branchToParser prefix b1) bs- where- addBranch tree branch =- [| $tree <|> $(branchToParser prefix branch) |]-- RUnion (Rule r1 _ _, rs) -> [makeRule expression]- where- expression = foldl adder start rs- where- branch r = [| $(conE (mkName- (addPrefix prefix . unionBranchName nm $ r))) <$>- $(varE (ruleName r)) |]- start = branch r1- adder soFar (Rule r _ _) = [| $soFar <|> $(branch r) |]-- RSeqTerm sq -> [nestRule, topRule]- where- nestRule = (helper, [| rule $(foldl addTerm start sq) |])- where- start = [|pure Seq.empty|]- addTerm acc x = [| liftA2 (<|) (symbol x) $acc |]- topRule = makeRule (wrapper helper)-- ROptional (Rule innerNm _ _) -> [makeRule expression]- where- expression = [| fmap $constructor (pure Nothing <|> $(just)) |]- where- just = [| fmap Just $(varE (ruleName innerNm)) |]-- RList (Rule innerNm _ _) -> [nestRule, makeRule (wrapper helper)]- where- nestRule = (helper, ([|rule|] `appE` parseSeq))- where- parseSeq = uInfixE [|pure Seq.empty|] [|(<|>)|] pSeq- where- pSeq = [|liftA2 (<|) $(varE (ruleName innerNm)) $(varE helper) |]-- RList1 (Rule innerNm _ _) -> [nestRule, makeRule topExpn]- where- nestRule = (helper, [|rule $(parseSeq)|])- where- parseSeq = [| pure Seq.empty <|> $pSeq |]- where- pSeq = [| (<|) <$> $(varE (ruleName innerNm))- <*> $(varE helper) |]- topExpn = [| $constructor <$> ( (,) <$> $(varE (ruleName innerNm))- <*> $(varE helper)- ) |]-- RWrap (Rule innerNm _ _) -> [makeRule expression]- where- expression = [|fmap $constructor $(varE (ruleName innerNm)) |]-- RRecord sq -> [makeRule expression]- where- expression = case viewl sq of- EmptyL -> [| pure $constructor |]- Rule r1 _ _ :< restFields -> foldl addField fstField restFields- where- fstField = [| $constructor <$> $(varE (ruleName r1)) |]- addField soFar (Rule r _ _)- = [| $soFar <*> $(varE (ruleName r)) |]- -- where- makeRule expression = (ruleName nm,- [|rule ($expression Text.Earley.<?> $(textToExp desc))|])- desc = maybe nm id mayDescription- textToExp txt = [| $(Syntax.lift txt) |]- constructor = constructorName prefix nm- wrapper wrapRule = [|fmap $constructor $(varE wrapRule) |]- helper = helperName nm---constructorName- :: String- -- ^ Module prefix- -> String- -- ^ Name of constructor- -> ExpQ-constructorName pfx nm = conE (mkName name)- where- name = pfx' ++ nm- pfx'- | null pfx = ""- | otherwise = pfx ++ "."--ruleName :: String -> Name-ruleName suffix = mkName ("_rule'" ++ suffix)--helperName :: String -> Name-helperName suffix = mkName ("_helper'" ++ suffix)--branchToParser- :: Syntax.Lift t- => String- -- ^ Module prefix- -> Branch t- -> ExpQ-branchToParser prefix (Branch name rules) = case viewl rules of- EmptyL -> [| pure $constructor |]- (Rule rule1 _ _) :< xs -> foldl f z xs- where- z = [| $constructor <$> $(varE (ruleName rule1)) |]- f soFar (Rule rule2 _ _) = [| $soFar <*> $(varE (ruleName rule2)) |]- where- constructor = constructorName prefix name---- # lazyPattern and bigTuple - because TH has no support for--- mdo notation- --- | Creates a lazy pattern for all the given names. Adds an empty--- pattern onto the front. This is the counterpart of 'bigTuple'.--- All of the given names are bound. In addition, a single,--- wildcard pattern is bound to the front.--- --- For example, @lazyPattern (map mkName ["x", "y", "z"])@ gives a--- pattern that looks like------ @~(_, (x, (y, (z, ()))))@------ The idea is that the named patterns are needed so that the--- recursive @do@ notation works, and that the wildcard pattern is--- the return value, which is not needed here.-lazyPattern- :: Foldable c- => c Name- -> Q Pat-lazyPattern = finish . foldr gen [p| () |]- where- gen name rest = [p| ($(varP name), $rest) |]- finish pat = [p| ~(_, $pat) |]---- | Creates a big tuple. It is nested in the second element, such--- as (1, (2, (3, (4, ())))). Thus, the big tuple is terminated--- with a unit value. It resembles a list where each tuple is a--- cons cell and the terminator is unit.-bigTuple- :: Foldable c- => ExpQ- -- ^ This expression will be the first one in the tuple.- -> c ExpQ- -- ^ Remaining expressions in the tuple.- -> ExpQ-bigTuple top = finish . foldr f [| () |]- where- f n rest = [| ( $(n), $rest) |]- finish tup = [| ($(top), $tup) |]---- | Creates an Earley grammar for a given 'Rule'. For examples of how--- to use this, see the source code for--- "Pinchot.Examples.PostalAstRuleTree" and for--- "Pinchot.Examples.PostalAstAllRules".--earleyGrammar- :: Syntax.Lift t-- => Qualifier- -- ^ Qualifier for data types crated with 'ruleTreeToTypes' or- -- 'allRulesToTypes'-- -> Pinchot t (Rule t)- -- ^ Creates an Earley parser for the 'Rule' that the 'Pinchot'- -- returns.-- -> Q Exp- -- ^ When spliced, this expression has type- -- @'Text.Earley.Grammar' r ('Text.Earley.Prod' r 'String' t a)@- --- -- where- -- - -- @r@ is left universally quantified- --- -- @t@ is the type of the token (usually 'Char')- --- -- @a@ is the type defined by the 'Rule'.-earleyGrammar prefix pinc = do- r <- fmap snd $ goPinchot pinc- earleyGrammarFromRule prefix r---- | Builds a recursive @do@ expression (because TH has no support--- for @mdo@ notation).-recursiveDo- :: [(Name, ExpQ)]- -- ^ Binding statements- -> ExpQ- -- ^ Final return value from @do@ block. The type of this 'ExpQ'- -- must be in the same monad as the @do@ block; it must not be a- -- pure value.- -> ExpQ- -- ^ Returns an expression whose value is the final return value- -- from the @do@ block.-recursiveDo binds final = [| fmap fst $ mfix $(fn) |]- where- fn = [| \ $(lazyPattern (fmap fst binds)) -> $doBlock |]- doBlock = TH.doE (bindStmts ++ returnStmts)- bindStmts = map mkBind binds- where- mkBind (name, exp)- = TH.bindS (TH.varP name) exp- returnStmts = [bindRtnVal, returner]- where- rtnValName = TH.mkName "_returner"- bindRtnVal = TH.bindS (TH.varP rtnValName) final- returner- = TH.noBindS- [| return $(bigTuple (TH.varE rtnValName) - (fmap (TH.varE . fst) binds)) |]--earleyGrammarFromRule- :: Syntax.Lift t- => String- -- ^ Module prefix- -> Rule t- -> Q Exp-earleyGrammarFromRule prefix r@(Rule top _ _) = recursiveDo binds final- where- binds = concatMap (ruleToParser prefix) . toList . ruleAndAncestors $ r- final = [| return $(TH.varE $ ruleName top) |]---- | Creates an Earley grammar for each 'Rule' created in a--- 'Pinchot'. For a 'Pinchot' with a large number of 'Rule's, this--- can create a large number of declarations that can take a long--- time to compile--sometimes several minutes. For lower--- compilation times, try 'earleyProduct'.--allEarleyGrammars- :: Syntax.Lift t-- => Qualifier- -- ^ Qualifier for data types created with 'ruleTreeToTypes' or- -- 'allRulesToTypes'-- -> Name- -- ^ Name for the terminal type; often this is 'Char'. Typically- -- you will use the Template Haskell quoting mechanism--for- -- example, @\'\'Char@.-- -> Pinchot t a- -- ^ Creates an Earley grammar for each 'Rule' created in the- -- 'Pinchot'. The return value of the 'Pinchot' computation is- -- ignored.-- -> DecsQ- -- ^ When spliced, this is a list of declarations. Each- -- declaration has type- -- @'Text.Earley.Grammar' r ('Text.Earley.Prod' r 'String' t a)@- --- -- where- -- - -- @r@ is left universally quantified- --- -- @t@ is the type of the token (usually 'Char')- --- -- @a@ is the type defined by the 'Rule'.- --- -- The name of each declaration is- -- g'TYPE_NAME- --- -- where TYPE_NAME is the name of the type defined in the- -- corresponding 'Rule'.-allEarleyGrammars prefix termName pinc = do- st <- fmap fst $ goPinchot pinc- sequence . concat . fmap makeDecl . fmap snd . M.toList- . allRules $ st- where- makeDecl rule@(Rule nm _ _) = [signature, TH.valD pat body []]- where- signature = TH.sigD name types- r = TH.mkName "r"- types = TH.forallT [TH.PlainTV r] (return [])- $ [t| Text.Earley.Grammar $(TH.varT r)- (Text.Earley.Prod $(TH.varT r) String $(TH.conT termName)- $(TH.conT qualRuleName)) |]- name = TH.mkName $ "g'" ++ nm- pat = TH.varP name- body = TH.normalB (earleyGrammarFromRule prefix rule)- qualRuleName- | null prefix = TH.mkName nm- | otherwise = TH.mkName (prefix ++ "." ++ nm)---prodDeclName :: String -> TH.Name-prodDeclName name = TH.mkName $ "t'" ++ name--prodFn :: String -> TH.ExpQ-prodFn = TH.varE . prodDeclName--addIndices :: Foldable c => c a -> [(Int, a)]-addIndices = zip [0..] . toList---- | Creates a production declaration for a 'Rule'.-productionDecl- :: String- -- ^ Rule name- -> Name- -- ^ Name of terminal type- -> RuleType t- -> TH.DecsQ-productionDecl n termType t- = sequence [signature, TH.funD (prodDeclName n) clauses]- where- signature = TH.sigD (prodDeclName n) types- where- types = TH.appT (TH.appT TH.arrowT (TH.conT (TH.mkName n)))- (TH.appT (TH.conT ''Seq) (TH.conT termType))- clauses = case t of- RTerminal _ -> [TH.clause [pat] bdy []]- where- pat = TH.conP (TH.mkName n) [TH.varP (TH.mkName "_x")]- bdy = TH.normalB [| Seq.singleton $(TH.varE (TH.mkName "_x")) |]-- RBranch (b1, bs) -> branchToClause b1- : fmap branchToClause (toList bs)-- RSeqTerm _ -> [TH.clause [pat] bdy []]- where- pat = TH.conP (TH.mkName n) [TH.varP (TH.mkName "_x")]- bdy = TH.normalB (dyn "_x")-- ROptional (Rule inner _ _) -> [justClause, nothingClause]- where- justClause- = TH.clause [TH.conP (TH.mkName n)- [TH.conP 'Just [TH.varP (TH.mkName "_b")]]]- (TH.normalB [| $(prodFn inner)- $(TH.varE (TH.mkName "_b")) |])- []- nothingClause- = TH.clause [TH.conP (TH.mkName n)- [TH.conP 'Nothing []]]- (TH.normalB [| Seq.empty |]) []-- RList (Rule inner _ _) -> [TH.clause [pat] bdy []]- where- pat = TH.conP (TH.mkName n) [TH.varP (TH.mkName "_a")] - bdy = TH.normalB [| join- $ fmap $(prodFn inner) $(TH.varE (TH.mkName "_a")) |]-- RList1 (Rule inner _ _) -> [TH.clause [pat] bdy []]- where- pat = TH.conP (TH.mkName n)- [TH.tupP [ dynP "_x1", dynP "_xs" ]]- bdy = TH.normalB- [| $lft `mappend` (join (fmap $(prodFn inner)- $(dyn "_xs"))) |]- where- lft = [| $(prodFn inner) $(dyn "_x1") |]-- RWrap (Rule inner _ _) -> [TH.clause [pat] bdy []]- where- pat = TH.conP (TH.mkName n) [dynP "_x"]- bdy = TH.normalB [| $(prodFn inner) $(dyn "_x") |]-- RRecord sq -> [TH.clause [pat] (TH.normalB bdy) []]- where- pat = TH.conP (TH.mkName n) . fmap mkPat- . fmap fst . addIndices $ sq- where- mkPat idx = dynP ("_x'" ++ show idx)- bdy = foldr addField [| Seq.empty |] . addIndices $ sq- where- addField (idx, (Rule nm _ _)) acc = [| $this `mappend` $acc |]- where- this = [| $(prodFn nm) $(dyn ("_x'" ++ show idx)) |]-- RUnion (r1, rs) -> mkClause r1 : fmap mkClause (toList rs)- where- mkClause (Rule inner _ _) = TH.clause [pat] bdy []- where- pat = TH.conP (TH.mkName (unionBranchName n inner))- [dynP "_x"]- bdy = TH.normalB [| $(prodFn inner) $(dyn "_x") |]---branchToClause :: Branch t -> TH.ClauseQ-branchToClause (Branch n rs) = TH.clause [pat] bdy []- where- pat = TH.conP (TH.mkName n) fields- where- fields = fmap mkField . fmap fst . addIndices $ rs- where- mkField idx = TH.varP (TH.mkName ("_x'" ++ show idx))- bdy = TH.normalB [| join $sq |]- where- sq = foldr addField (TH.varE 'Seq.empty) . addIndices $ rs- where- addField (idx, (Rule inner _ _)) acc = [| $newTerm <| $acc |]- where- newTerm = [| $(prodFn inner) $(TH.varE- (TH.mkName ("_x'" ++ show idx))) |]---- | Many functions take an argument that holds the name qualifier--- for the module that contains the data types created by applying--- 'ruleTreeToTypes' or 'allRulesToTypes' to the 'Pinchot.'------ You have to make sure that the data types you created with--- 'ruleTreeToTypes', 'allRulesToTypes', or 'allRulesRecord' are in--- scope. The spliced Template Haskell code has to know where to--- look for these data types. If you did an unqualified @import@ or--- if the types are in the same module as is the splice of--- 'earleyParser', just pass the empty string here. If you did a--- qualified import, use the appropriate qualifier here.------ For example, if you used @import qualified MyAst@, pass--- @\"MyAst\"@ here. If you used @import qualified--- Data.MyLibrary.MyAst as MyLibrary.MyAst@, pass--- @\"MyLibrary.MyAst\"@ here.------ I recommend that you always create a new module and that all you--- do in that module is apply 'ruleTreeToTypes' or--- 'allRulesToTypes', and that you then perform an @import--- qualified@ to bring those names into scope in the module in which--- you use a function that takes a 'Qualifier' argument. This--- avoids unlikely, but possible, issues that could otherwise arise--- due to naming conflicts.-type Qualifier = String----- | Creates a record data type that holds a value of type------ @'Text.Earley.Prod' r 'String' t a@------ for every rule created in the 'Pinchot'. @r@ is left--- universally quantified, @t@ is the token type (typically 'Char')--- and @a@ is the type of the rule.------ This always creates a single product type whose name is--- @Productions@; currently the name cannot be configured.------ For an example of the use of 'allRulesRecord', please see--- "Pinchot.Examples.AllRulesRecord".-allRulesRecord- :: Qualifier- -- ^ Qualifier for data types created with 'ruleTreeToTypes' or- -- 'allRulesToTypes'- -> Name- -- ^ Name of terminal type. Typically you will get this through- -- the Template Haskell quoting mechanism, such as @''Char@.- -> Pinchot t a- -- ^ A record is created that holds a value for each 'Rule'- -- created in the 'Pinchot'; the return value of the 'Pinchot' is- -- ignored.- -> DecsQ- -- ^ When spliced, this will create a single declaration that is a- -- record with the name @Productions@. It will have one type variable,- -- @r@. Each record in the declaration will have a name like so:- --- -- @a'NAME@- --- -- where @NAME@ is the name of the type. Don't count on these- -- records being in any particular order.-allRulesRecord prefix termName pinc- = sequence [TH.dataD (return []) (TH.mkName nameStr) tys [con] []]- where- nameStr = "Productions"- tys = [TH.PlainTV (TH.mkName "r")]- con = do- names <- fmap fst $ goPinchot pinc- TH.recC (TH.mkName nameStr)- (fmap (mkRecord . snd) . M.assocs . allRules $ names)- mkRecord (Rule ruleNm _ _) = TH.varStrictType recName st- where- recName = TH.mkName ("a'" ++ ruleNm)- st = TH.strictType TH.notStrict ty- where- ty = (TH.conT ''Text.Earley.Prod)- `TH.appT` (TH.varT (TH.mkName "r"))- `TH.appT` (TH.conT ''String)- `TH.appT` (TH.conT termName)- `TH.appT` (TH.conT (TH.mkName nameWithPrefix))- nameWithPrefix = case prefix of- [] -> ruleNm- _ -> prefix ++ '.' : ruleNm---- | Creates a 'Text.Earley.Grammar' that contains a--- 'Text.Earley.Prod' for every 'Rule' created in the 'Pinchot'.-earleyProduct- :: Syntax.Lift t-- => Qualifier- -- ^ Qualifier for data types created with 'ruleTreeToTypes' or- -- 'allRulesToTypes'-- -> Qualifier- -- ^ Module prefix for the type created with 'allRulesRecord'-- -> Pinchot t a- -- ^ Creates an Earley grammar that contains a 'Text.Earley.Prod'- -- for each 'Rule' in the 'Pinchot'. The return value from the- -- 'Pinchot' is ignored.-- -> ExpQ- -- ^ When spliced, 'earleyProduct' creates an expression whose- -- type is @'Text.Earley.Grammar' r (Productions r)@, where- -- @Productions@ is- -- the type created by 'allRulesRecord'.-earleyProduct pfxRule pfxRec pinc = do- names <- fmap fst $ goPinchot pinc- let binds = concatMap (ruleToParser pfxRule)- . fmap snd . M.assocs . allRules $ names- final = [| return- $(TH.recConE (TH.mkName rulesRecName) (recs names)) |]- recursiveDo binds final- where- rulesRecName- | null pfxRec = "Productions"- | otherwise = pfxRec ++ ".Productions"- recs = fmap mkRec . fmap snd . M.assocs . allRules- where- mkRec (Rule n _ _) = return (TH.mkName recName, recVal)- where- recName- | null pfxRec = "a'" ++ n- | otherwise = pfxRec ++ ".a'" ++ n- recVal = TH.VarE . ruleName $ n
lib/Pinchot/Intervals.hs view
@@ -1,3 +1,4 @@+{-# OPTIONS_HADDOCK not-home #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE TemplateHaskell #-} @@ -6,6 +7,7 @@ -- usually need. module Pinchot.Intervals where +import qualified Control.Lens as Lens import Control.Monad (join) import Data.Monoid ((<>)) import Data.Ord (comparing)@@ -19,17 +21,19 @@ -- 'mappend', which will combine both the included and excluded -- terminal symbols from each operand. data Intervals a = Intervals- { included :: Seq (a, a)+ { _included :: Seq (a, a) -- ^ Each pair @(a, b)@ is an inclusive range of terminal symbols, -- in order. For instance, @('a', 'c')@ includes the characters -- @'a'@, @'b'@, and @'c'@. The 'included' sequence contains all -- terminals that are included in the 'Intervals', except for those -- that are 'excluded'.- , excluded :: Seq (a, a)+ , _excluded :: Seq (a, a) -- ^ Each symbol in 'excluded' is not in the 'Intervals', even if -- the symbol is 'included'. } deriving (Eq, Ord, Show) +Lens.makeLenses ''Intervals+ instance Functor Intervals where fmap f (Intervals a b) = Intervals (fmap g a) (fmap g b) where@@ -42,7 +46,7 @@ -- | Include a range of symbols in the 'Intervals'. For instance, to -- include the characters @'a'@, @'b'@, and @'c'@, use @include 'a'--- 'c'@.+-- 'c'@. Example: 'Pinchot.Examples.Postal.rLetter'. include :: a -> a -> Intervals a include l h = Intervals [(l, h)] [] @@ -52,7 +56,8 @@ exclude :: a -> a -> Intervals a exclude l h = Intervals [] [(l, h)] --- | Include a single symbol.+-- | Include a single symbol. Example:+-- 'Pinchot.Examples.Postal.rNorth'. solo :: a -> Intervals a solo x = Intervals [(x, x)] []
+ lib/Pinchot/Locator.hs view
@@ -0,0 +1,59 @@+{-# OPTIONS_HADDOCK not-home #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE RankNTypes #-}+module Pinchot.Locator where++import Pinchot.Types++import qualified Data.ListLike as ListLike+import Data.Sequence (Seq, (|>))+import qualified Data.Sequence as Seq+import qualified Text.Earley as Earley++-- | Advances the location for 'Char' values. Tabs advance to the+-- next eight-column tab stop; newlines advance to the next line and+-- reset the column number to 1. All other characters advance the+-- column by 1.+advanceChar :: Char -> Loc -> Loc+advanceChar c (Loc !lin !col !pos)+ | c == '\n' = Loc (lin + 1) 1 (pos + 1)+ | c == '\t' = Loc lin (col + 8 - ((col - 1) `mod` 8)) (pos + 1)+ | otherwise = Loc lin (col + 1) (pos + 1)++-- | Takes any ListLike value based on 'Char' (@Seq@, @Text@,+-- @String@, etc.) and creates a 'Seq' which pairs each 'Char' with+-- its location. Example: 'locatedFullParses'.+locations+ :: ListLike.FoldableLL full Char+ => full+ -> Seq (Char, Loc)+locations = fst . ListLike.foldl' f (Seq.empty, Loc 1 1 1)+ where+ f (!sq, !loc) c = (sq |> (c, loc), advanceChar c loc)++-- | Breaks a ListLike into a 'Seq' but does not assign locations.+noLocations+ :: ListLike.FoldableLL full item+ => full+ -> Seq (item, ())+noLocations = ListLike.foldl' f Seq.empty+ where+ f !sq c = sq |> (c, ())++-- | Obtains all full Earley parses from a given input string, after+-- assigning a location to every 'Char'. Example:+-- 'Pinchot.Examples.Newman.address'.+locatedFullParses+ :: ListLike.FoldableLL full Char+ => (forall r. Earley.Grammar r (Earley.Prod r String (Char, Loc) (p Char Loc)))+ -- ^ Earley grammar with production that you want to parse.+ -> full+ -- ^ Source text, e.g. 'String', 'Data.Text', etc.+ -> ([p Char Loc], Earley.Report String (Seq (Char, Loc)))+ -- ^ A list of successful parses that when to the end of the+ -- source string, along with the Earley report showing possible+ -- errors.+locatedFullParses g+ = Earley.fullParses (Earley.parser g)+ . locations
+ lib/Pinchot/NonEmpty.hs view
@@ -0,0 +1,61 @@+{-# OPTIONS_HADDOCK not-home #-}+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-}+-- | Sequences that always contain at least one element.++module Pinchot.NonEmpty where++import Control.Monad (join, ap)+import Data.Sequence (Seq, (<|))+import qualified Data.Sequence as Seq+import qualified Control.Lens as Lens++-- | A non-empty sequence.+data NonEmpty a = NonEmpty+ { _front :: a+ -- ^ The first item+ , _rest :: Seq a+ -- ^ All remaining items+ } deriving (Eq, Ord, Show, Functor, Foldable, Traversable)++Lens.makeLenses ''NonEmpty++-- | Convert a 'NonEmpty' to a 'Seq'.+flatten :: NonEmpty a -> Seq a+flatten (NonEmpty a as) = a <| as++instance Monad NonEmpty where+ return a = NonEmpty a Seq.empty+ NonEmpty a as >>= f = NonEmpty (_front r1) rs+ where+ r1 = f a+ rs = _rest r1 `mappend` rss+ rss = join . fmap flatten . fmap f $ as++instance Applicative NonEmpty where+ pure = return+ (<*>) = ap++-- | Converts a non-empty 'Seq' to a 'NonEmpty'; 'Nothing' if the+-- 'Seq' is empty.+seqToNonEmpty :: Seq a -> Maybe (NonEmpty a)+seqToNonEmpty = fmap (uncurry NonEmpty) . Lens.uncons++-- | Prepends a 'Seq' to a 'NonEmpty'.+prependSeq :: Seq a -> NonEmpty a -> NonEmpty a+prependSeq sq (NonEmpty a as) = case Lens.uncons sq of+ Nothing -> NonEmpty a as+ Just (l, ls) -> NonEmpty l (ls `mappend` (a <| as))++-- | Appends a 'Seq' to a 'NonEmpty'.+appendSeq :: NonEmpty a -> Seq a -> NonEmpty a+appendSeq (NonEmpty a as) sq = NonEmpty a (as `mappend` sq)++-- | Associative operation that appends to 'NonEmpty'.+append :: NonEmpty a -> NonEmpty a -> NonEmpty a+append (NonEmpty l1 ls) (NonEmpty r1 rs)+ = NonEmpty l1 (ls `mappend` (r1 <| rs))++-- | Place a single item at the head of the 'NonEmpty'.+singleton :: a -> NonEmpty a+singleton a = NonEmpty a Seq.empty
+ lib/Pinchot/RecursiveDo.hs view
@@ -0,0 +1,76 @@+{-# OPTIONS_HADDOCK not-home #-}+{-# LANGUAGE TemplateHaskell #-}++-- | Emulating recursive do notation, as TH does not support it.+module Pinchot.RecursiveDo where++import Control.Monad.Fix (mfix)+import qualified Language.Haskell.TH as T++-- | Creates a lazy pattern for all the given names. Adds an empty+-- pattern onto the front. This is the counterpart of 'bigTuple'.+-- All of the given names are bound. In addition, a single,+-- wildcard pattern is bound to the front.+-- +-- For example, @lazyPattern (map mkName ["x", "y", "z"])@ gives a+-- pattern that looks like+--+-- @~(_, (x, (y, (z, ()))))@+--+-- The idea is that the named patterns are needed so that the+-- recursive @do@ notation works, and that the wildcard pattern is+-- the return value, which is not needed here.+lazyPattern+ :: Foldable c+ => c T.Name+ -> T.Q T.Pat+lazyPattern = finish . foldr gen [p| () |]+ where+ gen name rest = [p| ($(T.varP name), $rest) |]+ finish pat = [p| ~(_, $pat) |]++-- | Creates a big tuple. It is nested in the second element, such+-- as (1, (2, (3, (4, ())))). Thus, the big tuple is terminated+-- with a unit value. It resembles a list where each tuple is a+-- cons cell and the terminator is unit.+bigTuple+ :: Foldable c+ => T.ExpQ+ -- ^ This expression will be the first one in the tuple.+ -> c T.ExpQ+ -- ^ Remaining expressions in the tuple.+ -> T.ExpQ+bigTuple top = finish . foldr f [| () |]+ where+ f n rest = [| ( $(n), $rest) |]+ finish tup = [| ($(top), $tup) |]++-- | Builds a recursive @do@ expression (because TH has no support+-- for @mdo@ notation).+recursiveDo+ :: [(T.Name, T.ExpQ)]+ -- ^ Binding statements+ -> T.ExpQ+ -- ^ Final return value from @do@ block. The type of this 'ExpQ'+ -- must be in the same monad as the @do@ block; it must not be a+ -- pure value.+ -> T.ExpQ+ -- ^ Returns an expression whose value is the final return value+ -- from the @do@ block.+recursiveDo binds final = [| fmap fst $ mfix $(fn) |]+ where+ fn = [| \ $(lazyPattern (fmap fst binds)) -> $doBlock |]+ doBlock = T.doE (bindStmts ++ returnStmts)+ bindStmts = map mkBind binds+ where+ mkBind (name, exp)+ = T.bindS (T.varP name) exp+ returnStmts = [bindRtnVal, returner]+ where+ rtnValName = T.mkName "_returner"+ bindRtnVal = T.bindS (T.varP rtnValName) final+ returner+ = T.noBindS+ [| return $(bigTuple (T.varE rtnValName) + (fmap (T.varE . fst) binds)) |]+
+ lib/Pinchot/Rules.hs view
@@ -0,0 +1,223 @@+{-# OPTIONS_HADDOCK not-home #-}+{-# LANGUAGE OverloadedLists #-}+module Pinchot.Rules where++import qualified Control.Lens as Lens+import Control.Monad (join)+import Control.Monad.Trans.State (get, put, State)+import qualified Control.Monad.Trans.State as State+import Data.Monoid ((<>))+import Data.Sequence (Seq, (<|))+import qualified Data.Sequence as Seq+import Data.Set (Set)+import qualified Data.Set as Set++import Pinchot.Types+import Pinchot.Intervals++-- | Name a 'Rule' for use in error messages. If you do not name a+-- rule using this combinator, the rule's type name will be used in+-- error messages.+label :: Rule t -> String -> Rule t+label (Rule n _ t) s = Rule n (Just s) t++-- | Infix synonym for 'label'. Example:+-- 'Pinchot.Examples.Postal.rDigit'.+(<?>) :: Rule t -> String -> Rule t+(<?>) = label+infixr 0 <?>++-- | Constructs a 'Rule' with no description.+rule :: RuleName -> RuleType t -> Rule t+rule n = Rule n Nothing++-- | Creates a terminal production rule. Example:+-- 'Pinchot.Examples.Postal.rLetter'.+terminal+ :: RuleName+ -> Intervals t+ -- ^ Valid terminal symbols+ -> Rule t+terminal n i = rule n (Terminal i)++-- | Creates a non-terminal production rule. This is the most+-- flexible way to create non-terminals. You can even create a+-- non-terminal that depends on itself. Example:+-- 'Pinchot.Examples.Postal.rLetters'.++nonTerminal+ :: RuleName+ -- ^ Will be used for the name of the resulting type+ -> Seq (BranchName, Seq (Rule t))+ -- ^ Branches of the non-terminal production rule. This 'Seq'+ -- must have at least one element; otherwise, an error will+ -- result.+ -> Rule t+nonTerminal n branches = case Lens.uncons branches of+ Nothing -> error $ "nonTerminal: rule has no branches: " ++ n+ Just (b, bs) -> rule n (NonTerminal (f b) (fmap f bs))+ where+ f = uncurry Branch++-- | Creates a non-terminal production rule where each branch has+-- only one production. This function ultimately uses+-- 'nonTerminal'. Each branch is assigned a 'BranchName' that is+--+-- @RULE_NAME'PRODUCTION_NAME@+--+-- where @RULE_NAME@ is the name of the rule itself, and+-- @PRODUCTION_NAME@ is the rule name for what is being produced.+--+-- Example: 'Pinchot.Examples.Postal.rDirection'.+union+ :: RuleName+ -- ^ Will be used for the name of the resulting type+ -> Seq (Rule t)+ -- ^ List of branches. There must be at least one branch;+ -- otherwise a compile-time error will occur.+ -> Rule t+union n rs = nonTerminal n (fmap f rs)+ where+ f rule@(Rule branchName _ _)+ = (n ++ '\'' : branchName, Seq.singleton rule)++-- | Creates a production for a sequence of terminals. Useful for+-- parsing specific words. Ultimately this is simply a function+-- that creates a 'Rule' using the 'record' function.+--+-- In @terminals n s@, For each 'Char' in the 'String', a 'Rule' is+-- created whose 'RuleName' is @n@ followed by an apostrophe+-- followed by the index of the position of the 'Char'.+--+-- Examples: 'Pinchot.Examples.Postal.rBoulevard'.++terminals+ :: RuleName+ -- ^ Will be used for the name of the resulting type, and for the+ -- name of the sole data constructor+ -> String+ -> Rule Char+terminals n s = record n rules+ where+ rules = Seq.fromList . zipWith mkRule [(0 :: Int) ..] $ s+ mkRule idx char = terminal nm (solo char)+ where+ nm = n ++ ('\'' : show idx)++-- | Creates a newtype wrapper. Example:+-- 'Pinchot.Examples.Postal.rCity'.+wrap+ :: RuleName+ -- ^ Will be used for the name of the resulting data type, and for+ -- the name of the sole data constructor+ -> Rule t+ -- ^ The resulting 'Rule' simply wraps this 'Rule'.+ -> Rule t+wrap n r = rule n (Wrap r)+++-- | Creates a new non-terminal production rule with only one+-- alternative where each field has a record name. The name of each+-- record is:+--+-- @_r\'RULE_NAME\'INDEX\'FIELD_TYPE@+--+-- where @RULE_NAME@ is the name of this rule, @INDEX@ is the index number+-- for this field (starting with 0), and @FIELD_TYPE@ is the type of the+-- field itself.+--+-- Currently there is no way to change the names of the record fields.+--+-- Example: 'Pinchot.Examples.Postal.rAddress'.+record+ :: RuleName+ -- ^ The name of this rule, which is used both as the type name+ -- and for the name of the sole data constructor++ -> Seq (Rule t)+ -- ^ The right-hand side of this rule. This sequence can be empty,+ -- which results in an epsilon production.+ -> Rule t+record n rs = rule n (Record rs)++-- | Creates a rule for a production that optionally produces another+-- rule. The name for the created 'Rule' is the name of the 'Rule' to+-- which this function is applied, with @'Opt@ appended to the end.+--+-- Example: 'Pinchot.Examples.Postal.rOptNewline'.+opt+ :: Rule t+ -> Rule t+opt r@(Rule innerNm _ _) = rule n (Opt r)+ where+ n = innerNm ++ "'Opt"++-- | Creates a rule for the production of a sequence of other rules.+-- The name for the created 'Rule' is the name of the 'Rule' to which+-- this function is applied, with @'Star@ appended.+--+-- Example: 'Pinchot.Examples.Postal.rPreSpacedWord'.+star+ :: Rule t+ -> Rule t+star r@(Rule innerNm _ _) = rule (innerNm ++ "'Star") (Star r)++-- | Creates a rule for a production that appears at least once. The+-- name for the created 'Rule' is the name of the 'Rule' to which this+-- function is applied, with @'Plus@ appended.+--+-- Example: 'Pinchot.Examples.Postal.rDigits'.+plus+ :: Rule t+ -> Rule t+plus r@(Rule innerNm _ _) = rule (innerNm ++ "'Plus") (Plus r)++-- | Gets all ancestor rules to this 'Rule'. Includes the current+-- rule if it has not already been seen.+getAncestors :: Rule t -> State (Set RuleName) (Seq (Rule t))+getAncestors r@(Rule name _ ty) = do+ set <- get+ if Set.member name set+ then return Seq.empty+ else do+ put (Set.insert name set)+ case ty of+ Terminal _ -> return (Seq.singleton r)+ NonTerminal b1 bs -> do+ as1 <- branchAncestors b1+ ass <- fmap join . traverse branchAncestors $ bs+ return $ r <| as1 <> ass+ Wrap c -> do+ cs <- getAncestors c+ return $ r <| cs+ Record ls -> do+ cs <- fmap join . traverse getAncestors $ ls+ return $ r <| cs+ Opt c -> do+ cs <- getAncestors c+ return $ r <| cs+ Star c -> do+ cs <- getAncestors c+ return $ r <| cs+ Plus c -> do+ cs <- getAncestors c+ return $ r <| cs+ where+ branchAncestors (Branch _ rs) = fmap join . traverse getAncestors $ rs++-- | Gets all ancestor 'Rule's. Includes the current 'Rule'. Skips+-- duplicates.+family+ :: Rule t+ -> Seq (Rule t)+family rule = State.evalState (getAncestors rule) Set.empty++-- | Gets all the ancestor 'Rule's of a sequence of 'Rule'. Includes+-- each 'Rule' that is in the sequence. Skips duplicates.+families+ :: Seq (Rule t)+ -> Seq (Rule t)+families+ = join+ . flip State.evalState Set.empty+ . traverse getAncestors
+ lib/Pinchot/SyntaxTree.hs view
@@ -0,0 +1,113 @@+{-# OPTIONS_HADDOCK not-home #-}+{-# LANGUAGE TemplateHaskell #-}+-- | Grower - grows the types to hold a syntax tree++module Pinchot.SyntaxTree where++import Data.Foldable (toList)+import Data.Sequence (Seq)+import qualified Language.Haskell.TH as T++import Pinchot.NonEmpty+import Pinchot.Rules+import Pinchot.Types++-- | Makes the top-level declarations for each given 'Rule' and for+-- all ancestors of the given 'Rule's. Since ancestors are+-- included, you can get the entire tree of types that you need by+-- applying this function to a single start symbol. Example:+-- "Pinchot.Examples.SyntaxTrees".+syntaxTrees+ :: T.Name+ -- ^ Name of terminal type. Typically you will get this from the+ -- Template Haskell quoting mechanism, e.g. @''Char@.+ -> [T.Name]+ -- ^ What to derive, e.g. @[''Eq, ''Ord, ''Show]@+ -> Seq (Rule t)+ -> T.DecsQ+syntaxTrees term derives+ = traverse (ruleToType term derives)+ . toList+ . families++branchConstructor :: Branch t -> T.ConQ+branchConstructor (Branch nm rules) = T.normalC name fields+ where+ name = T.mkName nm+ mkField (Rule n _ _) = T.strictType T.notStrict+ [t| $(T.conT (T.mkName n)) $(charTypeVar) $(anyTypeVar) |]+ fields = toList . fmap mkField $ rules+ anyTypeVar = T.varT (T.mkName "a")+ charTypeVar = T.varT (T.mkName "t")++-- | Makes the top-level declaration for a given rule.+ruleToType+ :: T.Name+ -- ^ Name of terminal type+ -> [T.Name]+ -- ^ What to derive+ -> Rule t+ -> T.Q T.Dec+ruleToType typeName derives (Rule nm _ ruleType) = case ruleType of+ Terminal _ ->+ T.newtypeD (T.cxt []) name [charType, anyType] newtypeCon derives+ where+ newtypeCon = T.normalC name+ [T.strictType T.notStrict+ [t| ( $(charTypeVar), $(anyTypeVar) ) |] ]++ NonTerminal b1 bs -> T.dataD (T.cxt []) name [charType, anyType] cons derives+ where+ cons = branchConstructor b1 : toList (fmap branchConstructor bs)++ Wrap (Rule inner _ _) ->+ T.newtypeD (T.cxt []) name [charType, anyType] newtypeCon derives+ where+ newtypeCon = T.normalC name+ [ T.strictType T.notStrict+ [t| $(T.conT (T.mkName inner)) $(charTypeVar) $(anyTypeVar) |] ]++ Record sq -> T.dataD (T.cxt []) name [charType, anyType] [ctor] derives+ where+ ctor = T.recC name . zipWith mkField [(0 :: Int) ..] . toList $ sq+ mkField num (Rule rn _ _) = T.varStrictType (T.mkName fldNm)+ (T.strictType T.notStrict+ [t| $(T.conT (T.mkName rn)) $(charTypeVar) $(anyTypeVar) |])+ where+ fldNm = '_' : recordFieldName num nm rn++ Opt (Rule inner _ _) ->+ T.newtypeD (T.cxt []) name [charType, anyType] newtypeCon derives+ where+ newtypeCon = T.normalC name+ [T.strictType T.notStrict+ [t| Maybe ( $(T.conT (T.mkName inner)) $(charTypeVar)+ $(anyTypeVar)) |]]++ Star (Rule inner _ _) ->+ T.newtypeD (T.cxt []) name [charType, anyType] newtypeCon derives+ where+ newtypeCon = T.normalC name [sq]+ where+ sq = T.strictType T.notStrict+ [t| Seq ( $(T.conT (T.mkName inner)) $(charTypeVar)+ $(anyTypeVar) ) |]++ Plus (Rule inner _ _) ->+ T.newtypeD (T.cxt []) name [charType, anyType] cons derives+ where+ cons = T.normalC name [ne]+ where+ ne = T.strictType T.notStrict [t| NonEmpty $(ins) |]+ where+ ins = [t| $(T.conT (T.mkName inner))+ $(charTypeVar) $(anyTypeVar) |]++ where+ name = T.mkName nm+ anyType = T.PlainTV (T.mkName "a")+ anyTypeVar = T.varT (T.mkName "a")+ charType = T.PlainTV (T.mkName "t")+ charTypeVar = T.varT (T.mkName "t")++
+ lib/Pinchot/SyntaxTree/Optics.hs view
@@ -0,0 +1,246 @@+{-# LANGUAGE TemplateHaskell #-}+module Pinchot.SyntaxTree.Optics where++import Data.Coerce (coerce)+import Data.Foldable (toList)+import Data.Maybe (catMaybes)+import Data.Sequence (Seq)+import qualified Control.Lens as Lens+import qualified Language.Haskell.TH as T+import qualified Language.Haskell.TH.Syntax as Syntax++import Pinchot.Rules+import Pinchot.Types+import Pinchot.Intervals++-- | Creates optics declarations for a 'Rule', if optics can+-- be made for the 'Rule':+--+-- * 'Pinchot.terminal' gets a single 'Lens.Prism'+--+-- * 'Pinchot.nonTerminal' gets a 'Lens.Prism' for each constructor+--+-- * 'Pinchot.record' gets a single 'Lens.Lens'+--+-- * 'Pinchot.wrap', 'Pinchot.opt', 'Pinchot.star',+-- and 'Pinchot.plus' do not get optics.+--+-- Each rule in the sequence of 'Rule', as well as all ancestors of+-- those 'Rule's, will be handled.+--+-- Example: "Pinchot.Examples.RulesToOptics".+rulesToOptics+ :: Syntax.Lift t+ => Qualifier+ -- ^ Qualifier for module containing the data types that will get+ -- optics+ -> T.Name+ -- ^ Type name for the terminal+ -> Seq (Rule t)+ -> T.Q [T.Dec]+rulesToOptics qual termName+ = fmap concat+ . traverse (ruleToOptics qual termName)+ . families++-- | Creates optics declarations for a single 'Rule', if optics can+-- be made for the 'Rule':+--+-- * 'Terminal' gets a single 'Lens.Prism'+--+-- * 'NonTerminal' gets a 'Lens.Prism' for each constructor+--+-- * 'Terminals' gets a single 'Lens.Prism'+--+-- * 'Record' gets a single 'Lens.Lens'+--+-- * 'Wrap', 'Opt', 'Star', and 'Plus' do not get optics.+ruleToOptics+ :: Syntax.Lift t+ => Qualifier+ -- ^ Qualifier for module containing the data type that will get+ -- optics+ -> T.Name+ -- ^ Type name for the terminal+ -> Rule t+ -> T.Q [T.Dec]+ruleToOptics qual termName (Rule nm _ ty) = case ty of+ Terminal ivls -> terminalToOptics qual termName nm ivls+ NonTerminal b1 bs -> sequence $ nonTerminalToOptics qual nm b1 bs+ Record sq -> sequence $ recordsToOptics qual nm sq+ _ -> return []+ ++-- | Creates a prism for a terminal type. Although a newtype wraps+-- each terminal, do not make a Wrapped or an Iso, because the+-- relationship between the outer type and the type that it wraps+-- typically is not isometric. Thus, use a Prism instead, which+-- captures this relationship properly.+terminalToOptics+ :: Syntax.Lift t+ => Qualifier+ -- ^ Qualifier for module containing the data type that will get+ -- optics+ -> T.Name+ -- ^ Terminal type name+ -> String+ -- ^ Rule name+ -> Intervals t+ -> T.Q [T.Dec]+terminalToOptics qual termName nm ivls = do+ e1 <- T.sigD (T.mkName ('_':nm))+ $ T.forallT [ T.PlainTV (T.mkName "a")] (return [])+ [t| Lens.Prism' ( $(T.conT termName), $(anyType) )+ ($(T.conT (quald qual nm)) $(T.conT termName) $(anyType))+ |]+ + e2 <- T.valD prismName (T.normalB expn) []+ return [e1, e2]+ where+ anyType = T.varT (T.mkName "a")+ charType = T.varT (T.mkName "t")+ prismName = T.varP (T.mkName ('_' : nm))+ fetchPat = T.conP (quald qual nm) [T.varP (T.mkName "_x")]+ fetchName = T.varE (T.mkName "_x")+ ctor = T.conE (quald qual nm)+ expn = [| let fetch $fetchPat = $fetchName+ store (term, a)+ | inIntervals ivls term = Just ($(ctor) (term, a))+ | otherwise = Nothing+ in Lens.prism' fetch store+ |]++-- | Creates prisms for each 'Branch'.+nonTerminalToOptics+ :: Qualifier+ -- ^ Qualifier for module containing the data type that will get+ -- optics+ -> String+ -- ^ Rule name+ -> Branch t+ -> Seq (Branch t)+ -> [T.Q T.Dec]+nonTerminalToOptics qual nm b1 bsSeq+ = concat $ makePrism b1 : fmap makePrism bs+ where+ bs = toList bsSeq+ makePrism (Branch inner rulesSeq) = [ signature, binding ]+ where+ charType = T.varT (T.mkName "t")+ anyType = T.varT (T.mkName "a")+ rules = toList rulesSeq+ prismName = T.mkName ('_' : inner)+ signature = T.sigD prismName+ (forallA [t| Lens.Prism'+ ($(T.conT (quald qual nm)) $(charType) $(anyType))+ $(fieldsType) |])+ where+ fieldsType = case rules of+ [] -> T.tupleT 0+ Rule r1 _ _ : [] -> [t| $(T.conT (quald qual r1))+ $(charType) $(anyType) |]+ rs -> foldl addType (T.tupleT (length rs)) rs+ where+ addType soFar (Rule r _ _) = soFar `T.appT`+ [t| $(T.conT (quald qual r)) $(charType) $(anyType) |]+ binding = T.valD (T.varP prismName) body []+ where+ body = T.normalB+ $ (T.varE 'Lens.prism)+ `T.appE` setter+ `T.appE` getter+ where+ setter = T.lamE [pat] expn+ where+ (pat, expn) = case rules of+ [] -> (T.tupP [], T.conE (quald qual inner))+ _ : [] -> (T.varP local,+ T.conE (quald qual inner)+ `T.appE` T.varE local)+ where+ local = T.mkName "_x"+ ls -> (T.tupP pats, set)+ where+ pats = fmap (\i -> T.varP (T.mkName ("_x" ++ show i)))+ . take (length ls) $ [(0 :: Int) ..]+ set = foldl addVar start . take (length ls)+ $ [(0 :: Int) ..]+ where+ addVar acc i = acc `T.appE`+ (T.varE (T.mkName ("_x" ++ show i)))+ start = T.conE (quald qual inner)++ getter = T.lamE [pat] expn+ where+ local = T.mkName "_x"+ pat = T.varP local+ expn = T.caseE (T.varE (T.mkName "_x")) $+ T.match patCtor bodyCtor []+ : rest+ where+ patCtor = T.conP (quald qual inner)+ . fmap (\i -> T.varP (T.mkName $ "_y" ++ show i))+ . take (length rules)+ $ [(0 :: Int) ..]+ bodyCtor = T.normalB . (T.conE 'Right `T.appE`)+ $ case rules of+ [] -> T.tupE []+ _:[] -> T.varE (T.mkName "_y0")+ _ -> T.tupE+ . fmap (\i -> T.varE (T.mkName $ "_y" ++ show i))+ . take (length rules)+ $ [(0 :: Int) ..]+ rest = case bs of+ [] -> []+ _ -> [T.match patBlank bodyBlank []]+ where+ patBlank = T.varP (T.mkName "_z")+ bodyBlank = T.normalB+ $ T.conE ('Left)+ `T.appE` T.varE (T.mkName "_z")++recordsToOptics+ :: Qualifier+ -- ^ Qualifier for module containing the data type that will get+ -- optics+ -> String+ -- ^ Rule name+ -> Seq (Rule t)+ -> [T.Q T.Dec]+recordsToOptics qual nm+ = concat . zipWith makeLens [(0 :: Int) ..] . toList+ where+ makeLens index (Rule inner _ _) = [ signature, function ]+ where+ charType = T.varT (T.mkName "t")+ anyType = T.varT (T.mkName "a")+ fieldNm = recordFieldName index nm inner+ lensName = T.mkName fieldNm+ signature = T.sigD lensName (forallA+ [t| Lens.Lens' ($(T.conT (quald qual nm)) $(charType) $(anyType))+ ($(T.conT (quald qual inner)) $(charType) $(anyType))+ |])++ function = T.funD lensName [T.clause [] (T.normalB body) []]+ where+ namedRec = T.mkName "_namedRec"+ namedNewVal = T.mkName "_namedNewVal"+ body = (T.varE 'Lens.lens) `T.appE` getter `T.appE` setter+ where+ getter = T.lamE [pat] expn+ where+ pat = T.varP namedRec+ expn = (T.varE (quald qual ('_' : fieldNm)))+ `T.appE` (T.varE namedRec)++ setter = T.lamE [patRec, patNewVal] expn+ where+ patRec = T.varP namedRec+ patNewVal = T.varP namedNewVal+ expn = T.recUpdE (T.varE namedRec)+ [ return ( quald qual ('_' : fieldNm)+ , T.VarE namedNewVal) ]++forallA :: T.TypeQ -> T.TypeQ+forallA = T.forallT [ T.PlainTV (T.mkName "t")+ , T.PlainTV (T.mkName "a")] (return [])
+ lib/Pinchot/SyntaxTree/Wrappers.hs view
@@ -0,0 +1,161 @@+{-# LANGUAGE TemplateHaskell #-}+module Pinchot.SyntaxTree.Wrappers where++import Data.Foldable (toList)+import Data.Maybe (catMaybes)+import Data.Sequence (Seq)+import qualified Control.Lens as Lens+import qualified Language.Haskell.TH as T++import Pinchot.NonEmpty+import Pinchot.Rules+import Pinchot.Types++-- # Wrapped++-- | Creates a 'Lens.Wrapped' instance for each 'Rule' and its+-- ancestors, if there is an instance.+-- Only 'Pinchot.terminal', 'Pinchot.wrap',+-- 'Pinchot.opt', 'Pinchot.star', and 'Pinchot.plus'+-- get instances of 'Lens.Wrapped'.+--+-- This must be+-- spliced in the same module in which the syntax tree types are+-- created; this way, no orphans are created. Since ancestors are+-- included, you can get the entire tree of types that you need by+-- applying this function to a single start symbol.+--+-- Example: "Pinchot.Examples.SyntaxTrees".++wrappedInstances+ :: Seq (Rule t)+ -> T.DecsQ+wrappedInstances+ = sequence+ . catMaybes+ . toList+ . fmap singleWrappedInstance+ . families++-- | Creates a 'Lens.Wrapped' instance for the 'Rule', if there is+-- one. Only 'Pinchot.terminal', 'Pinchot.wrap',+-- 'Pinchot.opt', 'Pinchot.star', and 'Pinchot.plus'+-- get instances of 'Wrapped'.+-- 'This must be spliced in the same module in which the+-- syntax tree types are created.++singleWrappedInstance+ :: Rule t+ -> Maybe (T.Q T.Dec)+singleWrappedInstance (Rule nm _ ty) = case ty of+ Terminal _ -> Just $ wrappedTerminal nm+ Wrap (Rule inner _ _) -> Just $ wrappedWrap inner nm+ Opt (Rule inner _ _) -> Just $ wrappedOpt inner nm+ Star (Rule inner _ _) -> Just $ wrappedStar inner nm+ Plus (Rule inner _ _) -> Just $ wrappedPlus inner nm+ _ -> Nothing+++makeWrapped+ :: T.TypeQ+ -- ^ Name of wrapped type+ -> String+ -- ^ Name of wrapper type+ -> T.Q T.Dec+makeWrapped wrappedType nm = T.instanceD (return []) typ decs+ where+ name = T.mkName nm+ local = T.mkName "_x"+ typ = (T.conT ''Lens.Wrapped) `T.appT`+ ((T.conT name)+ `T.appT` (T.varT (T.mkName "t"))+ `T.appT` (T.varT (T.mkName "a")))+ decs = [assocType, wrapper]+ where+ assocType = T.tySynInstD ''Lens.Unwrapped+ (T.tySynEqn [T.conT name+ `T.appT` (T.varT (T.mkName "t"))+ `T.appT` (T.varT (T.mkName "a"))]+ wrappedType)+ wrapper = T.funD 'Lens._Wrapped'+ [T.clause [] (T.normalB body) []]+ where+ body = (T.varE 'Lens.iso)+ `T.appE` unwrap+ `T.appE` doWrap+ where+ unwrap = T.lamE [lambPat] (T.varE local)+ where+ lambPat = T.conP name [T.varP local]+ doWrap = T.lamE [lambPat] expn+ where+ expn = (T.conE name)+ `T.appE` (T.varE local)+ lambPat = T.varP local++wrappedOpt+ :: String+ -- ^ Wrapped rule name+ -> String+ -- ^ Wrapping Rule name+ -> T.Q T.Dec+wrappedOpt wrappedName = makeWrapped maybeName+ where+ maybeName = (T.conT ''Maybe)+ `T.appT`+ ((T.conT (T.mkName wrappedName))+ `T.appT` (T.varT (T.mkName "t"))+ `T.appT` (T.varT (T.mkName "a")))++wrappedTerminal+ :: String+ -- ^ Wrapper Rule name+ -> T.Q T.Dec+wrappedTerminal = makeWrapped+ [t| ( $(T.varT (T.mkName "t")), $(T.varT (T.mkName "a")) ) |]++wrappedTerminals+ :: String+ -- ^ Wrapper Rule name+ -> T.Q T.Dec+wrappedTerminals = makeWrapped+ [t| Seq ( $(T.varT (T.mkName "t")), $(T.varT (T.mkName "a")) ) |]++wrappedStar+ :: String+ -- ^ Wrapped rule name+ -> String+ -- ^ Wrapping Rule name+ -> T.Q T.Dec+wrappedStar wrappedName = makeWrapped innerName+ where+ innerName = (T.conT ''Seq) `T.appT`+ ((T.conT (T.mkName wrappedName))+ `T.appT` (T.varT (T.mkName "t"))+ `T.appT` (T.varT (T.mkName "a")))++wrappedPlus+ :: String+ -- ^ Wrapped rule name+ -> String+ -- ^ Wrapping Rule name+ -> T.Q T.Dec+wrappedPlus wrappedName = makeWrapped tupName+ where+ tupName = T.conT ''NonEmpty+ `T.appT` ((T.conT (T.mkName wrappedName))+ `T.appT` (T.varT (T.mkName "t"))+ `T.appT` (T.varT (T.mkName "a")))++wrappedWrap+ :: String+ -- ^ Wrapped rule name+ -> String+ -- ^ Wrapping Rule name+ -> T.Q T.Dec+wrappedWrap wrappedName = makeWrapped innerName+ where+ innerName =+ ((T.conT (T.mkName wrappedName))+ `T.appT` (T.varT (T.mkName "t"))+ `T.appT` (T.varT (T.mkName "a")))
+ lib/Pinchot/Terminalize.hs view
@@ -0,0 +1,323 @@+{-# OPTIONS_HADDOCK not-home #-}+{-# LANGUAGE TemplateHaskell #-}+module Pinchot.Terminalize where++import Control.Monad (join)+import Data.Sequence (Seq)+import qualified Data.Sequence as Seq+import Data.Foldable (foldlM, toList)+import Data.Map (Map)+import qualified Data.Map as Map+import qualified Language.Haskell.TH as T+import qualified Language.Haskell.TH.Syntax as Syntax++import Pinchot.NonEmpty (NonEmpty(NonEmpty))+import qualified Pinchot.NonEmpty as NonEmpty+import Pinchot.Types+import Pinchot.Rules++-- | For all the given rules and their ancestors, creates+-- declarations that reduce the rule and all its ancestors to+-- terminal symbols. Each rule gets a declaration named+-- @t'RULE_NAME@ where @RULE_NAME@ is the name of the rule. The+-- type of the declaration is either+--+-- Production a -> Seq (t, a)+--+-- or+--+-- Production a -> NonEmpty (t, a)+--+-- where @Production@ is the production corresponding to the given+-- 'Rule', @t@ is the terminal token type (often 'Char'), and @a@ is+-- arbitrary metadata about each token (often 'Loc'). 'NonEmpty' is+-- returned for productions that must always contain at least one+-- terminal symbol; for those that can be empty, 'Seq' is returned.+--+-- Example: "Pinchot.Examples.Terminalize".+terminalizers+ :: Qualifier+ -- ^ Qualifier for the module containing the data types created+ -- from the 'Rule's+ + -> T.Name+ -- ^ Name of terminal type. Typically you will get this through+ -- the Template Haskell quoting mechanism, such as @''Char@.++ -> Seq (Rule t)+ -> T.Q [T.Dec]++terminalizers qual termType+ = fmap concat+ . traverse (terminalizer qual termType)+ . toList+ . families++-- | For the given rule, creates declarations that reduce the rule+-- to terminal symbols. No ancestors are handled. Each rule gets a+-- declaration named @t'RULE_NAME@ where @RULE_NAME@ is the name of+-- the rule. The+-- type of the declaration is either+--+-- Production a -> Seq (t, a)+--+-- or+--+-- Production a -> NonEmpty (t, a)+--+-- where @Production@ is the production corresponding to the given+-- 'Rule', @t@ is the terminal token type (often 'Char'), and @a@ is+-- arbitrary metadata about each token (often 'Loc'). 'NonEmpty' is+-- returned for productions that must always contain at least one+-- terminal symbol; for those that can be empty, 'Seq' is returned.++terminalizer+ :: Qualifier+ -- ^ Qualifier for the module containing the data types created+ -- from the 'Rule's+ + -> T.Name+ -- ^ Name of terminal type. Typically you will get this through+ -- the Template Haskell quoting mechanism, such as @''Char@.++ -> Rule t+ -> T.Q [T.Dec]++terminalizer qual termType rule@(Rule nm _ _) = sequence [sig, expn]+ where+ declName = "t'" ++ nm+ anyType = T.varT (T.mkName "a")+ charType = T.varT (T.mkName "t")+ sig+ | atLeastOne rule = T.sigD (T.mkName declName)+ . T.forallT [T.PlainTV (T.mkName "t")+ , T.PlainTV (T.mkName "a")] (return [])+ $ [t| $(T.conT (quald qual nm)) $(charType) $(anyType)+ -> NonEmpty ($(charType), $(anyType)) |]+ | otherwise = T.sigD (T.mkName declName)+ . T.forallT [ T.PlainTV (T.mkName "t")+ , T.PlainTV (T.mkName "a")] (return [])+ $ [t| $(T.conT (quald qual nm)) $(charType) $(anyType)+ -> Seq ($(charType), $(anyType)) |]+ expn = T.valD (T.varP $ T.mkName declName)+ (T.normalB (terminalizeRuleExp qual rule)) []++-- | For the given rule, returns an expression that has type of+-- either+--+-- Production a -> Seq (t, a)+--+-- or+--+-- Production a -> NonEmpty (t, a)+--+-- where @Production@ is the production corresponding to the given+-- 'Rule', and @t@ is the terminal token type. 'NonEmpty' is+-- returned for productions that must always contain at least one+-- terminal symbol; for those that can be empty, 'Seq' is returned.+--+-- Example: 'Pinchot.Examples.Terminalize.terminalizeAddress'.+terminalizeRuleExp+ :: Qualifier+ -> Rule t+ -> T.Q T.Exp+terminalizeRuleExp qual rule@(Rule nm _ _) = do+ let allRules = family rule + lkp <- ruleLookupMap allRules+ let mkDec r@(Rule rn _ _) =+ let expn = terminalizeSingleRule qual lkp r+ decName = lookupName lkp rn+ in T.valD (T.varP decName) (T.normalB expn) []+ T.letE (fmap mkDec . toList $ allRules) (T.varE (lookupName lkp nm))++-- | Creates a 'Map' where each key is the name of the 'Rule' and+-- each value is a name corresponding to that 'Rule'. No+-- ancestors are used.+ruleLookupMap+ :: Foldable c+ => c (Rule t)+ -> T.Q (Map RuleName (T.Name))+ruleLookupMap = foldlM f Map.empty+ where+ f mp (Rule nm _ _) = do+ name <- T.newName $ "rule" ++ nm+ return $ Map.insert nm name mp++lookupName+ :: Map RuleName T.Name+ -> RuleName+ -> T.Name+lookupName lkp n = case Map.lookup n lkp of+ Nothing -> error $ "lookupName: name not found: " ++ n+ Just r -> r++-- | For the given rule, returns an expression that has type+-- of either+--+-- Production a -> Seq (t, a)+--+-- or+--+-- Production a -> NonEmpty (t, a)+--+-- where @Production@ is the production corresponding to the given+-- 'Rule', and @t@ is the terminal token type. 'NonEmpty' is+-- returned for productions that must always contain at least one+-- terminal symbol; for those that can be empty, 'Seq' is returned.+-- Gets no ancestors.+terminalizeSingleRule+ :: Qualifier+ -- ^ Module qualifier for module containing the generated types+ -- corresponding to all 'Rule's+ -> Map RuleName T.Name+ -- ^ For a given Rule, looks up the name of the expression that+ -- will terminalize that rule.+ -> Rule t+ -> T.Q T.Exp+terminalizeSingleRule qual lkp rule@(Rule nm _ ty) = case ty of+ Terminal _ -> do+ x <- T.newName "x"+ let pat = T.conP (quald qual nm) [T.varP x]+ [| \ $(pat) -> NonEmpty.singleton $(T.varE x) |]++ NonTerminal b1 bs -> do+ x <- T.newName "x"+ let fTzn | atLeastOne rule = terminalizeProductAtLeastOne+ | otherwise = terminalizeProductAllowsZero+ tzr (Branch name sq)+ = fmap (\(pat, expn) -> T.match pat (T.normalB expn) [])+ (fTzn qual lkp name sq)+ m1 <- tzr b1+ ms <- traverse tzr . toList $ bs+ T.lamE [T.varP x] (T.caseE (T.varE x) (m1 : ms))++ Wrap (Rule inner _ _) -> do+ x <- T.newName "x"+ let pat = T.conP (quald qual nm) [T.varP x]+ [| \ $(pat) -> $(T.varE (lookupName lkp inner)) $(T.varE x) |]++ Record rs -> do+ (pat, expn) <- fTzr qual lkp nm rs+ [| \ $(pat) -> $(expn) |]+ where+ fTzr | atLeastOne rule = terminalizeProductAtLeastOne+ | otherwise = terminalizeProductAllowsZero++ Opt r@(Rule inner _ _) -> do+ x <- T.newName "x"+ let pat = T.conP (quald qual nm) [T.varP x]+ [| \ $(pat) -> maybe Seq.empty+ $(convert (T.varE (lookupName lkp inner))) $(T.varE x) |]+ where+ convert expn | atLeastOne r = [| NonEmpty.flatten . $(expn) |]+ | otherwise = expn++ Star r@(Rule inner _ _) -> do+ x <- T.newName "x"+ let pat = T.conP (quald qual nm) [T.varP x]+ convert e | atLeastOne r = [| NonEmpty.flatten . $(e) |]+ | otherwise = e+ [| \ $(pat) -> join . fmap $(convert (T.varE (lookupName lkp inner)))+ $ $(T.varE x) |]++ Plus r@(Rule inner _ _)+ | atLeastOne r -> do+ x <- T.newName "x"+ let pat = T.conP (quald qual nm) [T.varP x]+ [| \ $(pat) ->+ let getTermNonEmpty = $(T.varE (lookupName lkp inner))+ getTerms (NonEmpty e1 es) = join . fmap getTermNonEmpty+ $ NonEmpty.NonEmpty e1 es+ in getTerms $(T.varE x)+ |]++ | otherwise -> do+ x <- T.newName "x"+ let pat = T.conP (quald qual nm) [T.varP x]+ [| let getTermSeq = $(T.varE (lookupName lkp inner))+ getTerms (NonEmpty e1 es) = getTermSeq e1+ `mappend` (join (fmap getTermSeq es))+ in getTerms $(T.varE x)+ |]++terminalizeProductAllowsZero+ :: Qualifier+ -> Map RuleName T.Name+ -> String+ -- ^ Rule name or branch name, as applicable+ -> Seq (Rule t)+ -> T.Q (T.PatQ, T.ExpQ)+terminalizeProductAllowsZero qual lkp name bs = do+ pairs <- fmap toList . traverse (terminalizeProductRule lkp) $ bs+ let pat = T.conP (quald qual name) (fmap (fst . snd) pairs)+ body = case pairs of+ [] -> [| Seq.empty |]+ x:xs -> foldl f start xs+ where+ f acc trip = [| $(acc) `mappend` $(procTrip trip) |]+ start = procTrip x+ procTrip (rule, (_, expn))+ | atLeastOne rule = [| NonEmpty.flatten $(expn) |]+ | otherwise = expn+ return (pat, body)++terminalizeProductAtLeastOne+ :: Qualifier+ -> Map RuleName T.Name+ -> String+ -- ^ Rule name or branch name, as applicable+ -> Seq (Rule t)+ -> T.Q (T.PatQ, T.ExpQ)+terminalizeProductAtLeastOne qual lkp name bs = do+ pairs <- fmap toList . traverse (terminalizeProductRule lkp) $ bs+ let pat = T.conP (quald qual name) (fmap (fst . snd) pairs)+ body = [| ( $(leadSeq) `NonEmpty.prependSeq` $(firstNonEmpty))+ `NonEmpty.appendSeq` $(trailSeq) |]+ where+ (leadRules, lastRules) = span (not . atLeastOne . fst) pairs+ (firstNonEmptyRule, trailRules) = case lastRules of+ [] -> error $ "terminalizeProductAtLeastOne: failure 1: " ++ name+ x:xs -> (x, xs)+ leadSeq = case fmap (snd . snd) leadRules of+ [] -> [| Seq.empty |]+ x:xs -> foldl f x xs+ where+ f acc expn = [| $(acc) `mappend` $(expn) |]+ firstNonEmpty = [| $(snd . snd $ firstNonEmptyRule) |]++ trailSeq = foldl f [| Seq.empty |] trailRules+ where+ f acc (rule, (_, expn))+ | atLeastOne rule =+ [| $(acc) `mappend` NonEmpty.flatten $(expn) |]+ | otherwise =+ [| $(acc) `mappend` $(expn) |]+ return (pat, body)++terminalizeProductRule+ :: Map RuleName T.Name+ -> Rule t+ -> T.Q (Rule t, (T.Q T.Pat, T.Q T.Exp))+terminalizeProductRule lkp r@(Rule nm _ _) = do+ x <- T.newName $ "terminalizeProductRule'" ++ nm+ let getTerms = [| $(T.varE (lookupName lkp nm)) $(T.varE x) |]+ return (r, (T.varP x, getTerms))++-- | Examines a rule to determine whether when terminalizing it will+-- always return at least one terminal symbol.+atLeastOne+ :: Rule t+ -> Bool+ -- ^ True if the rule will always have at least one terminal+ -- symbol.+atLeastOne (Rule _ _ ty) = case ty of+ Terminal _ -> True+ NonTerminal b1 bs -> branchAtLeastOne b1 && all branchAtLeastOne bs+ where+ branchAtLeastOne (Branch _ rs) = any atLeastOne rs+ Wrap r -> atLeastOne r+ Record rs -> any atLeastOne rs+ Opt _ -> False+ Star _ -> False+ Plus r -> atLeastOne r+
+ lib/Pinchot/Types.hs view
@@ -0,0 +1,180 @@+{-# OPTIONS_HADDOCK not-home #-}+module Pinchot.Types where++import Pinchot.Intervals++import qualified Control.Lens as Lens+import Data.Sequence (Seq)+import qualified Language.Haskell.TH as T++-- | Type synonym for the name of a production rule. This will be the+-- name of the type constructor for the corresponding type that will+-- be created, so this must be a valid Haskell type constructor name.+-- Typically each context-free grammar that you write will have+-- several production rules; you will want to make sure that every+-- 'RuleName' that you create for a single context-free grammar is+-- unique. However, Pinchot currently does not check for+-- uniqueness. If you use names that are not unique, GHC will give+-- an error message when you try to splice the resulting code, as+-- the data types will not have unique names.+type RuleName = String++-- | Type synonym the the name of an alternative in a 'nonTerminal'.+-- This name must not conflict with any other data constructor in+-- your grammar.+type BranchName = String++-- Rule n d t, where+--+-- n is the name of the rule. This is used as the name of the+-- corresponding data type.+--+-- d is the description of the rule. This is optional and is used for+-- the parser's error messages. If there is no description, the name+-- is used for error messages.+--+-- t is the type of rule (terminal, branch, etc.)++-- | A single production rule.+data Rule t = Rule+ { _ruleName :: RuleName+ , _ruleDescription :: Maybe String+ , _ruleType :: RuleType t+ } deriving (Eq, Ord, Show)++-- Can't use Template Haskell in this module due to corecursive+-- types++ruleName :: Lens.Lens' (Rule t) RuleName+ruleName+ = Lens.lens _ruleName (\r n -> r { _ruleName = n })++ruleDescription :: Lens.Lens' (Rule t) (Maybe String)+ruleDescription+ = Lens.lens _ruleDescription (\r d -> r { _ruleDescription = d })++ruleType :: Lens.Lens' (Rule t) (RuleType t)+ruleType+ = Lens.lens _ruleType (\r t -> r { _ruleType = t })++-- | A branch in a sum rule. In @Branch s ls@, @s@ is the name of the+-- data constructor, and @ls@ is the list of rules that this branch+-- produces.+data Branch t = Branch+ { _branchName :: BranchName+ , _branches :: Seq (Rule t)+ } deriving (Eq, Ord, Show)++branchName :: Lens.Lens' (Branch t) BranchName+branchName+ = Lens.lens _branchName (\b n -> b { _branchName = n })++branches :: Lens.Lens' (Branch t) (Seq (Rule t))+branches+ = Lens.lens _branches (\b s -> b { _branches = s})++-- | The type of a particular rule.+data RuleType t+ = Terminal (Intervals t)+ | NonTerminal (Branch t) (Seq (Branch t))+ | Wrap (Rule t)+ | Record (Seq (Rule t))+ | Opt (Rule t)+ | Star (Rule t)+ | Plus (Rule t)+ deriving (Eq, Ord, Show)++_Terminal :: Lens.Prism' (RuleType t) (Intervals t)+_Terminal = Lens.prism' (\i -> Terminal i)+ (\r -> case r of { Terminal i -> Just i; _ -> Nothing })++_NonTerminal :: Lens.Prism' (RuleType t) (Branch t, Seq (Branch t))+_NonTerminal = Lens.prism' (\(b, bs) -> NonTerminal b bs)+ (\r -> case r of { NonTerminal b bs -> Just (b, bs); _ -> Nothing })++_Wrap :: Lens.Prism' (RuleType t) (Rule t)+_Wrap = Lens.prism' (\r -> Wrap r)+ (\r -> case r of { Wrap x -> Just x; _ -> Nothing })++_Record :: Lens.Prism' (RuleType t) (Seq (Rule t))+_Record = Lens.prism' (\r -> Record r)+ (\r -> case r of { Record x -> Just x; _ -> Nothing })++_Opt :: Lens.Prism' (RuleType t) (Rule t)+_Opt = Lens.prism' (\r -> Opt r)+ (\r -> case r of { Opt x -> Just x; _ -> Nothing })++_Star :: Lens.Prism' (RuleType t) (Rule t)+_Star = Lens.prism' (\r -> Star r)+ (\r -> case r of { Star x -> Just x; _ -> Nothing })++_Plus :: Lens.Prism' (RuleType t) (Rule t)+_Plus = Lens.prism' (\r -> Plus r)+ (\r -> case r of { Plus x -> Just x; _ -> Nothing })++-- | The name of a field in a record, without the leading+-- underscore.+recordFieldName+ :: Int+ -- ^ Index+ -> String+ -- ^ Parent type name+ -> String+ -- ^ Inner type name+ -> String+recordFieldName idx par inn = "r'" ++ par ++ "'" ++ show idx ++ "'" ++ inn++-- | Many functions take an argument that holds the name qualifier+-- for the module that contains the data types created by applying a+-- function such as 'Pinchot.SyntaxTree.syntaxTrees' or+-- 'Pinchot.Earley.earleyProduct'.+--+-- You will have to make sure that these data types are in scope.+-- The spliced Template Haskell code has to know where to+-- look for these data types. If you did an unqualified @import@ or+-- if the types are in the same module as the function that takes a+-- 'Qualifier' argument, just pass the empty string here. If you did a+-- qualified import, use the appropriate qualifier here.+--+-- For example, if you used @import qualified MyAst@, pass+-- @\"MyAst\"@ here. If you used @import qualified+-- Data.MyLibrary.MyAst as MyLibrary.MyAst@, pass+-- @\"MyLibrary.MyAst\"@ here.+--+-- I recommend that you always create a new module and that all you+-- do in that module is apply 'Pinchot.SyntaxTree.syntaxTrees' or+-- 'Pinchot.Earley.earleyProduct', and that you then perform an @import+-- qualified@ to bring those names into scope in the module in which+-- you use a function that takes a 'Qualifier' argument. This+-- avoids unlikely, but possible, issues that could otherwise arise+-- due to naming conflicts.+type Qualifier = String+++-- | Prepends a qualifier to a string, and returns the resulting+-- Name.+quald+ :: Qualifier+ -> String+ -- ^ Item to be named - constructor, value, etc.+ -> T.Name+quald qual suf+ | null qual = T.mkName suf+ | otherwise = T.mkName (qual ++ '.':suf)++-- | A location.++data Loc = Loc+ { _line :: Int+ , _col :: Int+ , _pos :: Int+ } deriving (Eq, Ord, Read, Show)++line :: Lens.Lens' Loc Int+line = Lens.lens _line (\r l -> r { _line = l })++col :: Lens.Lens' Loc Int+col = Lens.lens _col (\r l -> r { _col = l })++pos :: Lens.Lens' Loc Int+pos = Lens.lens _pos (\r l -> r { _pos = l })
pinchot.cabal view
@@ -3,11 +3,11 @@ -- http://www.github.com/massysett/cartel -- -- Script name used to generate: genCabal.hs--- Generated on: 2016-03-04 16:15:31.455268 EST+-- Generated on: 2016-04-10 09:37:56.35801 EDT -- Cartel library version: 0.14.2.8 name: pinchot-version: 0.14.0.0+version: 0.16.0.0 cabal-version: >= 1.14 license: BSD3 license-file: LICENSE@@ -18,11 +18,10 @@ stability: Experimental homepage: http://www.github.com/massysett/pinchot bug-reports: http://www.github.com/massysett/pinchot/issues-synopsis: Build parsers and ASTs for context-free grammars+synopsis: Write grammars, not parsers description: Pinchot provides a simple language that you use to write a Haskell- program that describes a context-free grammar. When run, this program- creates a value representing the grammar. Using this value, you can+ value that describes a context-free grammar. Using this value, you can automatically generate data types corresponding to the grammar, as well as an Earley parser to parse strings in that grammar. .@@ -34,24 +33,33 @@ Library exposed-modules: Pinchot+ Pinchot.Earley Pinchot.Examples- Pinchot.Examples.AllEarleyGrammars Pinchot.Examples.AllRulesRecord- Pinchot.Examples.EarleyProduct+ Pinchot.Examples.Earley+ Pinchot.Examples.Newman Pinchot.Examples.Postal- Pinchot.Examples.PostalAstAllRules- Pinchot.Examples.PostalAstNoLenses- Pinchot.Examples.PostalAstRuleTree- Pinchot.Examples.QualifiedImport- Pinchot.Internal+ Pinchot.Examples.RulesToOptics+ Pinchot.Examples.SyntaxTrees+ Pinchot.Examples.Terminalize Pinchot.Intervals+ Pinchot.Locator+ Pinchot.NonEmpty+ Pinchot.RecursiveDo+ Pinchot.Rules+ Pinchot.SyntaxTree+ Pinchot.SyntaxTree.Optics+ Pinchot.SyntaxTree.Wrappers+ Pinchot.Terminalize+ Pinchot.Types build-depends: base >= 4.8.0.0 && < 5 , containers >= 0.5.6.2 , transformers >= 0.4.2.0 , template-haskell >= 2.10- , Earley >= 0.10.1.0+ , Earley >= 0.11.0.1 , lens >= 4.13+ , ListLike >= 4.2.1 other-extensions: TemplateHaskell default-language: Haskell2010@@ -62,126 +70,31 @@ type: git location: https://github.com/massysett/penny.git -Executable print-postal-grammar- main-is: print-postal-grammar.hs+Executable newman+ main-is: newman.hs if flag(executables) buildable: True other-modules: Pinchot+ Pinchot.Earley Pinchot.Examples- Pinchot.Examples.AllEarleyGrammars Pinchot.Examples.AllRulesRecord- Pinchot.Examples.EarleyProduct- Pinchot.Examples.Postal- Pinchot.Examples.PostalAstAllRules- Pinchot.Examples.PostalAstNoLenses- Pinchot.Examples.PostalAstRuleTree- Pinchot.Examples.QualifiedImport- Pinchot.Internal- Pinchot.Intervals- hs-source-dirs:- exe- build-depends:- base >= 4.8.0.0 && < 5- , containers >= 0.5.6.2- , transformers >= 0.4.2.0- , template-haskell >= 2.10- , Earley >= 0.10.1.0- , lens >= 4.13- other-extensions:- TemplateHaskell- default-language: Haskell2010- hs-source-dirs:- lib- else- buildable: False--Executable postal-parser- main-is: postal-parser.hs- if flag(executables)- buildable: True- other-modules:- Pinchot- Pinchot.Examples- Pinchot.Examples.AllEarleyGrammars- Pinchot.Examples.AllRulesRecord- Pinchot.Examples.EarleyProduct- Pinchot.Examples.Postal- Pinchot.Examples.PostalAstAllRules- Pinchot.Examples.PostalAstNoLenses- Pinchot.Examples.PostalAstRuleTree- Pinchot.Examples.QualifiedImport- Pinchot.Internal- Pinchot.Intervals- hs-source-dirs:- exe- build-depends:- pretty-show >= 1.6.9- , base >= 4.8.0.0 && < 5- , containers >= 0.5.6.2- , transformers >= 0.4.2.0- , template-haskell >= 2.10- , Earley >= 0.10.1.0- , lens >= 4.13- other-extensions:- TemplateHaskell- default-language: Haskell2010- hs-source-dirs:- lib- else- buildable: False--Executable parrot- main-is: parrot.hs- if flag(executables)- buildable: True- other-modules:- Pinchot- Pinchot.Examples- Pinchot.Examples.AllEarleyGrammars- Pinchot.Examples.AllRulesRecord- Pinchot.Examples.EarleyProduct- Pinchot.Examples.Postal- Pinchot.Examples.PostalAstAllRules- Pinchot.Examples.PostalAstNoLenses- Pinchot.Examples.PostalAstRuleTree- Pinchot.Examples.QualifiedImport- Pinchot.Internal- Pinchot.Intervals- hs-source-dirs:- exe- build-depends:- base >= 4.8.0.0 && < 5- , containers >= 0.5.6.2- , transformers >= 0.4.2.0- , template-haskell >= 2.10- , Earley >= 0.10.1.0- , lens >= 4.13- other-extensions:- TemplateHaskell- default-language: Haskell2010- hs-source-dirs:- lib- else- buildable: False--Executable parakeet- main-is: parakeet.hs- if flag(executables)- buildable: True- other-modules:- Pinchot- Pinchot.Examples- Pinchot.Examples.AllEarleyGrammars- Pinchot.Examples.AllRulesRecord- Pinchot.Examples.EarleyProduct+ Pinchot.Examples.Earley+ Pinchot.Examples.Newman Pinchot.Examples.Postal- Pinchot.Examples.PostalAstAllRules- Pinchot.Examples.PostalAstNoLenses- Pinchot.Examples.PostalAstRuleTree- Pinchot.Examples.QualifiedImport- Pinchot.Internal+ Pinchot.Examples.RulesToOptics+ Pinchot.Examples.SyntaxTrees+ Pinchot.Examples.Terminalize Pinchot.Intervals+ Pinchot.Locator+ Pinchot.NonEmpty+ Pinchot.RecursiveDo+ Pinchot.Rules+ Pinchot.SyntaxTree+ Pinchot.SyntaxTree.Optics+ Pinchot.SyntaxTree.Wrappers+ Pinchot.Terminalize+ Pinchot.Types hs-source-dirs: exe build-depends:@@ -189,8 +102,9 @@ , containers >= 0.5.6.2 , transformers >= 0.4.2.0 , template-haskell >= 2.10- , Earley >= 0.10.1.0+ , Earley >= 0.11.0.1 , lens >= 4.13+ , ListLike >= 4.2.1 other-extensions: TemplateHaskell default-language: Haskell2010