cryptol-2.4.0: Cryptol: The Language of Cryptography

Copyright | (c) 2013-2016 Galois Inc.
License | BSD3
Maintainer | cryptol@galois.com
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Cryptol.TypeCheck.TypeMap

Description

# Documentation

data TypeMap a Source #

Constructors

TM |

Fields

- tvar :: Map TVar a
- tcon :: Map TCon (List TypeMap a)
- trec :: Map [Ident] (List TypeMap a)

Instances

Functor TypeMap Source # |
Methods fmap :: (a -> b) -> TypeMap a -> TypeMap b # (<$) :: a -> TypeMap b -> TypeMap a #
TrieMap TypeMap Type Source # |
Methods emptyTM :: TypeMap a Source # nullTM :: TypeMap a -> Bool Source # lookupTM :: Type -> TypeMap a -> Maybe a Source # alterTM :: Type -> (Maybe a -> Maybe a) -> TypeMap a -> TypeMap a Source # unionTM :: (a -> a -> a) -> TypeMap a -> TypeMap a -> TypeMap a Source # toListTM :: TypeMap a -> [(Type, a)] Source # mapMaybeWithKeyTM :: (Type -> a -> Maybe b) -> TypeMap a -> TypeMap b Source #
Show a => Show (TypeMap a) Source # |
Methods showsPrec :: Int -> TypeMap a -> ShowS # show :: TypeMap a -> String # showList :: [TypeMap a] -> ShowS #
TVars a => TVars (TypeMap a) Source # |
Methods apSubst :: Subst -> TypeMap a -> TypeMap a Source #

type TypesMap = List TypeMap Source #

class TrieMap m k | m -> k where Source #

Minimal complete definition

emptyTM, nullTM, lookupTM, alterTM, unionTM, toListTM, mapMaybeWithKeyTM

Methods

emptyTM :: m a Source #

nullTM :: m a -> Bool Source #

lookupTM :: k -> m a -> Maybe a Source #

alterTM :: k -> (Maybe a -> Maybe a) -> m a -> m a Source #

unionTM :: (a -> a -> a) -> m a -> m a -> m a Source #

toListTM :: m a -> [(k, a)] Source #

mapMaybeWithKeyTM :: (k -> a -> Maybe b) -> m a -> m b Source #

Instances

TrieMap TypeMap Type Source # |
Methods emptyTM :: TypeMap a Source # nullTM :: TypeMap a -> Bool Source # lookupTM :: Type -> TypeMap a -> Maybe a Source # alterTM :: Type -> (Maybe a -> Maybe a) -> TypeMap a -> TypeMap a Source # unionTM :: (a -> a -> a) -> TypeMap a -> TypeMap a -> TypeMap a Source # toListTM :: TypeMap a -> [(Type, a)] Source # mapMaybeWithKeyTM :: (Type -> a -> Maybe b) -> TypeMap a -> TypeMap b Source #
Ord a => TrieMap (Map a) a Source # |
Methods emptyTM :: Map a a Source # nullTM :: Map a a -> Bool Source # lookupTM :: a -> Map a a -> Maybe a Source # alterTM :: a -> (Maybe a -> Maybe a) -> Map a a -> Map a a Source # unionTM :: (a -> a -> a) -> Map a a -> Map a a -> Map a a Source # toListTM :: Map a a -> [(a, a)] Source # mapMaybeWithKeyTM :: (a -> a -> Maybe b) -> Map a a -> Map a b Source #
TrieMap m a => TrieMap (List m) [a] Source # |
Methods emptyTM :: List m a Source # nullTM :: List m a -> Bool Source # lookupTM :: [a] -> List m a -> Maybe a Source # alterTM :: [a] -> (Maybe a -> Maybe a) -> List m a -> List m a Source # unionTM :: (a -> a -> a) -> List m a -> List m a -> List m a Source # toListTM :: List m a -> [([a], a)] Source # mapMaybeWithKeyTM :: ([a] -> a -> Maybe b) -> List m a -> List m b Source #

insertTM :: TrieMap m k => k -> a -> m a -> m a Source #

insertWithTM :: TrieMap m k => (a -> a -> a) -> k -> a -> m a -> m a Source #

membersTM :: TrieMap m k => m a -> [a] Source #

mapTM :: TrieMap m k => (a -> b) -> m a -> m b Source #

mapWithKeyTM :: TrieMap m k => (k -> a -> b) -> m a -> m b Source #

mapMaybeTM :: TrieMap m k => (a -> Maybe b) -> m a -> m b Source #

data List m a Source #

Constructors

L |

Fields

- nil :: Maybe a
- cons :: m (List m a)

Instances

Functor m => Functor (List m) Source # |
Methods fmap :: (a -> b) -> List m a -> List m b # (<$) :: a -> List m b -> List m a #
TrieMap m a => TrieMap (List m) [a] Source # |
Methods emptyTM :: List m a Source # nullTM :: List m a -> Bool Source # lookupTM :: [a] -> List m a -> Maybe a Source # alterTM :: [a] -> (Maybe a -> Maybe a) -> List m a -> List m a Source # unionTM :: (a -> a -> a) -> List m a -> List m a -> List m a Source # toListTM :: List m a -> [([a], a)] Source # mapMaybeWithKeyTM :: ([a] -> a -> Maybe b) -> List m a -> List m b Source #
(Functor m, TVars a) => TVars (List m a) Source # |
Methods apSubst :: Subst -> List m a -> List m a Source #