Skip to main content
added 68 characters in body
Source Link
BlackCap
  • 3.9k
  • 16
  • 33

[HaskellHaskell by zbw][1]zbw

{-#OPTIONS_GHC -fth -w#-}
module M where

import Language.Haskell.TH.Syntax
import System.IO.Unsafe

a = $( runIO $ TupE[] <$
              do x <- readLn :: IO Integer
                 y <- readLn
                 print $ x + y )

Can't run code at run-time? Run it at compile time!

This was a lot of fun, I did not know template haskell before this challenge. [1]: https://codegolf.stahckexchange.com/a/133931/43037

[Haskell by zbw][1]

{-#OPTIONS_GHC -fth -w#-}
module M where

import Language.Haskell.TH.Syntax
import System.IO.Unsafe

a = $( runIO $ TupE[] <$
              do x <- readLn :: IO Integer
                 y <- readLn
                 print $ x + y )

Can't run code at run-time? Run it at compile time!

This was a lot of fun, I did not know template haskell before this challenge. [1]: https://codegolf.stahckexchange.com/a/133931/43037

Haskell by zbw

{-#OPTIONS_GHC -fth -w#-}
module M where

import Language.Haskell.TH.Syntax
import System.IO.Unsafe

a = $( runIO $ TupE[] <$
              do x <- readLn :: IO Integer
                 y <- readLn
                 print $ x + y )

Can't run code at run-time? Run it at compile time!

This was a lot of fun, I did not know template haskell before this challenge.

added 186 characters in body
Source Link
BlackCap
  • 3.9k
  • 16
  • 33

Haskell by zbw[Haskell by zbw][1]

{-#OPTIONS_GHC -fth -w#-}
module M where

import Language.Haskell.TH.Syntax
import System.IO.Unsafe

a = $( runIO $ TupE[] <$
              do x <- readLn :: IO Integer
                 y <- readLn
                 print $ x + y )

Can't run code at run-time? Run it at compile time!

This was a lot of fun, I did not know template haskell before this challenge. [1]: https://codegolf.stahckexchange.com/a/133931/43037

Haskell by zbw

import Language.Haskell.TH.Syntax
import System.IO.Unsafe

a = $( runIO $ TupE[] <$
              do x <- readLn :: IO Integer
                 y <- readLn
                 print $ x + y )

[Haskell by zbw][1]

{-#OPTIONS_GHC -fth -w#-}
module M where

import Language.Haskell.TH.Syntax
import System.IO.Unsafe

a = $( runIO $ TupE[] <$
              do x <- readLn :: IO Integer
                 y <- readLn
                 print $ x + y )

Can't run code at run-time? Run it at compile time!

This was a lot of fun, I did not know template haskell before this challenge. [1]: https://codegolf.stahckexchange.com/a/133931/43037

Source Link
BlackCap
  • 3.9k
  • 16
  • 33

Haskell by zbw

import Language.Haskell.TH.Syntax
import System.IO.Unsafe

a = $( runIO $ TupE[] <$
              do x <- readLn :: IO Integer
                 y <- readLn
                 print $ x + y )