Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 8844588

Browse files
committed
Go to the Store to get some exports.
1 parent bfa326e commit 8844588

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

semantic-analysis/src/Analysis/Analysis/Exception.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import Control.Effect.Labelled
3333
import Control.Effect.State
3434
import qualified Data.Foldable as Foldable
3535
import Data.Function (fix)
36+
import qualified Data.Map as Map
3637
import qualified Data.Set as Set
3738
import qualified Data.Text as Text
3839

@@ -87,9 +88,9 @@ runFile eval = traverse run where
8788
. A.runEnv @ExcSet
8889
. convergeTerm (A.runStore @ExcSet . runExcC . fix (cacheTerm . eval))
8990
result msgs sets = do
91+
exports <- gets @(A.MStore ExcSet) (fmap Foldable.fold . Map.mapKeys A.getMAddr . A.getMStore)
9092
let set = Foldable.fold sets
9193
imports = foldMap extractImport msgs
92-
exports = mempty
9394
pure (Module (const set) imports exports (freeVariables set))
9495
extractImport (A.Import components) = Set.singleton (name (Text.intercalate (Text.pack ".") (Foldable.toList components)))
9596
extractImport (A.Export _) = mempty

0 commit comments

Comments
 (0)