horde-ad
horde-ad copied to clipboard
Get rid of AllowAmbiguousTypes
Edsko says: "I think AllowAmbiguousTypes is almost never the right solution; the main problem is that it gives the user no indication at all as to which type variables might be problematic. If you use the explicit inverse approach (which is only needed in rare cases), at least ghc will clearly point to where the problem is (cannot prove that such and such is equal to such and such)."
So probably the numerous AllowAmbiguousTypes in horde-ad code contribute to the unhelpful error messages when developing horde-ad or using it as a library. Let's get rid of them once the code stabilizes again. Some cases may require just the usage of Proxy arguments. More ideas are at https://www.youtube.com/watch?v=1vd9mvH8Bos&list=PLD8gywOEY4HaG5VSrKVnHxCptlJv2GAn7&index=3