fix: rename parameter of withImportModules to match doc string

This commit is contained in:
David Renshaw 2023-09-11 11:20:42 -04:00 committed by Sebastian Ullrich
parent 3e755dc0e1
commit ba416f2c1c

View file

@ -803,9 +803,9 @@ def importModules (imports : Array Import) (opts : Options) (trustLevel : UInt32
/--
Create environment object from imports and free compacted regions after calling `act`. No live references to the
environment object or imported objects may exist after `act` finishes. -/
unsafe def withImportModules {α : Type} (imports : Array Import) (opts : Options) (trustLevel : UInt32 := 0) (x : Environment → IO α) : IO α := do
unsafe def withImportModules {α : Type} (imports : Array Import) (opts : Options) (trustLevel : UInt32 := 0) (act : Environment → IO α) : IO α := do
let env ← importModules imports opts trustLevel
try x env finally env.freeRegions
try act env finally env.freeRegions
/--
Environment extension for tracking all `namespace` declared by users.