-
Notifications
You must be signed in to change notification settings - Fork 54
Tutorial
Here is a rough outline for a tutorial that I think we could write together on the wiki. Feel free to rearrange into an order makes more sense to you, add new suggestions, or write a page yourself. You don't have to be a Mercury developer! It's a tutorial, it doesn't need to be rigorous. It's a wiki, the writing doesn't need to be high quality.
The expected audience is someone with some or a lot of programming experience, possibly in functional programming languages, probably not proficient in Prolog.
-
- basic program structure
- compiling and running
- brief introduction to state variables
-
- function syntax
- variables
- if-then-else
- recursion
- builtin ints, integer arithmetic
-
Terms and variables
-
- int, float, string, char
- tuples
- state-of-the-world
- type conversion
-
- conjunction, disjunction, negation, true, fail, etc.
-
unification algorithm
-
input and output
- something about purity
- formatted output
- example: read from standard input
- example: reversing words per line
- example: reading/writing files
- example: data terms
-
uniqueness
-
higher-order programming
- foldl
- currying
- lambda
-
maps
-
sets
-
processing command line options
-
modules
- interface and implementation
- imports
- module qualification
- building multi-module programs (mmc --make, mmc -f)
- sub modules
- nested modules
- mutable variables
-
more on types (separate pages for each)
- abstract types (needs modules to make sense)
- record syntax
- univ
- existentially-quantified types
- user-defined equality and comparison
-
type classes
-
exceptions
-
purity
-
trace goals
-
FFI
-
concurrency
-
debugging
-
profiling
-
insts
-
glossary