More comments
This commit is contained in:
parent
c4bda1886f
commit
f32f08335a
@ -1,6 +1,12 @@
|
||||
#!/usr/bin/env runghc
|
||||
-- This is a comment
|
||||
|
||||
-- Running interactivly:
|
||||
-- gchi prax1.hs
|
||||
-- and just call functions
|
||||
-- :q ← quit
|
||||
-- :r ← reload this script
|
||||
-- :i prax.hs ← load another script or load this if not loaded before
|
||||
doubleMe x = x * 3
|
||||
|
||||
doubleUs x y = doubleMe x + doubleMe y
|
||||
@ -12,11 +18,12 @@ doubleSmallNumber' x = (if x <= 100 then doubleMe x else x) + 1
|
||||
|
||||
-- compile: ghc -dynamic prax1.hs
|
||||
-- flag -dynamic is needed under Arch Linux, can be leaved off on ther envs
|
||||
-- flag --make is needed?
|
||||
|
||||
-- runghc prax1.hs
|
||||
-- this also works ↑
|
||||
-- runghc prax1.hs
|
||||
-- this also works ↑ instead of save-compile-run cycle
|
||||
|
||||
-- entrypoint
|
||||
-- entrypoint that is ran after compile
|
||||
main = do
|
||||
putStrLn "Hello World"
|
||||
name <- getLine
|
||||
|
Loading…
Reference in New Issue
Block a user