On Fri, May 10, 2013 at 9:04 AM, MigMit <miguelimo38@yandex.ru> wrote:With that kind of interface you don't actually need existential types. Or phantom types. You can just keep Inotify inside the Watch, like this:Right, that is an alternative solution, but phantom types are a relatively simple and well understood way of enforcing this kind of property in the type system without incurring run-time costs. My inotify binding is intended to be as thin as possible, and given my proposed interface, you could implement your interface in terms of mine, making the phantom types disappear using the restricted existentials already available in GHC, and such a wrapper should be just as efficient as if you had implemented your interface directly.Best,Leon
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe