[Haskell-cafe] Re: isWHNF :: a - IO Bool ?

2007-09-27 Thread apfelmus
Tristan Allwood wrote: Does anyone know if there is a function that tells you if a haskell value has been forced or not? e.g. isWHNF :: a - IO Bool let x = (map succ [0..]) in do putStrLn . show (isWHNF x)-- False putStrLn . show . head $ x putStrLn . show (isWHNF x)

Re: [Haskell-cafe] Re: isWHNF :: a - IO Bool ?

2007-09-27 Thread Tristan Allwood
On Thu, Sep 27, 2007 at 05:31:51PM +0200, apfelmus wrote: Tristan Allwood wrote: Does anyone know if there is a function that tells you if a haskell value has been forced or not? e.g. isWHNF :: a - IO Bool let x = (map succ [0..]) in do putStrLn . show (isWHNF x)-- False

[Haskell-cafe] Re: isWHNF :: a - IO Bool ?

2007-09-27 Thread Jon Fairbairn
apfelmus [EMAIL PROTECTED] writes: Tristan Allwood wrote: Does anyone know if there is a function that tells you if a haskell value has been forced or not? e.g. isWHNF :: a - IO Bool let x = (map succ [0..]) in do putStrLn . show (isWHNF x)-- False putStrLn . show .

Re: [Haskell-cafe] Re: isWHNF :: a - IO Bool ?

2007-09-27 Thread Jonathan Cast
On Thu, 2007-09-27 at 16:57 +0100, Tristan Allwood wrote: On Thu, Sep 27, 2007 at 05:31:51PM +0200, apfelmus wrote: Tristan Allwood wrote: Does anyone know if there is a function that tells you if a haskell value has been forced or not? e.g. isWHNF :: a - IO Bool let x = (map succ [0..])

[Haskell-cafe] Re: isWHNF :: a - IO Bool ?

2007-09-27 Thread apfelmus
Tristan Allwood wrote: Does anyone know if there is a function that tells you if a haskell value has been forced or not? e.g. isWHNF :: a - IO Bool apfelmus wrote: Note that this function [isWHNF :: a - Bool] is not referentially transparent Indeed. Does it still mess up with the result