I found instructions for installing and using Tidal -- and they worked! -- but I've found no guidance for hacking it.
More detail
Tidal's installation instructions explain how to install Tidal via Cabal. I did that. As a result, my ~/.cabal store now has a copy of Tidal, which defines how it works whenever I run Tidal.
I don't just want to use Tidal. I want to change how it works -- but hacking the Cabal store is a bad idea. So instead I'd like to use my own fork of the Tidal repo, outside of the Cabal store. I know how to clone and alter the Tidal repo, but I don't know how to use the result -- every time I start Tidal it runs from the Cabal store.
What I tried
The bottom of the docs for using Tidal on Emacs mentions that one might need to replace tidal-boot-script-path "with the actual location of the BootTidal.hs file". Following that advice, I tried adding this line to my .emacs config:
To test whether that had worked, I added to "~/code/music/Tidal/Tidal/src/Sound/Tidal/Core.hs" a synonym for silence called turpa. When I reboot Emacs and restart Tidal, :i silence is defined but :i turpa is not. So that didn't work.
Next I tried simply replacing the complicated definition of tidal-boot-script-path in tidal.el with this:
Start from a clean slate by deleting ~/.ghc and ~/.cabal
Change into the tidal folder cd ~/code/music/Tidal
Install it using the 'old-style' cabal commands:
cabal v1-update
cabal v1-install
Then it should work from ghci (or via the edit plugins which generally use ghci).
This probably isn't 'best practice' use of the new v2-install commands, but as far as I can tell they are not designed for live coding and (therefore?) break all the time. Would love to hear different!
Weird. What version of Cabal do you use? Mine, 3.6.2.0, does not provide cabal v1-update. I do have v1-install. When I tried doing what you said, but using cabal update instead of cabal v1-update, it didn't work -- it still put tidal into my new .cabal folder, and my mod still wasn't recognized.
OTOH I can run cabal repl from the root of the project, run :s BootTidal.hs from the repl, and then use Tidal from that repl. That's good enough that I might not try to improve it for a while.