"Simon Marlow" <[EMAIL PROTECTED]> writes:
> It is nice, but it introduces too many problems. What happens to any
> I/O errors encountered by the lazy I/O? They have to be discarded,
> which means you can't effectively use lazy I/O for robust applications
> anyway.
Damn, I forgot that "file" me
"Simon Marlow" <[EMAIL PROTECTED]> writes:
> One reason, I think, is lazy I/O(*). It's to stop you accidentally
[...]
> (*) kill it! die! die!
So you want
main = readFile "/dev/zero" >> return ()
to terminate violantly rather than terminate peacefully? :)
Seriously, I understand that the IO
"David Sabel" <[EMAIL PROTECTED]> writes:
> {-# NOINLINE b #-}
>
> b x = if even x then unsafePerformIO getChar else bot
>
> bot = bot
>
> main = do
> putChar (b 4)
> putChar (b 6)
I am not a compiler implementer (or lawyer, for that matter :)
But I propose this guess. Firs
The doc RPM package for Red Hat 7.3 suffers the same problem as the
SuSE one. Could someone please give a hand-holding guide so that we
can fix it ourselves? Please? Please?
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.o
Ashley Yakeley <[EMAIL PROTECTED]> writes:
> Prelude> 0 * 2
> 0
We can generalize this.
import Monad
double_your_monad_in_30_days :: (MonadPlus M) => M a
double_your_monad_in_30_days = mzero `mplus` mzero
___
Glasgow-haskell-users mailing list
[EMAI
"Simon Marlow" <[EMAIL PROTECTED]> writes:
> On the other hand, you'd need something like mingw for OS/2 - does
> such a beast exist?
The substring "emx" refers to an OS/2 version of gcc and libraries
that make OS/2 look really like Unix from the programmer's point of
view. (It probably even pr
[EMAIL PROTECTED] (Ketil Z. Malde) writes:
> I'm not sure what the point would be, if they are in the
> distributions anyway? Isn't it better to install them by apt-get or
> up2date or whatever? (In fact, I had almost thought manually
> downloading packages a thing of the past, but then the IT
I had looked into the source code of IArray a bit. Like you have
found, (!) is not a class method. In fact, none of the claimed class
methods in the doc is a class method, and no class method of IArray is
documented. Instead, IArray class methods seem to pertain to
implementation details (I mea
Theodore Norvell <[EMAIL PROTECTED]> writes:
> Jorge's question raised a question in my mind. The IOExts
> module has many of the same features as the ST module, why
> are there two ways to do the same thing? Is the ST module
> only there for legacy purposes?
My user view is that I appreciate
> > testfunc = do
> >r <- newSTRef ('x',0)
> >foo r
> >bar r
> >(c,n) <- readSTRef r
> >return n
Jorge Adriano <[EMAIL PROTECTED]> writes:
> Yeap, I could do it like this myself :)
> The whole problem is with passing the 'r' as a parame
I will just translate your example from Norvell's DIY state monad to
GHC's ST monad. As you noticed, GHC's ST monad begins with an "empty"
state and you use some commands to add state variables as you go.
This means the translation is not straightforward. I hope you still
get the gist of it.
Yo
Mike Gunter <[EMAIL PROTECTED]> writes:
> Why is executable size a barrier? 1.64 megabytes (that's the size of
> the executable I built with GHC most recently) of disk space costs less
> than half a cent.
I don't like this argument. Can I go to a computer store, pay a cent,
and get a hard disk
"Andre W B Furtado" <[EMAIL PROTECTED]> writes:
[...]
> For example, suppose function doSomeStuffWith returns its own parameter.
> Using a 1.5MB file in this case, the Haskell program ends in almost 5
> seconds, while the C program ends in less than 0.5 seconds... Is my Haskell
> program too bad
Consider goal-directed theorem prover (or proof checker). Two existing
samples are in Lawrence Paulson's ML for the Working Programmer, and
yours truly's http://www.cs.utoronto.ca/~trebla/fp/prover/index.html
The advantage of mine is it illustrates monads. The advantage of Paulson's
is it doesn
I installed ghc 4.08.2 binaries for sparc solaris (and those for intel
linux, too), then tried compiling a sample program (the fibonacci one
in the user guide) with ghc -parallel. The compiler complained:
Could not find interface file for `Prelude'
in the directories ./*.hi
15 matches
Mail list logo