I am providing a small adventure game, written in Prolog: the_exam.pl. Your job is to re-implement this game in Haskell.
You should have a "main" function,
main :: IO (String).
Input to the program should be in the form of one- or two-word commands,
You will probably find it easiest to use basically the same division into functions as the example program, but this is not a requirement. Feel free to implement the program however works best for you.
There are two other files you may find helpful: spider.pl, which is a small adventure game written in Prolog, and spider.hs, which is essentially the same game written in Haskell. You are welcome to use large chunks of spider.hs in writing your adventure game; no attribution is required.
This is quite a lengthy assignment, but once you get started and get
"into the flow," it shouldn't be too difficult. Remember to use
aliases, declare the type of each function, and unit test at least the
more fundamental functions (not the ones in the IO monad, of course).
I have posted some lengthy comments about my Spider game, which I recommend that you read.