ATC_COL.hs revision 881f43de18aeae879886be203cd32e90051799c0
{- Generated by DrIFT (Automatic class derivations for Haskell) -}
{-# LINE 1 "COL/ATC_COL.der.hs" #-}
{-
Generated by 'genRules' (automatic rule generation for DrIFT). Don't touch!!
dependency files: COL/AS_COL.hs COL/COLSign.hs
-}
module COL.ATC_COL where
import Common.ATerm.Lib
import COL.AS_COL
import Common.Id
import Common.AS_Annotation
import CASL.AS_Basic_CASL
import CASL.ATC_CASL
import Modal.ModalSign
import CASL.Sign
import qualified Common.Lib.Map as Map
import qualified Common.Lib.Set as Set
import ATC.Id
import ATC.AS_Annotation
{-! for COL_SIG_ITEM derive : ShATermConvertible !-}
{-! for ModalSign derive : ShATermConvertible !-}
{- ? Generated by DrIFT : Look, but Don't Touch. (works w/ haddock) ? -}
-- Imported from other files :-
instance ATermConvertible COL_SIG_ITEM where
toShATerm att0 (Constructor_items aa ab) =
case toShATerm att0 aa of { (att1,aa') ->
case toShATerm att1 ab of { (att2,ab') ->
addATerm (ShAAppl "Constructor_items" [ aa',ab' ] []) att2 }}
toShATerm att0 (Observer_items aa ab) =
case toShATerm att0 aa of { (att1,aa') ->
case toShATerm att1 ab of { (att2,ab') ->
addATerm (ShAAppl "Observer_items" [ aa',ab' ] []) att2 }}
fromShATerm att =
case aterm of
(ShAAppl "Constructor_items" [ aa,ab ] _) ->
case fromShATerm (getATermByIndex1 aa att) of { aa' ->
case fromShATerm (getATermByIndex1 ab att) of { ab' ->
(Constructor_items aa' ab') }}
(ShAAppl "Observer_items" [ aa,ab ] _) ->
case fromShATerm (getATermByIndex1 aa att) of { aa' ->
case fromShATerm (getATermByIndex1 ab att) of { ab' ->
(Observer_items aa' ab') }}
u -> fromShATermError "COL_SIG_ITEM" u
where
aterm = getATerm att
fromATerm _ = error "function \"fromATerm\" not derived (implemented) for data type \"COL_SIG_ITEM\""
toATerm _ = error "function \"toATerm\" not derived (implemented) for data type \"COL_SIG_ITEM\""
instance ATermConvertible ModalSign where
toShATerm att0 (ModalSign aa ab ac ad) =
case toShATerm att0 aa of { (att1,aa') ->
case toShATerm att1 ab of { (att2,ab') ->
case toShATerm att2 ac of { (att3,ac') ->
case toShATerm att3 ad of { (att4,ad') ->
addATerm (ShAAppl "ModalSign" [ aa',ab',ac',ad' ] []) att4 }}}}
fromShATerm att =
case aterm of
(ShAAppl "ModalSign" [ aa,ab,ac,ad ] _) ->
case fromShATerm (getATermByIndex1 aa att) of { aa' ->
case fromShATerm (getATermByIndex1 ab att) of { ab' ->
case fromShATerm (getATermByIndex1 ac att) of { ac' ->
case fromShATerm (getATermByIndex1 ad att) of { ad' ->
(ModalSign aa' ab' ac' ad') }}}}
u -> fromShATermError "ModalSign" u
where
aterm = getATerm att
fromATerm _ = error "function \"fromATerm\" not derived (implemented) for data type \"ModalSign\""
toATerm _ = error "function \"toATerm\" not derived (implemented) for data type \"ModalSign\""