If you compile the lambda nofib benchmark with -fext-core, GHC won't
compile the resulting .hcr file:
[EMAIL PROTECTED] lambda]$ ghc -fext-core Main.hs
[EMAIL PROTECTED] lambda]$ ghc Main.hcr
Illegal data constructor name `Main.StateMonad2'
This is using GHC 5.05.
--
Kirsten Chevalier *
On Thursday 06 March 2003 10:55, Adrian Hey wrote:
On Tuesday 04 March 2003 12:36, Simon Peyton-Jones wrote:
GHC does not copy big objects, so don't worry about the copying cost.
(Instead of copying, it allocates big objects to (a contiguous series
of) heap blocks, with no other objects in
Thanks, looks like it's option (1) then. Could you tell me what
Haskell type I have to use be able to pass a pointer to this binary
to C land (genuine address, not StablePtr). I don't think
the standard FFI allows this at all but, IIRC, the old ghc libraries
allowed you to do this with a
| In the current CVS GHC, undoubtedly the right thing to use is
| Foreign.mallocForeignPtr. Internally these are implemented as
| MutableByteArray#, so you get fast allocation and GC, but from the
| programmer's point of view it's a normal ForeignPtr.
I wonder how it is for a random FFI user to
Hi Dirk,
[EMAIL PROTECTED] writes:
Hello,
trying to compile the following program
class ClassA a where
foo :: a - Int
class ClassA a = ClassB b a where
toA :: b - a
test :: (ClassB b a) = b - Int
test x =
let y = toA x in
let z = foo y in
Can anyone help? I downloaded the latest rpm for ghc but got the following
errors on installation:
error: failed dependencies:
libc.so.6(GLIBC_2.3) is needed by ghc-5.04.2-1
libreadline.so.4 is needed by ghc-5.04.2-1
I guess I need to update libc and libreadline. Can anyone point me at the
On Sun, 09 Mar 2003 22:13:35 -0500, Matthew Donadio [EMAIL PROTECTED] wrote:
I may be being a bit dense about this, but I am having some trouble
understanding how to use FFI, especially with respect to interfacing
Haskell lists/arrays to C arrays.
For example, say I have the C functions
void foo
M. Parker:
What about a port to Windows CE (i.e., for Pocket PC's). Or even better yet,
hugs for Pocket PC!
-Matt
There is an interesting research question in here: how to design lean
implementations of lazy functional languages so they can run on small
handheld and embedded systems with
Bjorn Lisper wrote:
There is an interesting research question in here: how to design lean
implementations of lazy functional languages so they can run on small
handheld and embedded systems with restricted resources. In particular the
restricted memory available poses an interesting challenge.
Bjorn Lisper wrote:
There is an interesting research question in here: how to design lean
implementations of lazy functional languages so they can run on small
handheld and embedded systems with restricted resources.
[...]
Furthermore, the i/o model
must be developed to accomodate the
Just a side remark.
I wonder whether the byte-code approach is the best possible solution
taking into account the overload of the decoder. Why not threaded code?
The FORTH (and similar) experience, PostScript implementations, etc.
show that this paradigm may be more interesting. Anyway, when you
Wait a minute!
As far as I have understood, threaded refers (in this context) to a
style of writing (byte code) interpreters. A threaded interpreter does
not have a dispatch loop which reads the next byte code and then
invokes the correct handler (typically by using the byte code as an index
[We apologize if you receive multiple copies of this announcement.]
Postdoctoral research fellow (University of Nottingham)
Doctoral studentship (University of Oxford)
in DATATYPE-GENERIC PROGRAMMING
The Universities of Nottingham and Oxford have positions available to work
on an EPSRC-supported
Hi,
Has anyone have experience reading from a handle using hGetContents when
the handle is still open and receives input from outside?
I need to do some manipulation to the contents and I can't afford to close
this handle. for example, an infinite stream abcabc... is written from
outside to this
Hi All,
Any one of your have the experience of defining a state of a state monad
as a polymorphic type?
I want to have:
type State = Term a = [a]
data M a = M (State - IO(State,a))
GHC yields a error message Illegal polymorphic type.
How to resolve this?
Thank you very much.
-W-M-
@ @
Wang Meng writes:
| Hi All,
|
| Any one of your have the experience of defining a state of a state monad
| as a polymorphic type?
| I want to have:
|
| type State = Term a = [a]
| data M a = M (State - IO(State,a))
|
| GHC yields a error message Illegal polymorphic type.
| How to
G'day all.
On Tue, Mar 11, 2003 at 08:34:06AM +1300, Tom Pledger wrote:
If, on the other hand, you want to vary the state type *during* a
single monadic computation, it gets messy. You could try one of the
following.
Very often, you just want to vary the state type for some portion
of the
Dear All,
The deadline for submisson to AADEBUG'2003, the Fifth International Workshop
on Automated and Algorithmic Debugging, is approaching. Papers and demos
should be received by 22 March, 2003. Please find the CFP enclosed.
See http://aadebug2003.elis.rug.ac.be/ for further details.
Best
---
data AParser String = AP
{apapply::([String]-[(String,[String])])}
Whoa! You cant declare a data type
like that! You must have a type variable after the data type name, thus:
Nick Name [EMAIL PROTECTED] contemplates two ways of finalizing
external resources:
[lots of context deleted]
f :: IO [a]
f = do
allocateResource
l - makeTheStream
addFinalizer l (disallocateResource)
return l
[snip]
Another alternative is to make f return
Nick Name [EMAIL PROTECTED] wrote,
As the result of a conversation on haskell-gui, I have tried to
implement the disallocation of resources when a stream is garbage
collected.
To explain myself:
I have a function
f :: IO [a]
which returns a lazy stream after allocating some
another possibility is a withStream type function which explicitly
finalizes.
withStream :: Stream a - ([a] - IO b) - IO b
the idea being the stream is freed when the IO b finishes.
this can easily be built on your explicit 'close stream' version below,
but may not be flexable enough for what
22 matches
Mail list logo