3. does make good sense, and is something that a future
Haskell hopefully will support (Hugs already does.)
1. is your best bet, I'd say.

--sigbjorn

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 24, 2000 13:56
> To: [EMAIL PROTECTED]
> Subject: Completely abstract types
> 
> 
> What should be the preferred way of declaring completely abstract
> types, without any meaningful representation known anywhere, for use
> as a tag only (of the Ptr type from some new Foreign library)?
> 
> 1. data CFile = CFile
>    GHC -Wall warns that I don't use the data constructor anywhere.
>    Right, this is what I indend to do, I don't want to export it,
>    and I don't want this warning.
> 
> 2. newtype CFile = CFile CFile
>    This is really without any non-bottom representation. The problem
>    is as the previous one.
> 
> 3. data CFile
>    This syntax is not currently supported. Would it make sense?
> 
> 4. ???
> 

Reply via email to