help needed for adding isWHNF primop to 5.00.2

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
31 Jul 2001 11:46:34 GMT


Tue, 31 Jul 2001 12:38:03 +0100, Simon Marlow <simonmar@microsoft.com> pisze:

> That's the way I'd go.  You have to declare the primitive like this,
> BTW:
> 
> 	isWHNF# :: a -> (# State# RealWorld, Int# #)
> 
> because the compiler doesn't know about the IO type and you can't return
> a Bool directly.

It can return a Bool, e.g. ==# returns a Bool.

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK