{-# OPTIONS -w -O0 #-}
{-# LANGUAGE CPP, StandaloneDeriving, DeriveDataTypeable, DeriveGeneric #-}
{- |
Module      :  CSL/ATC_CSL.der.hs
Description :  generated ShATermConvertible, Json instances
Copyright   :  (c) DFKI GmbH 2012
License     :  GPLv2 or higher, see LICENSE.txt

Maintainer  :  Christian.Maeder@dfki.de
Stability   :  provisional
Portability :  non-portable(derive Typeable instances)

Automatic derivation of instances via DrIFT-rule ShATermConvertible, Json
  for the type(s):
'CSL.Sign.OpType'
'CSL.Sign.Sign'
'CSL.Morphism.Morphism'
'CSL.AS_BASIC_CSL.OP_ITEM'
'CSL.AS_BASIC_CSL.VAR_ITEM'
'CSL.AS_BASIC_CSL.BASIC_SPEC'
'CSL.AS_BASIC_CSL.GroundConstant'
'CSL.AS_BASIC_CSL.AssDefinition'
'CSL.AS_BASIC_CSL.InstantiatedConstant'
'CSL.AS_BASIC_CSL.BASIC_ITEM'
'CSL.AS_BASIC_CSL.EXTPARAM'
'CSL.AS_BASIC_CSL.EPDecl'
'CSL.AS_BASIC_CSL.EPVal'
'CSL.AS_BASIC_CSL.OPNAME'
'CSL.AS_BASIC_CSL.OPID'
'CSL.AS_BASIC_CSL.ConstantName'
'CSL.AS_BASIC_CSL.EXPRESSION'
'CSL.AS_BASIC_CSL.VarDecl'
'CSL.AS_BASIC_CSL.OpDecl'
'CSL.AS_BASIC_CSL.CMD'
'CSL.AS_BASIC_CSL.SYMB_ITEMS'
'CSL.AS_BASIC_CSL.SYMB'
'CSL.AS_BASIC_CSL.SYMB_MAP_ITEMS'
'CSL.AS_BASIC_CSL.SYMB_OR_MAP'
'CSL.AS_BASIC_CSL.BindInfo'
'CSL.AS_BASIC_CSL.OpInfo'
'CSL.Symbol.Symbol'
'CSL.TreePO.Incomparable'
'CSL.TreePO.SetOrdering'
'CSL.TreePO.InfDev'
'CSL.TreePO.CIType'
'CSL.TreePO.SetOrInterval'
'CSL.TreePO.ClosedInterval'
'CSL.TreePO.InfInt'
-}

{-
Generated by 'genRules' (automatic rule generation for DrIFT). Don't touch!!
  dependency files:
CSL/Sign.hs
CSL/Morphism.hs
CSL/AS_BASIC_CSL.hs
CSL/Symbol.hs
CSL/TreePO.hs
-}

module CSL.ATC_CSL () where

import ATC.AS_Annotation
import ATerm.Lib
import CSL.AS_BASIC_CSL
import CSL.Morphism
import CSL.Print_AS ()
import CSL.Sign
import CSL.Sign as Sign
import CSL.Symbol
import CSL.TreePO
import CSL.TreePO (ClosedInterval (ClosedInterval))
import Common.AS_Annotation as AS_Anno
import Common.Doc
import Common.DocUtils
import Common.Id
import Common.Id as Id
import Common.Json.Instances
import Common.Result
import Data.Aeson(ToJSON, FromJSON)
import Data.Data
import Data.Maybe
import Data.Ratio
import GHC.Generics(Generic)
import qualified Common.Result as Result
import qualified Data.Map as Map
import qualified Data.Set as Set

{-! for CSL.Sign.OpType derive : ShATermConvertible !-}
{-! for CSL.Sign.Sign derive : ShATermConvertible !-}
{-! for CSL.Morphism.Morphism derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.OP_ITEM derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.VAR_ITEM derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.BASIC_SPEC derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.GroundConstant derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.AssDefinition derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.InstantiatedConstant derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.BASIC_ITEM derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.EXTPARAM derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.EPDecl derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.EPVal derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.OPNAME derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.OPID derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.ConstantName derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.EXPRESSION derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.VarDecl derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.OpDecl derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.CMD derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.SYMB_ITEMS derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.SYMB derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.SYMB_MAP_ITEMS derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.SYMB_OR_MAP derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.BindInfo derive : ShATermConvertible !-}
{-! for CSL.AS_BASIC_CSL.OpInfo derive : ShATermConvertible !-}
{-! for CSL.Symbol.Symbol derive : ShATermConvertible !-}
{-! for CSL.TreePO.Incomparable derive : ShATermConvertible !-}
{-! for CSL.TreePO.SetOrdering derive : ShATermConvertible !-}
{-! for CSL.TreePO.InfDev derive : ShATermConvertible !-}
{-! for CSL.TreePO.CIType derive : ShATermConvertible !-}
{-! for CSL.TreePO.SetOrInterval derive : ShATermConvertible !-}
{-! for CSL.TreePO.ClosedInterval derive : ShATermConvertible !-}
{-! for CSL.TreePO.InfInt derive : ShATermConvertible !-}

{-! for CSL.Sign.OpType derive : Json !-}
{-! for CSL.Sign.Sign derive : Json !-}
{-! for CSL.Morphism.Morphism derive : Json !-}
{-! for CSL.AS_BASIC_CSL.OP_ITEM derive : Json !-}
{-! for CSL.AS_BASIC_CSL.VAR_ITEM derive : Json !-}
{-! for CSL.AS_BASIC_CSL.BASIC_SPEC derive : Json !-}
{-! for CSL.AS_BASIC_CSL.GroundConstant derive : Json !-}
{-! for CSL.AS_BASIC_CSL.AssDefinition derive : Json !-}
{-! for CSL.AS_BASIC_CSL.InstantiatedConstant derive : Json !-}
{-! for CSL.AS_BASIC_CSL.BASIC_ITEM derive : Json !-}
{-! for CSL.AS_BASIC_CSL.EXTPARAM derive : Json !-}
{-! for CSL.AS_BASIC_CSL.EPDecl derive : Json !-}
{-! for CSL.AS_BASIC_CSL.EPVal derive : Json !-}
{-! for CSL.AS_BASIC_CSL.OPNAME derive : Json !-}
{-! for CSL.AS_BASIC_CSL.OPID derive : Json !-}
{-! for CSL.AS_BASIC_CSL.ConstantName derive : Json !-}
{-! for CSL.AS_BASIC_CSL.EXPRESSION derive : Json !-}
{-! for CSL.AS_BASIC_CSL.VarDecl derive : Json !-}
{-! for CSL.AS_BASIC_CSL.OpDecl derive : Json !-}
{-! for CSL.AS_BASIC_CSL.CMD derive : Json !-}
{-! for CSL.AS_BASIC_CSL.SYMB_ITEMS derive : Json !-}
{-! for CSL.AS_BASIC_CSL.SYMB derive : Json !-}
{-! for CSL.AS_BASIC_CSL.SYMB_MAP_ITEMS derive : Json !-}
{-! for CSL.AS_BASIC_CSL.SYMB_OR_MAP derive : Json !-}
{-! for CSL.AS_BASIC_CSL.BindInfo derive : Json !-}
{-! for CSL.AS_BASIC_CSL.OpInfo derive : Json !-}
{-! for CSL.Symbol.Symbol derive : Json !-}
{-! for CSL.TreePO.Incomparable derive : Json !-}
{-! for CSL.TreePO.SetOrdering derive : Json !-}
{-! for CSL.TreePO.InfDev derive : Json !-}
{-! for CSL.TreePO.CIType derive : Json !-}
{-! for CSL.TreePO.SetOrInterval derive : Json !-}
{-! for CSL.TreePO.ClosedInterval derive : Json !-}
{-! for CSL.TreePO.InfInt derive : Json !-}

-- Generated by DrIFT, look but don't touch!

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.OpInfo
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.OpInfo where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.OpInfo where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.BindInfo
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.BindInfo where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.BindInfo where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.SYMB_OR_MAP
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.SYMB_OR_MAP where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.SYMB_OR_MAP where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.SYMB_MAP_ITEMS
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.SYMB_MAP_ITEMS where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.SYMB_MAP_ITEMS where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.SYMB
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.SYMB where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.SYMB where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.SYMB_ITEMS
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.SYMB_ITEMS where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.SYMB_ITEMS where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.CMD
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.CMD where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.CMD where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.OpDecl
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.OpDecl where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.OpDecl where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.VarDecl
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.VarDecl where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.VarDecl where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.EXPRESSION
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.EXPRESSION where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.EXPRESSION where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.ConstantName
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.ConstantName where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.ConstantName where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.OPID
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.OPID where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.OPID where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.OPNAME
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.OPNAME where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.OPNAME where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.EPVal
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.EPVal where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.EPVal where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.EPDecl
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.EPDecl where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.EPDecl where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.EXTPARAM
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.EXTPARAM where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.EXTPARAM where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.BASIC_ITEM
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.BASIC_ITEM where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.BASIC_ITEM where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.InstantiatedConstant
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.InstantiatedConstant where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.InstantiatedConstant where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.AssDefinition
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.AssDefinition where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.AssDefinition where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.GroundConstant
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.GroundConstant where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.GroundConstant where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.BASIC_SPEC
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.BASIC_SPEC where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.BASIC_SPEC where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.VAR_ITEM
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.VAR_ITEM where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.VAR_ITEM where

deriving instance GHC.Generics.Generic CSL.AS_BASIC_CSL.OP_ITEM
instance Data.Aeson.ToJSON CSL.AS_BASIC_CSL.OP_ITEM where
instance Data.Aeson.FromJSON CSL.AS_BASIC_CSL.OP_ITEM where

instance ShATermConvertible CSL.AS_BASIC_CSL.OpInfo where
  toShATermAux :: ATermTable -> OpInfo -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OpInfo
xv = case OpInfo
xv of
    OpInfo a :: Int
a b :: Bool
b c :: Int
c d :: Bool
d e :: OPNAME
e f :: Maybe BindInfo
f -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Int -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Int
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Bool
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Int -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Int
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Bool
d
      (att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> OPNAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att4 OPNAME
e
      (att6 :: ATermTable
att6, f' :: Int
f') <- ATermTable -> Maybe BindInfo -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att5 Maybe BindInfo
f
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OpInfo" [Int
a', Int
b', Int
c', Int
d', Int
e',
                                           Int
f'] []) ATermTable
att6
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OpInfo)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OpInfo" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e, f :: Int
f] _ ->
      case Int -> ATermTable -> (ATermTable, Int)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Int
a') ->
      case Int -> ATermTable -> (ATermTable, Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Bool
b') ->
      case Int -> ATermTable -> (ATermTable, Int)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Int
c') ->
      case Int -> ATermTable -> (ATermTable, Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Bool
d') ->
      case Int -> ATermTable -> (ATermTable, OPNAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
e ATermTable
att4 of
      { (att5 :: ATermTable
att5, e' :: OPNAME
e') ->
      case Int -> ATermTable -> (ATermTable, Maybe BindInfo)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
f ATermTable
att5 of
      { (att6 :: ATermTable
att6, f' :: Maybe BindInfo
f') ->
      (ATermTable
att6, Int -> Bool -> Int -> Bool -> OPNAME -> Maybe BindInfo -> OpInfo
OpInfo Int
a' Bool
b' Int
c' Bool
d' OPNAME
e' Maybe BindInfo
f') }}}}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OpInfo)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.OpInfo" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.BindInfo where
  toShATermAux :: ATermTable -> BindInfo -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: BindInfo
xv = case BindInfo
xv of
    BindInfo a :: [Int]
a b :: [Int]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Int] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Int]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [Int] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [Int]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "BindInfo" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, BindInfo)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "BindInfo" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Int])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Int]
a') ->
      case Int -> ATermTable -> (ATermTable, [Int])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [Int]
b') ->
      (ATermTable
att2, [Int] -> [Int] -> BindInfo
BindInfo [Int]
a' [Int]
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, BindInfo)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.BindInfo" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.SYMB_OR_MAP where
  toShATermAux :: ATermTable -> SYMB_OR_MAP -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SYMB_OR_MAP
xv = case SYMB_OR_MAP
xv of
    Symb a :: SYMB
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SYMB -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 SYMB
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Symb" [Int
a'] []) ATermTable
att1
    Symb_map a :: SYMB
a b :: SYMB
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SYMB -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 SYMB
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> SYMB -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 SYMB
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Symb_map" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SYMB_OR_MAP)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Symb" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, SYMB)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: SYMB
a') ->
      (ATermTable
att1, SYMB -> SYMB_OR_MAP
Symb SYMB
a') }
    ShAAppl "Symb_map" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, SYMB)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: SYMB
a') ->
      case Int -> ATermTable -> (ATermTable, SYMB)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: SYMB
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, SYMB -> SYMB -> Range -> SYMB_OR_MAP
Symb_map SYMB
a' SYMB
b' Range
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SYMB_OR_MAP)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.SYMB_OR_MAP" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.SYMB_MAP_ITEMS where
  toShATermAux :: ATermTable -> SYMB_MAP_ITEMS -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SYMB_MAP_ITEMS
xv = case SYMB_MAP_ITEMS
xv of
    Symb_map_items a :: [SYMB_OR_MAP]
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [SYMB_OR_MAP] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [SYMB_OR_MAP]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Symb_map_items" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SYMB_MAP_ITEMS)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Symb_map_items" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [SYMB_OR_MAP])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [SYMB_OR_MAP]
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, [SYMB_OR_MAP] -> Range -> SYMB_MAP_ITEMS
Symb_map_items [SYMB_OR_MAP]
a' Range
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SYMB_MAP_ITEMS)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.SYMB_MAP_ITEMS" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.SYMB where
  toShATermAux :: ATermTable -> SYMB -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SYMB
xv = case SYMB
xv of
    Symb_id a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Symb_id" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SYMB)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Symb_id" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> SYMB
Symb_id Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SYMB)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.SYMB" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.SYMB_ITEMS where
  toShATermAux :: ATermTable -> SYMB_ITEMS -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SYMB_ITEMS
xv = case SYMB_ITEMS
xv of
    Symb_items a :: [SYMB]
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [SYMB] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [SYMB]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Symb_items" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SYMB_ITEMS)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Symb_items" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [SYMB])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [SYMB]
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, [SYMB] -> Range -> SYMB_ITEMS
Symb_items [SYMB]
a' Range
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SYMB_ITEMS)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.SYMB_ITEMS" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.CMD where
  toShATermAux :: ATermTable -> CMD -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CMD
xv = case CMD
xv of
    Ass a :: OpDecl
a b :: EXPRESSION
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OpDecl -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OpDecl
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> EXPRESSION -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 EXPRESSION
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Ass" [Int
a', Int
b'] []) ATermTable
att2
    Cmd a :: String
a b :: [EXPRESSION]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 String
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [EXPRESSION] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [EXPRESSION]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Cmd" [Int
a', Int
b'] []) ATermTable
att2
    Sequence a :: [CMD]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [CMD] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [CMD]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Sequence" [Int
