camlspotter / ocamloscope.2

OCamlOScope 2 : OCaml API search
42 stars 1 forks source link

Bug: M.x is alias of M.x #14

Closed camlspotter closed 7 years ago

camlspotter commented 7 years ago

For example, this happens for val {spotlib}.Spotlib.SpotStream.bind.

camlspotter commented 7 years ago

In Spotlib.SpotStream,

include Monad.Make(struct
  type 'a _t = 'a t
  type 'a t = 'a _t
  let return a = singleton a
  let bind t f = concat (map f t) (* <= this one *)
end)

This bind is somehow named Spotlib.SpotStream.bind. This should be called Spotlib.SpotStream.<noname1234>.bind or something.

camlspotter commented 7 years ago

Made test/t33_noname.ml:

module F(A : sig val x : int end) = struct
  include A
end

module M = F(struct
  let x = 1
end)

x is somehow called as NOTOP.T33_noname.M.x. Actually it should be NOTOP.T33_noname.<noname1234>.x.

camlspotter commented 7 years ago

In short, the name of mexp of F(mexp) where F's name is <c>.F is not <c> but <c>.F(<noname123>).

camlspotter commented 7 years ago

Fix is being built on fix_noname_esignature

camlspotter commented 7 years ago

Fixed

commit 208dc26db366e3e44b4d80ec87a0f15eff52b5f7
Merge: 856f0ff e8be755
Author: Jun Furuse <Jun.Furuse@gmail.com>
Date:   Sun Nov 6 01:38:07 2016 +0000

    merge

commit e8be7551b73fe290981f3111d474f9b30f58e296
Author: Jun Furuse <Jun.Furuse@gmail.com>
Date:   Sat Nov 5 00:31:55 2016 +0000

    fixed the naming of noname esignature like F(struct ... end (* <= this one *))