Or better still, make it fancy so it can do type-lookups etc. too :smile:
For reference, one way to do type-lookups at the moment is with an annotated hole:
> ?find :: Array _ -> Int
Error found:
in module $PSCI
at line 1, column 1 - line 1, column 6
Hole 'find' has the inferred type
Array t0 -> Int
You could substitute the hole with one of these values:
$PSCI.it :: Array t0 -> Int
Data.Array.length :: forall a. Array a -> Int
Data.Foldable.product :: forall a f.
( Foldable f
, Semiring a
) => f a -> a
Data.Foldable.sum :: forall a f.
( Foldable f
, Semiring a
) => f a -> a
Data.Semiring.one :: forall a. (Semiring a) => a
Data.Semiring.zero :: forall a. (Semiring a) => a
Unsafe.Coerce.unsafeCoerce :: forall a b. a -> b
However I don't think this includes declarations defined in the repl session.
Yeah, I know about that one. 馃憤
This was a suggestion based on a question someone had in Slack about whether it was possible to find where things were defined via the repl, but giving it "Pursuit powers" just seemed like a natural extension.
Should this be promoted to "Approved"? It doesn't sound like there's much more to discuss other than implementation?
I think it could do with a slightly more detailed specification; it's not entirely clear to me how this should work.
Most helpful comment
For reference, one way to do type-lookups at the moment is with an annotated hole:
However I don't think this includes declarations defined in the repl session.