I put the translation here. the question is in french but easily read and translated . you can write the answers in english. Either the evaluator below written in Haskell for a similar functional language of the λ-calculus: type Var = … type Env = … data Val = Vnum Int data Exp = Enum Int | Vfun Env Var Exp | Evar Var | Efun Var Exp | Exp Exp. E-mail | Elet Var Exp Exp env_lookup :: Env -> Var -> (Env Exp) env_add :: Env -> Var -> (Env Exp) -> Env eval (env Enum n) = n eval (env Evar x) = env_lookup x env eval (env Ecall real fun) = fun eval case of Vnum _ -> error “A number is not a function” Vfun formal body approx -> eval (env_add env real formal body) Where env_lookup and env_add are presumably predefined functions which respectively allows you to find the information of a variable and add a variable in an environment. 1. Haskell reports typing errors in the evaluation: Indicate them and show how to fix the code. 2. Give the type of eval. 3. Does Eval implement call by name (CBN) or call by value (CBV)? Briefly justify. 4. Does eval implement static scope or dynamic scope? Briefly justify. 5. Indicate concisely how to change the code to get the other kind of scope. 6. Haskell complains that eval is not “exhaustive”: Completing its definition Requirements: 1 | .doc file
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more