| Copyright | (c) Matthew Sackman Ivan Lazar Miljenovic |
|---|---|
| License | 3-Clause BSD-style |
| Maintainer | Ivan.Miljenovic@gmail.com |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Data.GraphViz.Parsing
Description
This module defines simple helper functions for use with Text.ParserCombinators.Poly.Lazy.
Note that the ParseDot instances for Bool, etc. match those
specified for use with Graphviz (e.g. non-zero integers are
equivalent to True).
You should not be using this module; rather, it is here for
informative/documentative reasons. If you want to parse a
, you should use
DotRepr rather than its parseDotGraphParseDot
instance.
Synopsis
- (<$) :: Functor f => a -> f b -> f a
- class Functor f => Applicative (f :: Type -> Type) where
- class Applicative f => Alternative (f :: Type -> Type) where
- newtype Const a (b :: k) = Const {
- getConst :: a
- newtype ZipList a = ZipList {
- getZipList :: [a]
- newtype WrappedMonad (m :: Type -> Type) a = WrapMonad {
- unwrapMonad :: m a
- newtype WrappedArrow (a :: Type -> Type -> Type) b c = WrapArrow {
- unwrapArrow :: a b c
- liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- liftA :: Applicative f => (a -> b) -> f a -> f b
- (<**>) :: Applicative f => f a -> f (a -> b) -> f b
- optional :: Alternative f => f a -> f (Maybe a)
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- reparse :: Text -> Parser s ()
- stGet :: Parser s s
- stQuery :: (s -> a) -> Parser s a
- stUpdate :: (s -> s) -> Parser s ()
- many1Satisfy :: (Char -> Bool) -> Parser s Text
- manySatisfy :: (Char -> Bool) -> Parser s Text
- onFail :: Parser s a -> Parser s a -> Parser s a
- satisfy :: (Char -> Bool) -> Parser s Char
- eof :: Parser s ()
- next :: Parser s Char
- newtype Parser s a = P (s -> Text -> Result (Text, s) a)
- data Result z a
- manyFinally' :: (PolyParse p, Show a) => p a -> p z -> p [a]
- manyFinally :: PolyParse p => p a -> p z -> p [a]
- bracket :: PolyParse p => p bra -> p ket -> p a -> p a
- bracketSep :: PolyParse p => p bra -> p sep -> p ket -> p a -> p [a]
- sepBy1 :: PolyParse p => p a -> p sep -> p [a]
- sepBy :: PolyParse p => p a -> p sep -> p [a]
- many1 :: PolyParse p => p a -> p [a]
- upto :: PolyParse p => Int -> p a -> p [a]
- exactly :: PolyParse p => Int -> p a -> p [a]
- oneOf :: PolyParse p => [p a] -> p a
- adjustErrBad :: PolyParse p => p a -> (String -> String) -> p a
- failBad :: PolyParse p => String -> p a
- discard :: PolyParse p => p a -> p b -> p a
- apply :: PolyParse p => p (a -> b) -> p a -> p b
- class Commitment (p :: Type -> Type) where
- class (Functor p, Monad p, MonadFail p, Applicative p, Alternative p, Commitment p) => PolyParse (p :: Type -> Type)
- type Parse a = Parser GraphvizState a
- class ParseDot a where
- parseIt :: ParseDot a => Text -> (a, Text)
- parseIt' :: ParseDot a => Text -> a
- runParser :: Parse a -> Text -> (Either String a, Text)
- runParser' :: Parse a -> Text -> a
- runParserWith :: (GraphvizState -> GraphvizState) -> Parse a -> Text -> (Either String a, Text)
- parseLiberally :: GraphvizState -> GraphvizState
- checkValidParse :: Either String a -> a
- checkValidParseWithRest :: (Either String a, Text) -> a
- ignoreSep :: (a -> b -> c) -> Parse a -> Parse sep -> Parse b -> Parse c
- onlyBool :: Parse Bool
- quotelessString :: Parse Text
- stringBlock :: Parse Text
- numString :: Bool -> Parse Text
- isNumString :: Bool -> Text -> Bool
- isIntString :: Text -> Bool
- quotedString :: Parse Text
- parseEscaped :: Bool -> [Char] -> [Char] -> Parse Text
- parseAndSpace :: Parse a -> Parse a
- string :: String -> Parse ()
- strings :: [String] -> Parse ()
- character :: Char -> Parse Char
- parseStrictFloat :: Bool -> Parse Double
- parseSignedFloat :: Bool -> Parse Double
- noneOf :: [Char] -> Parse Char
- whitespace1 :: Parse ()
- whitespace :: Parse ()
- wrapWhitespace :: Parse a -> Parse a
- optionalQuotedString :: String -> Parse ()
- optionalQuoted :: Parse a -> Parse a
- quotedParse :: Parse a -> Parse a
- orQuote :: Parse Char -> Parse Char
- quoteChar :: Char
- newline :: Parse ()
- newline' :: Parse ()
- parseComma :: Parse ()
- parseEq :: Parse ()
- tryParseList :: ParseDot a => Parse [a]
- tryParseList' :: Parse [a] -> Parse [a]
- consumeLine :: Parse Text
- commaSep :: (ParseDot a, ParseDot b) => Parse (a, b)
- commaSepUnqt :: (ParseDot a, ParseDot b) => Parse (a, b)
- commaSep' :: Parse a -> Parse b -> Parse (a, b)
- stringRep :: a -> String -> Parse a
- stringReps :: a -> [String] -> Parse a
- stringParse :: [(String, Parse a)] -> Parse a
- stringValue :: [(String, a)] -> Parse a
- parseAngled :: Parse a -> Parse a
- parseBraced :: Parse a -> Parse a
- parseColorScheme :: Bool -> Parse ColorScheme
Re-exporting pertinent parts of Polyparse.
class Functor f => Applicative (f :: Type -> Type) where #
Instances
| Applicative [] | |
| Applicative Maybe | |
| Applicative IO | |
| Applicative Par1 | |
| Applicative Q | |
| Applicative RGB | |
| Applicative DList | |
| Applicative Tree | |
| Applicative ZipList | |
| Applicative NonEmpty | |
| Applicative ReadPrec | |
| Applicative P | |
| Applicative ReadP | |
| Applicative Dual | |
| Applicative Product | |
| Applicative Sum | |
| Applicative Down | |
| Applicative First | |
| Applicative Last | |
| Applicative Identity | |
| Applicative DotCodeM Source # | |
| Applicative Put | |
| Applicative Seq | |
| Applicative STM | |
| Applicative (Either e) | |
| Applicative (U1 :: Type -> Type) | |
| Monoid a => Applicative ((,) a) | |
| Monad m => Applicative (WrappedMonad m) | |
Defined in Control.Applicative Methods pure :: a -> WrappedMonad m a # (<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b # liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c # (*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # (<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a # | |
| Applicative (Parser s) | |
Defined in Text.ParserCombinators.Poly.StateText | |
| Applicative (Proxy :: Type -> Type) | |
| Applicative (IParser t) | |
| Arrow a => Applicative (ArrowMonad a) | |
Defined in Control.Arrow Methods pure :: a0 -> ArrowMonad a a0 # (<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b # liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c # (*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b # (<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 # | |
| Applicative m => Applicative (ListT m) | |
| (Functor m, Monad m) => Applicative (MaybeT m) | |
| Applicative (DotM n) Source # | |
| Applicative f => Applicative (Rec1 f) | |
| Monoid m => Applicative (Const m :: Type -> Type) | |
| Arrow a => Applicative (WrappedArrow a b) | |
Defined in Control.Applicative Methods pure :: a0 -> WrappedArrow a b a0 # (<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 # liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c # (*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 # (<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 # | |
| Applicative f => Applicative (Alt f) | |
| Applicative f => Applicative (Ap f) | |
| (Functor m, Monad m) => Applicative (StateT s m) | |
Defined in Control.Monad.Trans.State.Lazy | |
| (Functor m, Monad m) => Applicative (ErrorT e m) | |
Defined in Control.Monad.Trans.Error | |
| (Functor m, Monad m) => Applicative (ExceptT e m) | |
Defined in Control.Monad.Trans.Except | |
| Applicative m => Applicative (IdentityT m) | |
Defined in Control.Monad.Trans.Identity | |
| Applicative m => Applicative (ReaderT r m) | |
Defined in Control.Monad.Trans.Reader | |
| (Functor m, Monad m) => Applicative (StateT s m) | |
Defined in Control.Monad.Trans.State.Strict | |
| (Monoid w, Applicative m) => Applicative (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.Strict | |
| (Monoid w, Applicative m) => Applicative (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.Lazy | |
| (Applicative f, Monad f) => Applicative (WhenMissing f x) | |
Defined in Data.IntMap.Internal Methods pure :: a -> WhenMissing f x a # (<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b # liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c # (*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b # (<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a # | |
| Applicative ((->) a :: Type -> Type) | |
| Monoid c => Applicative (K1 i c :: Type -> Type) | |
| (Applicative f, Applicative g) => Applicative (f :*: g) | |
| Applicative (ContT r m) | |
Defined in Control.Monad.Trans.Cont | |
| (Applicative f, Monad f) => Applicative (WhenMissing f k x) | |
Defined in Data.Map.Internal Methods pure :: a -> WhenMissing f k x a # (<*>) :: WhenMissing f k x (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b # liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c # (*>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b # (<*) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x a # | |
| (Monad f, Applicative f) => Applicative (WhenMatched f x y) | |
Defined in Data.IntMap.Internal Methods pure :: a -> WhenMatched f x y a # (<*>) :: WhenMatched f x y (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b # liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c # (*>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b # (<*) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y a # | |
| Applicative f => Applicative (M1 i c f) | |
| (Applicative f, Applicative g) => Applicative (f :.: g) | |
| (Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) | |
Defined in Control.Monad.Trans.RWS.Strict | |
| (Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) | |
Defined in Control.Monad.Trans.RWS.Lazy | |
| (Monad f, Applicative f) => Applicative (WhenMatched f k x y) | |
Defined in Data.Map.Internal Methods pure :: a -> WhenMatched f k x y a # (<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b # liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c # (*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b # (<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a # | |
class Applicative f => Alternative (f :: Type -> Type) where #
Minimal complete definition
empty, (<|>)
Instances
| Alternative [] | |
| Alternative Maybe | |
| Alternative IO | |
| Alternative DList | |
| Alternative ZipList | |
| Alternative ReadPrec | |
| Alternative P | |
| Alternative ReadP | |
| Alternative Seq | |
| Alternative STM | |
| Alternative (U1 :: Type -> Type) | |
| MonadPlus m => Alternative (WrappedMonad m) | |
Defined in Control.Applicative Methods empty :: WrappedMonad m a (<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a # some :: WrappedMonad m a -> WrappedMonad m [a] # many :: WrappedMonad m a -> WrappedMonad m [a] # | |
| Alternative (Parser s) | |
| Alternative (Proxy :: Type -> Type) | |
| ArrowPlus a => Alternative (ArrowMonad a) | |
| Applicative m => Alternative (ListT m) | |
| (Functor m, Monad m) => Alternative (MaybeT m) | |
| Alternative f => Alternative (Rec1 f) | |
| (ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b) | |
Defined in Control.Applicative Methods empty :: WrappedArrow a b a0 (<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 # some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] # many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] # | |
| Alternative f => Alternative (Alt f) | |
| Alternative f => Alternative (Ap f) | |
| (Functor m, MonadPlus m) => Alternative (StateT s m) | |
| (Functor m, Monad m, Error e) => Alternative (ErrorT e m) | |
| (Functor m, Monad m, Monoid e) => Alternative (ExceptT e m) | |
| Alternative m => Alternative (IdentityT m) | |
| Alternative m => Alternative (ReaderT r m) | |
| (Functor m, MonadPlus m) => Alternative (StateT s m) | |
| (Monoid w, Alternative m) => Alternative (WriterT w m) | |
| (Monoid w, Alternative m) => Alternative (WriterT w m) | |
| (Alternative f, Alternative g) => Alternative (f :*: g) | |
| Alternative f => Alternative (M1 i c f) | |