In John Hughes's The Design of Pretty printing library paper, he says:
The implementations which we are trying to derive consist of equations of
a restricted form. We will derive implementations by proving their
constituent equations from the specification. By itself this is no
guarantee
Daryoush Mehrtash dmehrtash at gmail.com writes:
What does restricted form mean?
non-restricted: e.g., f (f x y) z = f x (f y z))
restricted: the shape of function declarations in Haskell
(where lhs is a pattern)
definitions are terminating ...
non-termination: an equation like f x y = f
On Thu, Apr 15, 2010 at 10:59 PM, zaxis z_a...@163.com wrote:
instance (BinaryDefer a, BinaryDefer b) = BinaryDefer (a,b) where
put (a,b) = put2 a b
get = get2 (,)
size x = let ~(a,b) = x in size a + size b
putFixed (a,b) = putFixed2 a b
getFixed = getFixed2 (,)
in `size`
On 16 April 2010 15:59, zaxis z_a...@163.com wrote:
instance (BinaryDefer a, BinaryDefer b) = BinaryDefer (a,b) where
put (a,b) = put2 a b
get = get2 (,)
size x = let ~(a,b) = x in size a + size b
putFixed (a,b) = putFixed2 a b
getFixed = getFixed2 (,)
in `size` function,
Ivan,
in `size` function, what does the `~` mean ?
A lazy pattern match: http://en.wikibooks.org/wiki/Haskell/Laziness
(there is a better name for it, but I can't remember).
Irrefutable pattern? ;-)
Cheers,
Stefan
___
Haskell-Cafe mailing list
On 16/04/10 07:09, Ivan Miljenovic wrote:
On 16 April 2010 15:59, zaxis z_a...@163.com wrote:
instance (BinaryDefer a, BinaryDefer b) = BinaryDefer (a,b) where
put (a,b) = put2 a b
get = get2 (,)
size x = let ~(a,b) = x in size a + size b
putFixed (a,b) = putFixed2 a b
Stefan Holdermans ste...@vectorfabrics.com writes:
Irrefutable pattern? ;-)
Ahhh, yes, that's it. I knew it started with `i', but that's about it...
--
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
___
Haskell-Cafe
instance (BinaryDefer a, BinaryDefer b) = BinaryDefer (a,b) where
put (a,b) = put2 a b
get = get2 (,)
size x = let ~(a,b) = x in size a + size b
putFixed (a,b) = putFixed2 a b
getFixed = getFixed2 (,)
in `size` function, what does the `~` mean ?
Sincerely!
-
fac n
Hello!
I'm trying to wrap my head around OO'Haskell's notion of objects as fixpoints.
Is OO'Haskell's use of mfix simply a use of something like a monadic
Y-combinator to give the object access to its own identity?
Thanks,
Manuel
___
Haskell-Cafe
I'm trying to wrap my head around OO'Haskell's notion of objects as
fixpoints.
Is OO'Haskell's use of mfix simply a use of something like a monadic
Y-combinator to give the object access to its own identity?
I don't remember the details exactly, but isn't it to support open recursion
for
On Tue, Sep 15, 2009 at 10:14 AM, Manuel Simoni msim...@gmail.com wrote:
Hello!
I'm trying to wrap my head around OO'Haskell's notion of objects as fixpoints.
Is OO'Haskell's use of mfix simply a use of something like a monadic
Y-combinator to give the object access to its own identity?
I am having hard time making sense of GHC.Conc. Is there a writeup that
describes the significance of #, or the meaning of primOp and
primType?
Thanks
Daryoush
On Sun, Dec 7, 2008 at 11:48 PM, Don Stewart d...@galois.com wrote:
dmehrtash:
Any idea was the atomically# mean in the
This might be of some help:
http://www.haskell.org/ghc/docs/6.10.1/html/users_guide/syntax-extns.html
Daryoush Mehrtash wrote:
I am having hard time making sense of GHC.Conc. Is there a writeup
that describes the significance of #, or the meaning of primOp and
primType?
That code is in ghc root/rts/STM.c
-- ryan
2009/1/30 Daryoush Mehrtash dmehrt...@gmail.com:
I like to look at the code where the runtime detects a TVar, inside an
atomic block, has been changed by another thread and hence it aborts the
atomic operation. Any suggestion as to where I would
I like to look at the code where the runtime detects a TVar, inside an
atomic block, has been changed by another thread and hence it aborts the
atomic operation. Any suggestion as to where I would find the code?
daryoush
On Sun, Dec 7, 2008 at 10:48 PM, Don Stewart d...@galois.com wrote:
Any idea was the atomically# mean in the following code?
atomically :: STM a - IO a
atomically (STM m) = IO (\s - (*atomically# *m) s )
Code is from GHC.Conc module
http://www.haskell.org/ghc/docs/6.6/html/libraries/base/GHC-Conc.html
daryoush
___
dmehrtash:
Any idea was the atomically# mean in the following code?
atomically :: STM a - IO a
atomically (STM m) = IO (\s - (atomically# m) s )
Code is from GHC.Conc module
[1]http://www.haskell.org/ghc/docs/6.6/html/libraries/base/GHC-Conc.html
It is a primitive hook
17 matches
Mail list logo