[Haskell-beginners] what does (# a, s #) mean?

Henk-Jan van Tuyl hjgtuyl at chello.nl
Sun Apr 10 20:04:58 CEST 2011


On Sun, 10 Apr 2011 19:29:38 +0200, Amitava Shee <amitava.shee at gmail.com>  
wrote:

> I came across this definition in ghc source
>
> $GHC/compiler/utils/State.hs
> =======================
> newtype State s a = State { runState' :: s -> (# a, s #) }
>
>
> What does the construct (# a, s #) mean?
>

This is an unboxed tuple, see:
   http://www.haskell.org/ghc/docs/latest/html/users_guide/primitives.html#unboxed-tuples

Regards,
Henk-Jan van Tuyl


-- 
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
--



More information about the Beginners mailing list