Skip to content

Commit

Permalink
🧩 [consolidate]: Make clearer relationship between old version of tes…
Browse files Browse the repository at this point in the history
…tWithSetup and new.
  • Loading branch information
rolyp committed Oct 4, 2023
1 parent 8376f00 commit b2dffff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/Module.purs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ eval_progCxt (ProgCxt { mods }) = do
blah :: forall m g. Graph g => MonadError Error m => ProgCxt Unit -> m (GraphConfig g)
blah progCxt = do
(g × n) × progCxt' <- runWithGraphAllocT (G.empty × 0) do
progCxt' <- alloc progCxt
γ <- eval_progCxt progCxt'
pure $ ProgCxtEval { progCxt: progCxt', γ }
progCxt' <- alloc progCxt
γ <- eval_progCxt progCxt'
pure $ ProgCxtEval { progCxt: progCxt', γ }
pure { g, n, progCxt: progCxt' }
10 changes: 2 additions & 8 deletions test/Util.purs
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,9 @@ testWithSetup n file gconfig tconfig = do
pure $ averageRows rows

testWithSetup2 ∷ Int -> File -> ProgCxt Unit -> TestConfig -> Aff BenchRow
testWithSetup2 m file progCxt tconfig = do
testWithSetup2 n file progCxt tconfig = do
gconfig <- blah progCxt
s <- open file
testPretty s
rows <- replicateM m $ do
trRow <- testTrace s (unwrap gconfig.progCxt).γ tconfig
grRow <- testGraph s gconfig tconfig
pure $ BenchRow trRow grRow
pure $ averageRows rows
testWithSetup n file gconfig tconfig

testPretty :: forall m a. MonadAff m => MonadError Error m => Ann a => SE.Expr a -> m Unit
testPretty s = do
Expand Down

0 comments on commit b2dffff

Please sign in to comment.