mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Redo the Fresh constructor docs to describe them as requests.
This commit is contained in:
parent
9cac249c84
commit
62b1b804fc
@ -8,8 +8,8 @@ type TName = Int
|
|||||||
|
|
||||||
-- | An effect offering a (resettable) sequence of always-incrementing, and therefore “fresh,” type variables.
|
-- | An effect offering a (resettable) sequence of always-incrementing, and therefore “fresh,” type variables.
|
||||||
data Fresh a where
|
data Fresh a where
|
||||||
Reset :: TName -> Fresh () -- ^ Reset the sequence of variable names. Useful to avoid complicated alpha-equivalence comparisons when iteratively recomputing the results of an analysis til convergence.
|
Reset :: TName -> Fresh () -- ^ Request a reset of the sequence of variable names.
|
||||||
Fresh :: Fresh TName -- ^ Get a fresh variable name, guaranteed unused since the last reset.
|
Fresh :: Fresh TName -- ^ Request a fresh variable name.
|
||||||
|
|
||||||
-- | 'Monad's offering a (resettable) sequence of guaranteed-fresh type variables.
|
-- | 'Monad's offering a (resettable) sequence of guaranteed-fresh type variables.
|
||||||
class Monad m => MonadFresh m where
|
class Monad m => MonadFresh m where
|
||||||
|
Loading…
Reference in New Issue
Block a user