Wolfgang Jeltsch has observed:
> I have this code:
> class C a b c | a b -> c where
> f :: a -> b -> c
>
> instance C a b c => C a (x,y,b) c where
> f a (_,_,b) = f a b
>
> instance C a (a,c,b) c where
> f _ (_,c,_) = c
> ghci -fglasgow-exts -fallow-overlapping-
At 7:42 AM +0200 8/20/03, Jan Scheffczyk wrote:
Hi Andrew,
let x = expensiveComputation foo in x + x
I would certainly hope that expensiveComputation wasn't called twice,
and even though the language doesn't guarantee it, I have already
written code that assumed it.
I always thought that ther
On Wed, 20 Aug 2003 08:25:39 -0700
"Hal Daume" <[EMAIL PROTECTED]> wrote:
> I use my 'DynamicMap' type to handle this sort of thing. However, I
> don't really recommend this approach unless you're very careful. You
> basically lose out on all nice type checking properties and enter a
> world of
Dear Marnix,
your transformation can be rewritten as the composition of three
functions: one that converts the forest into a binary tree (this
is based on the natural correspondence between forests and binary
trees (*), see Knuth TAOCP, Vol 1), one that mirrors a binary tree
swapping left and righ
I use my 'DynamicMap' type to handle this sort of thing. However, I
don't really recommend this approach unless you're very careful. You
basically lose out on all nice type checking properties and enter a
world of dynamic typing (more or less).
Anyway, you can find it at:
http://www.isi.edu/~h
GPCE'03: 2nd International Conference on
Generative Programming and Component Engineering
In Cooperation with ACM SIGPLAN and SIGSOFT and
co-located at NetObjectDays'03
September 22-25, 2003, Erfurt, Germany
[apologies if you receive multiple copies of this message]
---
Weighted Automata: Theory and Applications
Dresden University of Technology, June 1 - 5, 2004
The workshop will cover all aspects of weighted automata,
ranging from the theory of
I think similar things have been asked before, but I couldn't find anything
specific.
I have a data type with attributes. These attributes have different types.
Right now I'm using a lot of boilerplate like that:
> data Gender = Masc | Fem | Neutr
> ...
> data Attr= Gender Gender | Cat Cat
Hi all,
Recently I've discovered an inversion operation on forests that transforms
'wide' forests into 'deep' onces and vice versa. I'm sure that this
operation is already known, however, I could not find any information on it.
(Largely because I don't know under what name to look for it.) You H