Last active
May 10, 2019 14:58
-
-
Save TerrorJack/ea0c11bc01aacf4a81cdaf96a21034a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE MagicHash #-} | |
{-# LANGUAGE UnboxedTuples #-} | |
{-# OPTIONS_GHC -Wall -O2 -fforce-recomp -ddump-to-file -ddump-simpl -ddump-stg -ddump-cmm-raw -ddump-asm #-} | |
import GHC.Exts | |
import GHC.Types | |
main :: IO () | |
main = do | |
r <- | |
IO $ \s0 -> | |
case newByteArray# 8# s0 of | |
(# s1, mba #) -> | |
case writeInt8Array# mba 0# 255# s1 of | |
s2 -> | |
case unsafeFreezeByteArray# mba s2 of | |
(# s10, ba #) -> (# s10, I# (indexInt8Array# ba 0#) #) | |
print r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment