I am implementing syntactic anti-unification for TH terms (Exp, Pat,
Clause, ...). For example anti-unifying the clauses
tail (1:xs) = xs
tail (1:2:xs) = (2:xs)
would yield
tail (1:x1) = x1
whereas the anti-instance of
last (1:[]) = 1
last (1:xs) =
Since a term can occur both as a pattern on the left-hand side of the
equation and also as expression on the right-hand side, I need to keep
track of this, too.
So in fact, I have to anti-unify the patterns, 'translate' the resulting
state (Data.Map [Pat] Pat) to (Data.Map [Body] Body) and
Don't you need to do this translation anyway, because Pat
and Exp use different constructors?
Yes, somewhere I have to say how to convert Pat to Exp.
Perhaps you can reduce
some of the lookup cases to looking up just Pat and Exp
(eg, looking up in a Body or Clause or Pat or Exp could
Excerpts from Martin Hofmann's message of Fri Jul 18 12:01:28 +0200 2008:
Don't you need to do this translation anyway, because Pat
and Exp use different constructors?
Yes, somewhere I have to say how to convert Pat to Exp.
That's often doable, but you have to deal with patterns like
On 17.07.2008, at 21:46, Lennart Augustsson wrote:
If scaleFloat and exponent are implemented with bit twiddling they can
be quite fast.
is there a way in ghc to 'cast' between float/int32 and double/int64
(without going through memory)?
sk
___
On 18.07.2008, at 13:05, Henning Thielemann wrote:
On Fri, 18 Jul 2008, stefan kersten wrote:
On 17.07.2008, at 21:46, Lennart Augustsson wrote:
If scaleFloat and exponent are implemented with bit twiddling
they can
be quite fast.
is there a way in ghc to 'cast' between float/int32 and
On Fri, 18 Jul 2008, stefan kersten wrote:
On 17.07.2008, at 21:46, Lennart Augustsson wrote:
If scaleFloat and exponent are implemented with bit twiddling they can
be quite fast.
is there a way in ghc to 'cast' between float/int32 and double/int64 (without
going through memory)?
What
Hi!
On Sat, Jul 12, 2008 at 3:33 AM, Max Bolingbroke
[EMAIL PROTECTED] wrote:
If findColor had been a function defined in terms of foldr rather than
using explicit recursion, then theres a good chance GHC 6.9 would have
fused it with the list to yield your optimized, loop unrolled,
version:
On Fri, 18 Jul 2008, stefan kersten wrote:
for implementing scaleFloat and exponent on the bitlevel as lennart
suggested, it would be preferable if the cast would be compiled to a register
move/reinterpretation, rather than a store/load through several layers of
abstraction (such as
On Thu, Jul 17, 2008 at 06:56:52PM +0200, stefan kersten wrote:
c_magnitude0 (Complex.Data.magnitude) 0m7.249s
c_magnitude1 (non-scaling version) 0m1.176s
c_magnitude2 (scaling version, strict square) 0m3.278s
Thanks!
I've filed a bug here:
2008/7/12 Mitar [EMAIL PROTECTED]:
So that I can easily change the type everywhere. But it would be much
nicer to write:
data Quaternion a = Q !a !a !a !a deriving (Eq,Show)
Only the performance of Num instance functions of Quaternion is then
quite worse.
You can probably use a
Hi!
On Fri, Jul 18, 2008 at 3:54 PM, Chaddaï Fouché
[EMAIL PROTECTED] wrote:
So that I can easily change the type everywhere. But it would be much
nicer to write:
data Quaternion a = Q !a !a !a !a deriving (Eq,Show)
Only the performance of Num instance functions of Quaternion is then
quite
sk:
On 17.07.2008, at 21:46, Lennart Augustsson wrote:
If scaleFloat and exponent are implemented with bit twiddling they can
be quite fast.
is there a way in ghc to 'cast' between float/int32 and double/int64
(without going through memory)?
Yeah,
fromIntegral/Int-Float
On 18.07.2008, at 19:47, Don Stewart wrote:
sk:
On 17.07.2008, at 21:46, Lennart Augustsson wrote:
If scaleFloat and exponent are implemented with bit twiddling
they can
be quite fast.
is there a way in ghc to 'cast' between float/int32 and double/int64
(without going through memory)?
sk:
On 18.07.2008, at 19:47, Don Stewart wrote:
sk:
On 17.07.2008, at 21:46, Lennart Augustsson wrote:
If scaleFloat and exponent are implemented with bit twiddling
they can
be quite fast.
is there a way in ghc to 'cast' between float/int32 and double/int64
(without going through
Hello,
Suppose I have a C struct like
typedef {
int a;
int *b;
} Foo;
typedef Foo *fooptr;
and all worker functions which are all basically int foofun (fooptr ,
fooptr, fooptr)
where the first one is a out argument and the other two are in arguments
and the return value
is
2008/7/18 Mitar [EMAIL PROTECTED]:
On Sat, Jul 12, 2008 at 3:33 AM, Max Bolingbroke
[EMAIL PROTECTED] wrote:
If findColor had been a function defined in terms of foldr rather than
using explicit recursion, then theres a good chance GHC 6.9 would have
fused it with the list to yield your
Mitar wrote:
On Fri, Jul 18, 2008 at 3:54 PM, Chaddaï Fouché
[EMAIL PROTECTED] wrote:
So that I can easily change the type everywhere. But it would be much
nicer to write:
data Quaternion a = Q !a !a !a !a deriving (Eq,Show)
Only the performance of Num instance functions of Quaternion is
ben.franksen:
Mitar wrote:
On Fri, Jul 18, 2008 at 3:54 PM, Chaddaï Fouché
[EMAIL PROTECTED] wrote:
So that I can easily change the type everywhere. But it would be much
nicer to write:
data Quaternion a = Q !a !a !a !a deriving (Eq,Show)
Only the performance of Num instance
Henning Thielemann wrote:
On Mon, 14 Jul 2008, Tillmann Rendel wrote:
Apropos cabal-install: can i make it build documentation during the
installation process and store them in some central location?
I also wondered about that. Maybe a '--haddock' flag for 'cabal install' ?
Everyone seems
I want to convert this code (a Hello World with the ebay API)
to the curl binding in the hope that it will handle SSL and
redirections etc better. Can someone give me some pointers please, or
a link to an example? I haven't used libcurl or Network.Curl and
can't find anything helpful...Thanks!
All,
Apologies for multiple listings.
This is just a friendly reminder to Northwest functionally minded folks that
this month's meeting is to be held
The Seattle Public Library
5009 Roosevelt Way N.E.
Seattle, WA 98105
206-684-4063
from 18.30 - 19:45 on July 23rd.
We'll be getting a demo of a
22 matches
Mail list logo