Hello Anton

I think the Temporal class might more simply be metric / distance
space. I can't see what 'none' is doing, 'dur' seems to be taking a
measurement. The FingerTree paper by Ralf Hinze and Ross Paterson uses
a distance space, but otherwise I haven't seen people use them in
Haskell. Its a class I'd like if some one designed it properly worked
out other valuable derived operations (I don't have the math skills to
do this myself).

Strechable looks like scalar multiplication in a vector-space.

I don't quite see what TMap does to require a class rather than this function:

tmap :: Functor f => (t -> a -> b) -> t -> f a -> f b
tmap fn t = fmap (fn t)

I suspect your event list will be very inefficient. It seems to be
avoiding the tree shape of the original Media type by annotating the
linear elements in a list with time values. This gives you the ability
to represent parallel events but puts a lot of burden on traversing
and maintaining the list. Because of this I'd be a bit concerned that
some of your classes really only have "one good instance" for the
Media type and a bad (i.e inefficient) instance for EventList. Having
"classes with one good instance" is generally an anti-pattern and
usually indicates plain functions would be better.

Apologies if the above is over-critical. Representing music (and event
lists / media) is actually a very difficult topic. All work in this
area is valuable and your contribution is very welcome.

Best wishes

Stephen
_______________________________________________
haskell-art mailing list
[email protected]
http://lists.lurk.org/mailman/listinfo/haskell-art

Reply via email to