aboutsummaryrefslogtreecommitdiff
path: root/neb/std
diff options
context:
space:
mode:
Diffstat (limited to 'neb/std')
-rw-r--r--neb/std/repl.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/neb/std/repl.py b/neb/std/repl.py
index 7ea383e..f953e18 100644
--- a/neb/std/repl.py
+++ b/neb/std/repl.py
@@ -5,9 +5,12 @@ from ..structs import *
REPL = Environment()
def interpretHowTo(symbol, args, env, ns):
- if not isinstance(args[0], Callable):
- raise InterpretPanic(symbol, "expects a :func", args[0])
- print(args[0].describe())
+ target = args[0]
+ if isinstance(target, Symbol):
+ target = evaluate(target, env, ns)
+ if not isinstance(target, Callable):
+ raise InterpretPanic(symbol, "expects a func or symbol", args[0])
+ print(target.describe())
return List([])
REPL.register("howto", Builtin("howto", interpretHowTo, [Arg("symbol", TypeEnum.ANY)], return_type=Type(":list")))