[Small changes in documentation sydow@chalmers.se**20080404054505] { hunk ./summary/bindings.html 36 -
  • Mathing (p) against a value is the sama es matching p against the same value. +
  • Mathing (p) against a value is the same as matching p against the same value. hunk ./summary/bindings.html 39 - In patterns the special "wildcard" variable _ may be used; in contrast to other variables, it is not bound +The special "wildcard" variable _ may be used in patterns; in contrast to other variables, it is not bound hunk ./summary/bindings.html 75 - Example + + - + + hunk ./summary/bindings.html 113 -
  • Pattern bindings

    +

  • Pattern bindings.

    hunk ./summary/bindings.html 131 -implicit var :: type
    +implicit var :: type
    hunk ./summary/default.html 41 -the ideas of Hinze's and Peyton Jones' derivable type classes. The mechanism applies in some, rather restrictive, situations, -but these including common cases like the Prelude's Eq and Ord, for which it is easy but tedious +the ideas of Hinze's and Peyton Jones' derivable type classes. The mechanism applies only in some, rather restrictive, situations, +but these include common cases like the Prelude's Eq and Ord, for which it is easy but tedious hunk ./summary/default.html 54 -the primitive type Either a b. The default instance builds an auxiliary type Ausing only these three -constructors and defines functions in boh directions between between D and A. The default instance +the primitive type Either a b. The default instance builds an auxiliary type A using only these three +type constructors and defines functions in both directions between between D and A. The default instance hunk ./summary/default.html 57 -for A (which is well-defined, since instances exist for , pairs and Either). +for A (which is well-defined, since instances exist for (), pairs and Either). hunk ./summary/expr.html 90 -

  • Function (and constructor) application. Application is denoted by juxtaposition and binds tighter than all operators and is left associative. +
  • Function (and constructor) application. Application is denoted by juxtaposition, binds tighter than all operators and is left associative. hunk ./summary/expr.html 156 -
  • + hunk ./summary/expr.html 222 - + hunk ./summary/expr.html 261 - - + + hunk ./summary/expr.html 287 +

    +To be written. hunk ./summary/haskell.html 53 -

  • The Command monad provides powerful constructs for object-oriented programming, with objects encapsulating a local -state and methods manipulating this state. This is done while retaining the pure nature of the language; a computation with -such side-effects is clearly indicated by a monadic type (and can hence not be used in a non-monadic context). +
  • The Cmd monad provides powerful constructs for object-oriented programming, with objects encapsulating a local +state and methods manipulating this state. This is achieved while retaining the pure nature of the language; a computation with +side-effects is clearly indicated by a monadic type (and can hence not be used in a non-monadic context). hunk ./summary/haskell.html 59 -

    The main program of a Timber program is not of type IO () (this type does not exist in Timber), but their must +

  • The main program of a Timber program is not of type IO () (this type does not exist in Timber), but there must hunk ./summary/implicit.html 109 -Obviously, twice has a polymorphic type. At first, it seems that the type should be (a -> a) -> a -> a. However,it can be assigned +Obviously, twice has a polymorphic type. At first, it seems that the type should be (a -> a) -> a -> a. However, it can be assigned hunk ./summary/intro.html 19 -typewriter font, nonterminal in italics and meta symbols in red. +typewriter font, nonterminals in italics and meta symbols in red. hunk ./summary/java.html 12 -both similatities and differences. +both similarities and differences. hunk ./summary/java.html 19 - struct type. Here is an interface suitable for a smple counter object: + struct type. Here is an interface suitable for a simple counter object: hunk ./summary/java.html 36 -
  • Declaration and initialisation of local state variables; +
  • Declaration and initialization of local state variables; hunk ./summary/java.html 61 - the initialisation of the state variable val to initVal, + the initialization of the state variable val to initVal, hunk ./summary/java.html 63 - here Prog {..} means: asemble a value of type Prog + here Prog {..} means: assemble a value of type Prog hunk ./summary/java.html 83 - data structures etc leading to new programming patterns. -
  • Timber does have subtyping between struct types and inclusion polymorphism + data structures etc leading to new programming patterns. counter above + is an example of this: it has type +
    +counter :: Int -> Class Counter
    +
    + i.e., it is a function that when applied to a integer (the start value) returns a + class, from which we later can create objects. +
  • Timber has subtyping between struct types and inclusion polymorphism hunk ./summary/java.html 96 - they can execute concurrently, leading to a very simple cocurrency model for + they can execute concurrently, leading to a very simple concurrency model for hunk ./summary/posix.html 65 - and write. hunk ./summary/posix.html 70 -for initialisation: it creates +for initialization: it creates hunk ./summary/stmts.html 25 - being defined may not occur in the right hand side. Initialisation implicitly declares this variables as part of the state of objects + being defined may not occur in the right hand side. Initialization implicitly declares this variable as part of the state of objects hunk ./summary/stmts.html 34 - and requests (which can only be defined in the statement sequence f a class). + and requests (which can only be defined in the statement sequence of a class). }
  • Example hunk ./summary/bindings.html 79 -
    showLine xs = concatMap showItem xs
    zip (x:xs) (y:ys) = (x,y) : zip xs ys
    zip _ _ = []
    ([1,3,7(:) 1 ((:) 3 ((:) 7 []))
    [1,3,7](:) 1 ((:) 3 ((:) 7 []))
    Point {x=0}Point {x=0, y=y}
    Point {x=0..}Point {x=0, y=y}
     > [] -> 0
    > > x : xs -> g x + h 3 xs
      [] -> 0
      x : xs -> g x + h 3 xs