    -- File generated by the BNF Converter (bnfc 2.9.5).

    {-# LANGUAGE CPP #-}
    {-# LANGUAGE FlexibleInstances #-}
    {-# LANGUAGE LambdaCase #-}
    #if __GLASGOW_HASKELL__ <= 708
    {-# LANGUAGE OverlappingInstances #-}
    #endif

    -- | Pretty-printer for Language.

    module Language.SMV.PrintSMV where

    import Prelude
      ( ($), (.)
      , Bool(..), (==), (<)
      , Int, Integer, Double, (+), (-), (*)
      , String, (++)
      , ShowS, showChar, showString
      , all, elem, foldr, id, map, null, replicate, shows, span
      )
    import Data.Char ( Char, isSpace )
    import qualified Language.SMV.AbsSMV

    -- | The top-level printing method.

    printTree :: Print a => a -> String
    printTree :: forall a. Print a => a -> String
    printTree = Doc -> String
    render (Doc -> String) -> (a -> Doc) -> a -> String
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> a -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0

    type Doc = [ShowS] -> [ShowS]

    doc :: ShowS -> Doc
    doc :: ShowS -> Doc
    doc = (:)

    render :: Doc -> String
    render :: Doc -> String
    render Doc
    d = Int -> Bool -> [String] -> ShowS
    rend Int
    0 Bool
    False ((ShowS -> String) -> [ShowS] -> [String]
    forall a b. (a -> b) -> [a] -> [b]
    map (ShowS -> ShowS
    forall a b. (a -> b) -> a -> b
    $ String
    "") ([ShowS] -> [String]) -> [ShowS] -> [String]
    forall a b. (a -> b) -> a -> b
    $ Doc
    d []) String
    ""
      where
      rend
        :: Int        -- ^ Indentation level.
        -> Bool       -- ^ Pending indentation to be output before next character?
        -> [String]
        -> ShowS
      rend :: Int -> Bool -> [String] -> ShowS
    rend Int
    i Bool
    p = \case
          String
    "["      :[String]
    ts -> Char -> ShowS
    char Char
    '[' ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> Bool -> [String] -> ShowS
    rend Int
    i Bool
    False [String]
    ts
          String
    "("      :[String]
    ts -> Char -> ShowS
    char Char
    '(' ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> Bool -> [String] -> ShowS
    rend Int
    i Bool
    False [String]
    ts
          String
    "{"      :[String]
    ts -> Int -> Bool -> ShowS
    onNewLine Int
    i     Bool
    p ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Char -> ShowS
    showChar   Char
    '{'  ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> [String] -> ShowS
    new (Int
    iInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    1) [String]
    ts
          String
    "}" : String
    ";":[String]
    ts -> Int -> Bool -> ShowS
    onNewLine (Int
    iInt -> Int -> Int
    forall a. Num a => a -> a -> a
    -Int
    1) Bool
    p ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . String -> ShowS
    showString String
    "};" ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> [String] -> ShowS
    new (Int
    iInt -> Int -> Int
    forall a. Num a => a -> a -> a
    -Int
    1) [String]
    ts
          String
    "}"      :[String]
    ts -> Int -> Bool -> ShowS
    onNewLine (Int
    iInt -> Int -> Int
    forall a. Num a => a -> a -> a
    -Int
    1) Bool
    p ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Char -> ShowS
    showChar   Char
    '}'  ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> [String] -> ShowS
    new (Int
    iInt -> Int -> Int
    forall a. Num a => a -> a -> a
    -Int
    1) [String]
    ts
          [String
    ";"]        -> Char -> ShowS
    char Char
    ';'
          String
    ";"      :[String]
    ts -> Char -> ShowS
    char Char
    ';' ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> [String] -> ShowS
    new Int
    i [String]
    ts
          String
    t  : ts :: [String]
    ts@(String
    s:[String]
    _) | String -> Bool
    closingOrPunctuation String
    s
                       -> ShowS
    pending ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . String -> ShowS
    showString String
    t ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> Bool -> [String] -> ShowS
    rend Int
    i Bool
    False [String]
    ts
          String
    t        :[String]
    ts -> ShowS
    pending ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . String -> ShowS
    space String
    t      ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> Bool -> [String] -> ShowS
    rend Int
    i Bool
    False [String]
    ts
          []           -> ShowS
    forall a. a -> a
    id
        where
        -- Output character after pending indentation.
        char :: Char -> ShowS
        char :: Char -> ShowS
    char Char
    c = ShowS
    pending ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Char -> ShowS
    showChar Char
    c

        -- Output pending indentation.
        pending :: ShowS
        pending :: ShowS
    pending = if Bool
    p then Int -> ShowS
    indent Int
    i else ShowS
    forall a. a -> a
    id

      -- Indentation (spaces) for given indentation level.
      indent :: Int -> ShowS
      indent :: Int -> ShowS
    indent Int
    i = Int -> ShowS -> ShowS
    replicateS (Int
    2Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    i) (Char -> ShowS
    showChar Char
    ' ')

      -- Continue rendering in new line with new indentation.
      new :: Int -> [String] -> ShowS
      new :: Int -> [String] -> ShowS
    new Int
    j [String]
    ts = Char -> ShowS
    showChar Char
    '\n' ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> Bool -> [String] -> ShowS
    rend Int
    j Bool
    True [String]
    ts

      -- Make sure we are on a fresh line.
      onNewLine :: Int -> Bool -> ShowS
      onNewLine :: Int -> Bool -> ShowS
    onNewLine Int
    i Bool
    p = (if Bool
    p then ShowS
    forall a. a -> a
    id else Char -> ShowS
    showChar Char
    '\n') ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> ShowS
    indent Int
    i

      -- Separate given string from following text by a space (if needed).
      space :: String -> ShowS
      space :: String -> ShowS
    space String
    t String
    s =
        case ((Char -> Bool) -> String -> Bool
    forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool
    all Char -> Bool
    isSpace String
    t, String -> Bool
    forall a. [a] -> Bool
    forall (t :: * -> *) a. Foldable t => t a -> Bool
    null String
    spc, String -> Bool
    forall a. [a] -> Bool
    forall (t :: * -> *) a. Foldable t => t a -> Bool
    null String
    rest) of
          (Bool
    True , Bool
    _   , Bool
    True ) -> []             -- remove trailing space
          (Bool
    False, Bool
    _   , Bool
    True ) -> String
    t              -- remove trailing space
          (Bool
    False, Bool
    True, Bool
    False) -> String
    t String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Char
    ' ' Char -> ShowS
    forall a. a -> [a] -> [a]
    : String
    s   -- add space if none
          (Bool, Bool, Bool)
    _                    -> String
    t String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ String
    s
        where
          (String
    spc, String
    rest) = (Char -> Bool) -> String -> (String, String)
    forall a. (a -> Bool) -> [a] -> ([a], [a])
    span Char -> Bool
    isSpace String
    s

      closingOrPunctuation :: String -> Bool
      closingOrPunctuation :: String -> Bool
    closingOrPunctuation [Char
    c] = Char
    c Char -> String -> Bool
    forall a. Eq a => a -> [a] -> Bool
    forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
    `elem` String
    closerOrPunct
      closingOrPunctuation String
    _   = Bool
    False

      closerOrPunct :: String
      closerOrPunct :: String
    closerOrPunct = String
    ")],;"

    parenth :: Doc -> Doc
    parenth :: Doc -> Doc
    parenth Doc
    ss = ShowS -> Doc
    doc (Char -> ShowS
    showChar Char
    '(') Doc -> Doc -> Doc
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Doc
    ss Doc -> Doc -> Doc
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ShowS -> Doc
    doc (Char -> ShowS
    showChar Char
    ')')

    concatS :: [ShowS] -> ShowS
    concatS :: [ShowS] -> ShowS
    concatS = (ShowS -> ShowS -> ShowS) -> ShowS -> [ShowS] -> ShowS
    forall a b. (a -> b -> b) -> b -> [a] -> b
    forall (t :: * -> *) a b.
    Foldable t =>
    (a -> b -> b) -> b -> t a -> b
    foldr ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    (.) ShowS
    forall a. a -> a
    id

    concatD :: [Doc] -> Doc
    concatD :: [Doc] -> Doc
    concatD = (Doc -> Doc -> Doc) -> Doc -> [Doc] -> Doc
    forall a b. (a -> b -> b) -> b -> [a] -> b
    forall (t :: * -> *) a b.
    Foldable t =>
    (a -> b -> b) -> b -> t a -> b
    foldr Doc -> Doc -> Doc
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    (.) Doc
    forall a. a -> a
    id

    replicateS :: Int -> ShowS -> ShowS
    replicateS :: Int -> ShowS -> ShowS
    replicateS Int
    n ShowS
    f = [ShowS] -> ShowS
    concatS (Int -> ShowS -> [ShowS]
    forall a. Int -> a -> [a]
    replicate Int
    n ShowS
    f)

    -- | The printer class does the job.

    class Print a where
      prt :: Int -> a -> Doc

    instance {-# OVERLAPPABLE #-} Print a => Print [a] where
      prt :: Int -> [a] -> Doc
    prt Int
    i = [Doc] -> Doc
    concatD ([Doc] -> Doc) -> ([a] -> [Doc]) -> [a] -> Doc
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> Doc) -> [a] -> [Doc]
    forall a b. (a -> b) -> [a] -> [b]
    map (Int -> a -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    i)

    instance Print Char where
      prt :: Int -> Char -> Doc
    prt Int
    _ Char
    c = ShowS -> Doc
    doc (Char -> ShowS
    showChar Char
    '\'' ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Char -> Char -> ShowS
    mkEsc Char
    '\'' Char
    c ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Char -> ShowS
    showChar Char
    '\'')

    instance Print String where
      prt :: Int -> String -> Doc
    prt Int
    _ = String -> Doc
    printString

    printString :: String -> Doc
    printString :: String -> Doc
    printString String
    s = ShowS -> Doc
    doc (Char -> ShowS
    showChar Char
    '"' ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . [ShowS] -> ShowS
    concatS ((Char -> ShowS) -> String -> [ShowS]
    forall a b. (a -> b) -> [a] -> [b]
    map (Char -> Char -> ShowS
    mkEsc Char
    '"') String
    s) ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Char -> ShowS
    showChar Char
    '"')

    mkEsc :: Char -> Char -> ShowS
    mkEsc :: Char -> Char -> ShowS
    mkEsc Char
    q = \case
      Char
    s | Char
    s Char -> Char -> Bool
    forall a. Eq a => a -> a -> Bool
    == Char
    q -> Char -> ShowS
    showChar Char
    '\\' ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Char -> ShowS
    showChar Char
    s
      Char
    '\\' -> String -> ShowS
    showString String
    "\\\\"
      Char
    '\n' -> String -> ShowS
    showString String
    "\\n"
      Char
    '\t' -> String -> ShowS
    showString String
    "\\t"
      Char
    s -> Char -> ShowS
    showChar Char
    s

    prPrec :: Int -> Int -> Doc -> Doc
    prPrec :: Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    j = if Int
    j Int -> Int -> Bool
    forall a. Ord a => a -> a -> Bool
    < Int
    i then Doc -> Doc
    parenth else Doc -> Doc
    forall a. a -> a
    id

    instance Print Integer where
      prt :: Int -> Integer -> Doc
    prt Int
    _ Integer
    x = ShowS -> Doc
    doc (Integer -> ShowS
    forall a. Show a => a -> ShowS
    shows Integer
    x)

    instance Print Double where
      prt :: Int -> Double -> Doc
    prt Int
    _ Double
    x = ShowS -> Doc
    doc (Double -> ShowS
    forall a. Show a => a -> ShowS
    shows Double
    x)

    instance Print Language.SMV.AbsSMV.Ident where
      prt :: Int -> Ident -> Doc
    prt Int
    _ (Language.SMV.AbsSMV.Ident String
    i) = ShowS -> Doc
    doc (ShowS -> Doc) -> ShowS -> Doc
    forall a b. (a -> b) -> a -> b
    $ String -> ShowS
    showString String
    i
    instance Print Language.SMV.AbsSMV.BoolSpec where
      prt :: Int -> BoolSpec -> Doc
    prt Int
    i = \case
        Language.SMV.AbsSMV.BoolSpecSignal Ident
    id_ -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    9 ([Doc] -> Doc
    concatD [Int -> Ident -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 Ident
    id_])
        Language.SMV.AbsSMV.BoolSpecConst BoolConst
    boolconst -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    9 ([Doc] -> Doc
    concatD [Int -> BoolConst -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 BoolConst
    boolconst])
        Language.SMV.AbsSMV.BoolSpecNum NumExpr
    numexpr -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    9 ([Doc] -> Doc
    concatD [Int -> NumExpr -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 NumExpr
    numexpr])
        Language.SMV.AbsSMV.BoolSpecCmp BoolSpec
    boolspec1 OrdOp
    ordop BoolSpec
    boolspec2 -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    8 ([Doc] -> Doc
    concatD [Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    8 BoolSpec
    boolspec1, Int -> OrdOp -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 OrdOp
    ordop, Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    9 BoolSpec
    boolspec2])
        Language.SMV.AbsSMV.BoolSpecNeg BoolSpec
    boolspec -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    7 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "!"), Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    8 BoolSpec
    boolspec])
        Language.SMV.AbsSMV.BoolSpecAnd BoolSpec
    boolspec1 BoolSpec
    boolspec2 -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    6 ([Doc] -> Doc
    concatD [Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    6 BoolSpec
    boolspec1, ShowS -> Doc
    doc (String -> ShowS
    showString String
    "&"), Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    7 BoolSpec
    boolspec2])
        Language.SMV.AbsSMV.BoolSpecOr BoolSpec
    boolspec1 BoolSpec
    boolspec2 -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    5 ([Doc] -> Doc
    concatD [Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    5 BoolSpec
    boolspec1, ShowS -> Doc
    doc (String -> ShowS
    showString String
    "|"), Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    6 BoolSpec
    boolspec2])
        Language.SMV.AbsSMV.BoolSpecXor BoolSpec
    boolspec1 BoolSpec
    boolspec2 -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    4 ([Doc] -> Doc
    concatD [Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    4 BoolSpec
    boolspec1, ShowS -> Doc
    doc (String -> ShowS
    showString String
    "xor"), Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    5 BoolSpec
    boolspec2])
        Language.SMV.AbsSMV.BoolSpecImplies BoolSpec
    boolspec1 BoolSpec
    boolspec2 -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    3 ([Doc] -> Doc
    concatD [Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    3 BoolSpec
    boolspec1, ShowS -> Doc
    doc (String -> ShowS
    showString String
    "->"), Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    4 BoolSpec
    boolspec2])
        Language.SMV.AbsSMV.BoolSpecEquivs BoolSpec
    boolspec1 BoolSpec
    boolspec2 -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    2 ([Doc] -> Doc
    concatD [Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    2 BoolSpec
    boolspec1, ShowS -> Doc
    doc (String -> ShowS
    showString String
    "<->"), Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    3 BoolSpec
    boolspec2])
        Language.SMV.AbsSMV.BoolSpecOp1 OpOne
    opone BoolSpec
    boolspec -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    1 ([Doc] -> Doc
    concatD [Int -> OpOne -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 OpOne
    opone, Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    2 BoolSpec
    boolspec])
        Language.SMV.AbsSMV.BoolSpecOp2 BoolSpec
    boolspec1 OpTwo
    optwo BoolSpec
    boolspec2 -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 BoolSpec
    boolspec1, Int -> OpTwo -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 OpTwo
    optwo, Int -> BoolSpec -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    1 BoolSpec
    boolspec2])

    instance Print Language.SMV.AbsSMV.NumExpr where
      prt :: Int -> NumExpr -> Doc
    prt Int
    i = \case
        Language.SMV.AbsSMV.NumId Ident
    id_ -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    2 ([Doc] -> Doc
    concatD [Int -> Ident -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 Ident
    id_])
        Language.SMV.AbsSMV.NumConstI Integer
    n -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    2 ([Doc] -> Doc
    concatD [Int -> Integer -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 Integer
    n])
        Language.SMV.AbsSMV.NumConstD Double
    d -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    2 ([Doc] -> Doc
    concatD [Int -> Double -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 Double
    d])
        Language.SMV.AbsSMV.NumAdd NumExpr
    numexpr1 AdditiveOp
    additiveop NumExpr
    numexpr2 -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    1 ([Doc] -> Doc
    concatD [Int -> NumExpr -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    1 NumExpr
    numexpr1, Int -> AdditiveOp -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 AdditiveOp
    additiveop, Int -> NumExpr -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    2 NumExpr
    numexpr2])
        Language.SMV.AbsSMV.NumMult NumExpr
    numexpr1 MultOp
    multop NumExpr
    numexpr2 -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [Int -> NumExpr -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 NumExpr
    numexpr1, Int -> MultOp -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 MultOp
    multop, Int -> NumExpr -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    1 NumExpr
    numexpr2])

    instance Print Language.SMV.AbsSMV.AdditiveOp where
      prt :: Int -> AdditiveOp -> Doc
    prt Int
    i = \case
        AdditiveOp
    Language.SMV.AbsSMV.OpPlus -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "+")])
        AdditiveOp
    Language.SMV.AbsSMV.OpMinus -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "-")])

    instance Print Language.SMV.AbsSMV.MultOp where
      prt :: Int -> MultOp -> Doc
    prt Int
    i = \case
        MultOp
    Language.SMV.AbsSMV.OpTimes -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "*")])
        MultOp
    Language.SMV.AbsSMV.OpDiv -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "/")])

    instance Print Language.SMV.AbsSMV.BoolConst where
      prt :: Int -> BoolConst -> Doc
    prt Int
    i = \case
        BoolConst
    Language.SMV.AbsSMV.BoolConstTrue -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "TRUE")])
        BoolConst
    Language.SMV.AbsSMV.BoolConstFalse -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "FALSE")])
        BoolConst
    Language.SMV.AbsSMV.BoolConstFTP -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "FTP")])
        BoolConst
    Language.SMV.AbsSMV.BoolConstLAST -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "LAST")])

    instance Print Language.SMV.AbsSMV.OpOne where
      prt :: Int -> OpOne -> Doc
    prt Int
    i = \case
        Language.SMV.AbsSMV.Op1Alone Op1Name
    opname -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [Int -> Op1Name -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 Op1Name
    opname])
        Language.SMV.AbsSMV.Op1MTL Op1Name
    opname OrdOp
    ordop Number
    number -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [Int -> Op1Name -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 Op1Name
    opname, ShowS -> Doc
    doc (String -> ShowS
    showString String
    "["), Int -> OrdOp -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 OrdOp
    ordop, Int -> Number -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 Number
    number, ShowS -> Doc
    doc (String -> ShowS
    showString String
    "]")])
        Language.SMV.AbsSMV.Op1MTLRange Op1Name
    opname Number
    number1 Number
    number2 -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [Int -> Op1Name -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 Op1Name
    opname, ShowS -> Doc
    doc (String -> ShowS
    showString String
    "["), Int -> Number -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 Number
    number1, ShowS -> Doc
    doc (String -> ShowS
    showString String
    ","), Int -> Number -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 Number
    number2, ShowS -> Doc
    doc (String -> ShowS
    showString String
    "]")])

    instance Print Language.SMV.AbsSMV.Number where
      prt :: Int -> Number -> Doc
    prt Int
    i = \case
        Language.SMV.AbsSMV.NumberInt Integer
    n -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [Int -> Integer -> Doc
    forall a. Print a => Int -> a -> Doc
    prt Int
    0 Integer
    n])

    instance Print Language.SMV.AbsSMV.OrdOp where
      prt :: Int -> OrdOp -> Doc
    prt Int
    i = \case
        OrdOp
    Language.SMV.AbsSMV.OrdOpLT -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "<")])
        OrdOp
    Language.SMV.AbsSMV.OrdOpLE -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "<=")])
        OrdOp
    Language.SMV.AbsSMV.OrdOpEQ -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "=")])
        OrdOp
    Language.SMV.AbsSMV.OrdOpNE -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "!=")])
        OrdOp
    Language.SMV.AbsSMV.OrdOpGT -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    ">")])
        OrdOp
    Language.SMV.AbsSMV.OrdOpGE -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    ">=")])

    instance Print Language.SMV.AbsSMV.Op1Name where
      prt :: Int -> Op1Name -> Doc
    prt Int
    i = \case
        Op1Name
    Language.SMV.AbsSMV.Op1Pre -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "pre")])
        Op1Name
    Language.SMV.AbsSMV.Op1X -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "X")])
        Op1Name
    Language.SMV.AbsSMV.Op1G -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "G")])
        Op1Name
    Language.SMV.AbsSMV.Op1F -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "F")])
        Op1Name
    Language.SMV.AbsSMV.Op1Y -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "Y")])
        Op1Name
    Language.SMV.AbsSMV.Op1Z -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "Z")])
        Op1Name
    Language.SMV.AbsSMV.Op1Hist -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "H")])
        Op1Name
    Language.SMV.AbsSMV.Op1O -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "O")])

    instance Print Language.SMV.AbsSMV.OpTwo where
      prt :: Int -> OpTwo -> Doc
    prt Int
    i = \case
        OpTwo
    Language.SMV.AbsSMV.Op2S -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "S")])
        OpTwo
    Language.SMV.AbsSMV.Op2T -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "T")])
        OpTwo
    Language.SMV.AbsSMV.Op2V -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "V")])
        OpTwo
    Language.SMV.AbsSMV.Op2U -> Int -> Int -> Doc -> Doc
    prPrec Int
    i Int
    0 ([Doc] -> Doc
    concatD [ShowS -> Doc
    doc (String -> ShowS
    showString String
    "U")])