seq as a class method

Bulat Ziganshin bulat.ziganshin at
Wed Mar 29 16:59:33 EST 2006

Hello Andy,

Thursday, March 30, 2006, 12:06:36 AM, you wrote:

> Questions
>   - Does anyone have any better suggestions of how to fix this real  
> issue?

use mutable state, possible in the ST monad?

> The problem(s) were things like

>         regs ::  !Array Int RegVal

use parallel or unboxed arrays here

>          status :: ![Status]

you need a strict list, smth like:

type StrictList a = Cons !(StrictList a) !a | Nil

it's the exact what i said some time ago, although for me main problem
is not space leaks, but the huge time required to work with lazy data
structures what are really never contain unevaluated data

> (Aside: What would be nice to have is "there should only be one
> instance of this type,
> tell me if that is not the case" evaluation mode. I'm not quite sure  
> how to express this,
> though).

my congratulations, you are discovered the "unique" types from Clean
(these types is one of reasons why this lazy language sometimes are
faster that haskell/ghc)

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at

More information about the Haskell-prime mailing list