A small defect in Haskell:
foo :: (ExtremelyLongClassName a, AnotherOutrageouslyLongClassName a) => a -> Int;
foo x = ...
There is no way to create a shortcut (like "type" or "let" in other domains) for the very long contexts (assume the names were picked by someone else and you don't have control over them). Ideally one could create a macro which can collect a whole bunch of contexts and shared type parameters: eo(a) could be defined to expand to (Eq a, Ord a).
Template Haskell can probably do this.
No comments :
Post a Comment