Copyright | (c) Martin Kuehl, Uni Bremen 2008-2009 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | mkhl@informatik.uni-bremen.de |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Viewing Maude data types as Symbols.
Defines a type class AsSymbol
that lets us treat Maude data types as
Symbol
s, converting back and forth between them as needed.
Consider importing Maude.Meta instead of this module.
- class AsSymbol a where
- asSymbol :: a -> Symbol
- asSymbolMaybe :: a -> Maybe Symbol
- asSymbolSet :: AsSymbol a => a -> SymbolSet
- mapAsSymbol :: AsSymbol a => (Symbol -> a) -> SymbolMap -> a -> a
The AsSymbol type class
Auxiliary functions
asSymbolSet :: AsSymbol a => a -> SymbolSet
mapAsSymbol :: AsSymbol a => (Symbol -> a) -> SymbolMap -> a -> a
Apply a SymbolMap
to the input, then convert the result back to
the original type.