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

Specialisation des primitives #4077

Closed
vicuna opened this issue Aug 4, 2006 · 1 comment
Closed

Specialisation des primitives #4077

vicuna opened this issue Aug 4, 2006 · 1 comment
Labels
Milestone

Comments

@vicuna
Copy link

vicuna commented Aug 4, 2006

Original bug ID: 4077
Reporter: @alainfrisch
Status: closed (set by @alainfrisch on 2015-12-02T17:42:52Z)
Resolution: fixed
Priority: normal
Severity: tweak
Target version: 4.03.0+dev / +beta1
Category: ~DO NOT USE (was: OCaml general)
Tags: patch
Related to: #4194 #5933
Monitored by: @ygrek carette till @alainfrisch

Bug description

Les primitives telles que Pervasives.compare sont spécialisées suivant leur type seulement lorsqu'elles sont totalement appliquées. Le patch ci-joint permet de faire la spécialisation même en cas d'application partielle.

Par exemple, les bouts de code ci-dessous utiliseront la comparaison sur les entiers:

module I = struct type t = int let compare : t -> t -> int = compare end

let f (l : int list) = List.sort Pervasives.compare l

let f = compare 3

File attachments

@vicuna
Copy link
Author

vicuna commented Dec 2, 2015

Comment author: @alainfrisch

This has been implemented some time ago.

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

No branches or pull requests

1 participant