Add instances for 'Tyepable'.
[packages/parsec.git] / Text / Parsec.hs
1 {-|
2 Module : Text.Parsec
3 Copyright : (c) Daan Leijen 1999-2001, (c) Paolo Martini 2007
4 License : BSD-style (see the LICENSE file)
5
6 Maintainer : aslatter@gmail.com
7 Stability : provisional
8 Portability : portable
9
10 This module includes everything you need to get started writing a
11 parser.
12
13 By default this module is set up to parse character data. If you'd like
14 to parse the result of your own tokenizer you should start with the following
15 imports:
16
17 @
18 import Text.Parsec.Prim
19 import Text.Parsec.Combinator
20 @
21
22 Then you can implement your own version of 'satisfy' on top of the 'tokenPrim'
23 primitive.
24
25 -}
26
27 module Text.Parsec
28 ( -- * Parsers
29 ParsecT
30 , Parsec
31 , token
32 , tokens
33 , runParserT
34 , runParser
35 , parse
36 , parseTest
37 , getPosition
38 , getInput
39 , getState
40 , putState
41 , modifyState
42 -- * Combinators
43 , (<|>)
44 , (<?>)
45 , label
46 , labels
47 , try
48 , unexpected
49 , choice
50 , many
51 , many1
52 , skipMany
53 , skipMany1
54 , count
55 , between
56 , option
57 , optionMaybe
58 , optional
59 , sepBy
60 , sepBy1
61 , endBy
62 , endBy1
63 , sepEndBy
64 , sepEndBy1
65 , chainl
66 , chainl1
67 , chainr
68 , chainr1
69 , eof
70 , notFollowedBy
71 , manyTill
72 , lookAhead
73 , anyToken
74 -- * Character Parsing
75 , module Text.Parsec.Char
76 -- * Error messages
77 , ParseError
78 , errorPos
79 -- * Position
80 , SourcePos
81 , SourceName, Line, Column
82 , sourceName, sourceLine, sourceColumn
83 , incSourceLine, incSourceColumn
84 , setSourceLine, setSourceColumn, setSourceName
85 -- * Low-level operations
86 , manyAccum
87 , tokenPrim
88 , tokenPrimEx
89 , runPT
90 , unknownError
91 , sysUnExpectError
92 , mergeErrorReply
93 , getParserState
94 , setParserState
95 , updateParserState
96 , Stream (..)
97 , runParsecT
98 , mkPT
99 , runP
100 , Consumed (..)
101 , Reply (..)
102 , State (..)
103 , setPosition
104 , setInput
105 -- * Other stuff
106 , setState
107 , updateState
108 , parsecMap
109 , parserReturn
110 , parserBind
111 , parserFail
112 , parserZero
113 , parserPlus
114 ) where
115
116 import Text.Parsec.Pos
117 import Text.Parsec.Error
118 import Text.Parsec.Prim
119 import Text.Parsec.Char
120 import Text.Parsec.Combinator