这是indexloc提供的服务,不要输入任何密码
Skip to content

Repl :t command doesn't work with (use) #1460

@ekzhang

Description

@ekzhang

I think the REPL's :t command doesn't quite work as I would expect with namespaces that are opened!

Here's the output on carp-v0.5.5-x86_64-macos:

鲤 :t IO.read-file
=> (Fn [(Ref String <a>)] (Result String String) <StaticLifetime>)
鲤 (use IO)
鲤 :t read-file
I can’t find the symbol `read-file` at REPL:5:7.

Traceback:
  (type read-file) at REPL:5:1.

This is despite that I can otherwise call (read-file) directly after (use IO) works. The same happens in composition when I type use IO:

鲤 use IO
=> IO
鲤 :t (read-file "input")
Can't get the type of: (read-file "input") at REPL:2:7.

Traceback:
  (type (read-file "input")) at REPL:2:1.
鲤 :t (IO.read-file "input")
=> (Result String String)

But not with (use IO) — I'm not sure what the difference is here.

鲤 (use IO)
鲤 :t (read-file "input")
=> (Result String String)
鲤 :t (IO.read-file "input")
=> (Result String String)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions