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

Commit c7fc67c

Browse files
committed
Revert "Define exports."
This reverts commit 3394949.
1 parent 809388e commit c7fc67c

4 files changed

Lines changed: 1 addition & 10 deletions

File tree

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ runFile eval = traverse run where
9393
imports = Set.fromList (map extractImport msgs)
9494
pure (Module (const set) imports exports (freeVariables set))
9595
extractImport (A.Import components) = name (Text.intercalate (Text.pack ".") (Foldable.toList components))
96-
extractImport (A.Export component) = name component
9796

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

semantic-analysis/src/Analysis/Carrier/Statement/State.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module Analysis.Carrier.Statement.State
1414
, module Analysis.Effect.Statement
1515
) where
1616

17-
import Analysis.Effect.Statement hiding (Export, Import)
17+
import Analysis.Effect.Statement hiding (Import)
1818
import qualified Analysis.Effect.Statement as S
1919
import Control.Algebra
2020
import Control.Carrier.State.Church
@@ -26,7 +26,6 @@ import Data.Text (Text)
2626

2727
data Message
2828
= Import (NonEmpty Text)
29-
| Export Text
3029
deriving (Eq, Ord, Show)
3130

3231

@@ -41,5 +40,4 @@ newtype StatementC m a = StatementC { runStatementC :: StateC [Message] m a }
4140
instance Algebra sig m => Algebra (S.Statement :+: sig) (StatementC m) where
4241
alg hdl sig ctx = case sig of
4342
L (S.Import ns) -> StatementC ((<$ ctx) <$> modify (Import ns:))
44-
L (S.Export n) -> StatementC ((<$ ctx) <$> modify (Export n:))
4543
R other -> StatementC (alg (runStatementC . hdl) (R other) ctx)

semantic-analysis/src/Analysis/Effect/Statement.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
module Analysis.Effect.Statement
44
( -- * Statement effect
55
simport
6-
, sexport
76
, Statement(..)
87
) where
98

@@ -17,9 +16,5 @@ import Data.Text
1716
simport :: Has Statement sig m => NonEmpty Text -> m ()
1817
simport ns = send (Import ns)
1918

20-
sexport :: Has Statement sig m => Text -> m ()
21-
sexport n = send (Export n)
22-
2319
data Statement (m :: K.Type -> K.Type) k where
2420
Import :: NonEmpty Text -> Statement m ()
25-
Export :: Text -> Statement m ()

semantic-analysis/src/Analysis/Syntax.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ evalModule :: (Has (Env addr) sig m, HasLabelled Store (Store addr val) sig m, H
9898
evalModule f i = S.runStatement mk (eval f i) where
9999
mk msgs b = pure (Module (const b) (Set.fromList (map formatImport msgs)) mempty mempty)
100100
formatImport (S.Import cs) = name (Text.intercalate (pack ".") (toList cs))
101-
formatImport (S.Export c) = name c
102101

103102

104103
-- Macro-expressible syntax

0 commit comments

Comments
 (0)