Skip to content

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

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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