mirror of
https://github.com/github/semantic.git
synced 2024-12-21 13:51:44 +03:00
Merge remote-tracking branch 'origin/master' into environment-scoping
This commit is contained in:
commit
f5edf073a2
@ -17,7 +17,7 @@ import Prelude hiding (fail)
|
||||
--
|
||||
-- This allows us to abstract the choice of whether to evaluate under binders for different value types.
|
||||
class (MonadEvaluator t v m) => MonadValue t v m where
|
||||
-- | Construct an abstract unit value.
|
||||
-- | Construct an abstract unit value.
|
||||
unit :: m v
|
||||
|
||||
-- | Construct an abstract integral value.
|
||||
|
@ -8,8 +8,10 @@ type TName = Int
|
||||
|
||||
-- | An effect offering a (resettable) sequence of always-incrementing, and therefore “fresh,” type variables.
|
||||
data Fresh a where
|
||||
Reset :: TName -> Fresh () -- ^ Request a reset of the sequence of variable names.
|
||||
Fresh :: Fresh TName -- ^ Request a fresh variable name.
|
||||
-- | Request a reset of the sequence of variable names.
|
||||
Reset :: TName -> Fresh ()
|
||||
-- | Request a fresh variable name.
|
||||
Fresh :: Fresh TName
|
||||
|
||||
-- | 'Monad's offering a (resettable) sequence of guaranteed-fresh type variables.
|
||||
class Monad m => MonadFresh m where
|
||||
|
Loading…
Reference in New Issue
Block a user