AS_COL.hs revision 881f43de18aeae879886be203cd32e90051799c0
{- Generated by DrIFT (Automatic class derivations for Haskell) -}
{-# LINE 1 "COL/AS_COL.der.hs" #-}
{-
Module : $Header$
Copyright : (c) Till Mossakowski, Uni Bremen 2004
Licence : All rights reserved.
Maintainer : hets@tzi.de
Stability : provisional
Portability : portable
Abstract syntax for COL extension of CASL
Only the added syntax is specified
-}
module COL.AS_COL where
import Common.Id
import Common.AS_Annotation
import CASL.AS_Basic_CASL
import CASL.ATC_CASL
-- DrIFT command
{-! global: UpPos !-}
type COL_BASIC_SPEC = BASIC_SPEC () COL_SIG_ITEM ()
data COL_SIG_ITEM =
Constructor_items [Id] [Pos]
-- pos: ids
| Observer_items [(Id, Maybe Int)] [Pos]
-- pos: ids
deriving (Eq, Show)
constructorS, constructorsS :: String
constructorS = "constructor"
constructorsS = constructorS ++ "s"
observerS, observersS :: String
observerS = "observer"
observersS = observerS ++ "s"
col_reserved_words :: [String]
col_reserved_words = [constructorS,constructorsS,observerS,observersS]
{- ? Generated by DrIFT : Look, but Don't Touch. (works w/ haddock) ? -}
instance PosItem COL_SIG_ITEM where
up_pos_l fn1 (Constructor_items aa ab) =
(Constructor_items aa (fn1 ab))
up_pos_l fn1 (Observer_items aa ab) = (Observer_items aa (fn1 ab))
get_pos_l (Constructor_items _ ab) = Just ab
get_pos_l (Observer_items _ ab) = Just ab
-- Imported from other files :-