-
-
Save wz1000/708c43a3ed4438c4850966479cf0be16 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 Safe #-} | |
{-# LANGUAGE BangPatterns #-} | |
{-# LANGUAGE DuplicateRecordFields #-} | |
module Main where | |
import Control.Monad.ST | |
data R a b = R { x :: a , x :: b} | |
unsafeCoerce :: a -> b | |
unsafeCoerce i = case (R False False){x = i} of | |
R a b -> b | |
unsafePerformIO :: IO a -> a | |
unsafePerformIO x = runST (unsafeCoerce x) | |
main = do | |
let !() = unsafePerformIO $ putStrLn "Launching missiles..." | |
pure () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment