1
1
mirror of https://github.com/github/semantic.git synced 2025-01-02 20:41:38 +03:00

📝 reset.

This commit is contained in:
Rob Rix 2017-12-21 10:56:04 -05:00
parent 3dd34f2a12
commit 9cac249c84

View File

@ -15,6 +15,8 @@ data Fresh a where
class Monad m => MonadFresh m where class Monad m => MonadFresh m where
-- | Get a fresh variable name, guaranteed unused (since the last 'reset'). -- | Get a fresh variable name, guaranteed unused (since the last 'reset').
fresh :: m TName fresh :: m TName
-- | 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 -> m () reset :: TName -> m ()
instance (Fresh :< fs) => MonadFresh (Eff fs) where instance (Fresh :< fs) => MonadFresh (Eff fs) where