Haskell scripting

2019-01-25

I’ve just started writing my first serious scripts using Haskell Stack. Unfortunately, I ran into a problem with sharing code between modules: the stack script command looks in the current working directory for modules to include as opposed to the directory in which the original Stack script is located. This means that it is impossible to write a Stack script that is location-independent without embedding absolute paths.

Therefore, I came up with this in which I have to create little Bash stub scripts and compile my shared modules on the fly. Take a look if you’re a masochist.

Fortunately, Michael Sloan at FPComplete is very responsive. He’d already recorded this issue a while ago and now there’s a pull request to fix this behaviour.

Related posts

Setting up Haskell dev environment
Backpack with Stack
Using doctest-discover with Stack revisited
Using doctest-discover with Stack

Tags

Haskell
Stack

All content © 2019 Richard Cook. All rights reserved.