a'] []) ATermTable
att1
    Cond a :: [(EXPRESSION, [CMD])]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [(EXPRESSION, [CMD])] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [(EXPRESSION, [CMD])]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Cond" [Int
a'] []) ATermTable
att1
    Repeat a :: EXPRESSION
a b :: [CMD]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> EXPRESSION -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 EXPRESSION
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [CMD] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [CMD]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Repeat" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CMD)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Ass" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, OpDecl)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OpDecl
a') ->
      case Int -> ATermTable -> (ATermTable, EXPRESSION)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: EXPRESSION
b') ->
      (ATermTable
att2, OpDecl -> EXPRESSION -> CMD
Ass OpDecl
a' EXPRESSION
b') }}
    ShAAppl "Cmd" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: String
a') ->
      case Int -> ATermTable -> (ATermTable, [EXPRESSION])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [EXPRESSION]
b') ->
      (ATermTable
att2, String -> [EXPRESSION] -> CMD
Cmd String
a' [EXPRESSION]
b') }}
    ShAAppl "Sequence" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [CMD])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [CMD]
a') ->
      (ATermTable
att1, [CMD] -> CMD
Sequence [CMD]
a') }
    ShAAppl "Cond" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [(EXPRESSION, [CMD])])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [(EXPRESSION, [CMD])]
a') ->
      (ATermTable
att1, [(EXPRESSION, [CMD])] -> CMD
Cond [(EXPRESSION, [CMD])]
a') }
    ShAAppl "Repeat" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, EXPRESSION)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: EXPRESSION
a') ->
      case Int -> ATermTable -> (ATermTable, [CMD])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [CMD]
b') ->
      (ATermTable
att2, EXPRESSION -> [CMD] -> CMD
Repeat EXPRESSION
a' [CMD]
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CMD)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.CMD" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.OpDecl where
  toShATermAux :: ATermTable -> OpDecl -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OpDecl
xv = case OpDecl
xv of
    OpDecl a :: ConstantName
a b :: [EXTPARAM]
b c :: [VarDecl]
c d :: Range
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ConstantName -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ConstantName
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [EXTPARAM] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [EXTPARAM]
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [VarDecl] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [VarDecl]
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Range
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OpDecl" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OpDecl)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OpDecl" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, ConstantName)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ConstantName
a') ->
      case Int -> ATermTable -> (ATermTable, [EXTPARAM])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [EXTPARAM]
b') ->
      case Int -> ATermTable -> (ATermTable, [VarDecl])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [VarDecl]
c') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Range
d') ->
      (ATermTable
att4, ConstantName -> [EXTPARAM] -> [VarDecl] -> Range -> OpDecl
OpDecl ConstantName
a' [EXTPARAM]
b' [VarDecl]
c' Range
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OpDecl)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.OpDecl" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.VarDecl where
  toShATermAux :: ATermTable -> VarDecl -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: VarDecl
xv = case VarDecl
xv of
    VarDecl a :: Token
a b :: Maybe Domain
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Maybe Domain -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Maybe Domain
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "VarDecl" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, VarDecl)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "VarDecl" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, Maybe Domain)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Maybe Domain
b') ->
      (ATermTable
att2, Token -> Maybe Domain -> VarDecl
VarDecl Token
a' Maybe Domain
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, VarDecl)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.VarDecl" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.EXPRESSION where
  toShATermAux :: ATermTable -> EXPRESSION -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: EXPRESSION
xv = case EXPRESSION
xv of
    Var a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Var" [Int
a'] []) ATermTable
att1
    Op a :: OPID
a b :: [EXTPARAM]
b c :: [EXPRESSION]
c d :: Range
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OPID -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OPID
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [EXTPARAM] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [EXTPARAM]
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [EXPRESSION] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [EXPRESSION]
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Range
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Op" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
    List a :: [EXPRESSION]
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [EXPRESSION] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [EXPRESSION]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "List" [Int
a', Int
b'] []) ATermTable
att2
    Interval a :: Double
a b :: Double
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Double -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Double
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Double -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Double
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Interval" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    Int a :: APInt
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> APInt -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 APInt
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Int" [Int
a', Int
b'] []) ATermTable
att2
    Rat a :: APFloat
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> APFloat -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 APFloat
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Rat" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, EXPRESSION)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Var" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> EXPRESSION
Var Token
a') }
    ShAAppl "Op" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, OPID)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OPID
