-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly explain "admits equality" in "ty cannot be realized" diags
Consider the following program: signature T = sig eqtype t end signature S = T where type t = (unit -> unit) * unit structure S: T = struct type t = (unit -> unit) * unit end Previously, MLton generated the following error messages: Error: z.sml 2.17-2.52. Type cannot be realized (admits equality): t. type spec: [eqtype] t spec at: z.sml 1.26-1.26 type defn: type t = [(unit -> unit) * unit] Error: z.sml 3.14-3.14. Type in structure disagrees with signature (admits equality): t. structure: type t = [_ -> _] * _ defn at: z.sml 3.30-3.30 signature: [eqtype] t spec at: z.sml 1.26-1.26 Note the different treatment of the non-equality type in "type cannot be realized" and "type in structure disagrees with signature". Now, MLton generates the following error messages: Error: z.sml 2.17-2.52. Type cannot be realized (admits equality): t. type spec: [eqtype] t spec at: z.sml 1.26-1.26 type defn: type t = [_ -> _] * _ Error: z.sml 3.14-3.14. Type in structure disagrees with signature (admits equality): t. structure: type t = [_ -> _] * _ defn at: z.sml 3.30-3.30 signature: [eqtype] t spec at: z.sml 1.26-1.26
- Loading branch information
1 parent
0795f05
commit 6803627
Showing
1 changed file
with
77 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters