Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000246OCamlOCaml generalpublic2000-12-14 11:182000-12-15 01:46
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000246: Variables de rangee faibles & signaturess
DescriptionFull_Name: Sylvain Boulme
Version: 3.00
OS: Linux RedHat 6.2
Submission from: cerdon.lip6.fr (132.227.83.56)


Le parser (et le typeur ?) dans le toplevel reagit de facon anormale en
presence
de variables de rangee faibles dans les signatures.

Par exemple, sous l'hypothese du code suivant :

class foo =
 object
   method printA = "A"
 end;;

module Titi =
  struct
    let f y (x:#foo) = x
    let blah = f 0
  end;;

Le module "Titi" a la signature :

sig
 val f : 'a -> (#foo as 'b) -> 'b
 val blah : (_#foo as 'a) -> 'a
end

Si on essaye de definir :

module type Toto =
  sig
    val f : 'a -> (#foo as 'b) -> 'b
    val blah : (_#foo as 'a) -> 'a
  end

La reponse est
 The type constructor foo expects 0 argument(s),
 but is here applied to 1 argument(s)

De meme, si on essaye de definir :

module type Toto =
  sig
    val blah : < printA: string; _..>
  end;;

La reponse est
  Syntax error: 'end' expected, the highlighted 'sig' might be unmatched

Cordialement,

Sylvain.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0002192)
administrator (administrator)
2000-12-15 01:46

The user cannot input weak type variables. Only the compiler can show them.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker