Logic_LF.hs revision e16b3696b2c173aac14200321868ed81b8f7dc69
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maeder{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
f0cb315452faea6fee8144489629e63e9bd7b303Christian MaederModule : $Header$
f0cb315452faea6fee8144489629e63e9bd7b303Christian MaederDescription : Instances of classes defined in Logic.hs for the Edinburgh
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maeder Logical Framework
f0cb315452faea6fee8144489629e63e9bd7b303Christian MaederCopyright : (c) Kristina Sojakova, DFKI Bremen 2009
f0cb315452faea6fee8144489629e63e9bd7b303Christian MaederLicense : GPLv2 or higher, see LICENSE.txt
f0cb315452faea6fee8144489629e63e9bd7b303Christian MaederMaintainer : k.sojakova@jacobs-university.de
f0cb315452faea6fee8144489629e63e9bd7b303Christian MaederStability : experimental
f0cb315452faea6fee8144489629e63e9bd7b303Christian MaederPortability : portable
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maederimport LF.MorphParser (readMorphism)
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maederimport qualified Data.Map as Map
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maederdata LF = LF deriving Show
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maederinstance Language LF where
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maeder description LF = "Edinburgh Logical Framework"
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maederinstance Category Sign Morphism where
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maeder ide = idMorph
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maeder composeMorphisms = compMorph
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maeder isInclusion = Map.null . symMap . canForm
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maederinstance Monoid BASIC_SPEC where
41582f75931338095dc749c455593c859376d593Christian Maeder mempty = Basic_spec []
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maeder mappend (Basic_spec l1) (Basic_spec l2) = Basic_spec $ l1 ++ l2
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maederinstance Syntax LF BASIC_SPEC SYMB_ITEMS SYMB_MAP_ITEMS where
f0cb315452faea6fee8144489629e63e9bd7b303Christian Maeder parse_basic_spec LF = Just basicSpec