a') ->
      case Int -> ATermTable -> (ATermTable, [EXTPARAM])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [EXTPARAM]
b') ->
      case Int -> ATermTable -> (ATermTable, [EXPRESSION])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [EXPRESSION]
c') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Range
d') ->
      (ATermTable
att4, OPID -> [EXTPARAM] -> [EXPRESSION] -> Range -> EXPRESSION
Op OPID
a' [EXTPARAM]
b' [EXPRESSION]
c' Range
d') }}}}
    ShAAppl "List" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [EXPRESSION])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [EXPRESSION]
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, [EXPRESSION] -> Range -> EXPRESSION
List [EXPRESSION]
a' Range
b') }}
    ShAAppl "Interval" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Double)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Double
a') ->
      case Int -> ATermTable -> (ATermTable, Double)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Double
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, Double -> Double -> Range -> EXPRESSION
Interval Double
a' Double
b' Range
c') }}}
    ShAAppl "Int" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, APInt)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: APInt
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, APInt -> Range -> EXPRESSION
Int APInt
a' Range
b') }}
    ShAAppl "Rat" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, APFloat)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: APFloat
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, APFloat -> Range -> EXPRESSION
Rat APFloat
a' Range
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, EXPRESSION)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.EXPRESSION" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.ConstantName where
  toShATermAux :: ATermTable -> ConstantName -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ConstantName
xv = case ConstantName
xv of
    SimpleConstant a :: String
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 String
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SimpleConstant" [Int
a'] []) ATermTable
att1
    ElimConstant a :: String
