Re: Strange behavior in GHC-compiled code

2012-05-26 Thread Mark Conway Wirt
On Fri, May 25, 2012 at 11:45:41PM +0200, Joachim Breitner wrote: > in that case I suggest you run a memory checker, e.g. memtest86, and see > if it find some hardware bugs. Or run the program on another machine and > see if the problem appears there as well. Hey Joachim, thanks for the referenc

Re: Strange behavior in GHC-compiled code

2012-05-25 Thread Mark Conway Wirt
On Fri, May 25, 2012 at 05:53:52PM +0100, Malcolm Wallace wrote: > Unless you show us the code, any answers will be guesses in the dark. > Does your program use unsafePerformIO unsafely perhaps? Or a version > of a library that happens to have a known bug? No unsafePerformIO's or IOrefs or the l

Strange behavior in GHC-compiled code

2012-05-25 Thread Mark Conway Wirt
Hi folks. I have a piece of Haskell code that's been laying around on my computer for about a year, and I recently decided to dust it off. The problem is that it used to work fine, but in the interim (in which I both upgraded OS versions/GHC versions and went from 32 bit to 64 bit) the code stopp

Re: Packages

2002-01-19 Thread Mark Conway Wirt
On Sat, Jan 19, 2002 at 11:05:06AM +, Marcin 'Qrczak' Kowalczyk wrote: > Curses.hsc:1: > Warning: Module `QIntegral' is located in package `qforeign-curses' > but its interface file claims it is part of package `qforeign' > > I understand what it means but I don't know how to

Re: FFI

2002-01-14 Thread Mark Conway Wirt
I'd like to say thanks to everyone who responded. At this point, I think I'll try each -- the FFI to get a feel for the low-level goings-on, C->Haskell 'cause it looks interesting, and H/Direct for it's power. After I've tried each, I'll have a better understanding and be able to evaluate each

FFI

2002-01-11 Thread Mark Conway Wirt
I'm looking for opinions as to the best way to do a C (or C++) foreign interface to GHC haskell code. It looks like there are three options. Greencard has been around for a while, but it looks as if it's more-or-less deprecated now; I don't see many people talking about it anymore. Unless I'm

Re: Input Processing Loops in Haskell

2001-11-13 Thread Mark Conway Wirt
On Tue, Nov 13, 2001 at 05:02:54PM -, Simon Marlow wrote: > > You can paraphrase this in Haskell, in the IO monad, like this: > >loop = do { > a <- get_input; > if (a == gET_OUT) then return () else loop; > } I follow, but I've never seen brackets used in Haskell code.

Re: Input Processing Loops in Haskell

2001-11-13 Thread Mark Conway Wirt
On Tue, Nov 13, 2001 at 05:59:19PM +, Keith Wansbrough wrote: > > It's worth adding that Mark's initial code, > > f a >| a == GET_OUT = a >| otherwise = f ( g a) > > will also not grow the stack, on any decent Haskell implementation. Tail recursion >is always implemented

Input Processing Loops in Haskell

2001-11-13 Thread Mark Conway Wirt
I apologize if this is a bit off-topic -- I'm asking it here because if what I want to do is possible, it may only be possible with ghc extensions, as opposed to vanilla Haskell.. In many types of applications, it's common to have a loop which loops infinitely, of at least until some conditi

Re: Help in calling Haskell from C

2001-10-11 Thread Mark Conway Wirt
On Tue, Aug 14, 2001 at 11:28:57AM -0700, Sigbjorn Finne wrote: > Hi, > > the 0.17 documentation (and examples) wasn't updated to cover > the extra argument that startupHaskell() now takes, I'm afraid. > Attached is a version of tst.c from examples/server/ which shows > you how to now use startup

Re: hdirect and ghc 5.02

2001-10-08 Thread Mark Conway Wirt
On Fri, Oct 05, 2001 at 01:27:54PM -0700, Sigbjorn Finne wrote: > Try http://www.galconn.com/~sof/hdirect-0.18-src.tar.gz > > (src dist built about a month ago). > There seems to be a slight problem with the build system. I've tried building it from fptools (having only checked out fpconfig)