2024-07-18 09:44 AEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000027mercuryBugpublic2007-11-14 15:02
Assigned Tojuliensf 
Product Version 
Target VersionFixed in Version 
Summary0000027: Type var in instance declaration can cause compiler to crash
DescriptionThe compiler crashes when compiling the following code:

:- module instance_var_bug.
:- interface.
:- typeclass tc(T) where [ pred p(T::in) is semidet ].
:- implementation.
:- instance tc(V) where [ p(_) :- semidet_true ].

The bug is that the instance argument is a variable, but this is not being caught.
TagsNo tags attached.
Attached Files




juliensf (administrator)

The compiler is checking that the instance declarations don't contain
type variables. The problem is that it doesn't do this check until
*after* the code that causing this abort is executed. Fixing this
should just be a matter of either re-ordering some of the checks in


juliensf (administrator)

Fixed. See r1.116 of compiler/check_typeclass.m for details.

-Issue History
Date Modified Username Field Change
2007-11-12 15:35 rafe New Issue
2007-11-12 16:11 juliensf Note Added: 0000048
2007-11-12 16:11 juliensf Assigned To => juliensf
2007-11-12 16:11 juliensf Status new => assigned
2007-11-14 15:02 juliensf Status assigned => resolved
2007-11-14 15:02 juliensf Resolution open => fixed
2007-11-14 15:02 juliensf Note Added: 0000051
+Issue History