a b :: Int
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 String
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Int -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Int
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ElimConstant" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, ConstantName)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SimpleConstant" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: String
a') ->
      (ATermTable
att1, String -> ConstantName
SimpleConstant String
a') }
    ShAAppl "ElimConstant" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: String
a') ->
      case Int -> ATermTable -> (ATermTable, Int)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Int
b') ->
      (ATermTable
att2, String -> Int -> ConstantName
ElimConstant String
a' Int
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ConstantName)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.ConstantName" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.OPID where
  toShATermAux :: ATermTable -> OPID -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OPID
xv = case OPID
xv of
    OpId a :: OPNAME
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OPNAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OPNAME
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OpId" [Int
a'] []) ATermTable
att1
    OpUser a :: ConstantName
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ConstantName -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ConstantName
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OpUser" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OPID)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OpId" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OPNAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OPNAME
a') ->
      (ATermTable
att1, OPNAME -> OPID
OpId OPNAME
a') }
    ShAAppl "OpUser" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, ConstantName)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ConstantName
a') ->
      (ATermTable
att1, ConstantName -> OPID
OpUser ConstantName
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OPID)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.OPID" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.OPNAME where
  toShATermAux :: ATermTable -> OPNAME -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OPNAME
xv = case OPNAME
xv of
    OP_mult -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_mult" [] []) ATermTable
att0
    OP_div -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_div" [] []) ATermTable
att0
    OP_plus -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_plus" [] []) ATermTable
att0
    OP_minus -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_minus" [] []) ATermTable
att0
    OP_neg -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_neg" [] []) ATermTable
att0
    OP_pow -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_pow" [] []) ATermTable
att0
    OP_fthrt -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_fthrt" [] []) ATermTable
att0
    OP_sqrt -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_sqrt" [] []) ATermTable
att0
    OP_abs -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_abs" [] []) ATermTable
att0
    OP_max -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_max" [] []) ATermTable
att0
    OP_min -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_min" [] []) ATermTable
att0
    OP_sign -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_sign" [] []) ATermTable
att0
    OP_cos -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_cos" [] []) ATermTable
att0
    OP_sin -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_sin" [] []) ATermTable
att0
    OP_tan -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_tan" [] []) ATermTable
att0
    OP_cot -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_cot" [] []) ATermTable
att0
    OP_Pi -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_Pi" [] []) ATermTable
att0
    OP_reldist -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_reldist" [] []) ATermTable
att0
    OP_minimize -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_minimize" [] []) ATermTable
att0
    OP_minloc -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_minloc" [] []) ATermTable
att0
    OP_maximize -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_maximize" [] []) ATermTable
att0
    OP_maxloc -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_maxloc" [] []) ATermTable
att0
    OP_factor -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_factor" [] []) ATermTable
att0
    OP_approx -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_approx" [] []) ATermTable
att0
    OP_divide -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_divide" [] []) ATermTable
att0
    OP_factorize -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_factorize" [] []) ATermTable
att0
    OP_int -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_int" [] []) ATermTable
att0
    OP_rlqe -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_rlqe" [] []) ATermTable
att0
    OP_simplify -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_simplify" [] []) ATermTable
att0
    OP_solve -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_solve" [] []) ATermTable
att0
    OP_neq -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_neq" [] []) ATermTable
att0
    OP_lt -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_lt" [] []) ATermTable
att0
    OP_leq -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_leq" [] []) ATermTable
att0
    OP_eq -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_eq" [] []) ATermTable
att0
    OP_gt -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_gt" [] []) ATermTable
att0
    OP_geq -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_geq" [] []) ATermTable
att0
    OP_convergence -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_convergence" [] []) ATermTable
att0
    OP_reldistLe -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_reldistLe" [] []) ATermTable
att0
    OP_in -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_in" [] []) ATermTable
att0
    OP_undef -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_undef" [] []) ATermTable
att0
    OP_failure -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_failure" [] []) ATermTable
att0
    OP_false -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_false" [] []) ATermTable
att0
    OP_true -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_true" [] []) ATermTable
att0
    OP_not -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_not" [] []) ATermTable
att0
    OP_and -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_and" [] []) ATermTable
att0
    OP_or -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_or" [] []) ATermTable
att0
    OP_impl -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_impl" [] []) ATermTable
att0
    OP_ex -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_ex" [] []) ATermTable
att0
    OP_all -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_all" [] []) ATermTable
att0
    OP_hastype -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_hastype" [] []) ATermTable
att0
    OP_real -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OP_real" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OPNAME)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OP_mult" [] _ -> (ATermTable
att0, OPNAME
OP_mult)
    ShAAppl "OP_div" [] _ -> (ATermTable
att0, OPNAME
OP_div)
    ShAAppl "OP_plus" [] _ -> (ATermTable
att0, OPNAME
OP_plus)
    ShAAppl "OP_minus" [] _ -> (ATermTable
att0, OPNAME
OP_minus)
    ShAAppl "OP_neg" [] _ -> (ATermTable
att0, OPNAME
OP_neg)
    ShAAppl "OP_pow" [] _ -> (ATermTable
att0, OPNAME
OP_pow)
    ShAAppl "OP_fthrt" [] _ -> (ATermTable
att0, OPNAME
OP_fthrt)
    ShAAppl "OP_sqrt" [] _ -> (ATermTable
att0, OPNAME
OP_sqrt)
    ShAAppl "OP_abs" [] _ -> (ATermTable
att0, OPNAME
OP_abs)
    ShAAppl "OP_max" [] _ -> (ATermTable
att0, OPNAME
OP_max)
    ShAAppl "OP_min" [] _ -> (ATermTable
att0, OPNAME
OP_min)
    ShAAppl "OP_sign" [] _ -> (ATermTable
att0, OPNAME
OP_sign)
    ShAAppl "OP_cos" [] _ -> (ATermTable
att0, OPNAME
OP_cos)
    ShAAppl "OP_sin" [] _ -> (ATermTable
att0, OPNAME
OP_sin)
    ShAAppl "OP_tan" [] _ -> (ATermTable
att0, OPNAME
OP_tan)
    ShAAppl "OP_cot" [] _ -> (ATermTable
att0, OPNAME
OP_cot)
    ShAAppl "OP_Pi" [] _ -> (ATermTable
att0, OPNAME
OP_Pi)
    ShAAppl "OP_reldist" [] _ -> (ATermTable
att0, OPNAME
OP_reldist)
    ShAAppl "OP_minimize" [] _ -> (ATermTable
att0, OPNAME
OP_minimize)
    ShAAppl "OP_minloc" [] _ -> (ATermTable
att0, OPNAME
OP_minloc)
    ShAAppl "OP_maximize" [] _ -> (ATermTable
att0, OPNAME
OP_maximize)
    ShAAppl "OP_maxloc" [] _ -> (ATermTable
att0, OPNAME
OP_maxloc)
    ShAAppl "OP_factor" [] _ -> (ATermTable
att0, OPNAME
OP_factor)
    ShAAppl "OP_approx" [] _ -> (ATermTable
att0, OPNAME
OP_approx)
    ShAAppl "OP_divide" [] _ -> (ATermTable
att0, OPNAME
OP_divide)
    ShAAppl "OP_factorize" [] _ -> (ATermTable
att0, OPNAME
OP_factorize)
    ShAAppl "OP_int" [] _ -> (ATermTable
att0, OPNAME
OP_int)
    ShAAppl "OP_rlqe" [] _ -> (ATermTable
att0, OPNAME
OP_rlqe)
    ShAAppl "OP_simplify" [] _ -> (ATermTable
att0, OPNAME
OP_simplify)
    ShAAppl "OP_solve" [] _ -> (ATermTable
att0, OPNAME
OP_solve)
    ShAAppl "OP_neq" [] _ -> (ATermTable
att0, OPNAME
OP_neq)
    ShAAppl "OP_lt" [] _ -> (ATermTable
att0, OPNAME
OP_lt)
    ShAAppl "OP_leq" [] _ -> (ATermTable
att0, OPNAME
OP_leq)
    ShAAppl "OP_eq" [] _ -> (ATermTable
att0, OPNAME
OP_eq)
    ShAAppl "OP_gt" [] _ -> (ATermTable
att0, OPNAME
OP_gt)
    ShAAppl "OP_geq" [] _ -> (ATermTable
att0, OPNAME
OP_geq)
    ShAAppl "OP_convergence" [] _ -> (ATermTable
att0, OPNAME
OP_convergence)
    ShAAppl "OP_reldistLe" [] _ -> (ATermTable
att0, OPNAME
OP_reldistLe)
    ShAAppl "OP_in" [] _ -> (ATermTable
att0, OPNAME
OP_in)
    ShAAppl "OP_undef" [] _ -> (ATermTable
att0, OPNAME
OP_undef)
    ShAAppl "OP_failure" [] _ -> (ATermTable
att0, OPNAME
OP_failure)
    ShAAppl "OP_false" [] _ -> (ATermTable
att0, OPNAME
OP_false)
    ShAAppl "OP_true" [] _ -> (ATermTable
att0, OPNAME
OP_true)
    ShAAppl "OP_not" [] _ -> (ATermTable
att0, OPNAME
OP_not)
    ShAAppl "OP_and" [] _ -> (ATermTable
att0, OPNAME
OP_and)
    ShAAppl "OP_or" [] _ -> (ATermTable
att0, OPNAME
OP_or)
    ShAAppl "OP_impl" [] _ -> (ATermTable
att0, OPNAME
OP_impl)
    ShAAppl "OP_ex" [] _ -> (ATermTable
att0, OPNAME
OP_ex)
    ShAAppl "OP_all" [] _ -> (ATermTable
att0, OPNAME
OP_all)
    ShAAppl "OP_hastype" [] _ -> (ATermTable
att0, OPNAME
OP_hastype)
    ShAAppl "OP_real" [] _ -> (ATermTable
att0, OPNAME
OP_real)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OPNAME)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.OPNAME" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.EPVal where
  toShATermAux :: ATermTable -> EPVal -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: EPVal
xv = case EPVal
xv of
    EPVal a :: APInt
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> APInt -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 APInt
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EPVal" [Int
a'] []) ATermTable
att1
    EPConstRef a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EPConstRef" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, EPVal)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "EPVal" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, APInt)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: APInt
a') ->
      (ATermTable
att1, APInt -> EPVal
EPVal APInt
a') }
    ShAAppl "EPConstRef" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> EPVal
EPConstRef Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, EPVal)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.EPVal" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.EPDecl where
  toShATermAux :: ATermTable -> EPDecl -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: EPDecl
xv = case EPDecl
xv of
    EPDecl a :: Token
a b :: EPDomain
b c :: Maybe APInt
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> EPDomain -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 EPDomain
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Maybe APInt -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Maybe APInt
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EPDecl" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, EPDecl)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "EPDecl" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, EPDomain)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: EPDomain
b') ->
      case Int -> ATermTable -> (ATermTable, Maybe APInt)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Maybe APInt
