{-# OPTIONS -w -O0 #-}
{-# LANGUAGE CPP, StandaloneDeriving, DeriveDataTypeable, DeriveGeneric #-}
{- |
Module      :  ATC/AS_Annotation.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):
'Common.AS_Annotation.Annote_word'
'Common.AS_Annotation.Annote_text'
'Common.AS_Annotation.Display_format'
'Common.AS_Annotation.PrecRel'
'Common.AS_Annotation.AssocEither'
'Common.AS_Annotation.Semantic_anno'
'Common.AS_Annotation.Annotation'
'Common.AS_Annotation.Annoted'
'Common.AS_Annotation.SenOrigin'
'Common.AS_Annotation.SenAttr'
'Common.AS_Annotation.Name'
-}

{-
Generated by 'genRules' (automatic rule generation for DrIFT). Don't touch!!
  dependency files:
Common/AS_Annotation.der.hs
-}

module ATC.AS_Annotation () where

import ATC.IRI
import ATerm.Lib
import Common.AS_Annotation
import Common.ATerm.ConvInstances
import Common.IRI (IRI)
import Common.Id
import Common.Json.ConvInstances
import Common.Json.Instances
import Data.Aeson(ToJSON, FromJSON)
import Data.Data
import Data.Graph.Inductive.Graph as Graph
import Data.Maybe
import GHC.Generics(Generic)
import qualified Data.Map as Map

{-! for Common.AS_Annotation.Annote_word derive : ShATermConvertible !-}
{-! for Common.AS_Annotation.Annote_text derive : ShATermConvertible !-}
{-! for Common.AS_Annotation.Display_format derive : ShATermConvertible !-}
{-! for Common.AS_Annotation.PrecRel derive : ShATermConvertible !-}
{-! for Common.AS_Annotation.AssocEither derive : ShATermConvertible !-}
{-! for Common.AS_Annotation.Semantic_anno derive : ShATermConvertible !-}
{-! for Common.AS_Annotation.Annotation derive : ShATermConvertible !-}
{-! for Common.AS_Annotation.Annoted derive : ShATermConvertible !-}
{-! for Common.AS_Annotation.SenOrigin derive : ShATermConvertible !-}
{-! for Common.AS_Annotation.SenAttr derive : ShATermConvertible !-}
{-! for Common.AS_Annotation.Name derive : ShATermConvertible !-}

{-! for Common.AS_Annotation.Annote_word derive : Json !-}
{-! for Common.AS_Annotation.Annote_text derive : Json !-}
{-! for Common.AS_Annotation.Display_format derive : Json !-}
{-! for Common.AS_Annotation.PrecRel derive : Json !-}
{-! for Common.AS_Annotation.AssocEither derive : Json !-}
{-! for Common.AS_Annotation.Semantic_anno derive : Json !-}
{-! for Common.AS_Annotation.Annotation derive : Json !-}
{-! for Common.AS_Annotation.Annoted derive : Json !-}
{-! for Common.AS_Annotation.SenOrigin derive : Json !-}
{-! for Common.AS_Annotation.SenAttr derive : Json !-}
{-! for Common.AS_Annotation.Name derive : Json !-}

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

instance ShATermConvertible Common.AS_Annotation.Annote_word where
  toShATermAux :: ATermTable -> Annote_word -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Annote_word
xv = case Annote_word
xv of
    Annote_word 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 "Annote_word" [Int
a'] []) ATermTable
att1
    Comment_start -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Comment_start" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Annote_word)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Annote_word" [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 -> Annote_word
Annote_word String
a') }
    ShAAppl "Comment_start" [] _ -> (ATermTable
att0, Annote_word
Comment_start)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Annote_word)
forall a. String -> ShATerm -> a
fromShATermError "Common.AS_Annotation.Annote_word" ShATerm
u

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

instance ShATermConvertible Common.AS_Annotation.Display_format where
  toShATermAux :: ATermTable -> Display_format -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Display_format
xv = case Display_format
xv of
    DF_HTML -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DF_HTML" [] []) ATermTable
att0
    DF_LATEX -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DF_LATEX" [] []) ATermTable
att0
    DF_RTF -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DF_RTF" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Display_format)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DF_HTML" [] _ -> (ATermTable
att0, Display_format
DF_HTML)
    ShAAppl "DF_LATEX" [] _ -> (ATermTable
att0, Display_format
DF_LATEX)
    ShAAppl "DF_RTF" [] _ -> (ATermTable
att0, Display_format
DF_RTF)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Display_format)
forall a. String -> ShATerm -> a
fromShATermError "Common.AS_Annotation.Display_format" ShATerm
u

instance ShATermConvertible Common.AS_Annotation.PrecRel where
  toShATermAux :: ATermTable -> PrecRel -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: PrecRel
xv = case PrecRel
xv of
    Higher -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Higher" [] []) ATermTable
att0
    Lower -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Lower" [] []) ATermTable
att0
    BothDirections -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "BothDirections" [] []) ATermTable
