{- Generated by DrIFT (Automatic class derivations for Haskell) -}
module TestTerm where
import TermRep
{-! global : Term !-}
data SortA = SortA1 SortB | SortA2
data SortB = SortB Integer SortA
{-* Generated by DrIFT : Look, but Don't Touch. *-}
instance Term SortA where
explode (x::SortA) = TermRep (toDyn x, f x, g x) where
f (SortA1 aa) = [explode aa]
f SortA2 = []
g (SortA1 _) xs = case TermRep.fArgs xs of [aa] -> toDyn ((SortA1 (TermRep.fDyn aa))::SortA)
g SortA2 xs = case TermRep.fArgs xs of [] -> toDyn ((SortA2)::SortA)
instance Term SortB where
explode (x::SortB) = TermRep (toDyn x, f x, g x) where
f (SortB aa ab) = [explode aa,explode ab]
g (SortB _ _) xs = case TermRep.fArgs xs of [aa,ab] -> toDyn ((SortB (TermRep.fDyn aa) (TermRep.fDyn ab))::SortB)
-- Imported from other files :-