summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbryan newbold <bnewbold@robocracy.org>2010-02-09 21:31:04 -0500
committerbryan newbold <bnewbold@robocracy.org>2010-02-09 21:31:04 -0500
commit5c8148df01fe38cb1e5bc05b9013712358661c35 (patch)
treec0ea249a87fd782cd4da87a514de97f27804ef51
parentbb7e7ad6784a69063406b967f129571a2972712b (diff)
downloadknowledge-5c8148df01fe38cb1e5bc05b9013712358661c35.tar.gz
knowledge-5c8148df01fe38cb1e5bc05b9013712358661c35.zip
start of haskell writeup
-rw-r--r--software/haskell.page35
1 files changed, 35 insertions, 0 deletions
diff --git a/software/haskell.page b/software/haskell.page
new file mode 100644
index 0000000..6911315
--- /dev/null
+++ b/software/haskell.page
@@ -0,0 +1,35 @@
+
+Haskell
+==================
+
+Structure
+------------
+Haskell programs consist of monads, actions, modules, ???
+
+Basic Syntax
+---------------
+
+A "type declaration":
+
+ main :: IO ()
+
+An action definition. Note that whitespace matters; the block extends to all
+lines indented to the same position as the first non-whitespace after the
+``do``:
+
+ main = do
+ stuff1
+ stuff2
+
+
+Compilation
+------------
+By default the "main" action of the "Main" module is the action that is
+executed when a compiled haskell program is run by the operating system;
+this means that most haskell programs need to define these components.
+
+The `ghc` (Glasgow Haskell Compiler) is the most popular. To compile and
+execute a simple one file haskell program you will do something like:
+
+ ghc -o hello helloworld.hs
+ ./hello