att0
    NoDirection -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NoDirection" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, PrecRel)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Higher" [] _ -> (ATermTable
att0, PrecRel
Higher)
    ShAAppl "Lower" [] _ -> (ATermTable
att0, PrecRel
Lower)
    ShAAppl "BothDirections" [] _ -> (ATermTable
att0, PrecRel
BothDirections)
    ShAAppl "NoDirection" [] _ -> (ATermTable
att0, PrecRel
NoDirection)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, PrecRel)
forall a. String -> ShATerm -> a
fromShATermError "Common.AS_Annotation.PrecRel" ShATerm
u

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

instance ShATermConvertible Common.AS_Annotation.Semantic_anno where
  toShATermAux :: ATermTable -> Semantic_anno -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Semantic_anno
xv = case Semantic_anno
xv of
    SA_cons -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SA_cons" [] []) ATermTable
att0
    SA_def -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SA_def" [] []) ATermTable
att0
    SA_implies -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SA_implies" [] []) ATermTable
att0
    SA_mono -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SA_mono" [] []) ATermTable
att0
    SA_implied -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SA_implied" [] []) ATermTable
att0
    SA_mcons -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SA_mcons" [] []) ATermTable
att0
    SA_ccons -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SA_ccons" [] []) ATermTable
att0
    SA_wdef -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SA_wdef" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Semantic_anno)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SA_cons" [] _ -> (ATermTable
att0, Semantic_anno
SA_cons)
    ShAAppl "SA_def" [] _ -> (ATermTable
att0, Semantic_anno
SA_def)
    ShAAppl "SA_implies" [] _ -> (ATermTable
att0, Semantic_anno
SA_implies)
    ShAAppl "SA_mono" [] _ -> (ATermTable
att0, Semantic_anno
SA_mono)
    ShAAppl "SA_implied" [] _ -> (ATermTable
att0, Semantic_anno
SA_implied)
    ShAAppl "SA_mcons" [] _ -> (ATermTable
att0, Semantic_anno
SA_mcons)
    ShAAppl "SA_ccons" [] _ -> (ATermTable
att0, Semantic_anno
SA_ccons)
    ShAAppl "SA_wdef" [] _ -> (ATermTable
att0, Semantic_anno
SA_wdef)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Semantic_anno)
forall a. String -> ShATerm -> a
fromShATermError "Common.AS_Annotation.Semantic_anno" ShATerm
u

instance ShATermConvertible Common.AS_Annotation.Annotation where
  toShATermAux :: ATermTable -> Annotation -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Annotation
xv = case Annotation
xv of
    Unparsed_anno a :: Annote_word
a b :: Annote_text
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Annote_word -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Annote_word
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Annote_text -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Annote_text
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Unparsed_anno" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    Display_anno a :: Id
a b :: [(Display_format, String)]
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Id -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Id
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [(Display_format, String)] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [(Display_format, String)]
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Display_anno" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    List_anno a :: Id
a b :: Id
b c :: Id
c d :: Range
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Id -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Id
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Id -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Id
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Id -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Id
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Range
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "List_anno" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
    Number_anno a :: Id
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Id -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Id
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Number_anno" [Int
a', Int
b'] []) ATermTable
att2
    Float_anno a :: Id
a b :: Id
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Id -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Id
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Id -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Id
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Float_anno" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    String_anno a :: Id
a b :: Id
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Id -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Id
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Id -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Id
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "String_anno" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    Prec_anno a :: PrecRel
a b :: [Id]
b c :: [Id]
c d :: Range
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PrecRel -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PrecRel
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [Id] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [Id]
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [Id] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [Id]
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Range
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Prec_anno" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
    Assoc_anno a :: AssocEither
a b :: [Id]
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> AssocEither -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 AssocEither
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [Id] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [Id]
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Assoc_anno" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    Label a :: [String]
a b :: Range
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 -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Label" [Int
a', Int
b'] []) ATermTable
att2
    Prefix_anno a :: [(String, IRI)]
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [(String, IRI)] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [(String, IRI)]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Prefix_anno" [Int
a', Int
b'] []) ATermTable
att2
    Semantic_anno a :: Semantic_anno
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Semantic_anno -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Semantic_anno
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Semantic_anno" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Annotation)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Unparsed_anno" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Annote_word)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Annote_word
a') ->
      case Int -> ATermTable -> (ATermTable, Annote_text)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Annote_text
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, Annote_word -> Annote_text -> Range -> Annotation
Unparsed_anno Annote_word
a' Annote_text
b' Range
c') }}}
    ShAAppl "Display_anno" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Id)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Id
