pire-0.2.5

Safe HaskellNone
LanguageHaskell2010

Env

Description

aka "type env"

Documentation

data Scheme t Source #

Constructors

Forall [TVar t] (Type t) 

Instances

Ord t => Substitutable t (Scheme t) Source # 

Methods

apply :: Subst t -> Scheme t -> Scheme t Source #

ftv :: Scheme t -> Set (TVar t) Source #

Eq t => Eq (Scheme t) Source # 

Methods

(==) :: Scheme t -> Scheme t -> Bool #

(/=) :: Scheme t -> Scheme t -> Bool #

Ord t => Ord (Scheme t) Source # 

Methods

compare :: Scheme t -> Scheme t -> Ordering #

(<) :: Scheme t -> Scheme t -> Bool #

(<=) :: Scheme t -> Scheme t -> Bool #

(>) :: Scheme t -> Scheme t -> Bool #

(>=) :: Scheme t -> Scheme t -> Bool #

max :: Scheme t -> Scheme t -> Scheme t #

min :: Scheme t -> Scheme t -> Scheme t #

Show t => Show (Scheme t) Source # 

Methods

showsPrec :: Int -> Scheme t -> ShowS #

show :: Scheme t -> String #

showList :: [Scheme t] -> ShowS #

newtype Env b t Source #

Constructors

Env (Map b (Scheme t)) 

Instances

Ord t => Substitutable t (Env b t) Source # 

Methods

apply :: Subst t -> Env b t -> Env b t Source #

ftv :: Env b t -> Set (TVar t) Source #

(Show t, Show b) => Show (Env b t) Source # 

Methods

showsPrec :: Int -> Env b t -> ShowS #

show :: Env b t -> String #

showList :: [Env b t] -> ShowS #

Ord x => Monoid (Env x y) Source # 

Methods

mempty :: Env x y #

mappend :: Env x y -> Env x y -> Env x y #

mconcat :: [Env x y] -> Env x y #

extend :: Ord t => Env t t -> (t, Scheme t) -> Env t t Source #

lookup_ :: (Ord t, Pretty t, MonadError (TypeError t) m, MonadState Unique m, Letters t) => t -> Env t t -> m (Type t) Source #

lookup :: Ord t => t -> Env t t -> Maybe (Scheme t) Source #

remove :: Ord t => Env t a -> t -> Env t a Source #

generalize :: Ord t => Env t t -> Type t -> Scheme t Source #

merge :: Ord x => Env x y -> Env x y -> Env x y Source #

empty :: Env x y Source #