When we write tidal code like
d1 $ s "superchip"
|>| note ("[c f a a f c]"
+ "[-12,0,3,7]" - 12 ...
the compiler inserts fromString
at each string literal, so the interpreter evaluates
d1 $ s (fromString "superchip")
|>| note (fromString "[c f a a f c]")
+ fromString "[-12,0,3,7]" - 12 ...
where fromString :: String -> Pattern _
calls the mini notation parser.
I was wondering - how expensive is this (how often does the parser run)? It should be fine (parser is run once) unless we're defining functions. See [Haskell-cafe] with -XOverloadedStrings, when is the implied fromString floated out?
This is a theoretical concern for now - I don't think parser performance ever was a problem.