c') ->
      (ATermTable
att3, Token -> EPDomain -> Maybe APInt -> EPDecl
EPDecl Token
a' EPDomain
b' Maybe APInt
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, EPDecl)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.EPDecl" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.EXTPARAM where
  toShATermAux :: ATermTable -> EXTPARAM -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: EXTPARAM
xv = case EXTPARAM
xv of
    EP a :: Token
a b :: String
b c :: APInt
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 String
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> APInt -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 APInt
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EP" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, EXTPARAM)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "EP" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: String
b') ->
      case Int -> ATermTable -> (ATermTable, APInt)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: APInt
c') ->
      (ATermTable
att3, Token -> String -> APInt -> EXTPARAM
EP Token
a' String
b' APInt
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, EXTPARAM)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.EXTPARAM" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.BASIC_ITEM where
  toShATermAux :: ATermTable -> BASIC_ITEM -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: BASIC_ITEM
xv = case BASIC_ITEM
xv of
    Op_decl a :: OP_ITEM
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OP_ITEM -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OP_ITEM
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Op_decl" [Int
a'] []) ATermTable
att1
    EP_decl a :: [(Token, EPDomain)]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [(Token, EPDomain)] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [(Token, EPDomain)]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EP_decl" [Int
a'] []) ATermTable
att1
    EP_domdecl a :: [(Token, APInt)]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [(Token, APInt)] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [(Token, APInt)]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EP_domdecl" [Int
a'] []) ATermTable
att1
    EP_defval a :: [(Token, APInt)]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [(Token, APInt)] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [(Token, APInt)]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EP_defval" [Int
a'] []) ATermTable
att1
    Var_decls a :: [VAR_ITEM]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [VAR_ITEM] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [VAR_ITEM]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Var_decls" [Int
a'] []) ATermTable
att1
    Axiom_item a :: Annoted CMD
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Annoted CMD -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Annoted CMD
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Axiom_item" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, BASIC_ITEM)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Op_decl" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OP_ITEM)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OP_ITEM
a') ->
      (ATermTable
att1, OP_ITEM -> BASIC_ITEM
Op_decl OP_ITEM
a') }
    ShAAppl "EP_decl" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [(Token, EPDomain)])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [(Token, EPDomain)]
a') ->
      (ATermTable
att1, [(Token, EPDomain)] -> BASIC_ITEM
EP_decl [(Token, EPDomain)]
a') }
    ShAAppl "EP_domdecl" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [(Token, APInt)])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [(Token, APInt)]
a') ->
      (ATermTable
att1, [(Token, APInt)] -> BASIC_ITEM
EP_domdecl [(Token, APInt)]
a') }
    ShAAppl "EP_defval" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [(Token, APInt)])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [(Token, APInt)]
a') ->
      (ATermTable
att1, [(Token, APInt)] -> BASIC_ITEM
EP_defval [(Token, APInt)]
a') }
    ShAAppl "Var_decls" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [VAR_ITEM])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [VAR_ITEM]
a') ->
      (ATermTable
att1, [VAR_ITEM] -> BASIC_ITEM
Var_decls [VAR_ITEM]
a') }
    ShAAppl "Axiom_item" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Annoted CMD)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Annoted CMD
a') ->
      (ATermTable
att1, Annoted CMD -> BASIC_ITEM
Axiom_item Annoted CMD
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, BASIC_ITEM)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.BASIC_ITEM" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.InstantiatedConstant where
  toShATermAux :: ATermTable -> InstantiatedConstant -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: InstantiatedConstant
xv = case InstantiatedConstant
xv of
    InstantiatedConstant a :: ConstantName
a b :: [EXPRESSION]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ConstantName -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ConstantName
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [EXPRESSION] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [EXPRESSION]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "InstantiatedConstant" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, InstantiatedConstant)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "InstantiatedConstant" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, ConstantName)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ConstantName
a') ->
      case Int -> ATermTable -> (ATermTable, [EXPRESSION])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [EXPRESSION]
b') ->
      (ATermTable
att2, ConstantName -> [EXPRESSION] -> InstantiatedConstant
InstantiatedConstant ConstantName
a' [EXPRESSION]
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, InstantiatedConstant)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.InstantiatedConstant" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.AssDefinition where
  toShATermAux :: ATermTable -> AssDefinition -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: AssDefinition
xv = case AssDefinition
xv of
    ConstDef a :: EXPRESSION
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> EXPRESSION -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 EXPRESSION
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ConstDef" [Int
a'] []) ATermTable
att1
    FunDef a :: [String]
a b :: EXPRESSION
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [String] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [String]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> EXPRESSION -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 EXPRESSION
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FunDef" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, AssDefinition)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ConstDef" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, EXPRESSION)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: EXPRESSION
a') ->
      (ATermTable
att1, EXPRESSION -> AssDefinition
ConstDef EXPRESSION
a') }
    ShAAppl "FunDef" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [String])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [String]
a') ->
      case Int -> ATermTable -> (ATermTable, EXPRESSION)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: EXPRESSION
b') ->
      (ATermTable
att2, [String] -> EXPRESSION -> AssDefinition
FunDef [String]
a' EXPRESSION
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, AssDefinition)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.AssDefinition" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.GroundConstant where
  toShATermAux :: ATermTable -> GroundConstant -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: GroundConstant
xv = case GroundConstant
xv of
    GCI a :: APInt
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> APInt -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 APInt
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GCI" [Int
a'] []) ATermTable
att1
    GCR a :: APFloat
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> APFloat -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 APFloat
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GCR" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, GroundConstant)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "GCI" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, APInt)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: APInt
a') ->
      (ATermTable
att1, APInt -> GroundConstant
GCI APInt
a') }
    ShAAppl "GCR" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, APFloat)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: APFloat
a') ->
      (ATermTable
att1, APFloat -> GroundConstant
GCR APFloat
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, GroundConstant)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.GroundConstant" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.BASIC_SPEC where
  toShATermAux :: ATermTable -> BASIC_SPEC -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: BASIC_SPEC
xv = case BASIC_SPEC
xv of
    Basic_spec a :: [Annoted BASIC_ITEM]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annoted BASIC_ITEM] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annoted BASIC_ITEM]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Basic_spec" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, BASIC_SPEC)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Basic_spec" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [Annoted BASIC_ITEM])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annoted BASIC_ITEM]
a') ->
      (ATermTable
att1, [Annoted BASIC_ITEM] -> BASIC_SPEC
Basic_spec [Annoted BASIC_ITEM]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, BASIC_SPEC)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.BASIC_SPEC" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.VAR_ITEM where
  toShATermAux :: ATermTable -> VAR_ITEM -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: VAR_ITEM
xv = case VAR_ITEM
xv of
    Var_item a :: [Token]
a b :: Domain
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Token] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Token]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Domain -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Domain
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Var_item" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, VAR_ITEM)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Var_item" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Token])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Token]
a') ->
      case Int -> ATermTable -> (ATermTable, Domain)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Domain
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, [Token] -> Domain -> Range -> VAR_ITEM
Var_item [Token]
a' Domain
b' Range
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, VAR_ITEM)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.VAR_ITEM" ShATerm
u

instance ShATermConvertible CSL.AS_BASIC_CSL.OP_ITEM where
  toShATermAux :: ATermTable -> OP_ITEM -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OP_ITEM
xv = case OP_ITEM
xv of
    Op_item a :: [Token]
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Token] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Token]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Op_item" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OP_ITEM)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Op_item" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Token])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Token]
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, [Token] -> Range -> OP_ITEM
Op_item [Token]
a' Range
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OP_ITEM)
forall a. String -> ShATerm -> a
fromShATermError "CSL.AS_BASIC_CSL.OP_ITEM" ShATerm
u

instance ShATermConvertible CSL.Morphism.Morphism where
  toShATermAux :: ATermTable -> Morphism -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Morphism
xv = case Morphism
xv of
    Morphism a :: Sign
a b :: Sign
b c :: Map Id Id
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Sign -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Sign
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Sign -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Sign
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Map Id Id -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Map Id Id
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Morphism" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Morphism)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Morphism" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Sign)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Sign
a') ->
      case Int -> ATermTable -> (ATermTable, Sign)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Sign
b') ->
      case Int -> ATermTable -> (ATermTable, Map Id Id)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Map Id Id
c') ->
      (ATermTable
att3, Sign -> Sign -> Map Id Id -> Morphism
Morphism Sign
a' Sign
b' Map Id Id
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Morphism)
forall a. String -> ShATerm -> a
fromShATermError "CSL.Morphism.Morphism" ShATerm
u

deriving instance GHC.Generics.Generic CSL.Morphism.Morphism
instance Data.Aeson.ToJSON CSL.Morphism.Morphism where
instance Data.Aeson.FromJSON CSL.Morphism.Morphism where

instance ShATermConvertible CSL.Sign.OpType where
  toShATermAux :: ATermTable -> OpType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OpType
xv = case OpType
xv of
    OpType a :: Int
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Int -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Int
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OpType" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OpType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OpType" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Int)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Int
a') ->
      (ATermTable
att1, Int -> OpType
OpType Int
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OpType)
forall a. String -> ShATerm -> a
fromShATermError "CSL.Sign.OpType" ShATerm
u

instance ShATermConvertible CSL.Sign.Sign where
  toShATermAux :: ATermTable -> Sign -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Sign
xv = case Sign
xv of
    Sign a :: Map Token OpType
a b :: Map Token (Maybe APInt)
b c :: Map Token EPDecl
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Map Token OpType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Map Token OpType
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Map Token (Maybe APInt) -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Map Token (Maybe APInt)
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Map Token EPDecl -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Map Token EPDecl
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Sign" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Sign)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Sign" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Map Token OpType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Map Token OpType
a') ->
      case Int -> ATermTable -> (ATermTable, Map Token (Maybe APInt))
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Map Token (Maybe APInt)
b') ->
      case Int -> ATermTable -> (ATermTable, Map Token EPDecl)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Map Token EPDecl
c') ->
      (ATermTable
att3, Map Token OpType
-> Map Token (Maybe APInt) -> Map Token EPDecl -> Sign
Sign Map Token OpType
a' Map Token (Maybe APInt)
b' Map Token EPDecl
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Sign)
forall a. String -> ShATerm -> a
fromShATermError "CSL.Sign.Sign" ShATerm
u

deriving instance GHC.Generics.Generic CSL.Sign.OpType
instance Data.Aeson.ToJSON CSL.Sign.OpType where
instance Data.Aeson.FromJSON CSL.Sign.OpType where

deriving instance GHC.Generics.Generic CSL.Sign.Sign
instance Data.Aeson.ToJSON CSL.Sign.Sign where
instance Data.Aeson.FromJSON CSL.Sign.Sign where

instance ShATermConvertible CSL.Symbol.Symbol where
  toShATermAux :: ATermTable -> Symbol -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Symbol
xv = case Symbol
xv of
    Symbol a :: Id
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Id -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Id
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Symbol" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Symbol)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Symbol" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Id)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Id
a') ->
      (ATermTable
att1, Id -> Symbol
Symbol Id
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Symbol)
forall a. String -> ShATerm -> a
fromShATermError "CSL.Symbol.Symbol" ShATerm
u

deriving instance GHC.Generics.Generic CSL.Symbol.Symbol
instance Data.Aeson.ToJSON CSL.Symbol.Symbol where
instance Data.Aeson.FromJSON CSL.Symbol.Symbol where

deriving instance GHC.Generics.Generic CSL.TreePO.InfInt
instance Data.Aeson.ToJSON CSL.TreePO.InfInt where
instance Data.Aeson.FromJSON CSL.TreePO.InfInt where

deriving instance GHC.Generics.Generic (CSL.TreePO.ClosedInterval a)
instance Data.Aeson.ToJSON a => Data.Aeson.ToJSON (CSL.TreePO.ClosedInterval a) where
instance Data.Aeson.FromJSON a => Data.Aeson.FromJSON (CSL.TreePO.ClosedInterval a) where

deriving instance GHC.Generics.Generic (CSL.TreePO.SetOrInterval a)
instance (Ord a,
          Data.Aeson.ToJSON a) => Data.Aeson.ToJSON (CSL.TreePO.SetOrInterval a) where
instance (Ord a,
          Data.Aeson.FromJSON a) => Data.Aeson.FromJSON (CSL.TreePO.SetOrInterval a) where

deriving instance GHC.Generics.Generic (CSL.TreePO.CIType a)
instance Data.Aeson.ToJSON a => Data.Aeson.ToJSON (CSL.TreePO.CIType a) where
instance Data.Aeson.FromJSON a => Data.Aeson.FromJSON (CSL.TreePO.CIType a) where

deriving instance GHC.Generics.Generic CSL.TreePO.InfDev
instance Data.Aeson.ToJSON CSL.TreePO.InfDev where
instance Data.Aeson.FromJSON CSL.TreePO.InfDev where

