-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Sound.Tidal.Boot module with standard aliases #1007
Conversation
Thanks! This is a bit delicate as editors have their own BootTidal.hs file that they use in some circumstances. I guess the old style BootTidal.hs will still work though? |
Yes @yaxu, it will continue to work. Nothing used in the custom BootTidal.hs files are modified here. We're only adding a module and changing the default BootTidal.hs |
Great, well the main branch is currently in a very 'experimental' state, so lets merge for now, and refine later if needed. Thanks a lot @ejconlon ! |
@yaxu Please let me know if there is anything more I can do to refine |
@ejconlon thanks, the big change now on main is moving things around to make room for a new 'sequence' type for beat-oriented representation that is dual to the current cycle-oriented one. I'm currently rewriting Sequence.hs for clarity but hopefully will be ready for testing and polishing soon.. |
Hi. I am both delighted and shocked that this works. This is
is morally equivalent to
which Having haddocks for names that are being used in Tidal's ghci session is very very good, I will definitely use this when teaching. |
@jwaldmann I am also surprised that it works! At first I tried implicit params, which seemed like a more "principled" approach that follows the usual scoping rules, but ghci did not support it well enough to use. |
Addresses #954 . This PR moves most of the content of the default BootTidal.hs file into the library module Sound.Tidal.Boot. This allows us to add Haddock documentation to the standard aliases that can be viewed on Hackage. These aliases can also be looked up on Hoogle. We also add few brief comments to the boot file.
The aliases in the original boot file were essentially partial applications of library functions with some in-scope tidal :: Stream value that is initialized at the top of the file. In this PR, we use a nullary typeclass class Tidally where tidal :: Stream with an orphan instance in the boot file instance Tidally where tidal = tidalInst to pass the reference to the stream to the alias functions, each of which has a Tidally constraint.
I have tested this PR manually. Please review for completeness of aliases and documentation, and maybe kick the tires yourself. I added an example.tidal file to the root of the repo for easy manual IDE integration testing, but please let me know if there is a better way.