Description : Instance of class Logic for the Haskell logic
Copyright : (c) Christian Maeder, Sonja Groening, Uni Bremen 2002-2004
Maintainer : Christian.Maeder@dfki.de
Portability : non-portable(Logic)
Here is the place where the classes 'Category', 'Syntax',
'StaticAnalysis', 'Sentences', and 'Logic' are instantiated for
Some method implementations for 'StaticAnalysis' and 'Sentences'
-- a dummy datatype for the LogicGraph and for identifying the right
data Haskell = Haskell deriving (Show)
instance Language Haskell where
"Haskell - a purely functional programming language,\
\ featuring static typing, higher-order functions, polymorphism,\
\ type classes and monadic effects.\
type HaskellMorphism = DefaultMorphism Sign
instance Category Haskell Sign HaskellMorphism where
dom Haskell = domOfDefaultMorphism
cod Haskell = codOfDefaultMorphism
ide Haskell = ideOfDefaultMorphism
comp Haskell = compOfDefaultMorphism
legal_obj Haskell = const True
legal_mor Haskell = legalDefaultMorphism (legal_obj Haskell)
-- abstract syntax, parsing (and printing)
instance Syntax Haskell HsDecls
SYMB_ITEMS SYMB_MAP_ITEMS
parse_basic_spec Haskell = Just hatParser
parse_symb_items Haskell = Nothing
parse_symb_map_items Haskell = Nothing
type Haskell_Sublogics = ()
instance Sentences Haskell (TiDecl PNT) Sign HaskellMorphism Symbol where
map_sen Haskell _m s = return s
print_named Haskell sen =
lab -> space <> text "{-" <+> text lab <+> text "-}"
instance StaticAnalysis Haskell HsDecls
SYMB_ITEMS SYMB_MAP_ITEMS
basic_analysis Haskell = Just hatAna
empty_signature Haskell = emptySign
signature_union Haskell s = return . addSign s
signature_difference Haskell s = return . diffSign s
final_union Haskell = signature_union Haskell
inclusion Haskell = defaultInclusion (is_subsig Haskell)
is_subsig Haskell = isSubSign
instance Logic Haskell Haskell_Sublogics
HsDecls (TiDecl PNT) SYMB_ITEMS SYMB_MAP_ITEMS