Sentence.hs revision 6858f9c9c8b077b2b574a9f30753cf5fec8124d6
c4ae37349f31bb57fba21eb842ea3f2e439abb1cGeorgel CalinModule : $Header$
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel CalinDescription : Sentences for Maude
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel CalinCopyright : (c) Martin Kuehl, Uni Bremen 2008
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel CalinLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel CalinMaintainer : mkhl@informatik.uni-bremen.de
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel CalinStability : experimental
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel CalinPortability : portable
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel CalinDefinition of sentences for Maude.
f00edd94c598adc73dc4f6005d79d2295e463da5Georgel Calin Sentence(..),
f00edd94c598adc73dc4f6005d79d2295e463da5Georgel Calinimport Data.Typeable (Typeable)
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel Calin-- for ShATermConvertible
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel Calinimport Common.DocUtils (Pretty(..))
c4ae37349f31bb57fba21eb842ea3f2e439abb1cGeorgel Calinimport qualified Common.Doc as Doc
c4ae37349f31bb57fba21eb842ea3f2e439abb1cGeorgel Calindata Sentence = MembAx MembAx
edbee37fd0c724e09c8471d25d0dc48ac84ac12cGeorgel Calin | Equation Equation
edbee37fd0c724e09c8471d25d0dc48ac84ac12cGeorgel Calin deriving (Show, Eq, Ord, Typeable)
edbee37fd0c724e09c8471d25d0dc48ac84ac12cGeorgel Calin-- TODO: Add real pretty-printing for Maude Sentences.
edbee37fd0c724e09c8471d25d0dc48ac84ac12cGeorgel Calininstance Pretty Sentence where
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel Calin-- TODO: Replace dummy implementation for ShATermConvertible Sentence.
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel Calininstance ShATermConvertible Sentence where
edbee37fd0c724e09c8471d25d0dc48ac84ac12cGeorgel Calin toShATermAux table _ = return (table, 0)
edbee37fd0c724e09c8471d25d0dc48ac84ac12cGeorgel Calin fromShATermAux _ table = (table, error "Nope...")
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel Calininstance HasSorts Sentence where
c4ae37349f31bb57fba21eb842ea3f2e439abb1cGeorgel Calin getSorts sen = case sen of
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel Calin MembAx mb -> getSorts mb
c4ae37349f31bb57fba21eb842ea3f2e439abb1cGeorgel Calin Equation eq -> getSorts eq
c4ae37349f31bb57fba21eb842ea3f2e439abb1cGeorgel Calin mapSorts mp sen = case sen of
c4ae37349f31bb57fba21eb842ea3f2e439abb1cGeorgel Calin MembAx mb -> MembAx (mapSorts mp mb)
c4ae37349f31bb57fba21eb842ea3f2e439abb1cGeorgel Calin Equation eq -> Equation (mapSorts mp eq)
c4ae37349f31bb57fba21eb842ea3f2e439abb1cGeorgel Calininstance HasOps Sentence where
edbee37fd0c724e09c8471d25d0dc48ac84ac12cGeorgel Calin getOps sen = case sen of
edbee37fd0c724e09c8471d25d0dc48ac84ac12cGeorgel Calin MembAx mb -> getOps mb
edbee37fd0c724e09c8471d25d0dc48ac84ac12cGeorgel Calin Equation eq -> getOps eq
c4ae37349f31bb57fba21eb842ea3f2e439abb1cGeorgel Calin mapOps mp sen = case sen of