1
1
mirror of https://github.com/github/semantic.git synced 2025-01-05 05:58:34 +03:00

📝 lambda.

This commit is contained in:
Rob Rix 2018-07-31 11:52:20 -04:00
parent 15ce4e0012
commit c4a46f47e1

View File

@ -62,6 +62,9 @@ defineNamespace name scope = define name $ do
binds <- Env.head <$> locally (scope >> getEnv)
namespace name Nothing binds
-- | Construct a function from a Haskell function taking 'Name's as arguments.
--
-- The constructed function will have the same arity as the Haskell function. Nullary functions are constructed by providing an evaluator producing an address. Note that the constructed function must not contain free variables as they will not be captured by the closure, and/or will be garbage collected.
lambda :: ( HasCallStack
, Lambda address value effects fn
, Member (Reader ModuleInfo) effects