unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.74k stars 267 forks source link

name selection in `find` is bananas #1348

Open aryairani opened 4 years ago

aryairani commented 4 years ago
.> find +

  1.  base.Bytes.++ : Bytes -> Bytes -> Bytes
  2.  base.Float.+ : Float -> Float -> Float
  3.  base.Int.+ : Int -> Int -> Int
  4.  base.List.++ : [a] -> [a] -> [a]
  5.  base.List.:+ : [a] -> a -> [a]
  6.  base.Nat.+ : Nat -> Nat -> Nat
  7.  base.Text.++ : Text -> Text -> Text
  8.  base2.Doc.++ : Doc -> Doc -> Doc
  9.  nonempty.NonEmpty.++ : NonEmpty a -> NonEmpty a -> NonEmpty a
  10. nonempty.NonEmpty.:+ : NonEmpty a -> a -> NonEmpty a
  11. base.List.+: : a -> [a] -> [a]
  12. nonempty.NonEmpty.+: : x1 -> NonEmpty x1 -> NonEmpty x1

.> find 6

  1. prs.pchiusano.base.Nat.+ : Nat -> Nat -> Nat

.>

Err, what?


fwiw:

.> debug.numberedArgs

  1.  base.Bytes.++##Bytes.++
  2.  base.Float.+##Float.+
  3.  base.Int.+##Int.+
  4.  base.List.++##List.++
  5.  base.List.:+##List.snoc
  6.  base.Nat.+##Nat.+
  7.  base.Text.++##Text.++
  8.  base2.Doc.++#hid0f7etdtvak92mno80hu7n1841l2titat727qv5eclf231es5apm2pi7mqlc08ilemp95oq6smqucj71iholiej3a3gn0s0d7hut0
  9.  nonempty.NonEmpty.++#c7t0a76tfpkp8gv5qph1gcko8bgr98ifbue6lkbuleam2g9v1ojirv8ptk0te7s888lmalkuf2dv514ug08bt12t3u3ofshd2terr08
  10. nonempty.NonEmpty.:+#h2hnfvr76ol8dhho2n8tjoethuignjrmrfc2fen1kfvvcndk6s3ci4rorcl8b565hsk9sm1c5rn646bj67skeup84t01940o9tsrl9o
  11. base.List.+:##List.cons
  12. nonempty.NonEmpty.+:#98a2gqjnrpvgk990278mlvcg6nm6m5dnpr30uce3aoi31mjl8v5ru67dt3p90qqpve0oabvovkunh9gbqotbi4h7a9a1pp1o4e1brtg
aryairani commented 4 years ago

Name depth doesn't seem to be a part of it:

.> find ##Nat.+

  1. base.Nat.+ : Nat -> Nat -> Nat

.> alias.type base.Nat Cat

  Done.

.> find ##Nat.+

  1. base.Nat.+ : Cat -> Cat -> Cat  

.> rename.type Cat Rat

  Done.

.> find ##Nat.+

  1. base.Nat.+ : Nat -> Nat -> Nat

.>