use ST from base
This commit is contained in:
parent
ebde478adc
commit
80b1b3581a
8 changed files with 80 additions and 121 deletions
|
@ -2,7 +2,7 @@ module Tests.Reduce
|
|||
|
||||
import Quox.Syntax as Lib
|
||||
import Quox.Equal
|
||||
import Quox.ST
|
||||
import Control.Monad.ST.Extra
|
||||
import TypingImpls
|
||||
import AstExtra
|
||||
import TAP
|
||||
|
@ -14,7 +14,8 @@ import Control.Eff
|
|||
|
||||
runWhnf : Eff Whnf a -> Either Error a
|
||||
runWhnf act = runSTErr $ do
|
||||
runEff act [handleStateSTRef !(newRef 0), handleExcept (\e => stLeft e)]
|
||||
runEff act [handleStateSTRef !(liftST $ newSTRef 0),
|
||||
handleExcept (\e => stLeft e)]
|
||||
|
||||
parameters {0 isRedex : RedexTest tm} {auto _ : CanWhnf tm isRedex} {d, n : Nat}
|
||||
{auto _ : (Eq (tm d n), Show (tm d n))}
|
||||
|
|
|
@ -5,7 +5,7 @@ import public Quox.Typing
|
|||
import public Quox.Pretty
|
||||
import Quox.Equal
|
||||
import Quox.Typechecker
|
||||
import Quox.ST
|
||||
import Control.Monad.ST.Extra
|
||||
import PrettyExtra
|
||||
|
||||
import Derive.Prelude
|
||||
|
@ -25,7 +25,7 @@ runEqual defs act = runSTErr $ do
|
|||
runEff act
|
||||
[handleExcept (\e => stLeft e),
|
||||
handleReaderConst defs,
|
||||
handleStateSTRef !(newRef 0)]
|
||||
handleStateSTRef !(liftST $ newSTRef 0)]
|
||||
|
||||
export
|
||||
runTC : Definitions -> Eff TC a -> Either Error a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue