Hi,
This is a bug which has been in GHCi from the beginning.
Bug
===
GHCi interprets a module while the compiled version is
present and up-to-date.
Details
===
When I (for example) have the following module structure:
module A where
...
module B where
import A
...
The
According to the GHC libraries manual, 6.2.1: The Handle returned by connectTo and
accept is unbuffered by default. However, with such a handle and hPutStrLn,
I am getting buffering, even when use IO.hSetBuffering to NoBuffering. When I
put in an explicit hFlush after the hPutStrLn it
Hi,
I just installed GHC 5.02.2 (actually, the latest version from CVS), and
had a strange problem. My first attempt worked ok, but I screwed something
up, so I junked it and started again from scratch.
This time, it died part-way through the make boot step for ghc
itself, because
Hi Nick,
I just installed GHC 5.02.2 (actually, the latest version
from CVS), and
had a strange problem. My first attempt worked ok, but I
screwed something
up, so I junked it and started again from scratch.
This time, it died part-way through the make boot step for ghc
itself,
I use GHC 5.00.2 on Solaris 2.6 at the university and am unable to use
hierarchical module names --- with and without the
-fglasgow-exts switch. GHCi
notifies me of parse errors on the module name. What is
interesting is that if
my module with hierarchical name imports a module which
On Fri, 25 Jan 2002, Simon Marlow wrote:
Nothing springs to mind, unless you had explicitly set
$(ProjectsToBuild) in your build.mk, and left out glafp-utils. It
usually isn't necessary to set $(ProjectsToBuild) as it defaults to
building all the projects in the current tree.
Aha, that
Also, when I try to compile for ticky-ticky profiling...
Just set GhcLibWays=t, you don't have to set
GhcCompilerWays too (this
is for building the compiler itself in a different way).
Unless I want to ticky-ticky profile the compiler itself, yes?
Yup... if you want to do that,
On Fri, 25 Jan 2002, Nicholas Nethercote wrote:
Also, when I try to compile for ticky-ticky profiling...
Further in the ticky-ticky adventure...
Having compiled the libraries and RTS and other bits for ticky-ticky, when
I try the -ticky option with ghc I get loads of messages like this at
We discussed this and yes it seems like a fine idea. Thanks.
We should have thought of it ages ago.
Not sure how fast we'll implement it, but it's on the list.
Simon
| -Original Message-
| From: George Russell [mailto:[EMAIL PROTECTED]]
| Sent: 14 January 2002 16:28
| To: [EMAIL
Okay, one quick question:
what do i have to import to get newAddrArray#, readAddrArray#, etc.?
And, secondly, a correction to the documentation:
under the Allocation section (7.2.14.1), It says:
newCharArray# :: Int# - State# s - (# State# s, MutableByteArray# s
elt #)
newIntArray#
Version 1.00.0 of popenhs is out. You can get it from:
http://www.01.246.ne.jp/~juhp/haskell/popenhs/
popenhs is a small library providing lazy string output from
and input to a subprocess. The interface provided by
popen now differs from the popen3 offered in 0.00 by
taking an input
Rijk-Jan van Haaften wrote:
...
In the last one, after the type checker has verified
that deTIM is type-correct, it can safely generalize
the type of deTIM, because it is a top-level function.
...
However, in
runTIM t = case t of {TIM l - runST l}
the argument 't' is non-generic.
t is
| I'm trying to learn more about Explicit Universal
| Quantification so I decide to run the following supposedly
| correct code from the ghc user
| guide:
|
| module Dummy where
|
| import ST
|
| newtype TIM s a = TIM (ST s (Maybe a))
|
| runTIM :: (forall s. TIM s a) - Maybe a
| runTIM t =
| I'm trying to learn more about Explicit Universal
| Quantification so I decide to run the following supposedly
| correct code from the ghc user
| guide:
|
| module Dummy where
|
| import ST
|
| newtype TIM s a = TIM (ST s (Maybe a))
|
|
Simon Peyton-Jones:
Lots of people have observed that Haskell might be a good scripting
language for numerical computation. In complicated numerical
applications, the program may spend most of its time in (say) matrix
multiply, which constitutes a tiny fraction of the code for the
Those two constructs are not the same
Compare
newtype T1 = C1 Bool
dataT2 = C2 !Bool
As for as I can tell, the only difference in the Report
between a newtype and a tuple type with a completely
strict constructor is in the
25 Jan 2002 08:00:24 +0100, Martin Norbäck [EMAIL PROTECTED] pisze:
newtype T1 = C1 Bool
dataT2 = C2 !Bool
the difference is that the constructor C1 does not exist, so only the
following values exist for T1:
C1 True (which is the represented as True)
C1 False (which is the
consider the following definition:
class C a where foo :: a - Int
instance C Bool where foo _ = 5
I can then say:
bar :: C a = a - Int
bar (x :: a) = foo (undefined :: a)
But not:
bar :: C a = a - Int
bar x = foo (undefined :: a)
because it tries to use a new scope for the type
Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] said:
The side effect of using data with a strict argument
instead of
newtype is that
f' (C2 x) (C2 y) = C2 (f x y)
unexpectedly becomes strict in both arguments, and we
would have
to write
f' x y = C2 (f (case x of C2 x' - x')
At 2002-01-25 14:00, Hal Daume III wrote:
class D a where constMember :: Int
instance D Int where constMember = 8
It seems ehre that there's no way to extract constMember for a
/particular/ class, since you can't tell it what a is supposed to
be. So, instead, I do:
class D a where
A Windows installer packaging up the supporting software to
Paul Hudak's School of Expression book in one convenient
bundle is now available via the Hugs98 downloads page
(see http://haskell.org/hugs ). A tar-bundle is provided for
other platforms also.
It includes the source code + supporting
I think one crucial point is being lost in the ongoing discussion of
pattern-matching and newtype:
newtype is supposed permit *erasure* of construction and pattern
matching. There is *no runtime cost* because the type
disappears at compile time. Even a non-optimising Haskell
Andre W B Furtado wrote:
Well, it's also possible to interchange data between these two monads by:
unsafeIOToST :: IO a - ST s a
stToIO :: ST s a - IO a
Can anyone tell the possible problems related to
unsafeIOToST?
^^
Cagdas,
Is it possible for you to give an
example where you think there is too much thinking
involved? I dont see it.
Writing haskell IO with monads
(with the Do notation) is just a straightforward as
writing C code for the same steps, isnt it? Just try
not to think about it too
Just check this monad tutorial (attached). It's really great for beginners.
-- Andre
---BeginMessage---
-- Forwarded message --
Date: Tue, 05 Jun 2001 11:26:12 -0300
From: Andre Santos [EMAIL PROTECTED]
Newsgroups: depto.cursos.grad.if098
Subject: Monads for the Working
25 matches
Mail list logo