A Journey in learning haskell
Hey there. In these ongoing blog series I will document my journey is progessively building a LISP interpreter as a case study for a 'larger' haskell program. I'm a beginner haskell programmer who is looking to learn a bit more. Follow along as you'll (hopefully) see me evolve into a haskell pro
I'm not sure what functionality the LISP will have, but I'm going to add more and more as time progresses.
I hope that the issues I run into, and the ways I will solve them, will be educational for you.
Today I'm going to set up the project. Cabal 1.8 has just been released and it introduces sanboxing.. So our project environment will be a cabal sandbox to escape Dependency hell. In the past we'd use cabal-dev for this, but this package has become obsulete with the introduction of sandboxes.
I've never worked with cabal 1.8 sandboxes before, so it will be fun to experiment with it.
P.s. I will post a link to the github repository soon once I' ve got my development environment all set up..
I've got some ideas lying around from previous failed LISP toy projects. I also want to see this project as an opportunity to learn about new technologies that I haven't worked with before. Here follows a list of things that I might use in the project
- Lexical scoping and variable binding with the bound library by Edward Kmett.
- For parsing we'll use parsec. Most grammars of scheme/lisps are in Backus-Nauer Form. This means the grammar of a lisp is context-free. Context free means we can restrict ourselves to Applicative code and can avoid monads.
- I might want to do something with F-algebras and typed lambda-calculus as intermediate form. But I only half know what I'm even saying. So I will have to read into that first.
- Once I'm there, I want to look at tail-call optimisation. But this seems like premature optimisation for now *padum tsss*
- I want to use monad transformers in some way (I've never really used them before) to learn more about them. Not sure what that goal means yet, but I just want to learn about monad transformers in this journey.
- While we're at it. Learn a thing about proper error handling. As haskell exceptions seem to be a big mess.
I'm kind of chaotic and impulsive. This means I have a hard time finishing projects and get bored quickly. So this series might turn into a " How to slay a dragon" tutorial half way through. You've been warned.
a better insight into building haskell applications.