From UBC Wiki

Authors: Zijing (Liz) Lu, Mingsheng(Roger) Yang

What is the problem?

We will attempt to implement a Haskell version of our first prolog project

What is the something extra?

We will recreate new data structure and relations for previous project so that it can be easily extended in possible furture work in Haskell.

What did we learn from doing this?

We successfully recreate the first Prolog project that we did. It took quite time for us to decided which data structure to use in order to represent our course dependency relationship as we looked at Haskell library such as hashmap and graph. The Data.Graph data structure should be the one thats most suitable and extendable to represent course prerequisites but building such structure at this stage is not feasible. The one we had is Map which allows us to easily store and access course information and reasonably good for scaling.

Comparing to the original Prolog version, Haskell version of the project is more complex and harder to write but offers more flexibly and possibility for extension. Unlike Prolog, pattern matching isn’t used as extensive as it is in prolog but we were still able to replicate the similar function structure. We also managed to recreated most of the functions from project1 using Haskell list comprehension which is a handy syntactic sugar. Future more, we looked at cabal package system while installing hackage pacages as the dependency is rather complex and the documentations is poorly supported. We also looked at how database can be intergrated in to Haskell projects. Driver such as HDBC is worth experimenting however we didn't have time to continue exploring. Although not being more readable or managable, Haskell version of the project stil gives us another way to look at non imperative programming.