On Thu, 2007-04-12 at 21:06 +1000, skaller wrote:
> On Thu, 2007-04-12 at 02:41 -0700, Erick Tryzelaar wrote:
>
> > and haskell's hard to follow wiki on it, with lots of links:
>
> and all of this is subsumed by Jay's pattern calculus ..
> which is already implemented for matching types.
in any
On Thu, 2007-04-12 at 02:41 -0700, Erick Tryzelaar wrote:
> and haskell's hard to follow wiki on it, with lots of links:
and all of this is subsumed by Jay's pattern calculus ..
which is already implemented for matching types.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
-
Erick Tryzelaar wrote:
> skaller wrote:
>
>> Matching against fake constructors is the same as applying
>> a virtual field.
>>
>> I'll have a look: it's all sugar.
>>
>>
>
> Last but not least is the draft paper about it from the F# folks:
>
> http://blogs.msdn.com/dsyme/attachment/2044281.
skaller wrote:
> Matching against fake constructors is the same as applying
> a virtual field.
>
> I'll have a look: it's all sugar.
>
Last but not least is the draft paper about it from the F# folks:
http://blogs.msdn.com/dsyme/attachment/2044281.ashx
---
On Wed, 2007-04-11 at 20:35 -0700, Erick Tryzelaar wrote:
> skaller wrote:
> > Felix has had 'virtual' fields for ages.
>
> I think you misunderstood me. Active patterns allow you to define fake
> constructors that you can match against using traditional pattern
> matching techniques.
Matchi
On Wed, 2007-04-11 at 19:58 -0700, Erick Tryzelaar wrote:
> A couple more, not necessarily having to do with the paper:
>
> 1. warn if not exhaustively matching all patterns.
>
>
> 2. aggregating patterns:
>
> match x with
> | 5 | 6 => ...
> | 7 => ...
> | _ => ...
> endmatch
>
> and with vari
skaller wrote:
>> 2. views/active patterns
>>
>> see
>> http://blogs.msdn.com/dsyme/archive/2007/04/06/detailed-release-notes-for-1-9-1-8.aspx.
>>
>>
>> This lets you extend pattern matching so that you can create virtual
>> constructors to match against.
>
> Felix has had 'virtual' fields for
A couple more, not necessarily having to do with the paper:
1. warn if not exhaustively matching all patterns.
2. aggregating patterns:
match x with
| 5 | 6 => ...
| 7 => ...
| _ => ...
endmatch
and with variable binding:
match x with
| Cons(?x, Cons(_, _)) | Cons(?x, Empty[int]) => ...
| _ =
On Wed, 2007-04-11 at 10:25 -0700, Erick Tryzelaar wrote:
> skaller wrote:
> 2. views/active patterns
>
> see
> http://blogs.msdn.com/dsyme/archive/2007/04/06/detailed-release-notes-for-1-9-1-8.aspx.
>
>
> This lets you extend pattern matching so that you can create virtual
> constructors to
On Wed, 2007-04-11 at 10:25 -0700, Erick Tryzelaar wrote:
> open List;
> fun head[T] (Cons[T] (h, t)) => h;
>
>
> I'd prefer not to have to have the '?', but if they're needed for
> parsing, then oh well :)
you can do this now:
fun head[T] : list[T] -> T = | Cons (?h,_) => h;
The type must b
skaller wrote:
> Pls read:
>
> http://www.ps.uni-sb.de/hamlet/#successor-ml
>
> in search of interesting ideas ..
>
I read through that a week or two ago when it showed up on
lambda-the-ultimate. If you're looking for something interesting to do,
here's a couple ideas:
1. destructuring function
Pls read:
http://www.ps.uni-sb.de/hamlet/#successor-ml
in search of interesting ideas ..
--
John Skaller
Felix, successor to C++: http://felix.sf.net
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.
12 matches
Mail list logo