3 ms·
I do love a bit of FP. Here's the canonical Hello, World! program. {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUA
by yakshaving_jgt 1y ago
I do love a bit of FP. Here's the canonical Hello, World! program.
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Foreign.C.Types
import Language.C.Inline qualified as C
C.include "<stdio.h>"
C.include "<stdlib.h>"
main :: IO ()
main = [C.block| void {
system("python -c 'print \"Hello, World!\"'");
} |]
- OhMeadhbh 1y agoExcept that someone installed a different version of python on the target system that changes the semantics of the print keyword.