deriving instance GHC.Generics.Generic CSL.TreePO.SetOrdering
instance Data.Aeson.ToJSON CSL.TreePO.SetOrdering where
instance Data.Aeson.FromJSON CSL.TreePO.SetOrdering where

deriving instance GHC.Generics.Generic CSL.TreePO.Incomparable
instance Data.Aeson.ToJSON CSL.TreePO.Incomparable where
instance Data.Aeson.FromJSON CSL.TreePO.Incomparable where

instance ShATermConvertible CSL.TreePO.InfInt where
  toShATermAux :: ATermTable -> InfInt -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: InfInt
xv = case InfInt
xv of
    PosInf -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "PosInf" [] []) ATermTable
att0
    NegInf -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NegInf" [] []) ATermTable
att0
    FinInt a :: APInt
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> APInt -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 APInt
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FinInt" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, InfInt)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "PosInf" [] _ -> (ATermTable
att0, InfInt
PosInf)
    ShAAppl "NegInf" [] _ -> (ATermTable
att0, InfInt
NegInf)
    ShAAppl "FinInt" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, APInt)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: APInt
a') ->
      (ATermTable
att1, APInt -> InfInt
FinInt APInt
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, InfInt)
forall a. String -> ShATerm -> a
fromShATermError "CSL.TreePO.InfInt" ShATerm
u

instance ShATermConvertible a => ShATermConvertible (CSL.TreePO.ClosedInterval a) where
  toShATermAux :: ATermTable -> ClosedInterval a -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ClosedInterval a
xv = case ClosedInterval a
xv of
    ClosedInterval a :: a
a b :: a
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> a -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 a
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> a -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 a
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ClosedInterval" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, ClosedInterval a)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ClosedInterval" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, a)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: a
a') ->
      case Int -> ATermTable -> (ATermTable, a)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: a
b') ->
      (ATermTable
att2, a -> a -> ClosedInterval a
forall a. a -> a -> ClosedInterval a
ClosedInterval a
a' a
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ClosedInterval a)
forall a. String -> ShATerm -> a
fromShATermError "CSL.TreePO.ClosedInterval" ShATerm
u

instance (Ord a,
          ShATermConvertible a) => ShATermConvertible (CSL.TreePO.SetOrInterval a) where
  toShATermAux :: ATermTable -> SetOrInterval a -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SetOrInterval a
xv = case SetOrInterval a
xv of
    Set a :: Set a
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Set a -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Set a
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Set" [Int
a'] []) ATermTable
att1
    IntVal a :: (a, Bool)
a b :: (a, Bool)
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> (a, Bool) -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 (a, Bool)
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> (a, Bool) -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 (a, Bool)
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "IntVal" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SetOrInterval a)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Set" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Set a)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Set a
a') ->
      (ATermTable
att1, Set a -> SetOrInterval a
forall a. Set a -> SetOrInterval a
Set Set a
a') }
    ShAAppl "IntVal" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, (a, Bool))
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: (a, Bool)
a') ->
      case Int -> ATermTable -> (ATermTable, (a, Bool))
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: (a, Bool)
b') ->
      (ATermTable
att2, (a, Bool) -> (a, Bool) -> SetOrInterval a
forall a. (a, Bool) -> (a, Bool) -> SetOrInterval a
IntVal (a, Bool)
a' (a, Bool)
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SetOrInterval a)
forall a. String -> ShATerm -> a
fromShATermError "CSL.TreePO.SetOrInterval" ShATerm
u

instance ShATermConvertible a => ShATermConvertible (CSL.TreePO.CIType a) where
  toShATermAux :: ATermTable -> CIType a -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CIType a
xv = case CIType a
xv of
    CIType a :: (a, InfDev)
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> (a, InfDev) -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 (a, InfDev)
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CIType" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CIType a)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CIType" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, (a, InfDev))
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: (a, InfDev)
a') ->
      (ATermTable
att1, (a, InfDev) -> CIType a
forall a. (a, InfDev) -> CIType a
CIType (a, InfDev)
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CIType a)
forall a. String -> ShATerm -> a
fromShATermError "CSL.TreePO.CIType" ShATerm
u

instance ShATermConvertible CSL.TreePO.InfDev where
  toShATermAux :: ATermTable -> InfDev -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: InfDev
xv = case InfDev
xv of
    EpsLeft -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EpsLeft" [] []) ATermTable
att0
    Zero -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Zero" [] []) ATermTable
att0
    EpsRight -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EpsRight" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, InfDev)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "EpsLeft" [] _ -> (ATermTable
att0, InfDev
EpsLeft)
    ShAAppl "Zero" [] _ -> (ATermTable
att0, InfDev
Zero)
    ShAAppl "EpsRight" [] _ -> (ATermTable
att0, InfDev
EpsRight)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, InfDev)
forall a. String -> ShATerm -> a
fromShATermError "CSL.TreePO.InfDev" ShATerm
u

instance ShATermConvertible CSL.TreePO.SetOrdering where
  toShATermAux :: ATermTable -> SetOrdering -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SetOrdering
xv = case SetOrdering
xv of
    Comparable a :: Ordering
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Ordering -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Ordering
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Comparable" [Int
a'] []) ATermTable
att1
    Incomparable a :: Incomparable
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Incomparable -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Incomparable
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Incomparable" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SetOrdering)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Comparable" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Ordering)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Ordering
a') ->
      (ATermTable
att1, Ordering -> SetOrdering
Comparable Ordering
a') }
    ShAAppl "Incomparable" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Incomparable)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Incomparable
a') ->
      (ATermTable
att1, Incomparable -> SetOrdering
Incomparable Incomparable
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SetOrdering)
forall a. String -> ShATerm -> a
fromShATermError "CSL.TreePO.SetOrdering" ShATerm
u

instance ShATermConvertible CSL.TreePO.Incomparable where
  toShATermAux :: ATermTable -> Incomparable -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Incomparable
xv = case Incomparable
xv of
    Disjoint -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Disjoint" [] []) ATermTable
att0
    Overlap -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Overlap" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Incomparable)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Disjoint" [] _ -> (ATermTable
att0, Incomparable
Disjoint)
    ShAAppl "Overlap" [] _ -> (ATermTable
att0, Incomparable
Overlap)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Incomparable)
forall a. String -> ShATerm -> a
fromShATermError "CSL.TreePO.Incomparable" ShATerm
u