| > | Also, is there a way to do something similar but for 'lazy' rather than
| > | 'seq'? I want something of type
| > |
| > | type World__ = State# RealWorld
| > |
| > | {-# NOINLINE newWorld__ #-}
| > | newWorld__ :: a -> World__
| > | newWorld__ x = realWord# -- ???
| > |
| > | except that I
On 12/3/06, John Meacham <[EMAIL PROTECTED]> wrote:
On Sat, Dec 02, 2006 at 11:02:28PM +, Simon Peyton-Jones wrote:
[snip]
> | Also, is there a way to do something similar but for 'lazy' rather than
> | 'seq'? I want something of type
> |
> | type World__ = State# RealWorld
> |
> | {-# NOIN
On Sat, Dec 02, 2006 at 11:02:28PM +, Simon Peyton-Jones wrote:
> | I was recently presented with the problem of writing a function like so
> |
> | seqInt__ :: forall a . a -> Int# -> Int#
> | seqInt__ x y = x `seq` y
> |
> | which seems fine, except 'seq' of type forall a b . a -> b -> b canno
| I was recently presented with the problem of writing a function like so
|
| seqInt__ :: forall a . a -> Int# -> Int#
| seqInt__ x y = x `seq` y
|
| which seems fine, except 'seq' of type forall a b . a -> b -> b cannot
| be applied to an unboxed value.
Actually it works fine. Did you try it? S
On Thu, Nov 30, 2006 at 08:13:13PM -0800, John Meacham wrote:
> I was recently presented with the problem of writing a function like so
>
> seqInt__ :: forall a . a -> Int# -> Int#
> seqInt__ x y = x `seq` y
>
> which seems fine, except 'seq' of type forall a b . a -> b -> b cannot
> be applied t
I was recently presented with the problem of writing a function like so
seqInt__ :: forall a . a -> Int# -> Int#
seqInt__ x y = x `seq` y
which seems fine, except 'seq' of type forall a b . a -> b -> b cannot
be applied to an unboxed value.
I could not think of a way to actually get the behavio