a') ->
      case Int -> ATermTable -> (ATermTable, [(Display_format, String)])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [(Display_format, String)]
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, Id -> [(Display_format, String)] -> Range -> Annotation
Display_anno Id
a' [(Display_format, String)]
b' Range
c') }}}
    ShAAppl "List_anno" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, Id)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Id
a') ->
      case Int -> ATermTable -> (ATermTable, Id)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Id
b') ->
      case Int -> ATermTable -> (ATermTable, Id)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Id
c') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Range
d') ->
      (ATermTable
att4, Id -> Id -> Id -> Range -> Annotation
List_anno Id
a' Id
b' Id
c' Range
d') }}}}
    ShAAppl "Number_anno" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Id)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Id
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, Id -> Range -> Annotation
Number_anno Id
a' Range
b') }}
    ShAAppl "Float_anno" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Id)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Id
a') ->
      case Int -> ATermTable -> (ATermTable, Id)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Id
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, Id -> Id -> Range -> Annotation
Float_anno Id
a' Id
b' Range
c') }}}
    ShAAppl "String_anno" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Id)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Id
a') ->
      case Int -> ATermTable -> (ATermTable, Id)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Id
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, Id -> Id -> Range -> Annotation
String_anno Id
a' Id
b' Range
c') }}}
    ShAAppl "Prec_anno" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, PrecRel)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PrecRel
a') ->
      case Int -> ATermTable -> (ATermTable, [Id])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [Id]
b') ->
      case Int -> ATermTable -> (ATermTable, [Id])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [Id]
c') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Range
d') ->
      (ATermTable
att4, PrecRel -> [Id] -> [Id] -> Range -> Annotation
Prec_anno PrecRel
a' [Id]
b' [Id]
c' Range
d') }}}}
    ShAAppl "Assoc_anno" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, AssocEither)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: AssocEither
a') ->
      case Int -> ATermTable -> (ATermTable, [Id])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [Id]
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, AssocEither -> [Id] -> Range -> Annotation
Assoc_anno AssocEither
a' [Id]
b' Range
c') }}}
    ShAAppl "Label" [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, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, [String] -> Range -> Annotation
Label [String]
a' Range
b') }}
    ShAAppl "Prefix_anno" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [(String, IRI)])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [(String, IRI)]
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, [(String, IRI)] -> Range -> Annotation
Prefix_anno [(String, IRI)]
a' Range
b') }}
    ShAAppl "Semantic_anno" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Semantic_anno)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Semantic_anno
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, Semantic_anno -> Range -> Annotation
Semantic_anno Semantic_anno
a' Range
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Annotation)
forall a. String -> ShATerm -> a
fromShATermError "Common.AS_Annotation.Annotation" ShATerm
u

instance ShATermConvertible a => ShATermConvertible (Common.AS_Annotation.Annoted a) where
  toShATermAux :: ATermTable -> Annoted a -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Annoted a
xv = case Annoted a
xv of
    Annoted a :: a
a b :: Range
b c :: [Annotation]
c d :: [Annotation]
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> a -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 a
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [Annotation]
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
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Annoted" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Annoted a)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Annoted" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, a)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: a
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [Annotation]
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') ->
      (ATermTable
att4, a -> Range -> [Annotation] -> [Annotation] -> Annoted a
forall a. a -> Range -> [Annotation] -> [Annotation] -> Annoted a
Annoted a
a' Range
b' [Annotation]
c' [Annotation]
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Annoted a)
forall a. String -> ShATerm -> a
fromShATermError "Common.AS_Annotation.Annoted" ShATerm
u

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

instance (ShATermConvertible s,
          ShATermConvertible a) => ShATermConvertible (Common.AS_Annotation.SenAttr s a) where
  toShATermAux :: ATermTable -> SenAttr s a -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SenAttr s a
xv = case SenAttr s a
xv of
    SenAttr a :: a
