blob: 35c074e68d35b97ae3b6a3c0d89eaef15919ac82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{-# LANGUAGE MagicHash, UnboxedTuples #-}
import GHC.Prim
import GHC.Word
big :: Word
big = maxBound
carry :: Word
carry = case big of
W# w -> case plusWord2# w w of
(# hi, lo #) -> W# hi
main = print carry
|