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

Commit 809388e

Browse files
committed
Revert "Don't extract exports as imports."
This reverts commit 847fe26.
1 parent 8844588 commit 809388e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ runFile eval = traverse run where
9090
result msgs sets = do
9191
exports <- gets @(A.MStore ExcSet) (fmap Foldable.fold . Map.mapKeys A.getMAddr . A.getMStore)
9292
let set = Foldable.fold sets
93-
imports = foldMap extractImport msgs
93+
imports = Set.fromList (map extractImport msgs)
9494
pure (Module (const set) imports exports (freeVariables set))
95-
extractImport (A.Import components) = Set.singleton (name (Text.intercalate (Text.pack ".") (Foldable.toList components)))
96-
extractImport (A.Export _) = mempty
95+
extractImport (A.Import components) = name (Text.intercalate (Text.pack ".") (Foldable.toList components))
96+
extractImport (A.Export component) = name component
9797

9898
newtype ExcC m a = ExcC { runExcC :: m a }
9999
deriving (Alternative, Applicative, Functor, Monad)

0 commit comments

Comments
 (0)