Skip to content

Small polishing following PR #10124#10175

Merged
2 commits merged intoocaml:trunkfrom
AltGr:topapi3
Feb 1, 2021
Merged

Small polishing following PR #10124#10175
2 commits merged intoocaml:trunkfrom
AltGr:topapi3

Conversation

@AltGr
Copy link
Copy Markdown
Member

@AltGr AltGr commented Jan 27, 2021

  • re-add the "native toplevel" message when running the native toplevel.
  • simplify internal functor followinf @Drup's review

Copy link
Copy Markdown
Member

@gasche gasche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved in principle, see minor comment. Thanks!

external ndl_run_toplevel: string -> string -> res
= "caml_natdynlink_run_toplevel"

let implementation_label = " - native toplevel"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry to be that nitpicking guy again, but I would use Some "native toplevel" and decide on the dash at render-time.

@gasche
Copy link
Copy Markdown
Member

gasche commented Jan 27, 2021

(It looks like you need to promote some testsuite files who depend on the locations within the changed module.)

val getvalue : string -> Obj.t
val setvalue : string -> Obj.t -> unit

val implementation_label: string
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this deserve a comment:

Suggested change
val implementation_label: string
(** String displayed after [OCaml version XXX] when starting the toplevel. *)
val implementation_label: string

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(or what @gasche said, just saw his comment)

AltGr added 2 commits February 1, 2021 12:06
It was dropped in ocaml#10124.

It seemed cleaner and safer to add the string to the specific module
used rather than trivially rely on `Sys.backend_type`. The string is
left empty for the bytecode toplevel, to avoid a visible change from the
current version.
@ghost ghost merged commit 496edaf into ocaml:trunk Feb 1, 2021
smuenzel pushed a commit to smuenzel/ocaml that referenced this pull request Mar 30, 2021
- Toplevel factorisation: simplify MakePrinter functor
- Re-add a discrimination string to the native toplevel header

  It seemed cleaner and safer to add the string to the specific module
  used rather than trivially rely on `Sys.backend_type`. The string is
  left empty for the bytecode toplevel, to avoid a visible change from the
  current version.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants