[m-dev.] for review: polymorphic unification not (in, in)

Warwick Harvey wharvey at cs.monash.edu.au
Tue Dec 1 10:41:39 AEDT 1998


DJ wrote:
> On 30-Nov-1998, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> > Index: polymorphism.m
> > ===================================================================
> > RCS file: /home/mercury1/repository/mercury/compiler/polymorphism.m,v
> > retrieving revision 1.156
> > diff -u -r1.156 polymorphism.m
> > --- polymorphism.m      1998/11/20 04:08:48     1.156
> > +++ polymorphism.m      1998/11/30 05:56:25
> > @@ -949,10 +949,28 @@
> >                                 error("polymorphism.m: can't find 
> > `builtin:unify/2'")
> >                         },
> >                         { Mode = XMode - YMode },
> > -                       { require(mode_is_fully_input(ModuleInfo, XMode),
> > -                               "Sorry, not implemented: polymorphic 
> > unification in mode other than (in, in)") },
> > -                       { require(mode_is_fully_input(ModuleInfo, YMode),
> > -                               "Sorry, not implemented: polymorphic 
> > unification in mode other than (in, in)") },
> > +                       { mode_is_fully_input(ModuleInfo, XMode) ->
> > +                               goal_info_get_context(GoalInfo, GoalContext),
> > +                               term__context_file(GoalContext, FileName),
> > +                               term__context_line(GoalContext, LineNumber),
> > +                               string__format("%s:%03d: Sorry, not 
> > implemented: polymorphic unification in mode other than (in, in)",
> > +                                               [s(FileName), i(LineNumber)],
> > +                                               ErrorMsg),
> > +                               error(ErrorMsg)
> > +                       ;
> > +                               true
> > +                       },
> 
> I think you have the "then and the "else" cases around the wrong way here.

Whups!  *embarrassed grin*

Yes, the bootcheck I ran last night showed this up - and some other things 
that could be refined (e.g. if FileName is "").  I'll post another diff when 
I've fixed those things.

Warwick




More information about the developers mailing list