> On 02-Jun-2003, Simon Marlow <[EMAIL PROTECTED]> wrote:
> >
> > I can't see how to acquire a value of type T that isn't bottom.
>
> By calling a function defined using the FFI, of course.
But the FFI lists the types that may be returned by a foreign function,
and T is not one of them.
Are
On 02-Jun-2003, Simon Marlow <[EMAIL PROTECTED]> wrote:
>
> I can't see how to acquire a value of type T that isn't bottom.
By calling a function defined using the FFI, of course.
--
Fergus Henderson <[EMAIL PROTECTED]> | "I have always known that the pursuit
The University of Melbourne
On 02-Jun-2003, Alastair Reid <[EMAIL PROTECTED]> wrote:
>
> I was just trying to show how to create a value of type
> T which might be bottom. It would have been easier to use:
>
> t :: T
> t = undefined
The same issue arises for ghc's unboxed types, of course.
ghc has some complic
> > I'm not following this. what exactly is derefPtr? The only
> analogous
> > function I can think of is Foreign.peek:
>
> Sorry, I meant peek.
>
> > but peek will unmarshal the value at the end of the Ptr into T, so T
> > cannot be abstract.
>
> Sorry, I was just trying to show how to crea
> I'm not following this. what exactly is derefPtr? The only analogous
> function I can think of is Foreign.peek:
Sorry, I meant peek.
> but peek will unmarshal the value at the end of the Ptr into T, so T
> cannot be abstract.
Sorry, I was just trying to show how to create a value of type
T w
> I don't think we have much choice about whether undefined
> values are part of
> the type. If you can create a value of that type:
>
> x <- derefPtr (px :: Ptr T)
I'm not following this. what exactly is derefPtr? The only analogous
function I can think of is Foreign.peek:
peek :: Sto
On Monday 02 June 2003 11:14 am, Malcolm Wallace wrote:
> How about something like:
>
> The declaration
> data T
> declares an abstract datatype T, whose values and operations are
> defined external to the Haskell language. Values of T follow
> the semantics of the foreign language,
John Meacham wrote:
> > This was discussed here before and there seemed to be some support for
> > it, but how about adding the empty data declaration extension to the FFI
> > spec?
I agree, it would be a suitable addition to the FFI, since it is the
place where such types make most sense.
Alas
Dnia nie 1. czerwca 2003 23:55, Alastair Reid napisaĆ:
> introduces a type T whose only value is bottom.
> ]]
>
> This semantics is obviously flawed though because it would suggest that any
> two values of type T are equal (and equal to bottom) and that optimizations
> based on that equality are
On Saturday 31 May 2003 10:11 pm, John Meacham wrote:
> This was discussed here before and there seemed to be some support for
> it, but how about adding the empty data declaration extension to the FFI
> spec?
I strongly agree that we should definitely add the ability to declare types
whose defin
10 matches
Mail list logo