    {-# LANGUAGE OverloadedStrings #-}
    {-# OPTIONS_HADDOCK hide #-}
    {- |
       Module      : Data.GraphViz.Commands.Available
       Description : Available command-line programs
       Copyright   : (c) Ivan Lazar Miljenovic
       License     : 3-Clause BSD-style
       Maintainer  : Ivan.Miljenovic@gmail.com

       These are the known programs that read in Dot graphs.

     -}
    module Data.GraphViz.Commands.Available where

    import Data.GraphViz.Parsing
    import Data.GraphViz.Printing

    -- -----------------------------------------------------------------------------

    -- | The available Graphviz commands.  The following directions are
    --   based upon those in the Graphviz man page (available online at
    --   <http://graphviz.org/pdf/dot.1.pdf>, or if installed on your
    --   system @man graphviz@).  Note that any command can be used on
    --   both directed and undirected graphs.
    --
    --   When used with the 'Layout' attribute, it overrides any actual
    --   command called on the dot graph.
    data GraphvizCommand = Dot       -- ^ For hierachical graphs (ideal for
                                     --   directed graphs).
                         | Neato     -- ^ For symmetric layouts of graphs
                                     --   (ideal for undirected graphs).
                         | TwoPi     -- ^ For radial layout of graphs.
                         | Circo     -- ^ For circular layout of graphs.
                         | Fdp       -- ^ Spring-model approach for
                                     --   undirected graphs.
                         | Sfdp      -- ^ As with Fdp, but ideal for large
                                     --   graphs.
                         | Osage     -- ^ Filter for drawing clustered graphs,
                                     --   requires Graphviz >= 2.28.0.
                         | Patchwork -- ^ Draw clustered graphs as treemaps,
                                     --   requires Graphviz >= 2.28.0.
                         deriving (GraphvizCommand -> GraphvizCommand -> Bool
    (GraphvizCommand -> GraphvizCommand -> Bool)
    -> (GraphvizCommand -> GraphvizCommand -> Bool)
    -> Eq GraphvizCommand
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: GraphvizCommand -> GraphvizCommand -> Bool
    == :: GraphvizCommand -> GraphvizCommand -> Bool
    $c/= :: GraphvizCommand -> GraphvizCommand -> Bool
    /= :: GraphvizCommand -> GraphvizCommand -> Bool
    Eq, Eq GraphvizCommand
    Eq GraphvizCommand =>
    (GraphvizCommand -> GraphvizCommand -> Ordering)
    -> (GraphvizCommand -> GraphvizCommand -> Bool)
    -> (GraphvizCommand -> GraphvizCommand -> Bool)
    -> (GraphvizCommand -> GraphvizCommand -> Bool)
    -> (GraphvizCommand -> GraphvizCommand -> Bool)
    -> (GraphvizCommand -> GraphvizCommand -> GraphvizCommand)
    -> (GraphvizCommand -> GraphvizCommand -> GraphvizCommand)
    -> Ord GraphvizCommand
    GraphvizCommand -> GraphvizCommand -> Bool
    GraphvizCommand -> GraphvizCommand -> Ordering
    GraphvizCommand -> GraphvizCommand -> GraphvizCommand
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: GraphvizCommand -> GraphvizCommand -> Ordering
    compare :: GraphvizCommand -> GraphvizCommand -> Ordering
    $c< :: GraphvizCommand -> GraphvizCommand -> Bool
    < :: GraphvizCommand -> GraphvizCommand -> Bool
    $c<= :: GraphvizCommand -> GraphvizCommand -> Bool
    <= :: GraphvizCommand -> GraphvizCommand -> Bool
    $c> :: GraphvizCommand -> GraphvizCommand -> Bool
    > :: GraphvizCommand -> GraphvizCommand -> Bool
    $c>= :: GraphvizCommand -> GraphvizCommand -> Bool
    >= :: GraphvizCommand -> GraphvizCommand -> Bool
    $cmax :: GraphvizCommand -> GraphvizCommand -> GraphvizCommand
    max :: GraphvizCommand -> GraphvizCommand -> GraphvizCommand
    $cmin :: GraphvizCommand -> GraphvizCommand -> GraphvizCommand
    min :: GraphvizCommand -> GraphvizCommand -> GraphvizCommand
    Ord, GraphvizCommand
    GraphvizCommand -> GraphvizCommand -> Bounded GraphvizCommand
    forall a. a -> a -> Bounded a
    $cminBound :: GraphvizCommand
    minBound :: GraphvizCommand
    $cmaxBound :: GraphvizCommand
    maxBound :: GraphvizCommand
    Bounded, Int -> GraphvizCommand
    GraphvizCommand -> Int
    GraphvizCommand -> [GraphvizCommand]
    GraphvizCommand -> GraphvizCommand
    GraphvizCommand -> GraphvizCommand -> [GraphvizCommand]
    GraphvizCommand
    -> GraphvizCommand -> GraphvizCommand -> [GraphvizCommand]
    (GraphvizCommand -> GraphvizCommand)
    -> (GraphvizCommand -> GraphvizCommand)
    -> (Int -> GraphvizCommand)
    -> (GraphvizCommand -> Int)
    -> (GraphvizCommand -> [GraphvizCommand])
    -> (GraphvizCommand -> GraphvizCommand -> [GraphvizCommand])
    -> (GraphvizCommand -> GraphvizCommand -> [GraphvizCommand])
    -> (GraphvizCommand
        -> GraphvizCommand -> GraphvizCommand -> [GraphvizCommand])
    -> Enum GraphvizCommand
    forall a.
    (a -> a)
    -> (a -> a)
    -> (Int -> a)
    -> (a -> Int)
    -> (a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> a -> [a])
    -> Enum a
    $csucc :: GraphvizCommand -> GraphvizCommand
    succ :: GraphvizCommand -> GraphvizCommand
    $cpred :: GraphvizCommand -> GraphvizCommand
    pred :: GraphvizCommand -> GraphvizCommand
    $ctoEnum :: Int -> GraphvizCommand
    toEnum :: Int -> GraphvizCommand
    $cfromEnum :: GraphvizCommand -> Int
    fromEnum :: GraphvizCommand -> Int
    $cenumFrom :: GraphvizCommand -> [GraphvizCommand]
    enumFrom :: GraphvizCommand -> [GraphvizCommand]
    $cenumFromThen :: GraphvizCommand -> GraphvizCommand -> [GraphvizCommand]
    enumFromThen :: GraphvizCommand -> GraphvizCommand -> [GraphvizCommand]
    $cenumFromTo :: GraphvizCommand -> GraphvizCommand -> [GraphvizCommand]
    enumFromTo :: GraphvizCommand -> GraphvizCommand -> [GraphvizCommand]
    $cenumFromThenTo :: GraphvizCommand
    -> GraphvizCommand -> GraphvizCommand -> [GraphvizCommand]
    enumFromThenTo :: GraphvizCommand
    -> GraphvizCommand -> GraphvizCommand -> [GraphvizCommand]
    Enum, Int -> GraphvizCommand -> [Char] -> [Char]
    [GraphvizCommand] -> [Char] -> [Char]
    GraphvizCommand -> [Char]
    (Int -> GraphvizCommand -> [Char] -> [Char])
    -> (GraphvizCommand -> [Char])
    -> ([GraphvizCommand] -> [Char] -> [Char])
    -> Show GraphvizCommand
    forall a.
    (Int -> a -> [Char] -> [Char])
    -> (a -> [Char]) -> ([a] -> [Char] -> [Char]) -> Show a
    $cshowsPrec :: Int -> GraphvizCommand -> [Char] -> [Char]
    showsPrec :: Int -> GraphvizCommand -> [Char] -> [Char]
    $cshow :: GraphvizCommand -> [Char]
    show :: GraphvizCommand -> [Char]
    $cshowList :: [GraphvizCommand] -> [Char] -> [Char]
    showList :: [GraphvizCommand] -> [Char] -> [Char]
    Show, ReadPrec [GraphvizCommand]
    ReadPrec GraphvizCommand
    Int -> ReadS GraphvizCommand
    ReadS [GraphvizCommand]
    (Int -> ReadS GraphvizCommand)
    -> ReadS [GraphvizCommand]
    -> ReadPrec GraphvizCommand
    -> ReadPrec [GraphvizCommand]
    -> Read GraphvizCommand
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: Int -> ReadS GraphvizCommand
    readsPrec :: Int -> ReadS GraphvizCommand
    $creadList :: ReadS [GraphvizCommand]
    readList :: ReadS [GraphvizCommand]
    $creadPrec :: ReadPrec GraphvizCommand
    readPrec :: ReadPrec GraphvizCommand
    $creadListPrec :: ReadPrec [GraphvizCommand]
    readListPrec :: ReadPrec [GraphvizCommand]
    Read)

    instance PrintDot GraphvizCommand where
      unqtDot :: GraphvizCommand -> DotCode
    unqtDot GraphvizCommand
    Dot       = Text -> DotCode
    forall (m :: * -> *). Applicative m => Text -> m Doc
    text Text
    "dot"
      unqtDot GraphvizCommand
    Neato     = Text -> DotCode
    forall (m :: * -> *). Applicative m => Text -> m Doc
    text Text
    "neato"
      unqtDot GraphvizCommand
    TwoPi     = Text -> DotCode
    forall (m :: * -> *). Applicative m => Text -> m Doc
    text Text
    "twopi"
      unqtDot GraphvizCommand
    Circo     = Text -> DotCode
    forall (m :: * -> *). Applicative m => Text -> m Doc
    text Text
    "circo"
      unqtDot GraphvizCommand
    Fdp       = Text -> DotCode
    forall (m :: * -> *). Applicative m => Text -> m Doc
    text Text
    "fdp"
      unqtDot GraphvizCommand
    Sfdp      = Text -> DotCode
    forall (m :: * -> *). Applicative m => Text -> m Doc
    text Text
    "sfdp"
      unqtDot GraphvizCommand
    Osage     = Text -> DotCode
    forall (m :: * -> *). Applicative m => Text -> m Doc
    text Text
    "osage"
      unqtDot GraphvizCommand
    Patchwork = Text -> DotCode
    forall (m :: * -> *). Applicative m => Text -> m Doc
    text Text
    "patchwork"

    instance ParseDot GraphvizCommand where
      parseUnqt :: Parse GraphvizCommand
    parseUnqt = [([Char], GraphvizCommand)] -> Parse GraphvizCommand
    forall a. [([Char], a)] -> Parse a
    stringValue [ ([Char]
    "dot", GraphvizCommand
    Dot)
                              , ([Char]
    "neato", GraphvizCommand
    Neato)
                              , ([Char]
    "twopi", GraphvizCommand
    TwoPi)
                              , ([Char]
    "circo", GraphvizCommand
    Circo)
                              , ([Char]
    "fdp", GraphvizCommand
    Fdp)
                              , ([Char]
    "sfdp", GraphvizCommand
    Sfdp)
                              , ([Char]
    "osage", GraphvizCommand
    Osage)
                              , ([Char]
    "patchwork", GraphvizCommand
    Patchwork)
                              ]