-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | packrat parser
--   
--   see examples directory
@package papillon
@version 0.1.0.5

module Text.Papillon.Core
papillonCore :: String -> DecsQ
class Source sl where {
    type family Token sl;
    data family Pos sl;
}
getToken :: Source sl => sl -> Maybe ((Token sl, sl))
initialPos :: Source sl => Pos sl
updatePos :: Source sl => Token sl -> Pos sl -> Pos sl
class SourceList c where {
    data family ListPos c;
}
listToken :: SourceList c => [c] -> Maybe ((c, [c]))
listInitialPos :: SourceList c => ListPos c
listUpdatePos :: SourceList c => c -> ListPos c -> ListPos c
data ParseError pos drv
mkParseError :: forall pos drv. String -> String -> String -> drv -> [String] -> pos -> ParseError pos drv
peDerivs :: ParseError pos drv -> drv
peReading :: ParseError pos drv -> ([String])
peMessage :: ParseError pos drv -> String
peCode :: ParseError pos drv -> String
peComment :: ParseError pos drv -> String
pePosition :: ParseError pos drv -> pos
pePositionS :: forall drv. ParseError (Pos String) drv -> (Int, Int)
papillonFile :: String -> Q ([PPragma], ModuleName, Maybe Exports, Code, DecsQ, Code)
data PPragma
LanguagePragma :: [String] -> PPragma
OtherPragma :: String -> PPragma
type ModuleName = [String]
type Exports = String
type Code = String

-- | Sequential application.
--   
--   A few functors support an implementation of <a>&lt;*&gt;</a> that is
--   more efficient than the default one.
(<*>) :: Applicative f => forall a b. () => f (a -> b) -> f a -> f b
infixl 4 <*>

-- | An infix synonym for <a>fmap</a>.
--   
--   The name of this operator is an allusion to <tt>$</tt>. Note the
--   similarities between their types:
--   
--   <pre>
--    ($)  ::              (a -&gt; b) -&gt;   a -&gt;   b
--   (&lt;$&gt;) :: Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
--   </pre>
--   
--   Whereas <tt>$</tt> is function application, <a>&lt;$&gt;</a> is
--   function application lifted over a <a>Functor</a>.
--   
--   <h4><b>Examples</b></h4>
--   
--   Convert from a <tt><tt>Maybe</tt> <tt>Int</tt></tt> to a
--   <tt><tt>Maybe</tt> <tt>String</tt></tt> using <tt>show</tt>:
--   
--   <pre>
--   &gt;&gt;&gt; show &lt;$&gt; Nothing
--   Nothing
--   
--   &gt;&gt;&gt; show &lt;$&gt; Just 3
--   Just "3"
--   </pre>
--   
--   Convert from an <tt><tt>Either</tt> <tt>Int</tt> <tt>Int</tt></tt> to
--   an <tt><tt>Either</tt> <tt>Int</tt></tt> <tt>String</tt> using
--   <tt>show</tt>:
--   
--   <pre>
--   &gt;&gt;&gt; show &lt;$&gt; Left 17
--   Left 17
--   
--   &gt;&gt;&gt; show &lt;$&gt; Right 17
--   Right "17"
--   </pre>
--   
--   Double each element of a list:
--   
--   <pre>
--   &gt;&gt;&gt; (*2) &lt;$&gt; [1,2,3]
--   [2,4,6]
--   </pre>
--   
--   Apply <tt>even</tt> to the second element of a pair:
--   
--   <pre>
--   &gt;&gt;&gt; even &lt;$&gt; (2,2)
--   (2,True)
--   </pre>
(<$>) :: Functor f => (a -> b) -> f a -> f b
infixl 4 <$>
runError :: forall err a. ErrorT err Identity a -> Either err a

module Text.Papillon
papillon :: QuasiQuoter
class Source sl where {
    type family Token sl;
    data family Pos sl;
}
getToken :: Source sl => sl -> Maybe ((Token sl, sl))
initialPos :: Source sl => Pos sl
updatePos :: Source sl => Token sl -> Pos sl -> Pos sl
class SourceList c where {
    data family ListPos c;
}
listToken :: SourceList c => [c] -> Maybe ((c, [c]))
listInitialPos :: SourceList c => ListPos c
listUpdatePos :: SourceList c => c -> ListPos c -> ListPos c
data ParseError pos drv
mkParseError :: forall pos drv. String -> String -> String -> drv -> [String] -> pos -> ParseError pos drv
peDerivs :: ParseError pos drv -> drv
peReading :: ParseError pos drv -> ([String])
peMessage :: ParseError pos drv -> String
peCode :: ParseError pos drv -> String
peComment :: ParseError pos drv -> String
pePosition :: ParseError pos drv -> pos
pePositionS :: forall drv. ParseError (Pos String) drv -> (Int, Int)

-- | Sequential application.
--   
--   A few functors support an implementation of <a>&lt;*&gt;</a> that is
--   more efficient than the default one.
(<*>) :: Applicative f => forall a b. () => f (a -> b) -> f a -> f b
infixl 4 <*>

-- | An infix synonym for <a>fmap</a>.
--   
--   The name of this operator is an allusion to <tt>$</tt>. Note the
--   similarities between their types:
--   
--   <pre>
--    ($)  ::              (a -&gt; b) -&gt;   a -&gt;   b
--   (&lt;$&gt;) :: Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
--   </pre>
--   
--   Whereas <tt>$</tt> is function application, <a>&lt;$&gt;</a> is
--   function application lifted over a <a>Functor</a>.
--   
--   <h4><b>Examples</b></h4>
--   
--   Convert from a <tt><tt>Maybe</tt> <tt>Int</tt></tt> to a
--   <tt><tt>Maybe</tt> <tt>String</tt></tt> using <tt>show</tt>:
--   
--   <pre>
--   &gt;&gt;&gt; show &lt;$&gt; Nothing
--   Nothing
--   
--   &gt;&gt;&gt; show &lt;$&gt; Just 3
--   Just "3"
--   </pre>
--   
--   Convert from an <tt><tt>Either</tt> <tt>Int</tt> <tt>Int</tt></tt> to
--   an <tt><tt>Either</tt> <tt>Int</tt></tt> <tt>String</tt> using
--   <tt>show</tt>:
--   
--   <pre>
--   &gt;&gt;&gt; show &lt;$&gt; Left 17
--   Left 17
--   
--   &gt;&gt;&gt; show &lt;$&gt; Right 17
--   Right "17"
--   </pre>
--   
--   Double each element of a list:
--   
--   <pre>
--   &gt;&gt;&gt; (*2) &lt;$&gt; [1,2,3]
--   [2,4,6]
--   </pre>
--   
--   Apply <tt>even</tt> to the second element of a pair:
--   
--   <pre>
--   &gt;&gt;&gt; even &lt;$&gt; (2,2)
--   (2,True)
--   </pre>
(<$>) :: Functor f => (a -> b) -> f a -> f b
infixl 4 <$>
runError :: forall err a. ErrorT err Identity a -> Either err a
