
* Ruud Koot
1) Consider the higher-order function 'map'. With tracked exceptions you would probably want to give it a type such as:
map :: forall a b e. (a -> b throws e) -> [a] -> [b] throws e
I.e., you need some kind of exception polymorphism, or severely restrict the kind of functions you would be allowed to pass to map (basically those that are guaranteed to not raise any exceptions).
Simply instantiating b with b `Throws` e gives map :: (a -> b `Throws` e) -> [a] -> [b `Throws` e] Which is actually a more useful type than the one you proposed, because it shows that map itself doesn't throw exceptions (so that e.g. computing length is safe). Assuming "Throws e" is a monad, you could use mapM instead of map to get the behavior you want. In fact, Throws will probably need to be an indexed monad. Roman