Logic_LF.hs revision 80d2ec8f37d5ddec13c14b17b1bab01e9c94630a
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-}
f38cb554a534c6df738be3f4d23327e69888e634John Wren KennedyModule : $Header$
f38cb554a534c6df738be3f4d23327e69888e634John Wren KennedyDescription : Instances of classes defined in Logic.hs for the Edinburgh
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy Logical Framework
f38cb554a534c6df738be3f4d23327e69888e634John Wren KennedyCopyright : (c) Kristina Sojakova, DFKI Bremen 2009
f38cb554a534c6df738be3f4d23327e69888e634John Wren KennedyLicense : GPLv2 or higher, see LICENSE.txt
f38cb554a534c6df738be3f4d23327e69888e634John Wren KennedyMaintainer : k.sojakova@jacobs-university.de
f38cb554a534c6df738be3f4d23327e69888e634John Wren KennedyStability : experimental
f38cb554a534c6df738be3f4d23327e69888e634John Wren KennedyPortability : portable
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedyimport qualified Data.Map as Map
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedydata LF = LF deriving Show
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedyinstance Language LF where
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy description LF = "Edinburgh Logical Framework"
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedyinstance Category Sign Morphism where
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy composeMorphisms = compMorph
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy isInclusion = Map.null . symMap . canForm
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy legal_mor = const True
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedyinstance Syntax LF BASIC_SPEC SYMB_ITEMS SYMB_MAP_ITEMS where
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy parse_basic_spec LF = Just basicSpec
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy parse_symb_items LF = Just symbItems
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy parse_symb_map_items LF = Just symbMapItems
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedyinstance Sentences LF
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy map_sen LF m = (Result []) . (translate m)
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy sym_of LF = singletonList . getSymbols
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedyinstance Logic LF
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy SYMB_MAP_ITEMS
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedyinstance StaticAnalysis LF
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy SYMB_MAP_ITEMS
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy basic_analysis LF = Just $ basicAnalysis