Course:CPSC312-2017-BusStopFinder-Haskell Rendition

From UBC Wiki

Bus Stop Finder - Haskell Rendition

Authors: Andy Lin, Gareth Ellis, Noa Avigad

What is the problem?

Investigate the feasibility of using functional programming to query and present to the user the location of the nearest bus stop to them (or to a predefined location) and present the bus schedule for that bus stop.

What is the something extra?

Working with TransLink's REST API, fetching, parsing and displaying the relevant data.

https://github.com/NoaAvigad/BusStopFinder As we previously implemented a similar program in Prolog, this provided an interesting opportunity to compare Haskell and Prolog. We found several aspects of Prolog, including it's unification system, to be superior to Haskell, particularly for constructing arbitrary queries on our datasets. Haskell took a bit more work to get things set up, but once we had the basic infrastructure up and running, we found it quite easy to work with. The major issue to working with Haskell was dealing with any IO operations, as, being an application that relies on calling the Translink REST api, we had many. Further problems were found when dealing with user input, however, those would likely be similar to those found in Prolog.

Overall, we have concluded that Haskell is entirely suited to this application. In particular, we found it's JSON parsing abilities to be quite impressive.

Source Code

Source code may be found here: https://github.com/NoaAvigad/BusStopFinder