[plt-scheme] 3.99: lazy + match ?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon May 26 09:23:25 EDT 2008

Once again the import thing bites us. There is something to be worked  
out and it is not even close to what Jacob did.


On May 26, 2008, at 1:09 AM, Eli Barzilay wrote:

> On May 26, Jon Rafkind wrote:
>> I am trying to use match and the lazy language together but they
>> don't seem to be cooperating. Should this work?
>
> No, not without some explicit efforts that integrate `match' into the
> lazy language.  The easy solution would be to do that by forcing the
> matched value, but a proper solution will force just the part that is
> needed for the match but not more.  [You can usually get such magic to
> happen by re-evaluating the library in the lazy language -- but
> `match' is big enough that it won't work in this case.]
>
>
>> #lang lazy
>> (require scheme/match)
>>
>> (define-struct f (x))
>>
>> (printf "test1 ~a\n"
>>         (match (make-f 1)
>>                ((struct f (x)) 'ok)))
>>
>>>
>> match: no matching clause for #<promise:temp4>
>>
>>  === context ===
>> /home/kazzmir/svn/plt/trunk/collects/scheme/match/patterns.ss:17:0:
>> match:error
>>
>> It works fine in #lang scheme. I'm running from svn, r9936( mzscheme
>> v3.99.0.25 ).
>
> -- 
>           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli  
> Barzilay:
>                   http://www.barzilay.org/                 Maze is  
> Life!
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.