Home My Page Projects Code Snippets Project Openings SML/NJ Bugs
Summary Activity Tracker Lists

[#133] Error message uses wrong name for abstract type in error message

Date:
2015-06-03 18:52
Priority:
3
State:
Open
Submitted by:
Bug Submitter (webuser)
Assigned to:
David MacQueen (dbm)
Machine Architecture:
None
Operating System:
Generic Unix
Component:
Compiler
Resolution:
None
Severity:
Cosmetic
OS Version:
na
SML/NJ Version:
110.78
Keywords:
types
URL:
Transcript (of reproduction):
Standard ML of New Jersey v110.78 [built: Sun Dec 21 16:30:08 2014] - structure Global :> sig type t val new : string -> t val same : t * t -> unit val toString : t -> string end = struct type t = string fun new name = name fun same (a : t, b) = (a = b) fun toString name = "@" ^ name end = = = = = = = = = = = = = = = = = = = = = ; stdIn:1.2-21.5 Error: value type in structure doesn't match signature spec name: same spec: string * string -> unit actual: string * string -> bool -
Source (for reproduction):
structure Global :> sig type t val new : string -> t val same : t * t -> unit val toString : t -> string end = struct type t = string fun new name = name fun same (a : t, b) = (a = b) fun toString name = "@" ^ name end
Summary:
Error message uses wrong name for abstract type in error message

Detailed description
Given a structure matched by an opaque signature that specifies
a type t, the error message is using t's internal representation,
instead of the name "t"
Additional comments:
The spec type in the error message should be "t * t -> unit",
since the signature is opaque.

Submitted via web form by John Reppy <jhr@cs.uchicago.edu>

Comments:

No Comments Have Been Posted

Attached Files:

Changes

Field Old Value Date By
assigned_tonone2015-06-03 19:49jhr
detailsGiven a structure matched by an opaque signature that specifies a type t, the error message is using t's internal representation, instead of the name "t" Additional comments: The spec type in the error message should be "t * t -> unit", since the signature is opaque. Submitted via web form by John Reppy <jhr@cs.uchicago.edu> 2015-06-03 19:49jhr
Transcript (of reproduction)Standard ML of New Jersey v110.78 [built: Sun Dec 21 16:30:08 2014] - structure Global :> sig type t val new : string -> t val same : t * t -> unit val toString : t -> string end = struct type t = string fun new name = name fun same (a : t, b) = (a = b) fun toString name = "@" ^ name end = = = = = = = = = = = = = = = = = = = = = ; stdIn:1.2-21.5 Error: value type in structure doesn't match signature spec name: same spec: string * string -> unit actual: string * string -> bool - 2015-06-03 19:49jhr
Source (for reproduction)structure Global :> sig type t val new : string -> t val same : t * t -> unit val toString : t -> string end = struct type t = string fun new name = name fun same (a : t, b) = (a = b) fun toString name = "@" ^ name end 2015-06-03 19:49jhr