mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
🔥 builtInExport.
This commit is contained in:
parent
6993b39ab0
commit
98b1b1e16b
@ -4,7 +4,6 @@ module Control.Abstract.Primitive
|
||||
, defineClass
|
||||
, defineNamespace
|
||||
, builtInPrint
|
||||
, builtInExport
|
||||
, lambda
|
||||
, Lambda(..)
|
||||
) where
|
||||
@ -118,26 +117,3 @@ builtInPrint :: ( AbstractValue address value effects
|
||||
)
|
||||
=> Evaluator term address value effects value
|
||||
builtInPrint = lambda (\ v -> variable v >>= deref >>= asString >>= trace . unpack >> box unit)
|
||||
|
||||
builtInExport :: ( AbstractValue address value effects
|
||||
, HasCallStack
|
||||
, Member (Allocator address) effects
|
||||
, Member (Deref value) effects
|
||||
, Member (Env address) effects
|
||||
, Member Fresh effects
|
||||
, Member (Function address value) effects
|
||||
, Member (Reader ModuleInfo) effects
|
||||
, Member (Reader Span) effects
|
||||
, Member (Resumable (BaseError (AddressError address value))) effects
|
||||
, Member (Resumable (BaseError (EnvironmentError address))) effects
|
||||
, Member (State (Heap address value)) effects
|
||||
, Ord address
|
||||
)
|
||||
=> Evaluator term address value effects value
|
||||
builtInExport = lambda (\ v -> do
|
||||
var <- variable v >>= deref
|
||||
(k, value) <- asPair var
|
||||
sym <- asString k
|
||||
addr <- box value
|
||||
export (name sym) (name sym) (Just addr)
|
||||
box unit)
|
||||
|
Loading…
Reference in New Issue
Block a user