vivid-synth/vivid

I made it work in stack, after simplifying the code very slightly

Closed this issue · 1 comments

I added a stack.yaml file with a single line:

resolver: lts-11.15

Then I stripped all the bounds from the .cabal file. After that I could run stack setup.

But stack ghci was giving me type errors, until I made the following changes to one file:

diff --git a/Vivid/SynthDef/FromUA.hs b/Vivid/SynthDef/FromUA.hs
index 98d614a..8e1b6b3 100644
--- a/Vivid/SynthDef/FromUA.hs
+++ b/Vivid/SynthDef/FromUA.hs
@@ -103,9 +103,9 @@ instance FromUA (NoDefaults args0) where
    fromUA _ = return []
 
 instance FromUA (UA a args0) where
-   type UAsArgs (UA a sdArgs) = '[a]
-   type SDBodyArgs (UA a args) = args
-   fromUA :: UA a args -> SDBody (UA a args) [(String, Signal)]
+   type UAsArgs (UA a args0) = '[a]
+   type SDBodyArgs (UA a args0) = args0
+   fromUA :: UA a args0 -> SDBody (UA a args0) [(String, Signal)]
    fromUA (UA x) = do
       y <- x
       return [(symbolVal (Proxy::Proxy a), y)]

And now I can run the examples!

I would submit a pull request but I don't actually know what the meaning of my changes to FromUA are, so I can't be sure I did something desirable.