Thanks for the article. A very helpful introduction.
This is a quick note for anyone else who is getting the following error:
Failed to load interface for 'Phoityne.Example.Math'
It appeared for me when I ran the command,
$ stack test. The solution to this issue only became clear after I cloned the article’s supporting repository.
- For Haskell to pick up
Math.hsas a file to be compiled add the following line to
- Also, your project’s equivalent
MyProject.cabalfile will need to have its
library-block amend. Somewhere around line 18 it should read,
exposed-modules: Lib, Phoityne.Example.Math.
I suspect that, for point #2, changes to the
.cabal file is something the stack tooling could do automatically. Presumably through a helpful command or somesuch.