Last active
October 23, 2015 23:57
-
-
Save halcat0x15a/a3e9bfc140c10ff34741 to your computer and use it in GitHub Desktop.
CPP
This file contains hidden or 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
| {-# OPTIONS_GHC -cpp -pgmPgcc -optP-E #-} | |
| #define SHOW_RESULT(a) (showResult #a (a)) | |
| showResult :: Show a => String -> a -> String | |
| showResult expr value = expr ++ " = " ++ show value | |
| main :: IO () | |
| main = putStrLn SHOW_RESULT(1 + 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment