Bulat Ziganshin wrote:

Hi Bulat

> Monday, May 22, 2006, 12:35:21 AM, you wrote:
> 
>> I am still puzzled by function arities, only thing I can see is that
>> IO-function seems to have arity one too big.
> 
> from GHC/IOBase.lhs:
> 
> newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #))

Yeah, that should explain it partly.  For example putStrLn's
InfoTable says arity 2 Ok, expanded:
String -> (State# RealWorld) -> (# State# ReadWorld, () #)
But the function type is ARG_P.  Which means one parameter in stack
(and it's a pointer).  This might be due to RealWorld getting
optimised away, but it still makes function arity-field pretty
useless as far as I can see.  Well, useless and pretty misleading :)

Thanks,
--Esa
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to