a b :: Maybe String
b c :: Bool
c d :: Bool
d e :: Bool
e f :: Maybe Bool
f g :: Maybe Id
g h :: String
h i :: Maybe SenOrigin
i j :: s
j -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> a -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 a
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Maybe String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Maybe String
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 -> Maybe Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att5 Maybe Bool
f
      (att7 :: ATermTable
att7, g' :: Int
g') <- ATermTable -> Maybe Id -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att6 Maybe Id
g
      (att8 :: ATermTable
att8, h' :: Int
h') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att7 String
h
      (att9 :: ATermTable
att9, i' :: Int
i') <- ATermTable -> Maybe SenOrigin -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att8 Maybe SenOrigin
i
      (att10 :: ATermTable
att10, j' :: Int
j') <- ATermTable -> s -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att9 s
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 "SenAttr" [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, SenAttr s a)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SenAttr" [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, a)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: a
a') ->
      case Int -> ATermTable -> (ATermTable, Maybe String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Maybe String
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, Maybe Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
f ATermTable
att5 of
      { (att6 :: ATermTable
att6, f' :: Maybe Bool
f') ->
      case Int -> ATermTable -> (ATermTable, Maybe Id)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
g ATermTable
att6 of
      { (att7 :: ATermTable
att7, g' :: Maybe Id
g') ->
      case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
h ATermTable
att7 of
      { (att8 :: ATermTable
att8, h' :: String
h') ->
      case Int -> ATermTable -> (ATermTable, Maybe SenOrigin)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
i ATermTable
att8 of
      { (att9 :: ATermTable
att9, i' :: Maybe SenOrigin
i') ->
      case Int -> ATermTable -> (ATermTable, s)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
j ATermTable
att9 of
      { (att10 :: ATermTable
att10, j' :: s
j') ->
      (ATermTable
att10, a
-> Maybe String
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Maybe Id
-> String
-> Maybe SenOrigin
-> s
-> SenAttr s a
forall s a.
a
-> Maybe String
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Maybe Id
-> String
-> Maybe SenOrigin
-> s
-> SenAttr s a
SenAttr a
a' Maybe String
b' Bool
c' Bool
d' Bool
e' Maybe Bool
f' Maybe Id
g' String
h' Maybe SenOrigin
i' s
j') }}}}}}}}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SenAttr s a)
forall a. String -> ShATerm -> a
fromShATermError "Common.AS_Annotation.SenAttr" ShATerm
u

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

deriving instance GHC.Generics.Generic Common.AS_Annotation.Annote_word
instance Data.Aeson.ToJSON Common.AS_Annotation.Annote_word where
instance Data.Aeson.FromJSON Common.AS_Annotation.Annote_word where

deriving instance GHC.Generics.Generic Common.AS_Annotation.Annote_text
instance Data.Aeson.ToJSON Common.AS_Annotation.Annote_text where
instance Data.Aeson.FromJSON Common.AS_Annotation.Annote_text where

deriving instance GHC.Generics.Generic Common.AS_Annotation.Display_format
instance Data.Aeson.ToJSON Common.AS_Annotation.Display_format where
instance Data.Aeson.FromJSON Common.AS_Annotation.Display_format where

deriving instance GHC.Generics.Generic Common.AS_Annotation.PrecRel
instance Data.Aeson.ToJSON Common.AS_Annotation.PrecRel where
instance Data.Aeson.FromJSON Common.AS_Annotation.PrecRel where

deriving instance GHC.Generics.Generic Common.AS_Annotation.AssocEither
instance Data.Aeson.ToJSON Common.AS_Annotation.AssocEither where
instance Data.Aeson.FromJSON Common.AS_Annotation.AssocEither where

deriving instance GHC.Generics.Generic Common.AS_Annotation.Semantic_anno
instance Data.Aeson.ToJSON Common.AS_Annotation.Semantic_anno where
instance Data.Aeson.FromJSON Common.AS_Annotation.Semantic_anno where

deriving instance GHC.Generics.Generic Common.AS_Annotation.Annotation
instance Data.Aeson.ToJSON Common.AS_Annotation.Annotation where
instance Data.Aeson.FromJSON Common.AS_Annotation.Annotation where

deriving instance GHC.Generics.Generic (Common.AS_Annotation.Annoted a)
instance Data.Aeson.ToJSON a => Data.Aeson.ToJSON (Common.AS_Annotation.Annoted a) where
instance Data.Aeson.FromJSON a => Data.Aeson.FromJSON (Common.AS_Annotation.Annoted a) where

deriving instance GHC.Generics.Generic Common.AS_Annotation.SenOrigin
instance Data.Aeson.ToJSON Common.AS_Annotation.SenOrigin where
instance Data.Aeson.FromJSON Common.AS_Annotation.SenOrigin where

deriving instance GHC.Generics.Generic (Common.AS_Annotation.SenAttr s a)
instance (Data.Aeson.ToJSON s,
          Data.Aeson.ToJSON a) => Data.Aeson.ToJSON (Common.AS_Annotation.SenAttr s a) where
instance (Data.Aeson.FromJSON s,
          Data.Aeson.FromJSON a) => Data.Aeson.FromJSON (Common.AS_Annotation.SenAttr s a) where

deriving instance GHC.Generics.Generic Common.AS_Annotation.Name
instance Data.Aeson.ToJSON Common.AS_Annotation.Name where
instance Data.Aeson.FromJSON Common.AS_Annotation.Name where