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.
Content © 2010–2021 Richard Cook. All rights reserved.