ExtSign.hs revision b87efd3db0d2dc41615ea28669faf80fc1b48d56
{- |
Module : $Header$
Description : generated Typeable, ShATermConvertible instances
Copyright : (c) DFKI Bremen 2008
License : GPLv2 or higher
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : non-portable(overlapping Typeable instances)
hand-written instances Typeable, ShATermConvertible for the type:
'Common.ExtSign.ExtSign' (in order to avoid data type context)
-}
module ATC.ExtSign () where
import ATerm.Lib
import Common.ExtSign
import Data.Typeable
-- as generated by DrIFT (with "Ord symbol" data type context)
instance (Ord symbol, ShATermConvertible sign, ShATermConvertible symbol)
=> ShATermConvertible (ExtSign sign symbol) where
toShATermAux att0 xv = case xv of
ExtSign a b -> do
(att1, a') <- toShATerm' att0 a
(att2, b') <- toShATerm' att1 b
return $ addATerm (ShAAppl "ExtSign" [a', b'] []) att2
fromShATermAux ix att0 = case getShATerm ix att0 of
ShAAppl "ExtSign" [a, b] _ ->
case fromShATerm' a att0 of
{ (att1, a') ->
case fromShATerm' b att1 of
{ (att2, b') ->
(att2, ExtSign a' b') }}
u -> fromShATermError "ExtSign" u
_tcExtSignTc :: TyCon
_tcExtSignTc = mkTyCon "Common.ExtSign.ExtSign"
instance Typeable2 ExtSign where
typeOf2 _ = mkTyConApp _tcExtSignTc []