@@ -252,6+252,8 @@ Again, we've left some gaps. (The use of `type` for the first line in Haskell an
15. Choose one of these languages and fill in the gaps to complete the definition.
15. Choose one of these languages and fill in the gaps to complete the definition.
+<a id="occurs_free"></a>
+
16. Write a function `occurs_free` that has the following type:
occurs_free : identifier -> lambda_term -> bool
16. Write a function `occurs_free` that has the following type:
occurs_free : identifier -> lambda_term -> bool
@@ -329,7+331,9 @@ any type `α`, as long as your function is of type `α -> α` and you have a bas
-- Or this:
let sysf_true = (\y n -> y) :: Sysf_bool a
-- Or this:
let sysf_true = (\y n -> y) :: Sysf_bool a
- :set -XExplicitForAll
+ Note that in both OCaml and Haskell code, the generalization `∀α` on the free type variable `α` is implicit. If you really want to, you can supply it explicitly in Haskell by saying: