Problem Set 9
Home Syllabus Lecture Slides Learning Haskell Problem Set 1 Problem Set 2 Problem Set 3 Problem Set 4 Problem Set 5 Problem Set 6 Problem Set 7 Problem Set 8 Problem Set 9

 

Due on Wednesday  December 12.

Monadic Semantics

Devise a monadic semantics, expressed in Haskell, for the ISWIM-like language of Chapter 13.

Note: Conceptually you should be able to figure this out from the Wadler paper (see:
http://portal.acm.org/citation.cfm?doid=143165.143169
for a version very close to the one I handed out in class).  But it will also help to understand Haskell's monads, and in particular, I expect you to provide an instance declaration of your semantic type in the Monad class.  If you don't have a copy of my textbook, there are many good references to monads on the web.  See for example:

http://www.haskell.org/all_about_monads/

 

Solution:

Monadic Semantics for ISWIM