Browse files

[enhance] compiler, utils: Added stdlib args for stdlib.core types we…

… want specialize
  • Loading branch information...
1 parent 3f34953 commit 7b1846c3966ec6b94b92a98add50bde469059514 @BourgerieQuentin BourgerieQuentin committed Apr 16, 2012
Showing with 5 additions and 5 deletions.
  1. +3 −3 opalang/opaMapToIdent.ml
  2. +2 −2 opalang/opaMapToIdent.mli
View
6 opalang/opaMapToIdent.ml
@@ -1,5 +1,5 @@
(*
- Copyright © 2011 MLstate
+ Copyright © 2011, 2012 MLstate
This file is part of OPA.
@@ -133,8 +133,8 @@ let typ s =
pp_stringmap
!r_type
-let specialized_typ ?(ty = []) ?(ty_row = []) name gamma =
- let typeident = typ name in
+let specialized_typ ?(stdlib=false) ?(ty = []) ?(ty_row = []) name gamma =
+ let typeident = if stdlib then Ident.source name else typ name in
let (scheme, _) = QmlTypes.Env.TypeIdent.find ~visibility_applies:false typeident gamma in
QmlTypes.Scheme.specialize ~typeident ~ty ~ty_row scheme
View
4 opalang/opaMapToIdent.mli
@@ -1,5 +1,5 @@
(*
- Copyright © 2011 MLstate
+ Copyright © 2011, 2012 MLstate
This file is part of OPA.
@@ -101,7 +101,7 @@ val typ : string -> QmlAst.ident
(** Like [typ] but search type scheme in gamma and specilize it
*)
-val specialized_typ : ?ty:QmlAst.ty list -> ?ty_row:QmlAst.ty_row list -> string -> QmlTypes.gamma
+val specialized_typ : ?stdlib:bool -> ?ty:QmlAst.ty list -> ?ty_row:QmlAst.ty_row list -> string -> QmlTypes.gamma
-> QmlAst.ty
(** {6 Map setter & getter}*)

0 comments on commit 7b1846c

Please sign in to comment.