caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: Jim Farrand <jim@farrand.net>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Type indexed types?
Date: 26 Jan 2005 05:36:47 +1100	[thread overview]
Message-ID: <1106678207.28636.98.camel@pelican.wigram> (raw)
In-Reply-To: <1106675391.28636.54.camel@pelican.wigram>

On Wed, 2005-01-26 at 04:49, skaller wrote:
> On Wed, 2005-01-26 at 04:24, skaller wrote:
> 
> > 
> > However, when we're trying to order all the match
> > candidates, it would be nicer to get one of the
> > above four results in one unification step.
> 
> Argg .. sorry for answering my own post,
> but now it is obvious how to do it.
> 
> 1) Set the result to Equal
> 
> 2) if you have an equation 
> 
> 	'a = T 
> or
> 	T = 'a
> 
> where T is not a type variable, and then:
> 
> if the current result is Equal reset it
> to 'less' or 'greater' depending which side
> of the original pair of terms 'a is on,
> 
> otherwise return Incomparable

Argg .. bug .. this should read: 

otherwise if the result is not 'less' or
'greater' consistent with which side of
the original pair 'a is on, return
incomparable (otherwise continue)

> 
> 3) if you get a mismatch, return Incomparable
> 
> 4) Otherwise you have an equation between
> two type variables, which doesn't change
> the current result
> 
> Provided you haven't returned incomparable,
> you continue unifying in the usual way,
> returning the result when the MGU is found.
-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net




  reply	other threads:[~2005-01-25 18:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-25 12:28 Jim Farrand
2005-01-25 17:01 ` [Caml-list] " skaller
2005-01-25 17:24   ` skaller
2005-01-25 17:49     ` skaller
2005-01-25 18:36       ` skaller [this message]
2005-01-25 18:37 ` brogoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1106678207.28636.98.camel@pelican.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=caml-list@inria.fr \
    --cc=jim@farrand.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).