Haskell#
Installation#
Haskellをインストールする.
$ curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
Version#
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.4.8
Example#
hello.hs:
main = putStrLn "Hello, World!"
ghc Ver.
$ ghc hello.hs
[1 of 2] Compiling Main ( hello.hs, hello.o ) [Missing object file]
[2 of 2] Linking hello
$ ./hello
Hello, World!
runghc Ver.
$ runghc hello.hs
Hello, World!
REPL Ver.
$ ghci
GHCi, version 9.4.8: https://www.haskell.org/ghc/ :? for help
ghci> putStrLn "Hello, World!"
Hello, World!