{-# OPTIONS -w -O0 #-}
{-# LANGUAGE CPP, StandaloneDeriving, DeriveDataTypeable, DeriveGeneric #-}
{- |
Module      :  OWL2/ATC_OWL2.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):
'OWL2.AS.EquivOrDisjoint'
'OWL2.AS.DomainOrRange'
'OWL2.AS.SameOrDifferent'
'OWL2.AS.Relation'
'OWL2.AS.Character'
'OWL2.AS.PositiveOrNegative'
'OWL2.AS.QuantifierType'
'OWL2.AS.DatatypeCat'
'OWL2.AS.CardinalityType'
'OWL2.AS.Cardinality'
'OWL2.AS.JunctionType'
'OWL2.AS.Entity'
'OWL2.AS.EntityType'
'OWL2.AS.TypedOrUntyped'
'OWL2.AS.Literal'
'OWL2.AS.NNInt'
'OWL2.AS.IntLit'
'OWL2.AS.DecLit'
'OWL2.AS.FloatLit'
'OWL2.AS.ObjectPropertyExpression'
'OWL2.AS.DataRange'
'OWL2.AS.ClassExpression'
'OWL2.AS.Annotation'
'OWL2.AS.AnnotationValue'
'OWL2.AS.AnnotationAxiom'
'OWL2.AS.AnnotationSubject'
'OWL2.AS.Axiom'
'OWL2.AS.ClassAxiom'
'OWL2.AS.ObjectPropertyAxiom'
'OWL2.AS.SubObjectPropertyExpression'
'OWL2.AS.DataPropertyAxiom'
'OWL2.AS.Assertion'
'OWL2.AS.Rule'
'OWL2.AS.IndividualArg'
'OWL2.AS.DataArg'
'OWL2.AS.UnknownArg'
'OWL2.AS.Atom'
'OWL2.AS.DGAtom'
'OWL2.AS.DGNodeAssertion'
'OWL2.AS.DGEdgeAssertion'
'OWL2.AS.OntologySyntaxType'
'OWL2.AS.OntologyMetadata'
'OWL2.AS.OntologyDocument'
'OWL2.AS.PrefixDeclaration'
'OWL2.AS.Ontology'
'OWL2.Symbols.ExtEntityType'
'OWL2.Symbols.SymbItems'
'OWL2.Symbols.SymbMapItems'
'OWL2.Symbols.RawSymb'
'OWL2.Sign.Sign'
'OWL2.Sign.SignAxiom'
'OWL2.Sign.RoleKind'
'OWL2.Sign.RoleType'
'OWL2.Sign.DesKind'
'OWL2.Sign.DomainOrRangeOrFunc'
'OWL2.Morphism.OWLMorphism'
'OWL2.ProfilesAndSublogics.ProfSub'
'OWL2.Sublogic.NumberRestrictions'
'OWL2.Sublogic.OWLSub'
'OWL2.Profiles.Profiles'
-}

{-
Generated by 'genRules' (automatic rule generation for DrIFT). Don't touch!!
  dependency files:
OWL2/AS.hs
OWL2/Symbols.hs
OWL2/Sign.hs
OWL2/Morphism.hs
OWL2/ProfilesAndSublogics.hs
OWL2/Sublogic.hs
OWL2/Profiles.hs
-}

module OWL2.ATC_OWL2 () where

import ATC.IRI
import ATC.Result
import ATerm.Lib
import Common.Doc
import Common.DocUtils
import Common.IRI
import Common.IRI (expandIRI')
import Common.IRI (setPrefix, mkIRI)
import Common.Id
import Common.Id (Id)
import Common.Id (nullRange)
import Common.Json.Instances
import Common.Keywords (stringS)
import Common.Lib.MapSet (setToMap)
import Common.Lib.State
import Common.Lib.State (execState)
import Common.Result
import Common.Utils (composeMap)
import Control.Monad
import Data.Aeson(ToJSON, FromJSON)
import Data.Char (intToDigit)
import Data.Data
import Data.Graph (stronglyConnComp, SCC(..))
import Data.List
import Data.List (stripPrefix)
import Data.Maybe
import Data.Maybe (mapMaybe)
import Data.Set (empty)
import Data.Tree
import GHC.Generics(Generic)
import OWL2.AS
import OWL2.ColonKeywords
import OWL2.Function
import OWL2.Keywords
import OWL2.ManchesterPrint ()
import OWL2.Morphism
import OWL2.Profiles
import OWL2.ProfilesAndSublogics
import OWL2.Sign
import OWL2.Sublogic
import OWL2.Symbols
import qualified Common.GlobalAnnotations as GA (PrefixMap)
import qualified Control.Monad.Fail as Fail
import qualified Data.Map as Map
import qualified Data.Set as Set

{-! for OWL2.AS.EquivOrDisjoint derive : ShATermConvertible !-}
{-! for OWL2.AS.DomainOrRange derive : ShATermConvertible !-}
{-! for OWL2.AS.SameOrDifferent derive : ShATermConvertible !-}
{-! for OWL2.AS.Relation derive : ShATermConvertible !-}
{-! for OWL2.AS.Character derive : ShATermConvertible !-}
{-! for OWL2.AS.PositiveOrNegative derive : ShATermConvertible !-}
{-! for OWL2.AS.QuantifierType derive : ShATermConvertible !-}
{-! for OWL2.AS.DatatypeCat derive : ShATermConvertible !-}
{-! for OWL2.AS.CardinalityType derive : ShATermConvertible !-}
{-! for OWL2.AS.Cardinality derive : ShATermConvertible !-}
{-! for OWL2.AS.JunctionType derive : ShATermConvertible !-}
{-! for OWL2.AS.Entity derive : ShATermConvertible !-}
{-! for OWL2.AS.EntityType derive : ShATermConvertible !-}
{-! for OWL2.AS.TypedOrUntyped derive : ShATermConvertible !-}
{-! for OWL2.AS.Literal derive : ShATermConvertible !-}
{-! for OWL2.AS.NNInt derive : ShATermConvertible !-}
{-! for OWL2.AS.IntLit derive : ShATermConvertible !-}
{-! for OWL2.AS.DecLit derive : ShATermConvertible !-}
{-! for OWL2.AS.FloatLit derive : ShATermConvertible !-}
{-! for OWL2.AS.ObjectPropertyExpression derive : ShATermConvertible !-}
{-! for OWL2.AS.DataRange derive : ShATermConvertible !-}
{-! for OWL2.AS.ClassExpression derive : ShATermConvertible !-}
{-! for OWL2.AS.Annotation derive : ShATermConvertible !-}
{-! for OWL2.AS.AnnotationValue derive : ShATermConvertible !-}
{-! for OWL2.AS.AnnotationAxiom derive : ShATermConvertible !-}
{-! for OWL2.AS.AnnotationSubject derive : ShATermConvertible !-}
{-! for OWL2.AS.Axiom derive : ShATermConvertible !-}
{-! for OWL2.AS.ClassAxiom derive : ShATermConvertible !-}
{-! for OWL2.AS.ObjectPropertyAxiom derive : ShATermConvertible !-}
{-! for OWL2.AS.SubObjectPropertyExpression derive : ShATermConvertible !-}
{-! for OWL2.AS.DataPropertyAxiom derive : ShATermConvertible !-}
{-! for OWL2.AS.Assertion derive : ShATermConvertible !-}
{-! for OWL2.AS.Rule derive : ShATermConvertible !-}
{-! for OWL2.AS.IndividualArg derive : ShATermConvertible !-}
{-! for OWL2.AS.DataArg derive : ShATermConvertible !-}
{-! for OWL2.AS.UnknownArg derive : ShATermConvertible !-}
{-! for OWL2.AS.Atom derive : ShATermConvertible !-}
{-! for OWL2.AS.DGAtom derive : ShATermConvertible !-}
{-! for OWL2.AS.DGNodeAssertion derive : ShATermConvertible !-}
{-! for OWL2.AS.DGEdgeAssertion derive : ShATermConvertible !-}
{-! for OWL2.AS.OntologySyntaxType derive : ShATermConvertible !-}
{-! for OWL2.AS.OntologyMetadata derive : ShATermConvertible !-}
{-! for OWL2.AS.OntologyDocument derive : ShATermConvertible !-}
{-! for OWL2.AS.PrefixDeclaration derive : ShATermConvertible !-}
{-! for OWL2.AS.Ontology derive : ShATermConvertible !-}
{-! for OWL2.Symbols.ExtEntityType derive : ShATermConvertible !-}
{-! for OWL2.Symbols.SymbItems derive : ShATermConvertible !-}
{-! for OWL2.Symbols.SymbMapItems derive : ShATermConvertible !-}
{-! for OWL2.Symbols.RawSymb derive : ShATermConvertible !-}
{-! for OWL2.Sign.Sign derive : ShATermConvertible !-}
{-! for OWL2.Sign.SignAxiom derive : ShATermConvertible !-}
{-! for OWL2.Sign.RoleKind derive : ShATermConvertible !-}
{-! for OWL2.Sign.RoleType derive : ShATermConvertible !-}
{-! for OWL2.Sign.DesKind derive : ShATermConvertible !-}
{-! for OWL2.Sign.DomainOrRangeOrFunc derive : ShATermConvertible !-}
{-! for OWL2.Morphism.OWLMorphism derive : ShATermConvertible !-}
{-! for OWL2.ProfilesAndSublogics.ProfSub derive : ShATermConvertible !-}
{-! for OWL2.Sublogic.NumberRestrictions derive : ShATermConvertible !-}
{-! for OWL2.Sublogic.OWLSub derive : ShATermConvertible !-}
{-! for OWL2.Profiles.Profiles derive : ShATermConvertible !-}

{-! for OWL2.AS.EquivOrDisjoint derive : Json !-}
{-! for OWL2.AS.DomainOrRange derive : Json !-}
{-! for OWL2.AS.SameOrDifferent derive : Json !-}
{-! for OWL2.AS.Relation derive : Json !-}
{-! for OWL2.AS.Character derive : Json !-}
{-! for OWL2.AS.PositiveOrNegative derive : Json !-}
{-! for OWL2.AS.QuantifierType derive : Json !-}
{-! for OWL2.AS.DatatypeCat derive : Json !-}
{-! for OWL2.AS.CardinalityType derive : Json !-}
{-! for OWL2.AS.Cardinality derive : Json !-}
{-! for OWL2.AS.JunctionType derive : Json !-}
{-! for OWL2.AS.Entity derive : Json !-}
{-! for OWL2.AS.EntityType derive : Json !-}
{-! for OWL2.AS.TypedOrUntyped derive : Json !-}
{-! for OWL2.AS.Literal derive : Json !-}
{-! for OWL2.AS.NNInt derive : Json !-}
{-! for OWL2.AS.IntLit derive : Json !-}
{-! for OWL2.AS.DecLit derive : Json !-}
{-! for OWL2.AS.FloatLit derive : Json !-}
{-! for OWL2.AS.ObjectPropertyExpression derive : Json !-}
{-! for OWL2.AS.DataRange derive : Json !-}
{-! for OWL2.AS.ClassExpression derive : Json !-}
{-! for OWL2.AS.Annotation derive : Json !-}
{-! for OWL2.AS.AnnotationValue derive : Json !-}
{-! for OWL2.AS.AnnotationAxiom derive : Json !-}
{-! for OWL2.AS.AnnotationSubject derive : Json !-}
{-! for OWL2.AS.Axiom derive : Json !-}
{-! for OWL2.AS.ClassAxiom derive : Json !-}
{-! for OWL2.AS.ObjectPropertyAxiom derive : Json !-}
{-! for OWL2.AS.SubObjectPropertyExpression derive : Json !-}
{-! for OWL2.AS.DataPropertyAxiom derive : Json !-}
{-! for OWL2.AS.Assertion derive : Json !-}
{-! for OWL2.AS.Rule derive : Json !-}
{-! for OWL2.AS.IndividualArg derive : Json !-}
{-! for OWL2.AS.DataArg derive : Json !-}
{-! for OWL2.AS.UnknownArg derive : Json !-}
{-! for OWL2.AS.Atom derive : Json !-}
{-! for OWL2.AS.DGAtom derive : Json !-}
{-! for OWL2.AS.DGNodeAssertion derive : Json !-}
{-! for OWL2.AS.DGEdgeAssertion derive : Json !-}
{-! for OWL2.AS.OntologySyntaxType derive : Json !-}
{-! for OWL2.AS.OntologyMetadata derive : Json !-}
{-! for OWL2.AS.OntologyDocument derive : Json !-}
{-! for OWL2.AS.PrefixDeclaration derive : Json !-}
{-! for OWL2.AS.Ontology derive : Json !-}
{-! for OWL2.Symbols.ExtEntityType derive : Json !-}
{-! for OWL2.Symbols.SymbItems derive : Json !-}
{-! for OWL2.Symbols.SymbMapItems derive : Json !-}
{-! for OWL2.Symbols.RawSymb derive : Json !-}
{-! for OWL2.Sign.Sign derive : Json !-}
{-! for OWL2.Sign.SignAxiom derive : Json !-}
{-! for OWL2.Sign.RoleKind derive : Json !-}
{-! for OWL2.Sign.RoleType derive : Json !-}
{-! for OWL2.Sign.DesKind derive : Json !-}
{-! for OWL2.Sign.DomainOrRangeOrFunc derive : Json !-}
{-! for OWL2.Morphism.OWLMorphism derive : Json !-}
{-! for OWL2.ProfilesAndSublogics.ProfSub derive : Json !-}
{-! for OWL2.Sublogic.NumberRestrictions derive : Json !-}
{-! for OWL2.Sublogic.OWLSub derive : Json !-}
{-! for OWL2.Profiles.Profiles derive : Json !-}

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

deriving instance GHC.Generics.Generic OWL2.AS.Ontology
instance Data.Aeson.ToJSON OWL2.AS.Ontology where
instance Data.Aeson.FromJSON OWL2.AS.Ontology where

deriving instance GHC.Generics.Generic OWL2.AS.PrefixDeclaration
instance Data.Aeson.ToJSON OWL2.AS.PrefixDeclaration where
instance Data.Aeson.FromJSON OWL2.AS.PrefixDeclaration where

deriving instance GHC.Generics.Generic OWL2.AS.OntologyDocument
instance Data.Aeson.ToJSON OWL2.AS.OntologyDocument where
instance Data.Aeson.FromJSON OWL2.AS.OntologyDocument where

deriving instance GHC.Generics.Generic OWL2.AS.OntologyMetadata
instance Data.Aeson.ToJSON OWL2.AS.OntologyMetadata where
instance Data.Aeson.FromJSON OWL2.AS.OntologyMetadata where

deriving instance GHC.Generics.Generic OWL2.AS.OntologySyntaxType
instance Data.Aeson.ToJSON OWL2.AS.OntologySyntaxType where
instance Data.Aeson.FromJSON OWL2.AS.OntologySyntaxType where

deriving instance GHC.Generics.Generic OWL2.AS.DGEdgeAssertion
instance Data.Aeson.ToJSON OWL2.AS.DGEdgeAssertion where
instance Data.Aeson.FromJSON OWL2.AS.DGEdgeAssertion where

deriving instance GHC.Generics.Generic OWL2.AS.DGNodeAssertion
instance Data.Aeson.ToJSON OWL2.AS.DGNodeAssertion where
instance Data.Aeson.FromJSON OWL2.AS.DGNodeAssertion where

deriving instance GHC.Generics.Generic OWL2.AS.DGAtom
instance Data.Aeson.ToJSON OWL2.AS.DGAtom where
instance Data.Aeson.FromJSON OWL2.AS.DGAtom where

deriving instance GHC.Generics.Generic OWL2.AS.Atom
instance Data.Aeson.ToJSON OWL2.AS.Atom where
instance Data.Aeson.FromJSON OWL2.AS.Atom where

deriving instance GHC.Generics.Generic OWL2.AS.UnknownArg
instance Data.Aeson.ToJSON OWL2.AS.UnknownArg where
instance Data.Aeson.FromJSON OWL2.AS.UnknownArg where

deriving instance GHC.Generics.Generic OWL2.AS.DataArg
instance Data.Aeson.ToJSON OWL2.AS.DataArg where
instance Data.Aeson.FromJSON OWL2.AS.DataArg where

deriving instance GHC.Generics.Generic OWL2.AS.IndividualArg
instance Data.Aeson.ToJSON OWL2.AS.IndividualArg where
instance Data.Aeson.FromJSON OWL2.AS.IndividualArg where

deriving instance GHC.Generics.Generic OWL2.AS.Rule
instance Data.Aeson.ToJSON OWL2.AS.Rule where
instance Data.Aeson.FromJSON OWL2.AS.Rule where

deriving instance GHC.Generics.Generic OWL2.AS.Assertion
instance Data.Aeson.ToJSON OWL2.AS.Assertion where
instance Data.Aeson.FromJSON OWL2.AS.Assertion where

deriving instance GHC.Generics.Generic OWL2.AS.DataPropertyAxiom
instance Data.Aeson.ToJSON OWL2.AS.DataPropertyAxiom where
instance Data.Aeson.FromJSON OWL2.AS.DataPropertyAxiom where

deriving instance GHC.Generics.Generic OWL2.AS.SubObjectPropertyExpression
instance Data.Aeson.ToJSON OWL2.AS.SubObjectPropertyExpression where
instance Data.Aeson.FromJSON OWL2.AS.SubObjectPropertyExpression where

deriving instance GHC.Generics.Generic OWL2.AS.ObjectPropertyAxiom
instance Data.Aeson.ToJSON OWL2.AS.ObjectPropertyAxiom where
instance Data.Aeson.FromJSON OWL2.AS.ObjectPropertyAxiom where

deriving instance GHC.Generics.Generic OWL2.AS.ClassAxiom
instance Data.Aeson.ToJSON OWL2.AS.ClassAxiom where
instance Data.Aeson.FromJSON OWL2.AS.ClassAxiom where

deriving instance GHC.Generics.Generic OWL2.AS.Axiom
instance Data.Aeson.ToJSON OWL2.AS.Axiom where
instance Data.Aeson.FromJSON OWL2.AS.Axiom where

deriving instance GHC.Generics.Generic OWL2.AS.AnnotationSubject
instance Data.Aeson.ToJSON OWL2.AS.AnnotationSubject where
instance Data.Aeson.FromJSON OWL2.AS.AnnotationSubject where

deriving instance GHC.Generics.Generic OWL2.AS.AnnotationAxiom
instance Data.Aeson.ToJSON OWL2.AS.AnnotationAxiom where
instance Data.Aeson.FromJSON OWL2.AS.AnnotationAxiom where

deriving instance GHC.Generics.Generic OWL2.AS.AnnotationValue
instance Data.Aeson.ToJSON OWL2.AS.AnnotationValue where
instance Data.Aeson.FromJSON OWL2.AS.AnnotationValue where

deriving instance GHC.Generics.Generic OWL2.AS.Annotation
instance Data.Aeson.ToJSON OWL2.AS.Annotation where
instance Data.Aeson.FromJSON OWL2.AS.Annotation where

deriving instance GHC.Generics.Generic OWL2.AS.ClassExpression
instance Data.Aeson.ToJSON OWL2.AS.ClassExpression where
instance Data.Aeson.FromJSON OWL2.AS.ClassExpression where

deriving instance GHC.Generics.Generic OWL2.AS.DataRange
instance Data.Aeson.ToJSON OWL2.AS.DataRange where
instance Data.Aeson.FromJSON OWL2.AS.DataRange where

deriving instance GHC.Generics.Generic OWL2.AS.ObjectPropertyExpression
instance Data.Aeson.ToJSON OWL2.AS.ObjectPropertyExpression where
instance Data.Aeson.FromJSON OWL2.AS.ObjectPropertyExpression where

deriving instance GHC.Generics.Generic OWL2.AS.FloatLit
instance Data.Aeson.ToJSON OWL2.AS.FloatLit where
instance Data.Aeson.FromJSON OWL2.AS.FloatLit where

deriving instance GHC.Generics.Generic OWL2.AS.DecLit
instance Data.Aeson.ToJSON OWL2.AS.DecLit where
instance Data.Aeson.FromJSON OWL2.AS.DecLit where

deriving instance GHC.Generics.Generic OWL2.AS.IntLit
instance Data.Aeson.ToJSON OWL2.AS.IntLit where
instance Data.Aeson.FromJSON OWL2.AS.IntLit where

deriving instance GHC.Generics.Generic OWL2.AS.NNInt
instance Data.Aeson.ToJSON OWL2.AS.NNInt where
instance Data.Aeson.FromJSON OWL2.AS.NNInt where

deriving instance GHC.Generics.Generic OWL2.AS.Literal
instance Data.Aeson.ToJSON OWL2.AS.Literal where
instance Data.Aeson.FromJSON OWL2.AS.Literal where

deriving instance GHC.Generics.Generic OWL2.AS.TypedOrUntyped
instance Data.Aeson.ToJSON OWL2.AS.TypedOrUntyped where
instance Data.Aeson.FromJSON OWL2.AS.TypedOrUntyped where

deriving instance GHC.Generics.Generic OWL2.AS.EntityType
instance Data.Aeson.ToJSON OWL2.AS.EntityType where
instance Data.Aeson.FromJSON OWL2.AS.EntityType where

deriving instance GHC.Generics.Generic OWL2.AS.Entity
instance Data.Aeson.ToJSON OWL2.AS.Entity where
instance Data.Aeson.FromJSON OWL2.AS.Entity where

deriving instance GHC.Generics.Generic OWL2.AS.JunctionType
instance Data.Aeson.ToJSON OWL2.AS.JunctionType where
instance Data.Aeson.FromJSON OWL2.AS.JunctionType where

deriving instance GHC.Generics.Generic (OWL2.AS.Cardinality a b)
instance (Data.Aeson.ToJSON a,
          Data.Aeson.ToJSON b) => Data.Aeson.ToJSON (OWL2.AS.Cardinality a b) where
instance (Data.Aeson.FromJSON a,
          Data.Aeson.FromJSON b) => Data.Aeson.FromJSON (OWL2.AS.Cardinality a b) where

deriving instance GHC.Generics.Generic OWL2.AS.CardinalityType
instance Data.Aeson.ToJSON OWL2.AS.CardinalityType where
instance Data.Aeson.FromJSON OWL2.AS.CardinalityType where

deriving instance GHC.Generics.Generic OWL2.AS.DatatypeCat
instance Data.Aeson.ToJSON OWL2.AS.DatatypeCat where
instance Data.Aeson.FromJSON OWL2.AS.DatatypeCat where

deriving instance GHC.Generics.Generic OWL2.AS.QuantifierType
instance Data.Aeson.ToJSON OWL2.AS.QuantifierType where
instance Data.Aeson.FromJSON OWL2.AS.QuantifierType where

deriving instance GHC.Generics.Generic OWL2.AS.PositiveOrNegative
instance Data.Aeson.ToJSON OWL2.AS.PositiveOrNegative where
instance Data.Aeson.FromJSON OWL2.AS.PositiveOrNegative where

deriving instance GHC.Generics.Generic OWL2.AS.Character
instance Data.Aeson.ToJSON OWL2.AS.Character where
instance Data.Aeson.FromJSON OWL2.AS.Character where

deriving instance GHC.Generics.Generic OWL2.AS.Relation
instance Data.Aeson.ToJSON OWL2.AS.Relation where
instance Data.Aeson.FromJSON OWL2.AS.Relation where

deriving instance GHC.Generics.Generic OWL2.AS.SameOrDifferent
instance Data.Aeson.ToJSON OWL2.AS.SameOrDifferent where
instance Data.Aeson.FromJSON OWL2.AS.SameOrDifferent where

deriving instance GHC.Generics.Generic OWL2.AS.DomainOrRange
instance Data.Aeson.ToJSON OWL2.AS.DomainOrRange where
instance Data.Aeson.FromJSON OWL2.AS.DomainOrRange where

deriving instance GHC.Generics.Generic OWL2.AS.EquivOrDisjoint
instance Data.Aeson.ToJSON OWL2.AS.EquivOrDisjoint where
instance Data.Aeson.FromJSON OWL2.AS.EquivOrDisjoint where

instance ShATermConvertible OWL2.AS.Ontology where
  toShATermAux :: ATermTable -> Ontology -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Ontology
xv = case Ontology
xv of
    Ontology a :: Maybe OntologyIRI
a b :: Maybe OntologyIRI
b c :: DirectlyImportsDocuments
c d :: [Annotation]
d e :: [Axiom]
e -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Maybe OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Maybe OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Maybe OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Maybe OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 DirectlyImportsDocuments
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 [Annotation]
d
      (att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> [Axiom] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att4 [Axiom]
e
      (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 "Ontology" [Int
a', Int
b', Int
c', Int
d', Int
e'] []) ATermTable
att5
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Ontology)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Ontology" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e] _ ->
      case Int -> ATermTable -> (ATermTable, Maybe OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Maybe OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, Maybe OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Maybe OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: DirectlyImportsDocuments
c') ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: [Annotation]
d') ->
      case Int -> ATermTable -> (ATermTable, [Axiom])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
e ATermTable
att4 of
      { (att5 :: ATermTable
att5, e' :: [Axiom]
e') ->
      (ATermTable
att5, Maybe OntologyIRI
-> Maybe OntologyIRI
-> DirectlyImportsDocuments
-> [Annotation]
-> [Axiom]
-> Ontology
Ontology Maybe OntologyIRI
a' Maybe OntologyIRI
b' DirectlyImportsDocuments
c' [Annotation]
d' [Axiom]
e') }}}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Ontology)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Ontology" ShATerm
u

instance ShATermConvertible OWL2.AS.PrefixDeclaration where
  toShATermAux :: ATermTable -> PrefixDeclaration -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: PrefixDeclaration
xv = case PrefixDeclaration
xv of
    PrefixDeclaration a :: String
a b :: OntologyIRI
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 -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
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 "PrefixDeclaration" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, PrefixDeclaration)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "PrefixDeclaration" [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, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      (ATermTable
att2, String -> OntologyIRI -> PrefixDeclaration
PrefixDeclaration String
a' OntologyIRI
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, PrefixDeclaration)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.PrefixDeclaration" ShATerm
u

instance ShATermConvertible OWL2.AS.OntologyDocument where
  toShATermAux :: ATermTable -> OntologyDocument -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OntologyDocument
xv = case OntologyDocument
xv of
    OntologyDocument a :: OntologyMetadata
a b :: PrefixMap
b c :: Ontology
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyMetadata -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyMetadata
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PrefixMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PrefixMap
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Ontology -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Ontology
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 "OntologyDocument" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OntologyDocument)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OntologyDocument" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyMetadata)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyMetadata
a') ->
      case Int -> ATermTable -> (ATermTable, PrefixMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PrefixMap
b') ->
      case Int -> ATermTable -> (ATermTable, Ontology)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Ontology
c') ->
      (ATermTable
att3, OntologyMetadata -> PrefixMap -> Ontology -> OntologyDocument
OntologyDocument OntologyMetadata
a' PrefixMap
b' Ontology
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OntologyDocument)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.OntologyDocument" ShATerm
u

instance ShATermConvertible OWL2.AS.OntologyMetadata where
  toShATermAux :: ATermTable -> OntologyMetadata -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OntologyMetadata
xv = case OntologyMetadata
xv of
    OntologyMetadata a :: OntologySyntaxType
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologySyntaxType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologySyntaxType
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 "OntologyMetadata" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OntologyMetadata)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OntologyMetadata" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologySyntaxType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologySyntaxType
a') ->
      (ATermTable
att1, OntologySyntaxType -> OntologyMetadata
OntologyMetadata OntologySyntaxType
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OntologyMetadata)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.OntologyMetadata" ShATerm
u

instance ShATermConvertible OWL2.AS.OntologySyntaxType where
  toShATermAux :: ATermTable -> OntologySyntaxType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OntologySyntaxType
xv = case OntologySyntaxType
xv of
    MS -> (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 "MS" [] []) ATermTable
att0
    AS -> (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 "AS" [] []) ATermTable
att0
    XML -> (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 "XML" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OntologySyntaxType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "MS" [] _ -> (ATermTable
att0, OntologySyntaxType
MS)
    ShAAppl "AS" [] _ -> (ATermTable
att0, OntologySyntaxType
AS)
    ShAAppl "XML" [] _ -> (ATermTable
att0, OntologySyntaxType
XML)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OntologySyntaxType)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.OntologySyntaxType" ShATerm
u

instance ShATermConvertible OWL2.AS.DGEdgeAssertion where
  toShATermAux :: ATermTable -> DGEdgeAssertion -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DGEdgeAssertion
xv = case DGEdgeAssertion
xv of
    DGEdgeAssertion a :: OntologyIRI
a b :: OntologyIRI
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
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 "DGEdgeAssertion" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DGEdgeAssertion)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DGEdgeAssertion" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, OntologyIRI -> OntologyIRI -> OntologyIRI -> DGEdgeAssertion
DGEdgeAssertion OntologyIRI
a' OntologyIRI
b' OntologyIRI
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DGEdgeAssertion)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DGEdgeAssertion" ShATerm
u

instance ShATermConvertible OWL2.AS.DGNodeAssertion where
  toShATermAux :: ATermTable -> DGNodeAssertion -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DGNodeAssertion
xv = case DGNodeAssertion
xv of
    DGNodeAssertion a :: OntologyIRI
a b :: OntologyIRI
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
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 "DGNodeAssertion" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DGNodeAssertion)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DGNodeAssertion" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      (ATermTable
att2, OntologyIRI -> OntologyIRI -> DGNodeAssertion
DGNodeAssertion OntologyIRI
a' OntologyIRI
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DGNodeAssertion)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DGNodeAssertion" ShATerm
u

instance ShATermConvertible OWL2.AS.DGAtom where
  toShATermAux :: ATermTable -> DGAtom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DGAtom
xv = case DGAtom
xv of
    DGClassAtom a :: ClassExpression
a b :: IndividualArg
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ClassExpression
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
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 "DGClassAtom" [Int
a', Int
b'] []) ATermTable
att2
    DGObjectPropertyAtom a :: ObjectPropertyExpression
a b :: IndividualArg
b c :: IndividualArg
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyExpression
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 IndividualArg
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 "DGObjectPropertyAtom" [Int
a', Int
b',
                                                         Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DGAtom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DGClassAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ClassExpression
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      (ATermTable
att2, ClassExpression -> IndividualArg -> DGAtom
DGClassAtom ClassExpression
a' IndividualArg
b') }}
    ShAAppl "DGObjectPropertyAtom" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ObjectPropertyExpression
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: IndividualArg
c') ->
      (ATermTable
att3, ObjectPropertyExpression
-> IndividualArg -> IndividualArg -> DGAtom
DGObjectPropertyAtom ObjectPropertyExpression
a' IndividualArg
b' IndividualArg
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DGAtom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DGAtom" ShATerm
u

instance ShATermConvertible OWL2.AS.Atom where
  toShATermAux :: ATermTable -> Atom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Atom
xv = case Atom
xv of
    ClassAtom a :: ClassExpression
a b :: IndividualArg
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ClassExpression
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
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 "ClassAtom" [Int
a', Int
b'] []) ATermTable
att2
    DataRangeAtom a :: DataRange
a b :: DataArg
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DataRange -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DataRange
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DataArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DataArg
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 "DataRangeAtom" [Int
a', Int
b'] []) ATermTable
att2
    ObjectPropertyAtom a :: ObjectPropertyExpression
a b :: IndividualArg
b c :: IndividualArg
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyExpression
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 IndividualArg
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 "ObjectPropertyAtom" [Int
a', Int
b',
                                                       Int
c'] []) ATermTable
att3
    DataPropertyAtom a :: OntologyIRI
a b :: IndividualArg
b c :: DataArg
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> DataArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 DataArg
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 "DataPropertyAtom" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    BuiltInAtom a :: OntologyIRI
a b :: [DataArg]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [DataArg] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [DataArg]
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 "BuiltInAtom" [Int
a', Int
b'] []) ATermTable
att2
    SameIndividualAtom a :: IndividualArg
a b :: IndividualArg
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 IndividualArg
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
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 "SameIndividualAtom" [Int
a', Int
b'] []) ATermTable
att2
    DifferentIndividualsAtom a :: IndividualArg
a b :: IndividualArg
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 IndividualArg
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
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 "DifferentIndividualsAtom" [Int
a',
                                                             Int
b'] []) ATermTable
att2
    UnknownUnaryAtom a :: OntologyIRI
a b :: UnknownArg
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> UnknownArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 UnknownArg
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 "UnknownUnaryAtom" [Int
a', Int
b'] []) ATermTable
att2
    UnknownBinaryAtom a :: OntologyIRI
a b :: UnknownArg
b c :: UnknownArg
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> UnknownArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 UnknownArg
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> UnknownArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 UnknownArg
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 "UnknownBinaryAtom" [Int
a', Int
b',
                                                      Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Atom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ClassAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ClassExpression
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      (ATermTable
att2, ClassExpression -> IndividualArg -> Atom
ClassAtom ClassExpression
a' IndividualArg
b') }}
    ShAAppl "DataRangeAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, DataRange)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DataRange
a') ->
      case Int -> ATermTable -> (ATermTable, DataArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: DataArg
b') ->
      (ATermTable
att2, DataRange -> DataArg -> Atom
DataRangeAtom DataRange
a' DataArg
b') }}
    ShAAppl "ObjectPropertyAtom" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ObjectPropertyExpression
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: IndividualArg
c') ->
      (ATermTable
att3, ObjectPropertyExpression -> IndividualArg -> IndividualArg -> Atom
ObjectPropertyAtom ObjectPropertyExpression
a' IndividualArg
b' IndividualArg
c') }}}
    ShAAppl "DataPropertyAtom" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      case Int -> ATermTable -> (ATermTable, DataArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: DataArg
c') ->
      (ATermTable
att3, OntologyIRI -> IndividualArg -> DataArg -> Atom
DataPropertyAtom OntologyIRI
a' IndividualArg
b' DataArg
c') }}}
    ShAAppl "BuiltInAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, [DataArg])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [DataArg]
b') ->
      (ATermTable
att2, OntologyIRI -> [DataArg] -> Atom
BuiltInAtom OntologyIRI
a' [DataArg]
b') }}
    ShAAppl "SameIndividualAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: IndividualArg
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      (ATermTable
att2, IndividualArg -> IndividualArg -> Atom
SameIndividualAtom IndividualArg
a' IndividualArg
b') }}
    ShAAppl "DifferentIndividualsAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: IndividualArg
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      (ATermTable
att2, IndividualArg -> IndividualArg -> Atom
DifferentIndividualsAtom IndividualArg
a' IndividualArg
b') }}
    ShAAppl "UnknownUnaryAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, UnknownArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: UnknownArg
b') ->
      (ATermTable
att2, OntologyIRI -> UnknownArg -> Atom
UnknownUnaryAtom OntologyIRI
a' UnknownArg
b') }}
    ShAAppl "UnknownBinaryAtom" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, UnknownArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: UnknownArg
b') ->
      case Int -> ATermTable -> (ATermTable, UnknownArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: UnknownArg
c') ->
      (ATermTable
att3, OntologyIRI -> UnknownArg -> UnknownArg -> Atom
UnknownBinaryAtom OntologyIRI
a' UnknownArg
b' UnknownArg
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Atom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Atom" ShATerm
u

instance ShATermConvertible OWL2.AS.UnknownArg where
  toShATermAux :: ATermTable -> UnknownArg -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: UnknownArg
xv = case UnknownArg
xv of
    IndividualArg a :: IndividualArg
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 IndividualArg
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 "IndividualArg" [Int
a'] []) ATermTable
att1
    DataArg a :: DataArg
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DataArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DataArg
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 "DataArg" [Int
a'] []) ATermTable
att1
    Variable a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
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 "Variable" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, UnknownArg)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "IndividualArg" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: IndividualArg
a') ->
      (ATermTable
att1, IndividualArg -> UnknownArg
IndividualArg IndividualArg
a') }
    ShAAppl "DataArg" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, DataArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DataArg
a') ->
      (ATermTable
att1, DataArg -> UnknownArg
DataArg DataArg
a') }
    ShAAppl "Variable" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> UnknownArg
Variable OntologyIRI
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, UnknownArg)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.UnknownArg" ShATerm
u

instance ShATermConvertible OWL2.AS.DataArg where
  toShATermAux :: ATermTable -> DataArg -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DataArg
xv = case DataArg
xv of
    DArg a :: Literal
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Literal -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Literal
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 "DArg" [Int
a'] []) ATermTable
att1
    DVar a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
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 "DVar" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DataArg)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DArg" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Literal)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Literal
a') ->
      (ATermTable
att1, Literal -> DataArg
DArg Literal
a') }
    ShAAppl "DVar" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> DataArg
DVar OntologyIRI
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DataArg)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DataArg" ShATerm
u

instance ShATermConvertible OWL2.AS.IndividualArg where
  toShATermAux :: ATermTable -> IndividualArg -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: IndividualArg
xv = case IndividualArg
xv of
    IArg a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
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 "IArg" [Int
a'] []) ATermTable
att1
    IVar a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
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 "IVar" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, IndividualArg)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "IArg" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> IndividualArg
IArg OntologyIRI
a') }
    ShAAppl "IVar" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> IndividualArg
IVar OntologyIRI
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, IndividualArg)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.IndividualArg" ShATerm
u

instance ShATermConvertible OWL2.AS.Rule where
  toShATermAux :: ATermTable -> Rule -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Rule
xv = case Rule
xv of
    DLSafeRule a :: [Annotation]
a b :: [Atom]
b c :: [Atom]
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [Atom] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [Atom]
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [Atom] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [Atom]
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 "DLSafeRule" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    DGRule a :: [Annotation]
a b :: [DGAtom]
b c :: [DGAtom]
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [DGAtom] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [DGAtom]
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [DGAtom] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [DGAtom]
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 "DGRule" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Rule)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DLSafeRule" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, [Atom])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [Atom]
b') ->
      case Int -> ATermTable -> (ATermTable, [Atom])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [Atom]
c') ->
      (ATermTable
att3, [Annotation] -> [Atom] -> [Atom] -> Rule
DLSafeRule [Annotation]
a' [Atom]
b' [Atom]
c') }}}
    ShAAppl "DGRule" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, [DGAtom])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [DGAtom]
b') ->
      case Int -> ATermTable -> (ATermTable, [DGAtom])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [DGAtom]
c') ->
      (ATermTable
att3, [Annotation] -> [DGAtom] -> [DGAtom] -> Rule
DGRule [Annotation]
a' [DGAtom]
b' [DGAtom]
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Rule)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Rule" ShATerm
u

instance ShATermConvertible OWL2.AS.Assertion where
  toShATermAux :: ATermTable -> Assertion -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Assertion
xv = case Assertion
xv of
    SameIndividual a :: [Annotation]
a b :: DirectlyImportsDocuments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DirectlyImportsDocuments
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 "SameIndividual" [Int
a', Int
b'] []) ATermTable
att2
    DifferentIndividuals a :: [Annotation]
a b :: DirectlyImportsDocuments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DirectlyImportsDocuments
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 "DifferentIndividuals" [Int
a', Int
b'] []) ATermTable
att2
    ClassAssertion a :: [Annotation]
a b :: ClassExpression
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ClassExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
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 "ClassAssertion" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    ObjectPropertyAssertion a :: [Annotation]
a b :: ObjectPropertyExpression
b c :: OntologyIRI
c d :: OntologyIRI
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 OntologyIRI
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 "ObjectPropertyAssertion" [Int
a', Int
b', Int
c',
                                                            Int
d'] []) ATermTable
att4
    NegativeObjectPropertyAssertion a :: [Annotation]
a b :: ObjectPropertyExpression
b c :: OntologyIRI
c d :: OntologyIRI
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 OntologyIRI
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 "NegativeObjectPropertyAssertion" [Int
a',
                                                                    Int
b', Int
c', Int
d'] []) ATermTable
att4
    DataPropertyAssertion a :: [Annotation]
a b :: OntologyIRI
b c :: OntologyIRI
c d :: Literal
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Literal -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Literal
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 "DataPropertyAssertion" [Int
a', Int
b', Int
c',
                                                          Int
d'] []) ATermTable
att4
    NegativeDataPropertyAssertion a :: [Annotation]
a b :: OntologyIRI
b c :: OntologyIRI
c d :: Literal
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Literal -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Literal
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 "NegativeDataPropertyAssertion" [Int
a', Int
b',
                                                                  Int
c', Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Assertion)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SameIndividual" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: DirectlyImportsDocuments
b') ->
      (ATermTable
att2, [Annotation] -> DirectlyImportsDocuments -> Assertion
SameIndividual [Annotation]
a' DirectlyImportsDocuments
b') }}
    ShAAppl "DifferentIndividuals" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: DirectlyImportsDocuments
b') ->
      (ATermTable
att2, [Annotation] -> DirectlyImportsDocuments -> Assertion
DifferentIndividuals [Annotation]
a' DirectlyImportsDocuments
b') }}
    ShAAppl "ClassAssertion" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ClassExpression
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, [Annotation] -> ClassExpression -> OntologyIRI -> Assertion
ClassAssertion [Annotation]
a' ClassExpression
b' OntologyIRI
c') }}}
    ShAAppl "ObjectPropertyAssertion" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: OntologyIRI
d') ->
      (ATermTable
att4, [Annotation]
-> ObjectPropertyExpression
-> OntologyIRI
-> OntologyIRI
-> Assertion
ObjectPropertyAssertion [Annotation]
a' ObjectPropertyExpression
b' OntologyIRI
c' OntologyIRI
d') }}}}
    ShAAppl "NegativeObjectPropertyAssertion" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: OntologyIRI
d') ->
      (ATermTable
att4, [Annotation]
-> ObjectPropertyExpression
-> OntologyIRI
-> OntologyIRI
-> Assertion
NegativeObjectPropertyAssertion [Annotation]
a' ObjectPropertyExpression
b' OntologyIRI
c' OntologyIRI
d') }}}}
    ShAAppl "DataPropertyAssertion" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      case Int -> ATermTable -> (ATermTable, Literal)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Literal
d') ->
      (ATermTable
att4, [Annotation] -> OntologyIRI -> OntologyIRI -> Literal -> Assertion
DataPropertyAssertion [Annotation]
a' OntologyIRI
b' OntologyIRI
c' Literal
d') }}}}
    ShAAppl "NegativeDataPropertyAssertion" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      case Int -> ATermTable -> (ATermTable, Literal)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Literal
d') ->
      (ATermTable
att4, [Annotation] -> OntologyIRI -> OntologyIRI -> Literal -> Assertion
NegativeDataPropertyAssertion [Annotation]
a' OntologyIRI
b' OntologyIRI
c' Literal
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Assertion)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Assertion" ShATerm
u

instance ShATermConvertible OWL2.AS.DataPropertyAxiom where
  toShATermAux :: ATermTable -> DataPropertyAxiom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DataPropertyAxiom
xv = case DataPropertyAxiom
xv of
    SubDataPropertyOf a :: [Annotation]
a b :: OntologyIRI
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
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 "SubDataPropertyOf" [Int
a', Int
b',
                                                      Int
c'] []) ATermTable
att3
    EquivalentDataProperties a :: [Annotation]
a b :: DirectlyImportsDocuments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DirectlyImportsDocuments
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 "EquivalentDataProperties" [Int
a',
                                                             Int
b'] []) ATermTable
att2
    DisjointDataProperties a :: [Annotation]
a b :: DirectlyImportsDocuments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DirectlyImportsDocuments
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 "DisjointDataProperties" [Int
a',
                                                           Int
b'] []) ATermTable
att2
    DataPropertyDomain a :: [Annotation]
a b :: OntologyIRI
b c :: ClassExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ClassExpression
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 "DataPropertyDomain" [Int
a', Int
b',
                                                       Int
c'] []) ATermTable
att3
    DataPropertyRange a :: [Annotation]
a b :: OntologyIRI
b c :: DataRange
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> DataRange -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 DataRange
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 "DataPropertyRange" [Int
a', Int
b',
                                                      Int
c'] []) ATermTable
att3
    FunctionalDataProperty a :: [Annotation]
a b :: OntologyIRI
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
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 "FunctionalDataProperty" [Int
a',
                                                           Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DataPropertyAxiom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SubDataPropertyOf" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> OntologyIRI -> DataPropertyAxiom
SubDataPropertyOf [Annotation]
a' OntologyIRI
b' OntologyIRI
c') }}}
    ShAAppl "EquivalentDataProperties" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: DirectlyImportsDocuments
b') ->
      (ATermTable
att2, [Annotation] -> DirectlyImportsDocuments -> DataPropertyAxiom
EquivalentDataProperties [Annotation]
a' DirectlyImportsDocuments
b') }}
    ShAAppl "DisjointDataProperties" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: DirectlyImportsDocuments
b') ->
      (ATermTable
att2, [Annotation] -> DirectlyImportsDocuments -> DataPropertyAxiom
DisjointDataProperties [Annotation]
a' DirectlyImportsDocuments
b') }}
    ShAAppl "DataPropertyDomain" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ClassExpression
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> ClassExpression -> DataPropertyAxiom
DataPropertyDomain [Annotation]
a' OntologyIRI
b' ClassExpression
c') }}}
    ShAAppl "DataPropertyRange" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, DataRange)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: DataRange
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> DataRange -> DataPropertyAxiom
DataPropertyRange [Annotation]
a' OntologyIRI
b' DataRange
c') }}}
    ShAAppl "FunctionalDataProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      (ATermTable
att2, [Annotation] -> OntologyIRI -> DataPropertyAxiom
FunctionalDataProperty [Annotation]
a' OntologyIRI
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DataPropertyAxiom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DataPropertyAxiom" ShATerm
u

instance ShATermConvertible OWL2.AS.SubObjectPropertyExpression where
  toShATermAux :: ATermTable -> SubObjectPropertyExpression -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SubObjectPropertyExpression
xv = case SubObjectPropertyExpression
xv of
    SubObjPropExpr_obj a :: ObjectPropertyExpression
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyExpression
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 "SubObjPropExpr_obj" [Int
a'] []) ATermTable
att1
    SubObjPropExpr_exprchain a :: [ObjectPropertyExpression]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [ObjectPropertyExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [ObjectPropertyExpression]
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 "SubObjPropExpr_exprchain" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SubObjectPropertyExpression)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SubObjPropExpr_obj" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ObjectPropertyExpression
a') ->
      (ATermTable
att1, ObjectPropertyExpression -> SubObjectPropertyExpression
SubObjPropExpr_obj ObjectPropertyExpression
a') }
    ShAAppl "SubObjPropExpr_exprchain" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [ObjectPropertyExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [ObjectPropertyExpression]
a') ->
      (ATermTable
att1, [ObjectPropertyExpression] -> SubObjectPropertyExpression
SubObjPropExpr_exprchain [ObjectPropertyExpression]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SubObjectPropertyExpression)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.SubObjectPropertyExpression" ShATerm
u

instance ShATermConvertible OWL2.AS.ObjectPropertyAxiom where
  toShATermAux :: ATermTable -> ObjectPropertyAxiom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ObjectPropertyAxiom
xv = case ObjectPropertyAxiom
xv of
    SubObjectPropertyOf a :: [Annotation]
a b :: SubObjectPropertyExpression
b c :: ObjectPropertyExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> SubObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 SubObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ObjectPropertyExpression
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 "SubObjectPropertyOf" [Int
a', Int
b',
                                                        Int
c'] []) ATermTable
att3
    EquivalentObjectProperties a :: [Annotation]
a b :: [ObjectPropertyExpression]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [ObjectPropertyExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [ObjectPropertyExpression]
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 "EquivalentObjectProperties" [Int
a',
                                                               Int
b'] []) ATermTable
att2
    DisjointObjectProperties a :: [Annotation]
a b :: [ObjectPropertyExpression]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [ObjectPropertyExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [ObjectPropertyExpression]
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 "DisjointObjectProperties" [Int
a',
                                                             Int
b'] []) ATermTable
att2
    InverseObjectProperties a :: [Annotation]
a b :: ObjectPropertyExpression
b c :: ObjectPropertyExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ObjectPropertyExpression
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 "InverseObjectProperties" [Int
a', Int
b',
                                                            Int
c'] []) ATermTable
att3
    ObjectPropertyDomain a :: [Annotation]
a b :: ObjectPropertyExpression
b c :: ClassExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ClassExpression
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 "ObjectPropertyDomain" [Int
a', Int
b',
                                                         Int
c'] []) ATermTable
att3
    ObjectPropertyRange a :: [Annotation]
a b :: ObjectPropertyExpression
b c :: ClassExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ClassExpression
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 "ObjectPropertyRange" [Int
a', Int
b',
                                                        Int
c'] []) ATermTable
att3
    FunctionalObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
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 "FunctionalObjectProperty" [Int
a',
                                                             Int
b'] []) ATermTable
att2
    InverseFunctionalObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
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 "InverseFunctionalObjectProperty" [Int
a',
                                                                    Int
b'] []) ATermTable
att2
    ReflexiveObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
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 "ReflexiveObjectProperty" [Int
a',
                                                            Int
b'] []) ATermTable
att2
    IrreflexiveObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
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 "IrreflexiveObjectProperty" [Int
a',
                                                              Int
b'] []) ATermTable
att2
    SymmetricObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
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 "SymmetricObjectProperty" [Int
a',
                                                            Int
b'] []) ATermTable
att2
    AsymmetricObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
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 "AsymmetricObjectProperty" [Int
a',
                                                             Int
b'] []) ATermTable
att2
    TransitiveObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
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 "TransitiveObjectProperty" [Int
a',
                                                             Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, ObjectPropertyAxiom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SubObjectPropertyOf" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, SubObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: SubObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ObjectPropertyExpression
c') ->
      (ATermTable
att3, [Annotation]
-> SubObjectPropertyExpression
-> ObjectPropertyExpression
-> ObjectPropertyAxiom
SubObjectPropertyOf [Annotation]
a' SubObjectPropertyExpression
b' ObjectPropertyExpression
c') }}}
    ShAAppl "EquivalentObjectProperties" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, [ObjectPropertyExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [ObjectPropertyExpression]
b') ->
      (ATermTable
att2, [Annotation] -> [ObjectPropertyExpression] -> ObjectPropertyAxiom
EquivalentObjectProperties [Annotation]
a' [ObjectPropertyExpression]
b') }}
    ShAAppl "DisjointObjectProperties" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, [ObjectPropertyExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [ObjectPropertyExpression]
b') ->
      (ATermTable
att2, [Annotation] -> [ObjectPropertyExpression] -> ObjectPropertyAxiom
DisjointObjectProperties [Annotation]
a' [ObjectPropertyExpression]
b') }}
    ShAAppl "InverseObjectProperties" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ObjectPropertyExpression
c') ->
      (ATermTable
att3, [Annotation]
-> ObjectPropertyExpression
-> ObjectPropertyExpression
-> ObjectPropertyAxiom
InverseObjectProperties [Annotation]
a' ObjectPropertyExpression
b' ObjectPropertyExpression
c') }}}
    ShAAppl "ObjectPropertyDomain" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ClassExpression
c') ->
      (ATermTable
att3, [Annotation]
-> ObjectPropertyExpression
-> ClassExpression
-> ObjectPropertyAxiom
ObjectPropertyDomain [Annotation]
a' ObjectPropertyExpression
b' ClassExpression
c') }}}
    ShAAppl "ObjectPropertyRange" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ClassExpression
c') ->
      (ATermTable
att3, [Annotation]
-> ObjectPropertyExpression
-> ClassExpression
-> ObjectPropertyAxiom
ObjectPropertyRange [Annotation]
a' ObjectPropertyExpression
b' ClassExpression
c') }}}
    ShAAppl "FunctionalObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
FunctionalObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    ShAAppl "InverseFunctionalObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
InverseFunctionalObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    ShAAppl "ReflexiveObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
ReflexiveObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    ShAAppl "IrreflexiveObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
IrreflexiveObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    ShAAppl "SymmetricObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
SymmetricObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    ShAAppl "AsymmetricObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
AsymmetricObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    ShAAppl "TransitiveObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
TransitiveObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ObjectPropertyAxiom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.ObjectPropertyAxiom" ShATerm
u

instance ShATermConvertible OWL2.AS.ClassAxiom where
  toShATermAux :: ATermTable -> ClassAxiom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ClassAxiom
xv = case ClassAxiom
xv of
    SubClassOf a :: [Annotation]
a b :: ClassExpression
b c :: ClassExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ClassExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ClassExpression
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 "SubClassOf" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    EquivalentClasses a :: [Annotation]
a b :: [ClassExpression]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [ClassExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [ClassExpression]
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 "EquivalentClasses" [Int
a', Int
b'] []) ATermTable
att2
    DisjointClasses a :: [Annotation]
a b :: [ClassExpression]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [ClassExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [ClassExpression]
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 "DisjointClasses" [Int
a', Int
b'] []) ATermTable
att2
    DisjointUnion a :: [Annotation]
a b :: OntologyIRI
b c :: [ClassExpression]
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [ClassExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [ClassExpression]
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 "DisjointUnion" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, ClassAxiom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SubClassOf" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ClassExpression
b') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ClassExpression
c') ->
      (ATermTable
att3, [Annotation] -> ClassExpression -> ClassExpression -> ClassAxiom
SubClassOf [Annotation]
a' ClassExpression
b' ClassExpression
c') }}}
    ShAAppl "EquivalentClasses" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, [ClassExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [ClassExpression]
b') ->
      (ATermTable
att2, [Annotation] -> [ClassExpression] -> ClassAxiom
EquivalentClasses [Annotation]
a' [ClassExpression]
b') }}
    ShAAppl "DisjointClasses" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, [ClassExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [ClassExpression]
b') ->
      (ATermTable
att2, [Annotation] -> [ClassExpression] -> ClassAxiom
DisjointClasses [Annotation]
a' [ClassExpression]
b') }}
    ShAAppl "DisjointUnion" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, [ClassExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [ClassExpression]
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> [ClassExpression] -> ClassAxiom
DisjointUnion [Annotation]
a' OntologyIRI
b' [ClassExpression]
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ClassAxiom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.ClassAxiom" ShATerm
u

instance ShATermConvertible OWL2.AS.Axiom where
  toShATermAux :: ATermTable -> Axiom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Axiom
xv = case Axiom
xv of
    Declaration a :: [Annotation]
a b :: Entity
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Entity -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Entity
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 "Declaration" [Int
a', Int
b'] []) ATermTable
att2
    ClassAxiom a :: ClassAxiom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ClassAxiom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ClassAxiom
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 "ClassAxiom" [Int
a'] []) ATermTable
att1
    ObjectPropertyAxiom a :: ObjectPropertyAxiom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyAxiom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyAxiom
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 "ObjectPropertyAxiom" [Int
a'] []) ATermTable
att1
    DataPropertyAxiom a :: DataPropertyAxiom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DataPropertyAxiom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DataPropertyAxiom
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 "DataPropertyAxiom" [Int
a'] []) ATermTable
att1
    DatatypeDefinition a :: [Annotation]
a b :: OntologyIRI
b c :: DataRange
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> DataRange -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 DataRange
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 "DatatypeDefinition" [Int
a', Int
b',
                                                       Int
c'] []) ATermTable
att3
    HasKey a :: [Annotation]
a b :: ClassExpression
b c :: [ObjectPropertyExpression]
c d :: DirectlyImportsDocuments
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ClassExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [ObjectPropertyExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [ObjectPropertyExpression]
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 DirectlyImportsDocuments
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 "HasKey" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
    Assertion a :: Assertion
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Assertion -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Assertion
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 "Assertion" [Int
a'] []) ATermTable
att1
    AnnotationAxiom a :: AnnotationAxiom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> AnnotationAxiom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 AnnotationAxiom
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 "AnnotationAxiom" [Int
a'] []) ATermTable
att1
    Rule a :: Rule
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Rule -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Rule
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 "Rule" [Int
a'] []) ATermTable
att1
    DGAxiom a :: [Annotation]
a b :: OntologyIRI
b c :: [DGNodeAssertion]
c d :: [DGEdgeAssertion]
d e :: DirectlyImportsDocuments
e -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [DGNodeAssertion] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [DGNodeAssertion]
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> [DGEdgeAssertion] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 [DGEdgeAssertion]
d
      (att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att4 DirectlyImportsDocuments
e
      (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 "DGAxiom" [Int
a', Int
b', Int
c', Int
d', Int
e'] []) ATermTable
att5
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Axiom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Declaration" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, Entity)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Entity
b') ->
      (ATermTable
att2, [Annotation] -> Entity -> Axiom
Declaration [Annotation]
a' Entity
b') }}
    ShAAppl "ClassAxiom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, ClassAxiom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ClassAxiom
a') ->
      (ATermTable
att1, ClassAxiom -> Axiom
ClassAxiom ClassAxiom
a') }
    ShAAppl "ObjectPropertyAxiom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyAxiom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ObjectPropertyAxiom
a') ->
      (ATermTable
att1, ObjectPropertyAxiom -> Axiom
ObjectPropertyAxiom ObjectPropertyAxiom
a') }
    ShAAppl "DataPropertyAxiom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, DataPropertyAxiom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DataPropertyAxiom
a') ->
      (ATermTable
att1, DataPropertyAxiom -> Axiom
DataPropertyAxiom DataPropertyAxiom
a') }
    ShAAppl "DatatypeDefinition" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, DataRange)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: DataRange
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> DataRange -> Axiom
DatatypeDefinition [Annotation]
a' OntologyIRI
b' DataRange
c') }}}
    ShAAppl "HasKey" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ClassExpression
b') ->
      case Int -> ATermTable -> (ATermTable, [ObjectPropertyExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [ObjectPropertyExpression]
c') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: DirectlyImportsDocuments
d') ->
      (ATermTable
att4, [Annotation]
-> ClassExpression
-> [ObjectPropertyExpression]
-> DirectlyImportsDocuments
-> Axiom
HasKey [Annotation]
a' ClassExpression
b' [ObjectPropertyExpression]
c' DirectlyImportsDocuments
d') }}}}
    ShAAppl "Assertion" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Assertion)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Assertion
a') ->
      (ATermTable
att1, Assertion -> Axiom
Assertion Assertion
a') }
    ShAAppl "AnnotationAxiom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, AnnotationAxiom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: AnnotationAxiom
a') ->
      (ATermTable
att1, AnnotationAxiom -> Axiom
AnnotationAxiom AnnotationAxiom
a') }
    ShAAppl "Rule" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Rule)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Rule
a') ->
      (ATermTable
att1, Rule -> Axiom
Rule Rule
a') }
    ShAAppl "DGAxiom" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, [DGNodeAssertion])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [DGNodeAssertion]
c') ->
      case Int -> ATermTable -> (ATermTable, [DGEdgeAssertion])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: [DGEdgeAssertion]
d') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
e ATermTable
att4 of
      { (att5 :: ATermTable
att5, e' :: DirectlyImportsDocuments
e') ->
      (ATermTable
att5, [Annotation]
-> OntologyIRI
-> [DGNodeAssertion]
-> [DGEdgeAssertion]
-> DirectlyImportsDocuments
-> Axiom
DGAxiom [Annotation]
a' OntologyIRI
b' [DGNodeAssertion]
c' [DGEdgeAssertion]
d' DirectlyImportsDocuments
e') }}}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Axiom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Axiom" ShATerm
u

instance ShATermConvertible OWL2.AS.AnnotationSubject where
  toShATermAux :: ATermTable -> AnnotationSubject -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: AnnotationSubject
xv = case AnnotationSubject
xv of
    AnnSubIri a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
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 "AnnSubIri" [Int
a'] []) ATermTable
att1
    AnnSubAnInd a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
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 "AnnSubAnInd" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, AnnotationSubject)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "AnnSubIri" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> AnnotationSubject
AnnSubIri OntologyIRI
a') }
    ShAAppl "AnnSubAnInd" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> AnnotationSubject
AnnSubAnInd OntologyIRI
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, AnnotationSubject)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.AnnotationSubject" ShATerm
u

instance ShATermConvertible OWL2.AS.AnnotationAxiom where
  toShATermAux :: ATermTable -> AnnotationAxiom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: AnnotationAxiom
xv = case AnnotationAxiom
xv of
    AnnotationAssertion a :: [Annotation]
a b :: OntologyIRI
b c :: AnnotationSubject
c d :: AnnotationValue
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> AnnotationSubject -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 AnnotationSubject
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> AnnotationValue -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 AnnotationValue
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 "AnnotationAssertion" [Int
a', Int
b', Int
c',
                                                        Int
d'] []) ATermTable
att4
    SubAnnotationPropertyOf a :: [Annotation]
a b :: OntologyIRI
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
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 "SubAnnotationPropertyOf" [Int
a', Int
b',
                                                            Int
c'] []) ATermTable
att3
    AnnotationPropertyDomain a :: [Annotation]
a b :: OntologyIRI
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
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 "AnnotationPropertyDomain" [Int
a', Int
b',
                                                             Int
c'] []) ATermTable
att3
    AnnotationPropertyRange a :: [Annotation]
a b :: OntologyIRI
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
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 "AnnotationPropertyRange" [Int
a', Int
b',
                                                            Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, AnnotationAxiom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "AnnotationAssertion" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, AnnotationSubject)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: AnnotationSubject
c') ->
      case Int -> ATermTable -> (ATermTable, AnnotationValue)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: AnnotationValue
d') ->
      (ATermTable
att4, [Annotation]
-> OntologyIRI
-> AnnotationSubject
-> AnnotationValue
-> AnnotationAxiom
AnnotationAssertion [Annotation]
a' OntologyIRI
b' AnnotationSubject
c' AnnotationValue
d') }}}}
    ShAAppl "SubAnnotationPropertyOf" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> OntologyIRI -> AnnotationAxiom
SubAnnotationPropertyOf [Annotation]
a' OntologyIRI
b' OntologyIRI
c') }}}
    ShAAppl "AnnotationPropertyDomain" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> OntologyIRI -> AnnotationAxiom
AnnotationPropertyDomain [Annotation]
a' OntologyIRI
b' OntologyIRI
c') }}}
    ShAAppl "AnnotationPropertyRange" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> OntologyIRI -> AnnotationAxiom
AnnotationPropertyRange [Annotation]
a' OntologyIRI
b' OntologyIRI
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, AnnotationAxiom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.AnnotationAxiom" ShATerm
u

instance ShATermConvertible OWL2.AS.AnnotationValue where
  toShATermAux :: ATermTable -> AnnotationValue -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: AnnotationValue
xv = case AnnotationValue
xv of
    AnnAnInd a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
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 "AnnAnInd" [Int
a'] []) ATermTable
att1
    AnnValue a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
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 "AnnValue" [Int
a'] []) ATermTable
att1
    AnnValLit a :: Literal
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Literal -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Literal
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 "AnnValLit" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, AnnotationValue)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "AnnAnInd" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> AnnotationValue
AnnAnInd OntologyIRI
a') }
    ShAAppl "AnnValue" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> AnnotationValue
AnnValue OntologyIRI
a') }
    ShAAppl "AnnValLit" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Literal)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Literal
a') ->
      (ATermTable
att1, Literal -> AnnotationValue
AnnValLit Literal
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, AnnotationValue)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.AnnotationValue" ShATerm
u

instance ShATermConvertible OWL2.AS.Annotation where
  toShATermAux :: ATermTable -> Annotation -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Annotation
xv = case Annotation
xv of
    Annotation a :: [Annotation]
a b :: OntologyIRI
b c :: AnnotationValue
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> AnnotationValue -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 AnnotationValue
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 "Annotation" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Annotation)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Annotation" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, AnnotationValue)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: AnnotationValue
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> AnnotationValue -> Annotation
Annotation [Annotation]
a' OntologyIRI
b' AnnotationValue
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Annotation)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Annotation" ShATerm
u

instance ShATermConvertible OWL2.AS.ClassExpression where
  toShATermAux :: ATermTable -> ClassExpression -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ClassExpression
xv = case ClassExpression
xv of
    Expression a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
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 "Expression" [Int
a'] []) ATermTable
att1
    ObjectJunction a :: JunctionType
a b :: [ClassExpression]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> JunctionType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 JunctionType
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [ClassExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [ClassExpression]
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 "ObjectJunction" [Int
a', Int
b'] []) ATermTable
att2
    ObjectComplementOf a :: ClassExpression
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ClassExpression
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 "ObjectComplementOf" [Int
a'] []) ATermTable
att1
    ObjectOneOf a :: DirectlyImportsDocuments
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DirectlyImportsDocuments
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 "ObjectOneOf" [Int
a'] []) ATermTable
att1
    ObjectValuesFrom a :: QuantifierType
a b :: ObjectPropertyExpression
b c :: ClassExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> QuantifierType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 QuantifierType
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ClassExpression
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 "ObjectValuesFrom" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    ObjectHasValue a :: ObjectPropertyExpression
a b :: OntologyIRI
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyExpression
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
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 "ObjectHasValue" [Int
a', Int
b'] []) ATermTable
att2
    ObjectHasSelf a :: ObjectPropertyExpression
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyExpression
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 "ObjectHasSelf" [Int
a'] []) ATermTable
att1
    ObjectCardinality a :: Cardinality ObjectPropertyExpression ClassExpression
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable
-> Cardinality ObjectPropertyExpression ClassExpression
-> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Cardinality ObjectPropertyExpression ClassExpression
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 "ObjectCardinality" [Int
a'] []) ATermTable
att1
    DataValuesFrom a :: QuantifierType
a b :: DirectlyImportsDocuments
b c :: DataRange
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> QuantifierType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 QuantifierType
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DirectlyImportsDocuments
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> DataRange -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 DataRange
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 "DataValuesFrom" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    DataHasValue a :: OntologyIRI
a b :: Literal
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Literal -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Literal
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 "DataHasValue" [Int
a', Int
b'] []) ATermTable
att2
    DataCardinality a :: Cardinality OntologyIRI DataRange
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable
-> Cardinality OntologyIRI DataRange -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Cardinality OntologyIRI DataRange
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 "DataCardinality" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, ClassExpression)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Expression" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> ClassExpression
Expression OntologyIRI
a') }
    ShAAppl "ObjectJunction" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, JunctionType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: JunctionType
a') ->
      case Int -> ATermTable -> (ATermTable, [ClassExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [ClassExpression]
b') ->
      (ATermTable
att2, JunctionType -> [ClassExpression] -> ClassExpression
ObjectJunction JunctionType
a' [ClassExpression]
b') }}
    ShAAppl "ObjectComplementOf" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ClassExpression
a') ->
      (ATermTable
att1, ClassExpression -> ClassExpression
ObjectComplementOf ClassExpression
a') }
    ShAAppl "ObjectOneOf" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DirectlyImportsDocuments
a') ->
      (ATermTable
att1, DirectlyImportsDocuments -> ClassExpression
ObjectOneOf DirectlyImportsDocuments
a') }
    ShAAppl "ObjectValuesFrom" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, QuantifierType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: QuantifierType
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ClassExpression
c') ->
      (ATermTable
att3, QuantifierType
-> ObjectPropertyExpression -> ClassExpression -> ClassExpression
ObjectValuesFrom QuantifierType
a' ObjectPropertyExpression
b' ClassExpression
c') }}}
    ShAAppl "ObjectHasValue" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ObjectPropertyExpression
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      (ATermTable
att2, ObjectPropertyExpression -> OntologyIRI -> ClassExpression
ObjectHasValue ObjectPropertyExpression
a' OntologyIRI
b') }}
    ShAAppl "ObjectHasSelf" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ObjectPropertyExpression
a') ->
      (ATermTable
att1, ObjectPropertyExpression -> ClassExpression
ObjectHasSelf ObjectPropertyExpression
a') }
    ShAAppl "ObjectCardinality" [a :: Int
a] _ ->
      case Int
-> ATermTable
-> (ATermTable,
    Cardinality ObjectPropertyExpression ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Cardinality ObjectPropertyExpression ClassExpression
a') ->
      (ATermTable
att1, Cardinality ObjectPropertyExpression ClassExpression
-> ClassExpression
ObjectCardinality Cardinality ObjectPropertyExpression ClassExpression
a') }
    ShAAppl "DataValuesFrom" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, QuantifierType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: QuantifierType
a') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: DirectlyImportsDocuments
b') ->
      case Int -> ATermTable -> (ATermTable, DataRange)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: DataRange
c') ->
      (ATermTable
att3, QuantifierType
-> DirectlyImportsDocuments -> DataRange -> ClassExpression
DataValuesFrom QuantifierType
a' DirectlyImportsDocuments
b' DataRange
c') }}}
    ShAAppl "DataHasValue" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, Literal)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Literal
b') ->
      (ATermTable
att2, OntologyIRI -> Literal -> ClassExpression
DataHasValue OntologyIRI
a' Literal
b') }}
    ShAAppl "DataCardinality" [a :: Int
a] _ ->
      case Int
-> ATermTable -> (ATermTable, Cardinality OntologyIRI DataRange)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Cardinality OntologyIRI DataRange
a') ->
      (ATermTable
att1, Cardinality OntologyIRI DataRange -> ClassExpression
DataCardinality Cardinality OntologyIRI DataRange
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ClassExpression)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.ClassExpression" ShATerm
u

instance ShATermConvertible OWL2.AS.DataRange where
  toShATermAux :: ATermTable -> DataRange -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DataRange
xv = case DataRange
xv of
    DataType a :: OntologyIRI
a b :: [(OntologyIRI, Literal)]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [(OntologyIRI, Literal)] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [(OntologyIRI, Literal)]
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 "DataType" [Int
a', Int
b'] []) ATermTable
att2
    DataJunction a :: JunctionType
a b :: [DataRange]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> JunctionType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 JunctionType
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [DataRange] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [DataRange]
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 "DataJunction" [Int
a', Int
b'] []) ATermTable
att2
    DataComplementOf a :: DataRange
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DataRange -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DataRange
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 "DataComplementOf" [Int
a'] []) ATermTable
att1
    DataOneOf a :: [Literal]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Literal] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Literal]
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 "DataOneOf" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DataRange)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DataType" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, [(OntologyIRI, Literal)])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [(OntologyIRI, Literal)]
b') ->
      (ATermTable
att2, OntologyIRI -> [(OntologyIRI, Literal)] -> DataRange
DataType OntologyIRI
a' [(OntologyIRI, Literal)]
b') }}
    ShAAppl "DataJunction" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, JunctionType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: JunctionType
a') ->
      case Int -> ATermTable -> (ATermTable, [DataRange])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [DataRange]
b') ->
      (ATermTable
att2, JunctionType -> [DataRange] -> DataRange
DataJunction JunctionType
a' [DataRange]
b') }}
    ShAAppl "DataComplementOf" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, DataRange)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DataRange
a') ->
      (ATermTable
att1, DataRange -> DataRange
DataComplementOf DataRange
a') }
    ShAAppl "DataOneOf" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [Literal])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Literal]
a') ->
      (ATermTable
att1, [Literal] -> DataRange
DataOneOf [Literal]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DataRange)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DataRange" ShATerm
u

instance ShATermConvertible OWL2.AS.ObjectPropertyExpression where
  toShATermAux :: ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ObjectPropertyExpression
xv = case ObjectPropertyExpression
xv of
    ObjectProp a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
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 "ObjectProp" [Int
a'] []) ATermTable
att1
    ObjectInverseOf a :: ObjectPropertyExpression
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyExpression
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 "ObjectInverseOf" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ObjectProp" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> ObjectPropertyExpression
ObjectProp OntologyIRI
a') }
    ShAAppl "ObjectInverseOf" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ObjectPropertyExpression
a') ->
      (ATermTable
att1, ObjectPropertyExpression -> ObjectPropertyExpression
ObjectInverseOf ObjectPropertyExpression
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ObjectPropertyExpression)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.ObjectPropertyExpression" ShATerm
u

instance ShATermConvertible OWL2.AS.FloatLit where
  toShATermAux :: ATermTable -> FloatLit -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FloatLit
xv = case FloatLit
xv of
    FloatLit a :: DecLit
a b :: IntLit
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DecLit -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DecLit
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IntLit -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IntLit
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 "FloatLit" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FloatLit)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FloatLit" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, DecLit)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DecLit
a') ->
      case Int -> ATermTable -> (ATermTable, IntLit)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IntLit
b') ->
      (ATermTable
att2, DecLit -> IntLit -> FloatLit
FloatLit DecLit
a' IntLit
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FloatLit)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.FloatLit" ShATerm
u

instance ShATermConvertible OWL2.AS.DecLit where
  toShATermAux :: ATermTable -> DecLit -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DecLit
xv = case DecLit
xv of
    DecLit a :: IntLit
a b :: NNInt
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> IntLit -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 IntLit
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> NNInt -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 NNInt
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 "DecLit" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DecLit)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DecLit" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, IntLit)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: IntLit
a') ->
      case Int -> ATermTable -> (ATermTable, NNInt)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: NNInt
b') ->
      (ATermTable
att2, IntLit -> NNInt -> DecLit
DecLit IntLit
a' NNInt
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DecLit)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DecLit" ShATerm
u

instance ShATermConvertible OWL2.AS.IntLit where
  toShATermAux :: ATermTable -> IntLit -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: IntLit
xv = case IntLit
xv of
    IntLit a :: NNInt
a b :: Bool
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> NNInt -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 NNInt
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
      (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 "IntLit" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, IntLit)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "IntLit" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, NNInt)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: NNInt
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') ->
      (ATermTable
att2, NNInt -> Bool -> IntLit
IntLit NNInt
a' Bool
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, IntLit)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.IntLit" ShATerm
u

instance ShATermConvertible OWL2.AS.NNInt where
  toShATermAux :: ATermTable -> NNInt -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: NNInt
xv = case NNInt
xv of
    NNInt 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 "NNInt" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, NNInt)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "NNInt" [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] -> NNInt
NNInt [Int]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, NNInt)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.NNInt" ShATerm
u

instance ShATermConvertible OWL2.AS.Literal where
  toShATermAux :: ATermTable -> Literal -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Literal
xv = case Literal
xv of
    Literal a :: String
a b :: TypedOrUntyped
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 -> TypedOrUntyped -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TypedOrUntyped
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 "Literal" [Int
a', Int
b'] []) ATermTable
att2
    NumberLit a :: FloatLit
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FloatLit -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FloatLit
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 "NumberLit" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Literal)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Literal" [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, TypedOrUntyped)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TypedOrUntyped
b') ->
      (ATermTable
att2, String -> TypedOrUntyped -> Literal
Literal String
a' TypedOrUntyped
b') }}
    ShAAppl "NumberLit" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FloatLit)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FloatLit
a') ->
      (ATermTable
att1, FloatLit -> Literal
NumberLit FloatLit
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Literal)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Literal" ShATerm
u

instance ShATermConvertible OWL2.AS.TypedOrUntyped where
  toShATermAux :: ATermTable -> TypedOrUntyped -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TypedOrUntyped
xv = case TypedOrUntyped
xv of
    Typed a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
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 "Typed" [Int
a'] []) ATermTable
att1
    Untyped a :: Maybe String
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Maybe String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Maybe 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 "Untyped" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TypedOrUntyped)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Typed" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> TypedOrUntyped
Typed OntologyIRI
a') }
    ShAAppl "Untyped" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Maybe String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Maybe String
a') ->
      (ATermTable
att1, Maybe String -> TypedOrUntyped
Untyped Maybe String
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TypedOrUntyped)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.TypedOrUntyped" ShATerm
u

instance ShATermConvertible OWL2.AS.EntityType where
  toShATermAux :: ATermTable -> EntityType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: EntityType
xv = case EntityType
xv of
    Datatype -> (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 "Datatype" [] []) ATermTable
att0
    Class -> (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 "Class" [] []) ATermTable
att0
    ObjectProperty -> (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 "ObjectProperty" [] []) ATermTable
att0
    DataProperty -> (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 "DataProperty" [] []) ATermTable
att0
    AnnotationProperty ->
      (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 "AnnotationProperty" [] []) ATermTable
att0
    NamedIndividual -> (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 "NamedIndividual" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, EntityType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Datatype" [] _ -> (ATermTable
att0, EntityType
Datatype)
    ShAAppl "Class" [] _ -> (ATermTable
att0, EntityType
Class)
    ShAAppl "ObjectProperty" [] _ -> (ATermTable
att0, EntityType
ObjectProperty)
    ShAAppl "DataProperty" [] _ -> (ATermTable
att0, EntityType
DataProperty)
    ShAAppl "AnnotationProperty" [] _ -> (ATermTable
att0, EntityType
AnnotationProperty)
    ShAAppl "NamedIndividual" [] _ -> (ATermTable
att0, EntityType
NamedIndividual)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, EntityType)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.EntityType" ShATerm
u

instance ShATermConvertible OWL2.AS.Entity where
  toShATermAux :: ATermTable -> Entity -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Entity
xv = case Entity
xv of
    Entity a :: Maybe String
a b :: EntityType
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Maybe String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Maybe String
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> EntityType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 EntityType
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
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 "Entity" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Entity)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Entity" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Maybe String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Maybe String
a') ->
      case Int -> ATermTable -> (ATermTable, EntityType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: EntityType
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, Maybe String -> EntityType -> OntologyIRI -> Entity
Entity Maybe String
a' EntityType
b' OntologyIRI
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Entity)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Entity" ShATerm
u

instance ShATermConvertible OWL2.AS.JunctionType where
  toShATermAux :: ATermTable -> JunctionType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: JunctionType
xv = case JunctionType
xv of
    UnionOf -> (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 "UnionOf" [] []) ATermTable
att0
    IntersectionOf -> (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 "IntersectionOf" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, JunctionType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "UnionOf" [] _ -> (ATermTable
att0, JunctionType
UnionOf)
    ShAAppl "IntersectionOf" [] _ -> (ATermTable
att0, JunctionType
IntersectionOf)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, JunctionType)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.JunctionType" ShATerm
u

instance (ShATermConvertible a,
          ShATermConvertible b) => ShATermConvertible (OWL2.AS.Cardinality a b) where
  toShATermAux :: ATermTable -> Cardinality a b -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Cardinality a b
xv = case Cardinality a b
xv of
    Cardinality a :: CardinalityType
a b :: Int
b c :: a
c d :: Maybe b
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> CardinalityType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 CardinalityType
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
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> a -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 a
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Maybe b -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Maybe b
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 "Cardinality" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Cardinality a b)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Cardinality" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, CardinalityType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: CardinalityType
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') ->
      case Int -> ATermTable -> (ATermTable, a)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: a
c') ->
      case Int -> ATermTable -> (ATermTable, Maybe b)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Maybe b
d') ->
      (ATermTable
att4, CardinalityType -> Int -> a -> Maybe b -> Cardinality a b
forall a b.
CardinalityType -> Int -> a -> Maybe b -> Cardinality a b
Cardinality CardinalityType
a' Int
b' a
c' Maybe b
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Cardinality a b)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Cardinality" ShATerm
u

instance ShATermConvertible OWL2.AS.CardinalityType where
  toShATermAux :: ATermTable -> CardinalityType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CardinalityType
xv = case CardinalityType
xv of
    MinCardinality -> (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 "MinCardinality" [] []) ATermTable
att0
    MaxCardinality -> (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 "MaxCardinality" [] []) ATermTable
att0
    ExactCardinality ->
      (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 "ExactCardinality" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CardinalityType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "MinCardinality" [] _ -> (ATermTable
att0, CardinalityType
MinCardinality)
    ShAAppl "MaxCardinality" [] _ -> (ATermTable
att0, CardinalityType
MaxCardinality)
    ShAAppl "ExactCardinality" [] _ -> (ATermTable
att0, CardinalityType
ExactCardinality)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CardinalityType)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.CardinalityType" ShATerm
u

instance ShATermConvertible OWL2.AS.DatatypeCat where
  toShATermAux :: ATermTable -> DatatypeCat -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DatatypeCat
xv = case DatatypeCat
xv of
    OWL2Number -> (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 "OWL2Number" [] []) ATermTable
att0
    OWL2String -> (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 "OWL2String" [] []) ATermTable
att0
    OWL2Bool -> (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 "OWL2Bool" [] []) ATermTable
att0
    Other -> (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 "Other" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DatatypeCat)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OWL2Number" [] _ -> (ATermTable
att0, DatatypeCat
OWL2Number)
    ShAAppl "OWL2String" [] _ -> (ATermTable
att0, DatatypeCat
OWL2String)
    ShAAppl "OWL2Bool" [] _ -> (ATermTable
att0, DatatypeCat
OWL2Bool)
    ShAAppl "Other" [] _ -> (ATermTable
att0, DatatypeCat
Other)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DatatypeCat)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DatatypeCat" ShATerm
u

instance ShATermConvertible OWL2.AS.QuantifierType where
  toShATermAux :: ATermTable -> QuantifierType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: QuantifierType
xv = case QuantifierType
xv of
    AllValuesFrom -> (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 "AllValuesFrom" [] []) ATermTable
att0
    SomeValuesFrom -> (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 "SomeValuesFrom" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, QuantifierType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "AllValuesFrom" [] _ -> (ATermTable
att0, QuantifierType
AllValuesFrom)
    ShAAppl "SomeValuesFrom" [] _ -> (ATermTable
att0, QuantifierType
SomeValuesFrom)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, QuantifierType)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.QuantifierType" ShATerm
u

instance ShATermConvertible OWL2.AS.PositiveOrNegative where
  toShATermAux :: ATermTable -> PositiveOrNegative -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: PositiveOrNegative
xv = case PositiveOrNegative
xv of
    Positive -> (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 "Positive" [] []) ATermTable
att0
    Negative -> (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 "Negative" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, PositiveOrNegative)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Positive" [] _ -> (ATermTable
att0, PositiveOrNegative
Positive)
    ShAAppl "Negative" [] _ -> (ATermTable
att0, PositiveOrNegative
Negative)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, PositiveOrNegative)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.PositiveOrNegative" ShATerm
u

instance ShATermConvertible OWL2.AS.Character where
  toShATermAux :: ATermTable -> Character -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Character
xv = case Character
xv of
    Functional -> (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 "Functional" [] []) ATermTable
att0
    InverseFunctional ->
      (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 "InverseFunctional" [] []) ATermTable
att0
    Reflexive -> (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 "Reflexive" [] []) ATermTable
att0
    Irreflexive -> (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 "Irreflexive" [] []) ATermTable
att0
    Symmetric -> (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 "Symmetric" [] []) ATermTable
att0
    Asymmetric -> (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 "Asymmetric" [] []) ATermTable
att0
    Antisymmetric -> (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 "Antisymmetric" [] []) ATermTable
att0
    Transitive -> (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 "Transitive" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Character)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Functional" [] _ -> (ATermTable
att0, Character
Functional)
    ShAAppl "InverseFunctional" [] _ -> (ATermTable
att0, Character
InverseFunctional)
    ShAAppl "Reflexive" [] _ -> (ATermTable
att0, Character
Reflexive)
    ShAAppl "Irreflexive" [] _ -> (ATermTable
att0, Character
Irreflexive)
    ShAAppl "Symmetric" [] _ -> (ATermTable
att0, Character
Symmetric)
    ShAAppl "Asymmetric" [] _ -> (ATermTable
att0, Character
Asymmetric)
    ShAAppl "Antisymmetric" [] _ -> (ATermTable
att0, Character
Antisymmetric)
    ShAAppl "Transitive" [] _ -> (ATermTable
att0, Character
Transitive)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Character)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Character" ShATerm
u

instance ShATermConvertible OWL2.AS.Relation where
  toShATermAux :: ATermTable -> Relation -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Relation
xv = case Relation
xv of
    EDRelation a :: EquivOrDisjoint
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> EquivOrDisjoint -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 EquivOrDisjoint
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 "EDRelation" [Int
a'] []) ATermTable
att1
    SubPropertyOf -> (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 "SubPropertyOf" [] []) ATermTable
att0
    InverseOf -> (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 "InverseOf" [] []) ATermTable
att0
    SubClass -> (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 "SubClass" [] []) ATermTable
att0
    Types -> (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 "Types" [] []) ATermTable
att0
    DRRelation a :: DomainOrRange
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DomainOrRange -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DomainOrRange
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 "DRRelation" [Int
a'] []) ATermTable
att1
    SDRelation a :: SameOrDifferent
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SameOrDifferent -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 SameOrDifferent
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 "SDRelation" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Relation)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "EDRelation" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, EquivOrDisjoint)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: EquivOrDisjoint
a') ->
      (ATermTable
att1, EquivOrDisjoint -> Relation
EDRelation EquivOrDisjoint
a') }
    ShAAppl "SubPropertyOf" [] _ -> (ATermTable
att0, Relation
SubPropertyOf)
    ShAAppl "InverseOf" [] _ -> (ATermTable
att0, Relation
InverseOf)
    ShAAppl "SubClass" [] _ -> (ATermTable
att0, Relation
SubClass)
    ShAAppl "Types" [] _ -> (ATermTable
att0, Relation
Types)
    ShAAppl "DRRelation" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, DomainOrRange)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DomainOrRange
a') ->
      (ATermTable
att1, DomainOrRange -> Relation
DRRelation DomainOrRange
a') }
    ShAAppl "SDRelation" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, SameOrDifferent)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: SameOrDifferent
a') ->
      (ATermTable
att1, SameOrDifferent -> Relation
SDRelation SameOrDifferent
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Relation)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Relation" ShATerm
u

instance ShATermConvertible OWL2.AS.SameOrDifferent where
  toShATermAux :: ATermTable -> SameOrDifferent -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SameOrDifferent
xv = case SameOrDifferent
xv of
    Same -> (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 "Same" [] []) ATermTable
att0
    Different -> (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 "Different" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SameOrDifferent)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Same" [] _ -> (ATermTable
att0, SameOrDifferent
Same)
    ShAAppl "Different" [] _ -> (ATermTable
att0, SameOrDifferent
Different)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SameOrDifferent)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.SameOrDifferent" ShATerm
u

instance ShATermConvertible OWL2.AS.DomainOrRange where
  toShATermAux :: ATermTable -> DomainOrRange -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DomainOrRange
xv = case DomainOrRange
xv of
    ADomain -> (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 "ADomain" [] []) ATermTable
att0
    ARange -> (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 "ARange" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DomainOrRange)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ADomain" [] _ -> (ATermTable
att0, DomainOrRange
ADomain)
    ShAAppl "ARange" [] _ -> (ATermTable
att0, DomainOrRange
ARange)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DomainOrRange)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DomainOrRange" ShATerm
u

instance ShATermConvertible OWL2.AS.EquivOrDisjoint where
  toShATermAux :: ATermTable -> EquivOrDisjoint -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: EquivOrDisjoint
xv = case EquivOrDisjoint
xv of
    Equivalent -> (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 "Equivalent" [] []) ATermTable
att0
    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
  fromShATermAux :: Int -> ATermTable -> (ATermTable, EquivOrDisjoint)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Equivalent" [] _ -> (ATermTable
att0, EquivOrDisjoint
Equivalent)
    ShAAppl "Disjoint" [] _ -> (ATermTable
att0, EquivOrDisjoint
Disjoint)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, EquivOrDisjoint)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.EquivOrDisjoint" ShATerm
u

instance ShATermConvertible OWL2.Morphism.OWLMorphism where
  toShATermAux :: ATermTable -> OWLMorphism -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OWLMorphism
xv = case OWLMorphism
xv of
    OWLMorphism a :: Sign
a b :: Sign
b c :: MorphMap
c d :: StringMap
d -> 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 -> MorphMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 MorphMap
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> StringMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 StringMap
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 "OWLMorphism" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OWLMorphism)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OWLMorphism" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      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, MorphMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: MorphMap
c') ->
      case Int -> ATermTable -> (ATermTable, StringMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: StringMap
d') ->
      (ATermTable
att4, Sign -> Sign -> MorphMap -> StringMap -> OWLMorphism
OWLMorphism Sign
a' Sign
b' MorphMap
c' StringMap
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OWLMorphism)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Morphism.OWLMorphism" ShATerm
u

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

deriving instance GHC.Generics.Generic OWL2.Profiles.Profiles
instance Data.Aeson.ToJSON OWL2.Profiles.Profiles where
instance Data.Aeson.FromJSON OWL2.Profiles.Profiles where

instance ShATermConvertible OWL2.Profiles.Profiles where
  toShATermAux :: ATermTable -> Profiles -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Profiles
xv = case Profiles
xv of
    Profiles a :: Bool
a b :: Bool
b c :: Bool
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Bool
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 -> Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Bool
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 "Profiles" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Profiles)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Profiles" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Bool
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, Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Bool
c') ->
      (ATermTable
att3, Bool -> Bool -> Bool -> Profiles
Profiles Bool
a' Bool
b' Bool
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Profiles)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Profiles.Profiles" ShATerm
u

instance ShATermConvertible OWL2.ProfilesAndSublogics.ProfSub where
  toShATermAux :: ATermTable -> ProfSub -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ProfSub
xv = case ProfSub
xv of
    ProfSub a :: Profiles
a b :: OWLSub
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Profiles -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Profiles
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OWLSub -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OWLSub
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 "ProfSub" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, ProfSub)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ProfSub" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Profiles)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Profiles
a') ->
      case Int -> ATermTable -> (ATermTable, OWLSub)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OWLSub
b') ->
      (ATermTable
att2, Profiles -> OWLSub -> ProfSub
ProfSub Profiles
a' OWLSub
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ProfSub)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.ProfilesAndSublogics.ProfSub" ShATerm
u

deriving instance GHC.Generics.Generic OWL2.ProfilesAndSublogics.ProfSub
instance Data.Aeson.ToJSON OWL2.ProfilesAndSublogics.ProfSub where
instance Data.Aeson.FromJSON OWL2.ProfilesAndSublogics.ProfSub where

deriving instance GHC.Generics.Generic (OWL2.Sign.DomainOrRangeOrFunc a)
instance Data.Aeson.ToJSON a => Data.Aeson.ToJSON (OWL2.Sign.DomainOrRangeOrFunc a) where
instance Data.Aeson.FromJSON a => Data.Aeson.FromJSON (OWL2.Sign.DomainOrRangeOrFunc a) where

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

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

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

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

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

instance ShATermConvertible a => ShATermConvertible (OWL2.Sign.DomainOrRangeOrFunc a) where
  toShATermAux :: ATermTable -> DomainOrRangeOrFunc a -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DomainOrRangeOrFunc a
xv = case DomainOrRangeOrFunc a
xv of
    DomainOrRange a :: DesKind
a b :: ClassExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DesKind -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DesKind
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ClassExpression
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 "DomainOrRange" [Int
a', Int
b'] []) ATermTable
att2
    RDRange a :: DataRange
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DataRange -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DataRange
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 "RDRange" [Int
a'] []) ATermTable
att1
    FuncProp a :: a
a -> 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
      (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 "FuncProp" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DomainOrRangeOrFunc a)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DomainOrRange" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, DesKind)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DesKind
a') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ClassExpression
b') ->
      (ATermTable
att2, DesKind -> ClassExpression -> DomainOrRangeOrFunc a
forall a. DesKind -> ClassExpression -> DomainOrRangeOrFunc a
DomainOrRange DesKind
a' ClassExpression
b') }}
    ShAAppl "RDRange" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, DataRange)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DataRange
a') ->
      (ATermTable
att1, DataRange -> DomainOrRangeOrFunc a
forall a. DataRange -> DomainOrRangeOrFunc a
RDRange DataRange
a') }
    ShAAppl "FuncProp" [a :: Int
a] _ ->
      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') ->
      (ATermTable
att1, a -> DomainOrRangeOrFunc a
forall a. a -> DomainOrRangeOrFunc a
FuncProp a
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DomainOrRangeOrFunc a)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Sign.DomainOrRangeOrFunc" ShATerm
u

instance ShATermConvertible OWL2.Sign.DesKind where
  toShATermAux :: ATermTable -> DesKind -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DesKind
xv = case DesKind
xv of
    RDomain -> (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 "RDomain" [] []) ATermTable
att0
    DDomain -> (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 "DDomain" [] []) ATermTable
att0
    RIRange -> (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 "RIRange" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DesKind)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "RDomain" [] _ -> (ATermTable
att0, DesKind
RDomain)
    ShAAppl "DDomain" [] _ -> (ATermTable
att0, DesKind
DDomain)
    ShAAppl "RIRange" [] _ -> (ATermTable
att0, DesKind
RIRange)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DesKind)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Sign.DesKind" ShATerm
u

instance ShATermConvertible OWL2.Sign.RoleType where
  toShATermAux :: ATermTable -> RoleType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: RoleType
xv = case RoleType
xv of
    IRole -> (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 "IRole" [] []) ATermTable
att0
    DRole -> (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 "DRole" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, RoleType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "IRole" [] _ -> (ATermTable
att0, RoleType
IRole)
    ShAAppl "DRole" [] _ -> (ATermTable
att0, RoleType
DRole)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, RoleType)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Sign.RoleType" ShATerm
u

instance ShATermConvertible OWL2.Sign.RoleKind where
  toShATermAux :: ATermTable -> RoleKind -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: RoleKind
xv = case RoleKind
xv of
    FuncRole -> (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 "FuncRole" [] []) ATermTable
att0
    RefRole -> (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 "RefRole" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, RoleKind)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FuncRole" [] _ -> (ATermTable
att0, RoleKind
FuncRole)
    ShAAppl "RefRole" [] _ -> (ATermTable
att0, RoleKind
RefRole)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, RoleKind)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Sign.RoleKind" ShATerm
u

instance ShATermConvertible OWL2.Sign.SignAxiom where
  toShATermAux :: ATermTable -> SignAxiom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SignAxiom
xv = case SignAxiom
xv of
    Subconcept a :: ClassExpression
a b :: ClassExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ClassExpression
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ClassExpression
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 "Subconcept" [Int
a', Int
b'] []) ATermTable
att2
    Role a :: DomainOrRangeOrFunc (RoleKind, RoleType)
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable
-> DomainOrRangeOrFunc (RoleKind, RoleType) -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DomainOrRangeOrFunc (RoleKind, RoleType)
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
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 "Role" [Int
a', Int
b'] []) ATermTable
att2
    Data a :: DomainOrRangeOrFunc ()
a b :: OntologyIRI
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DomainOrRangeOrFunc () -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DomainOrRangeOrFunc ()
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
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 "Data" [Int
a', Int
b'] []) ATermTable
att2
    Conceptmembership a :: OntologyIRI
a b :: ClassExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ClassExpression
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 "Conceptmembership" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SignAxiom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Subconcept" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ClassExpression
a') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ClassExpression
b') ->
      (ATermTable
att2, ClassExpression -> ClassExpression -> SignAxiom
Subconcept ClassExpression
a' ClassExpression
b') }}
    ShAAppl "Role" [a :: Int
a, b :: Int
b] _ ->
      case Int
-> ATermTable
-> (ATermTable, DomainOrRangeOrFunc (RoleKind, RoleType))
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DomainOrRangeOrFunc (RoleKind, RoleType)
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, DomainOrRangeOrFunc (RoleKind, RoleType)
-> ObjectPropertyExpression -> SignAxiom
Role DomainOrRangeOrFunc (RoleKind, RoleType)
a' ObjectPropertyExpression
b') }}
    ShAAppl "Data" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, DomainOrRangeOrFunc ())
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DomainOrRangeOrFunc ()
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      (ATermTable
att2, DomainOrRangeOrFunc () -> OntologyIRI -> SignAxiom
Data DomainOrRangeOrFunc ()
a' OntologyIRI
b') }}
    ShAAppl "Conceptmembership" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ClassExpression
b') ->
      (ATermTable
att2, OntologyIRI -> ClassExpression -> SignAxiom
Conceptmembership OntologyIRI
a' ClassExpression
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SignAxiom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Sign.SignAxiom" ShATerm
u

instance ShATermConvertible OWL2.Sign.Sign where
  toShATermAux :: ATermTable -> Sign -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Sign
xv = case Sign
xv of
    Sign a :: Set OntologyIRI
a b :: Set OntologyIRI
b c :: Set OntologyIRI
c d :: Set OntologyIRI
d e :: Set OntologyIRI
e f :: Set OntologyIRI
f g :: Map OntologyIRI String
g h :: StringMap
h -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Set OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Set OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Set OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Set OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Set OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Set OntologyIRI
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Set OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Set OntologyIRI
d
      (att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> Set OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att4 Set OntologyIRI
e
      (att6 :: ATermTable
att6, f' :: Int
f') <- ATermTable -> Set OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att5 Set OntologyIRI
f
      (att7 :: ATermTable
att7, g' :: Int
g') <- ATermTable -> Map OntologyIRI String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att6 Map OntologyIRI String
g
      (att8 :: ATermTable
att8, h' :: Int
h') <- ATermTable -> StringMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att7 StringMap
h
      (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', Int
d', Int
e', Int
f', Int
g',
                                         Int
h'] []) ATermTable
att8
  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, d :: Int
d, e :: Int
e, f :: Int
f, g :: Int
g, h :: Int
h] _ ->
      case Int -> ATermTable -> (ATermTable, Set OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Set OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, Set OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Set OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, Set OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Set OntologyIRI
c') ->
      case Int -> ATermTable -> (ATermTable, Set OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Set OntologyIRI
d') ->
      case Int -> ATermTable -> (ATermTable, Set OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
e ATermTable
att4 of
      { (att5 :: ATermTable
att5, e' :: Set OntologyIRI
e') ->
      case Int -> ATermTable -> (ATermTable, Set OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
f ATermTable
att5 of
      { (att6 :: ATermTable
att6, f' :: Set OntologyIRI
f') ->
      case Int -> ATermTable -> (ATermTable, Map OntologyIRI String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
g ATermTable
att6 of
      { (att7 :: ATermTable
att7, g' :: Map OntologyIRI String
g') ->
      case Int -> ATermTable -> (ATermTable, StringMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
h ATermTable
att7 of
      { (att8 :: ATermTable
att8, h' :: StringMap
h') ->
      (ATermTable
att8, Set OntologyIRI
-> Set OntologyIRI
-> Set OntologyIRI
-> Set OntologyIRI
-> Set OntologyIRI
-> Set OntologyIRI
-> Map OntologyIRI String
-> StringMap
-> Sign
Sign Set OntologyIRI
a' Set OntologyIRI
b' Set OntologyIRI
c' Set OntologyIRI
d' Set OntologyIRI
e' Set OntologyIRI
f' Map OntologyIRI String
g' StringMap
h') }}}}}}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Sign)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Sign.Sign" ShATerm
u

instance ShATermConvertible OWL2.Sublogic.NumberRestrictions where
  toShATermAux :: ATermTable -> NumberRestrictions -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: NumberRestrictions
xv = case NumberRestrictions
xv of
    None -> (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 "None" [] []) ATermTable
att0
    Unqualified -> (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 "Unqualified" [] []) ATermTable
att0
    Qualified -> (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 "Qualified" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, NumberRestrictions)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "None" [] _ -> (ATermTable
att0, NumberRestrictions
None)
    ShAAppl "Unqualified" [] _ -> (ATermTable
att0, NumberRestrictions
Unqualified)
    ShAAppl "Qualified" [] _ -> (ATermTable
att0, NumberRestrictions
Qualified)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, NumberRestrictions)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Sublogic.NumberRestrictions" ShATerm
u

instance ShATermConvertible OWL2.Sublogic.OWLSub where
  toShATermAux :: ATermTable -> OWLSub -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OWLSub
xv = case OWLSub
xv of
    OWLSub a :: NumberRestrictions
a b :: Bool
b c :: Bool
c d :: Bool
d e :: Bool
e f :: Bool
f g :: Bool
g h :: Set OntologyIRI
h i :: Bool
i j :: Bool
j -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> NumberRestrictions -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 NumberRestrictions
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 -> Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Bool
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 -> Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att4 Bool
e
      (att6 :: ATermTable
att6, f' :: Int
f') <- ATermTable -> Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att5 Bool
f
      (att7 :: ATermTable
att7, g' :: Int
g') <- ATermTable -> Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att6 Bool
g
      (att8 :: ATermTable
att8, h' :: Int
h') <- ATermTable -> Set OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att7 Set OntologyIRI
h
      (att9 :: ATermTable
att9, i' :: Int
i') <- ATermTable -> Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att8 Bool
i
      (att10 :: ATermTable
att10, j' :: Int
j') <- ATermTable -> Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att9 Bool
j
      (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 "OWLSub" [Int
a', Int
b', Int
c', Int
d', Int
e', Int
f', Int
g',
                                           Int
h', Int
i', Int
j'] []) ATermTable
att10
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OWLSub)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OWLSub" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e, f :: Int
f, g :: Int
g, h :: Int
h, i :: Int
i, j :: Int
j] _ ->
      case Int -> ATermTable -> (ATermTable, NumberRestrictions)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: NumberRestrictions
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, Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Bool
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, Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
e ATermTable
att4 of
      { (att5 :: ATermTable
att5, e' :: Bool
e') ->
      case Int -> ATermTable -> (ATermTable, Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
f ATermTable
att5 of
      { (att6 :: ATermTable
att6, f' :: Bool
f') ->
      case Int -> ATermTable -> (ATermTable, Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
g ATermTable
att6 of
      { (att7 :: ATermTable
att7, g' :: Bool
g') ->
      case Int -> ATermTable -> (ATermTable, Set OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
h ATermTable
att7 of
      { (att8 :: ATermTable
att8, h' :: Set OntologyIRI
h') ->
      case Int -> ATermTable -> (ATermTable, Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
i ATermTable
att8 of
      { (att9 :: ATermTable
att9, i' :: Bool
i') ->
      case Int -> ATermTable -> (ATermTable, Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
j ATermTable
att9 of
      { (att10 :: ATermTable
att10, j' :: Bool
j') ->
      (ATermTable
att10, NumberRestrictions
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Set OntologyIRI
-> Bool
-> Bool
-> OWLSub
OWLSub NumberRestrictions
a' Bool
b' Bool
c' Bool
d' Bool
e' Bool
f' Bool
g' Set OntologyIRI
h' Bool
i' Bool
j') }}}}}}}}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OWLSub)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Sublogic.OWLSub" ShATerm
u

deriving instance GHC.Generics.Generic OWL2.Sublogic.NumberRestrictions
instance Data.Aeson.ToJSON OWL2.Sublogic.NumberRestrictions where
instance Data.Aeson.FromJSON OWL2.Sublogic.NumberRestrictions where

deriving instance GHC.Generics.Generic OWL2.Sublogic.OWLSub
instance Data.Aeson.ToJSON OWL2.Sublogic.OWLSub where
instance Data.Aeson.FromJSON OWL2.Sublogic.OWLSub where

deriving instance GHC.Generics.Generic OWL2.Symbols.RawSymb
instance Data.Aeson.ToJSON OWL2.Symbols.RawSymb where
instance Data.Aeson.FromJSON OWL2.Symbols.RawSymb where

deriving instance GHC.Generics.Generic OWL2.Symbols.SymbMapItems
instance Data.Aeson.ToJSON OWL2.Symbols.SymbMapItems where
instance Data.Aeson.FromJSON OWL2.Symbols.SymbMapItems where

deriving instance GHC.Generics.Generic OWL2.Symbols.SymbItems
instance Data.Aeson.ToJSON OWL2.Symbols.SymbItems where
instance Data.Aeson.FromJSON OWL2.Symbols.SymbItems where

deriving instance GHC.Generics.Generic OWL2.Symbols.ExtEntityType
instance Data.Aeson.ToJSON OWL2.Symbols.ExtEntityType where
instance Data.Aeson.FromJSON OWL2.Symbols.ExtEntityType where

instance ShATermConvertible OWL2.Symbols.RawSymb where
  toShATermAux :: ATermTable -> RawSymb -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: RawSymb
xv = case RawSymb
xv of
    ASymbol a :: Entity
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Entity -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Entity
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 "ASymbol" [Int
a'] []) ATermTable
att1
    AnUri a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
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 "AnUri" [Int
a'] []) ATermTable
att1
    APrefix 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 "APrefix" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, RawSymb)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ASymbol" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Entity)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Entity
a') ->
      (ATermTable
att1, Entity -> RawSymb
ASymbol Entity
a') }
    ShAAppl "AnUri" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> RawSymb
AnUri OntologyIRI
a') }
    ShAAppl "APrefix" [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 -> RawSymb
APrefix String
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, RawSymb)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Symbols.RawSymb" ShATerm
u

instance ShATermConvertible OWL2.Symbols.SymbMapItems where
  toShATermAux :: ATermTable -> SymbMapItems -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SymbMapItems
xv = case SymbMapItems
xv of
    SymbMapItems a :: ExtEntityType
a b :: [(OntologyIRI, Maybe OntologyIRI)]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ExtEntityType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ExtEntityType
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable
-> [(OntologyIRI, Maybe OntologyIRI)] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [(OntologyIRI, Maybe OntologyIRI)]
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 "SymbMapItems" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SymbMapItems)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SymbMapItems" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, ExtEntityType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ExtEntityType
a') ->
      case Int
-> ATermTable -> (ATermTable, [(OntologyIRI, Maybe OntologyIRI)])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [(OntologyIRI, Maybe OntologyIRI)]
b') ->
      (ATermTable
att2, ExtEntityType -> [(OntologyIRI, Maybe OntologyIRI)] -> SymbMapItems
SymbMapItems ExtEntityType
a' [(OntologyIRI, Maybe OntologyIRI)]
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SymbMapItems)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Symbols.SymbMapItems" ShATerm
u

instance ShATermConvertible OWL2.Symbols.SymbItems where
  toShATermAux :: ATermTable -> SymbItems -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SymbItems
xv = case SymbItems
xv of
    SymbItems a :: ExtEntityType
a b :: DirectlyImportsDocuments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ExtEntityType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ExtEntityType
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DirectlyImportsDocuments
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 "SymbItems" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SymbItems)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SymbItems" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, ExtEntityType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ExtEntityType
a') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: DirectlyImportsDocuments
b') ->
      (ATermTable
att2, ExtEntityType -> DirectlyImportsDocuments -> SymbItems
SymbItems ExtEntityType
a' DirectlyImportsDocuments
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SymbItems)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Symbols.SymbItems" ShATerm
u

instance ShATermConvertible OWL2.Symbols.ExtEntityType where
  toShATermAux :: ATermTable -> ExtEntityType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ExtEntityType
xv = case ExtEntityType
xv of
    AnyEntity -> (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 "AnyEntity" [] []) ATermTable
att0
    PrefixO -> (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 "PrefixO" [] []) ATermTable
att0
    EntityType a :: EntityType
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> EntityType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 EntityType
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 "EntityType" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, ExtEntityType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "AnyEntity" [] _ -> (ATermTable
att0, ExtEntityType
AnyEntity)
    ShAAppl "PrefixO" [] _ -> (ATermTable
att0, ExtEntityType
PrefixO)
    ShAAppl "EntityType" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, EntityType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: EntityType
a') ->
      (ATermTable
att1, EntityType -> ExtEntityType
EntityType EntityType
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ExtEntityType)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.Symbols.ExtEntityType" ShATerm
u