Re: OCaml 4.11 prerelease in Rawhide (was: Re: ocaml-bisect-ppx and related updates)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 18, 2020 at 5:16 AM Richard W.M. Jones <rjones@xxxxxxxxxx> wrote:
> * ocaml-topkg is broken for unclear reasons:
>
>   https://bugzilla.redhat.com/show_bug.cgi?id=1825451
>
>   This affects many other packages.

#mod_use appears to have changed behavior, whether intentionally or
unintentionally I do not know.  Inside the topkg-1.0.1 directory with
ocaml 4.10.0:

$ ocaml
        OCaml version 4.10.0

# #use "topfind";;
- : unit = ()
Findlib has been successfully loaded. Additional directives:
  #require "package";;      to load a package
  #list;;                   to list the available packages
  #camlp4o;;                to load camlp4 (standard syntax)
  #camlp4r;;                to load camlp4 (revised syntax)
  #predicates "p,q,...";;   to set these predicates
  Topfind.reset();;         to force that packages will be reloaded
  #thread;;                 to enable threads

- : unit = ()
# #require "bytes";;
/usr/lib64/ocaml/bytes: added to search path
# #require "result";;
/usr/lib64/ocaml/result: added to search path
/usr/lib64/ocaml/result/result.cma: loaded
# #directory "src";;
# #mod_use "topkg_result.ml";;
module Topkg_result :
  sig
    val ( >>= ) :
      ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result
    val ( >>| ) : ('a, 'b) result -> ('a -> 'c) -> ('c, 'b) result
    type ('a, 'b) r = ('a, 'b) result = Ok of 'a | Error of 'b
    type 'a result = ('a, [ `Msg of string ]) r
    module R :
      sig
        type msg = [ `Msg of string ]
        val msgf :
          ('a, Format.formatter, unit, [> `Msg of string ]) format4 -> 'a
        val reword_error : ('a -> 'b) -> ('c, 'a) r -> ('c, 'b) r
        val error_msg : 'a -> ('b, [> `Msg of 'a ]) r
        val error_msgf :
          ('a, Format.formatter, unit, ('b, [> `Msg of string ]) r) format4 ->
          'a
        val reword_error_msg :
          ?replace:bool ->
          (string -> [< `Msg of string ]) ->
          ('a, [< `Msg of string ]) r -> ('a, [> `Msg of string ]) r
      end
  end
# #show Topkg_result;;
module Topkg_result :
  sig
    val ( >>= ) :
      ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result
    val ( >>| ) : ('a, 'b) result -> ('a -> 'c) -> ('c, 'b) result
    type ('a, 'b) r = ('a, 'b) result = Ok of 'a | Error of 'b
    type 'a result = ('a, [ `Msg of string ]) r
    module R : sig ... end
  end
# #show R;;
Unknown element.


With ocaml 4.11.0, it is essentially the same up until this point:

# #mod_use "topkg_result.ml";;
val ( >>= ) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result =
  <fun>
val ( >>| ) : ('a, 'b) result -> ('a -> 'c) -> ('c, 'b) result = <fun>
type ('a, 'b) r = ('a, 'b) result = Ok of 'a | Error of 'b
type 'a result = ('a, [ `Msg of string ]) r
module R :
  sig
    type msg = [ `Msg of string ]
    val msgf :
      ('a, Format.formatter, unit, [> `Msg of string ]) format4 -> 'a
    val reword_error : ('a -> 'b) -> ('c, 'a) r -> ('c, 'b) r
    val error_msg : 'a -> ('b, [> `Msg of 'a ]) r
    val error_msgf :
      ('a, Format.formatter, unit, ('b, [> `Msg of string ]) r) format4 -> 'a
    val reword_error_msg :
      ?replace:bool ->
      (string -> [< `Msg of string ]) ->
      ('a, [< `Msg of string ]) r -> ('a, [> `Msg of string ]) r
  end
# #show Topkg_result;;
Unknown element.
# #show R;;
module R :
  sig
    type msg = [ `Msg of string ]
    val msgf :
      ('a, Format.formatter, unit, [> `Msg of string ]) format4 -> 'a
    val reword_error : ('a -> 'b) -> ('c, 'a) r -> ('c, 'b) r
    val error_msg : 'a -> ('b, [> `Msg of 'a ]) r
    val error_msgf :
      ('a, Format.formatter, unit, ('b, [> `Msg of string ]) r) format4 -> 'a
    val reword_error_msg :
      ?replace:bool ->
      (string -> [< `Msg of string ]) ->
      ('a, [< `Msg of string ]) r -> ('a, [> `Msg of string ]) r
  end

So the module name is no longer set from the filename.  If this is an
intentional change, then the topkg code will have to be modifed.
Otherwise, it is an ocaml bug.
-- 
Jerry James
http://www.jamezone.org/
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux