Fri, 01 Dec 2000 13:10:43 +1100, Manuel M. T. Chakravarty <chak@cse.unsw.edu.au> pisze:
Instead of the
newtype Window = Window ForeignObj
way of wrapping foreign ADTs that we used so far, should we use
newtype WindowTag = WindowTag () type Window = ForeignObj WindowTag
?
This exposes the fact that Window is a ForeignObj. Ok, but maybe some people want it to be more abstract - clients need not to know that it's just a ForeignObj. Such type is usually exported. BTW, IMHO it's more natural to write data WindowTag = WindowTag and it would be yet more natural (and would avoid ghc's warning about a constructor which is never used) if we were allowed to write data WindowTag to create a void type. -- __("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTÊPCZA QRCZAK