[Haskell-cafe] music-related problem
Serguey Zefirov
sergueyz at gmail.com
Sun Jul 4 15:35:19 EDT 2010
>> Actually, it would be wise to parametrize Item with computed
>> attributes so that you can clearly distinguish between documents where
>> soundedEnd is set from documents where it is not.
> Ah, this sounds like something I am looking for... parameterizing Item with
> the computed attributes. But I am not clear about what that would look
> like. Would Item have kind * -> *? Like
> data Item c = Item {pitch::Pitch, end::Loc, computed::c}
> ?
Yep.
Item () means there soundEnd isn't set and Item Loc means we computed it.
If you need more computed parameters, just tuple them. ;)
More information about the Haskell-Cafe
mailing list