I am providing a small adventure game, written in Prolog: sleepy.pl. Your job is to reimplement 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, such as
You will probably find it easiest to use basically the same division into functions as the provided program, but this is not a requirement. In particular, the provided program contains predicates
retractall which you probably don't need.
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.