{-# OPTIONS -w -O0 #-}
{-# LANGUAGE CPP, StandaloneDeriving, DeriveDataTypeable #-}
{- |
Module      :  Alloy/ATC_Alloy.der.hs
Description :  generated Typeable, ShATermConvertible 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 Typeable, ShATermConvertible
  for the type(s):
'Alloy.AS_Alloy.X'
'Alloy.AS_Alloy.Sen'
'Alloy.AS_Alloy.Symbol'
'Alloy.AS_Alloy.RawSymbol'
'Alloy.AS_Alloy.SymbItems'
'Alloy.AS_Alloy.SymbMapItems'
'Alloy.AlloySign.Sign'
'Alloy.AlloySign.Mor'
-}

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

module Alloy.ATC_Alloy () where

import ATC.AS_Annotation
import ATerm.Lib
import Alloy.AS_Alloy
import Alloy.AlloySign
import Common.Id
import Data.Monoid
import Data.Typeable

{-! for Alloy.AS_Alloy.X derive : Typeable !-}
{-! for Alloy.AS_Alloy.Sen derive : Typeable !-}
{-! for Alloy.AS_Alloy.Symbol derive : Typeable !-}
{-! for Alloy.AS_Alloy.RawSymbol derive : Typeable !-}
{-! for Alloy.AS_Alloy.SymbItems derive : Typeable !-}
{-! for Alloy.AS_Alloy.SymbMapItems derive : Typeable !-}
{-! for Alloy.AlloySign.Sign derive : Typeable !-}
{-! for Alloy.AlloySign.Mor derive : Typeable !-}

{-! for Alloy.AS_Alloy.X derive : ShATermConvertible !-}
{-! for Alloy.AS_Alloy.Sen derive : ShATermConvertible !-}
{-! for Alloy.AS_Alloy.Symbol derive : ShATermConvertible !-}
{-! for Alloy.AS_Alloy.RawSymbol derive : ShATermConvertible !-}
{-! for Alloy.AS_Alloy.SymbItems derive : ShATermConvertible !-}
{-! for Alloy.AS_Alloy.SymbMapItems derive : ShATermConvertible !-}
{-! for Alloy.AlloySign.Sign derive : ShATermConvertible !-}
{-! for Alloy.AlloySign.Mor derive : ShATermConvertible !-}

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

instance ShATermConvertible SymbMapItems where
  toShATermAux att0 xv = case xv of
    SymbMapItems -> return $ addATerm (ShAAppl "SymbMapItems" [] []) att0
  fromShATermAux ix att0 = case getShATerm ix att0 of
    ShAAppl "SymbMapItems" [] _ -> (att0, SymbMapItems)
    u -> fromShATermError "SymbMapItems" u

instance ShATermConvertible SymbItems where
  toShATermAux att0 xv = case xv of
    SymbItems -> return $ addATerm (ShAAppl "SymbItems" [] []) att0
  fromShATermAux ix att0 = case getShATerm ix att0 of
    ShAAppl "SymbItems" [] _ -> (att0, SymbItems)
    u -> fromShATermError "SymbItems" u

instance ShATermConvertible RawSymbol where
  toShATermAux att0 xv = case xv of
    RawSymbol -> return $ addATerm (ShAAppl "RawSymbol" [] []) att0
  fromShATermAux ix att0 = case getShATerm ix att0 of
    ShAAppl "RawSymbol" [] _ -> (att0, RawSymbol)
    u -> fromShATermError "RawSymbol" u

instance ShATermConvertible Symbol where
  toShATermAux att0 xv = case xv of
    Symbol -> return $ addATerm (ShAAppl "Symbol" [] []) att0
  fromShATermAux ix att0 = case getShATerm ix att0 of
    ShAAppl "Symbol" [] _ -> (att0, Symbol)
    u -> fromShATermError "Symbol" u

instance ShATermConvertible Sen where
  toShATermAux att0 xv = case xv of
    Sen -> return $ addATerm (ShAAppl "Sen" [] []) att0
  fromShATermAux ix att0 = case getShATerm ix att0 of
    ShAAppl "Sen" [] _ -> (att0, Sen)
    u -> fromShATermError "Sen" u

instance ShATermConvertible X where
  toShATermAux att0 xv = case xv of
    X -> return $ addATerm (ShAAppl "X" [] []) att0
  fromShATermAux ix att0 = case getShATerm ix att0 of
    ShAAppl "X" [] _ -> (att0, X)
    u -> fromShATermError "X" u

deriving instance Typeable SymbMapItems

deriving instance Typeable SymbItems

deriving instance Typeable RawSymbol

deriving instance Typeable Symbol

deriving instance Typeable Sen

deriving instance Typeable X

deriving instance Typeable Sign

deriving instance Typeable Mor

instance ShATermConvertible Sign where
  toShATermAux att0 xv = case xv of
    Sign -> return $ addATerm (ShAAppl "Sign" [] []) att0
  fromShATermAux ix att0 = case getShATerm ix att0 of
    ShAAppl "Sign" [] _ -> (att0, Sign)
    u -> fromShATermError "Sign" u

instance ShATermConvertible Mor where
  toShATermAux att0 xv = case xv of
    Mor -> return $ addATerm (ShAAppl "Mor" [] []) att0
  fromShATermAux ix att0 = case getShATerm ix att0 of
    ShAAppl "Mor" [] _ -> (att0, Mor)
    u -> fromShATermError "Mor" u
