Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect docstring on 4.06 #112

Open
copy opened this issue Dec 19, 2017 · 5 comments
Open

Incorrect docstring on 4.06 #112

copy opened this issue Dec 19, 2017 · 5 comments

Comments

@copy
Copy link
Contributor

copy commented Dec 19, 2017

See c-cube/ocaml-containers#168. The .mli is include module type of String.

@Drup
Copy link
Collaborator

Drup commented Apr 13, 2018

I can't reproduce the failure either. Do you have the issue with both normal and flambda compilers ?

@copy
Copy link
Contributor Author

copy commented Apr 13, 2018

I can reproduce it on 4.06.1 with containers 2.0+alpha2:

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── kinds: t, v, e, c, m, s, k ┐
│CCString.escaped                                                                                                                                                                    │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
> val CCString.escaped string -> string                                                                                                                                               
    [find_all ~sub s] finds all occurrences of [sub] in [s], even overlapping                                                                                                         
    instances.                                                                                                                                                                        
    @param start starting position in [s].                                                                                                                                            
    @since 0.17                                                                                                                                                                       

And slightly different on OCaml 4.06.1+flambda with Containers 2.1:

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── kinds: t, v, e, c, m, s, k ┐
│CCString.esc                                                                                                                                                                        │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
> val CCString.escaped string -> string                                                                                                                                               
    [suffix ~suf s] returns [true] iff [suf] is a suffix of [s].                                                                                                                      
    @since 0.7                                                                                                                                                                        

And also some other functions:

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── kinds: t, v, e, c, m, s, k ┐
│CCString.uncapitalize                                                                                                                                                               │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
  val CCString.uncapitalize_ascii string -> string                                                                                                                                    
> val CCString.uncapitalize string -> string                                                                                                                                          
    All pairs of chars respect the predicate?                                                                                                                                         
    @raise Invalid_argument if the strings have not the same length.                                                                                                                  
    @since 0.12                                                                                                                                                                       

The pattern seems to be that all functions that aren't shadowed by containers have an incorrect docstring.

@Drup
Copy link
Collaborator

Drup commented Apr 13, 2018

Which version of ocp-browser are you using. Can you reproduce on containers 2.1 as well ?

@copy
Copy link
Contributor Author

copy commented Apr 13, 2018

Yes, I can reproduce with ocp-browser 1.1.6 and containers 2.1 on OCaml 4.06.1+flambda.

@Drup
Copy link
Collaborator

Drup commented Apr 13, 2018

Ah! I can reproduce with 2.1 on 4.06.0 and 4.06.1+flambda, but on 4.04.2 and 4.05.0, included functions don't have any documentation at all. The plot thicken.

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

No branches or pull requests

2 participants