Hi!
what error message are you receiving? If I do this with vanilla settings I get
Ambiguous occurrence ‘<>’
It could refer to
either ‘Sound.Tidal.Context.<>’,
imported from ‘Sound.Tidal.Context’
(and originally defined in ‘Sound.Tidal.Core’)
or ‘Prelude.<>’,
imported from ‘Prelude’ (and originally defined in ‘GHC.Base’)
In this case, the problem is that the operator <>
is defined both in Prelude
(which is a set of standard functions that are automatically imported) and in Sound.Tidal.Context
(which is the one you want to use). Consequently the compiler does not know which version of <>
you want to use and you have to do this explicitly. To do that you have several options:
- Write
Sound.Tidal.Context.<>
explicitly, i.e.,
d1 $ sound ("bd sn:2" Sound.Tidal.Context.<> "cp*3")
which is a quick fix but is cumbersome to write every time
2. Import prelude without <>
to avoid the name clash. You can do this by writing
import Prelude hiding ((<>))
and evaluating the line in tidal. The ambiguity should now be resolved.
3. Define <>
explicitly as Sound.Tidal.Context.<>
, i.e.,
(<>) = (Sound.Tidal.Context.<>)
Again, evaluate the above line in tidal and <>
should now work as expected.
You can add (2.) or (3.) to you boot tidal to avoid having to execute them every time you launch tidal cycles.