with Haskell 98, etc.) of these tools (and any others that you
consider useful) for such a project.
Thanks in advance.
Dean Herington
Department of Computer Science
University of North Carolina at Chapel Hill
[EMAIL PROTECTED]
size (much) above its default 25 cells. It sounds
from the error message, though, that 16000 is simply a limit set in the
Hugs interpreter.
Any ideas on how to make this combination of Happy-generated parser and
Hugs work together?
Thanks in advance.
Dean Herington
[EMAIL PROTECTED]
Andreas Gruenbacher wrote:
Hello,
I was trying to write an abstraction for bidirectional communication
between two threads. For some reason, MVars seem to break:
---
class Cords c t u where
newCord :: IO (c t u)
listen :: c t u - IO t
/2001-August/001581.html and followup
article.
Dean Herington
Amanda Clare wrote:
I have some code which is being unnecessarily lazy (and occupying too
much heap space). The code should read and process several files one by
one. What's happening is that all files get read in but the processing
RROR "Composition.hs" (line 52): Cannot justify constraints in explicitly
typed binding
*** Expression : h1
*** Type : (a
-> a -> (a,a)) -> (a -> a -> (a,a)) -> a -> a -> (a,a)
*** Given context : ()
*** Constraints : Composable (b -> b -> (b,b)) (c -> c
GHC accepts the declaration:
(a # b) = a ++ b
but Hugs rejects it, saying:
Syntax error in input (unexpected `=')
Who's right?
--Dean
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
On Fri, 1 Feb 2002, Ashley Yakeley wrote:
At 2002-02-01 10:45, Dean Herington wrote:
h1 :: (a - a - (a,a)) - (a - a - (a,a)) - (a - a - (a,a))
h1 = f1 # g1
I think you mean:
h1 :: (a - a - (a,a)) - (a - a - (a,a)) - (a - a - (a,a))
h1 f g = f # g
Actually, I botched the type
cal
test controller for HUnit?)
Dean Herington
are the same, does that rely on there being no true concurrency in
the current implementations? How would the cost change if true
concurrency were provided? Wouldn't thunk evaluation involve mutual
exclusion?
Dean Herington
___
Haskell mailing list
[EMAIL
The type `Dynamic` is an instance of `Show` but not of `Read`. Is there
some reason `Dynamic` could not be made an instance of `Read`? Has
anyone extended `Dynamic` in that way?
Dean Herington
___
Haskell mailing list
[EMAIL PROTECTED]
http
Paulo Sequeira wrote:
A friend is considering to start a project of building a generator of
certain particular (pieces of) programs. The code generated is most likely
to be Java.
Anyone knows of a module that provides data structures and functions for
representing and manipulating Java
Simon Peyton-Jones wrote:
| In GHC 5.04.1, derived instances of Show mishandle precedence:
|
| Prelude putStrLn (showsPrec 10 (Just 0) )
| Just 0
|
| The result should be: (Just 0)
I think it's a bug in the Report, not in GHC, actually. The Report says
(Section D.4)
The function
Ferenc Wagner wrote:
Simon Peyton-Jones [EMAIL PROTECTED] writes:
So I propose to modify the instance decl for Ratio by
adding explicit defns for succ/pred just like those in
Float/Double.
I bet you guessed: once at it, what about removing those
unintuitive 1/2-s, like:
Simon Peyton-Jones wrote:
Folks
The concrete is setting fast, but Ross points out that the instance for
Enum (Ratio a) is inconsistent with that for Enum Float and Enum Double.
(It's strange that these non-integral types are in Enum, but we're stuck
with that.)
All three use
Dean Herington wrote:
On Tue, 29 Oct 2002, Christian Sievers wrote:
I guess equivalent just means equality without suggesting that the type is
an instance of Eq. There are other places where the report uses == in
situations where you can't really apply it, for example, in D.2 it says
On Thu, 7 Nov 2002, Johannes Waldmann wrote:
Dear all, I would welcome some advice
on getting better error messages
when using read :: Read a = a
The problem is, `readsPrec' (the class method)
eats the longest feasible input prefix,
but when I call `read' (built-in prelude function)
On 7 Nov 2002, Alastair Reid wrote:
Why not just define your own function, much like `read`, that
produces a more suitable error message?
readsPrec (i.e., the class method) doesn't report how far it got when
it reports failure.
Yes, that's true if no prefix is a valid parse. In the case
Mark P Jones wrote:
Moreover,
in attempting to optimize the code, you might instead break it
and introduce some bugs that will eventually come back and bite.
Indeed! If we take Mark Phillips's original version of penultimax as our
specification, all four alternate versions are incorrect:
On Sun, 19 Jan 2003, Nick Name wrote:
I got another trouble: I need to build a record type like
Package { name :: String, version :: Int , mantainer :: String ... other
fields ... }
from a list of string of the form
[Package: ... , Mantainer: ... , Version: ... , ... ]
where the
I was unhappy with the use of `error` in my first solution, so I wrote a
second solution that's more robust. It also demonstrates monadic style.
The new solution is at the bottom.
Dean
On Thu, 23 Jan 2003, Dean Herington wrote:
On Sun, 19 Jan 2003, Nick Name wrote:
I got another
On Sun, 26 Jan 2003, Norman Ramsey wrote:
In a fit of madness, I have agreed to deliver a 50-minute lecture
on type classes to an audience of undergraduate students. These
students will have seen some simple typing rules for F2 and will
have some exposure to Hindley-Milner type
Can someone explain why the type declaration for `g` is required in the
following?
class RT r t where rt :: r - t
data D t = Dt t | forall r. RT r t = Dr r
f :: D t - D t
f = g
where -- g :: D t - D t
g (Dr r) = Dt (rt r)
As given above, the program evokes these error messages:
with
2003, Dean Herington wrote:
Can someone explain why the type declaration for `g` is required in the
following?
class RT r t where rt :: r - t
data D t = Dt t | forall r. RT r t = Dr r
f :: D t - D t
f = g
where -- g :: D t - D t
g (Dr r) = Dt (rt r)
As given
:
Dean Herington [EMAIL PROTECTED] writes:
Ketil Z. Malde wrote:
-- | add data from a file to the histogram
addFile :: FiniteMap String Int - String - IO (FiniteMap String Int)
addFile fm name = do
x - readFile name
return (addHist fm x)
I changed this to read x
On Fri, 14 Feb 2003, John Meacham wrote:
This seems to be contrary to how i thought haskell was implemented in
ghc (and probably other systems). I was under the impression that thunks
in ghc were opaque except for the code address at the begining of them.
in order to evaluate something you
You can't derive Enum Player automatically, but you can program it. Here's one
way how, using shorter example names.
-- Dean
data E1 = E1a | E1b | E1c deriving (Enum, Bounded, Show, Read)
data E2 = E2a | E2b | E2c deriving (Enum, Bounded, Show, Read)
data E = E1 E1 | E2 E2deriving (Show,
Oops! Small bug. See below.
Dean Herington wrote:
You can't derive Enum Player automatically, but you can program it. Here's one
way how, using shorter example names.
-- Dean
data E1 = E1a | E1b | E1c deriving (Enum, Bounded, Show, Read)
data E2 = E2a | E2b | E2c deriving (Enum
If a type that could be defined either by `data` or `newtype` (i.e., a
single-constructor type) is exported abstractly (without its constructor),
can the user of the type tell how the type was declared?
Dean
___
Haskell mailing list
[EMAIL PROTECTED]
On Sun, 9 Mar 2003, Hal Daume III wrote:
well, yes, but if you export:
mkN :: Int - N
mkD :: Int - D
or something like that, then they'll still bea ble to tell the difference,
right?
Well, yes, but I don't. In fact the type in question is an MVar which my
abstraction ensures is always
On Thu, 12 Jun 2003, Niels Reyngoud wrote:
Hello,
We're two students from the department of computer science at the
University of Utrecht (the Netherlands), and we're havind some severe
difficulties in working
with file handles in Haskell. Consider for example the following program:
On Thu, 12 Jun 2003, Wolfgang Jeltsch wrote:
On Thursday, 2003-06-12, 18:01, CEST, Filip wrote:
Hi,
I wrote something like let t = try (hGetLine h1) and I would like to check
is it EOFError or not. How can I do this ??
Thanks
Hello,
the above code assigns the I/O action
Niels Reyngoud wrote:
Hello all,
Thanks for your replies on our previous posts. To avoid the lazy
behaviour, we tried to write our own IO module IOExts2 which basically
redifnes
readFile, writeFile and appendFile to make sure they use binary-mode and
strict behaviour. The libary is as
Dylan Thurston wrote:
On Thu, Jun 19, 2003 at 11:08:35AM -0500, Ed Komp wrote:
| type BaseType = Either Integer ( Either Bool () )
|
| type Value = (Either Double BaseType)
|
| data Foo = forall x. (SubType x BaseType) = MkFoo x
|
| test :: Foo - Value
| test
Tom Pledger wrote:
K. Fritz Ruehr writes:
:
| But Jerzy Karczmarczuk enlightened me as to the full generality possible
| along these lines (revealing the whole truth under the influence of at
| least one beer, as I recall). Namely, one can define a sequence of
| functions (let's use a
Can someone explain why the following doesn't work? Is there some other
way to achieve the same effect (declaring a set of instances for pair-like
types in one go)?
Thanks.
Dean
swan(108)% cat Test1.hs
{-# OPTIONS -fglasgow-exts #-}
class R r where
rId :: r - String
class (R r) = RT r t
On Wed, 1 Oct 2003, Keith Wansbrough wrote:
Can actually someone supply an implementation of something like interact
that does no pipelining for the argument id? Simply doing putStr !$ f
!$ s was not enough!
Yes, of course.
Your code above only forces the evaluation of the first
Is there a good reason why `exitImmediately` (in System.Posix.Process as
well as other places) shouldn't return `IO a` instead of `IO ()`?
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
Here's the latest version of my DeepSeq module.
Dean
DeepSeq.lhs -- deep strict evaluation support
The `DeepSeq` class provides a method `deepSeq` that is similar to
`seq` except that it forces deep evaluation of its first argument
before returning its second argument.
Instances of `DeepSeq` are
At 4:05 PM + 12/8/04, Ben Rudiak-Gould wrote:
Dean Herington wrote:
deepSeq :: DeepSeq a = a - b - b
I should point out that deepSeq with this type is the composition of
two simpler operations:
deepSeq = seq . eval where eval :: DeepSeq a = a - a
eval ties a demand for a value
Is there any practical way to do client-side web scripting in
Haskell? All the references I have found to HaskellScript seem quite
out of date.
Dean
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Title: RE: [Haskell] stack overflow - nonobvious
thunks?
The following version seems to do the trick (and still remain
quite readable). It worked for 1 as well.
import Data.Map as Map
import System.Random
import Data.List (foldl')
table :: (Ord a) = [a] - [(a,Int)]
table xs =
At 7:31 PM +0100 2/24/06, minh thu wrote:
Hi all,
1/
I'd like to know how can I implement an interactive program (an
editor) in haskell where some things have to be updated.
The things can be text in a word processor, or a pixel array in a
2d graphics editor, and so on.
Have I to pass the
working directory
/afs/cs.unc.edu/home/heringto/applications/ghc-4.08.1
Can you help?
Thanks.
Dean Herington
[EMAIL PROTECTED]
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
The program shown below elicits a complaint about pattern overlap for
doMem1 (but not doMem2). I don't expect any complaint. (Hugs accepts
both.)
Dean Herington
[EMAIL PROTECTED]
swift(125)% cat GHCtest1.lhs
module Main where
type Label = Int
data Exp = CONST Integer
| LREF
I have a program that hangs. When I interrupt it (^C) it elicits the
following error message.
CCTest: fatal error: resurrectThreads: thread blocked in a strange way
CCTest: no threads to run: infinite loop or deadlock?
Here's some info about my environment:
buzzard(120)% uname -a
SunOS
I have some GHC-compiled programs that run OK under Sparc/Solaris but
hang under x86/Linux. I'm using GHC 5.02.3 on both systems (although
I've tried GHC 5.03.20020410 on Linux with the same failures). I'm
debugging to narrow the problem down. My current suspicion is that
closing the write end
Simon Marlow wrote:
The fine points of Unix signal semantics have always been somewhat
mysterious to me. However, after digging around in man pages
for a while,
I have a theory as to what's going wrong...
Yes, your diagnosis looks very plausible.
The right way, I believe, to handle
Volker Stolz wrote:
In local.glasgow-haskell-bugs, you wrote:
Am 10. Jul 2002 um 22:21 CEST schrieb Dean Herington:
The first issue I confronted is that the get*ProcessStatus routines return
an error rather than nothing if there is no candidate child process.
Yes, `waitpid' might
On Wed, 28 Aug 2002, Simon Marlow wrote:
I have a program that is suffering a select() failure. It prints:
9
select: Bad file descriptor
Fed: fatal error: select failed
From looking at some RTS sources, the 9 apparently represents
errno EBADF
(bad file descriptor). Does
Simon Marlow wrote:
Unfortunately, select() (and hence the GHC RTS) doesn't
identify the bad
descriptor(s). Here's where I suspect my program may be
going awry. The
main process creates a pipe. The process then forks. The
parent closes
the pipe's read descriptor
Sigbjorn Finne wrote:
Dean Herington [EMAIL PROTECTED] writes:
...
When a thread wants to read from a file descriptor, its logic looks like:
threadWaitRead (fdToInt fd)
([char], 1) - locked (fdRead fd 1)
where `locked` obtains and holds the aforementioned lock
http://www.haskell.org/ghc/docs/latest/html/base/GHC.Conc.html says:
The killThread function may be defined in terms of throwTo:
killThread = throwTo (AsyncException ThreadKilled)
I think it should be:
killThread = flip throwTo (AsyncException ThreadKilled)
or, perhaps better:
I'm sporadically seeing the following error:
ghc-5.02.3: fatal error: getStablePtr: too light
Any ideas what it means or how to avoid it?
I'm running on Linux.
-- Dean
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
I compiled a program with ghc --make -prof -auto-all -H100M
-fglasgow-exts -i.. -iHUnit -package data -package util -package posix
-syslib concurrent When I run it, it evokes a Bus Error (with or
without +RTS -p). Any ideas what's wrong?
I'm using GHC 5.02.3 on Sparc/Solaris.
Dean
I'm suffering stack overflow in a program that uses both multiple
processes and multiple threads. Can anyone help me interpret the
following -xc output? In particular, which ... reports relate to
the stack overflow? (I've added a newline following each '' to
increase readability.) I think
With the program:
import Exception
main = let catch = Prelude.catch in catch (print ok) print
hugs 98 version 20021021 gives:
__ __ __ __ ___
_
|| || || || || || ||__ Hugs 98: Based on the Haskell 98
standard
||___|| ||__|| ||__||
In GHC 5.04.1, derived instances of Show mishandle precedence:
Prelude putStrLn (showsPrec 10 (Just 0) )
Just 0
Prelude
The result should be:
(Just 0)
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
Given this program:
{-# OPTIONS -fglasgow-exts #-}
module Bug1 where
import Control.Monad.State
newtype T a = T (StateT Int IO a) deriving (MonadState)
GHC 5.04.2 chokes:
ghc-5.04.2: chasing modules from: Bug1
Compiling Bug1 ( Bug1.hs, ./Bug1.o )
ghc-5.04.2: panic! (the
I don't understand why GHC (I was using 5.04.2) should reject these two
programs.
{-# OPTIONS -fglasgow-exts #-}
swap1 :: (forall a. a - a, forall a. a - a - a)
- (forall a. a - a - a, forall a. a - a)
swap1 (a, b) = (b, a)
yields:
Bug2.hs:3: parse error on input `,'
With the attached files, I get an apparently garbled error message
during compilation.
buzzard(105)% make
ghc --make -package data -package concurrent -package posix Data
ghc-5.04.2: chasing modules from: Data
Compiling Repr ( Repr.hs, Repr.o )
Compiling Data ( Data.hs,
buzzard(131)% cat Bug6.hs
{-# OPTIONS -fglasgow-exts #-}
import Control.Monad.State
data S1 = S1 (M1 Int)
newtype M1 a = M1 { unM1 :: StateT S1 IO a } deriving (Monad)
data S2 = S2 (M2 Int)
newtype M2 a = M2 { unM2 :: S2 - (a, S2) }
instance Monad M2 where
return a = M2 $ \s - (a, s)
m = k
buzzard(118)% cat Bug5.hs
import Control.Monad.State
data S = S Int
newtype M a = M (StateT S IO a)
deriving (Monad)
main = return ()
buzzard(119)% ghc -c Bug5.hs
Bug5.hs:3:
Can't make a derived instance of `Monad M'
(too hard for cunning newtype deriving)
When deriving instances
I'm getting intermittent thread blocked indefinitely errors with GHC
5.04.2. My program uses modules Concurrent and Posix heavily. In
particular, I fork processes (now with GHC.Conc.forkProcess) and handle
SIGCHLD signals to determine when the processes have finished. The
symptoms seem similar
I've attached some clues below the quoted message.
On Thu, 20 Feb 2003, Dean Herington wrote:
I'm getting intermittent thread blocked indefinitely errors with GHC
5.04.2. My program uses modules Concurrent and Posix heavily. In
particular, I fork processes (now with GHC.Conc.forkProcess
buzzard(150)% cat Two-part.hs
main = return ()
buzzard(151)% ghc --make Two-part.hs
ghc-5.04.2: chasing modules from: Two-part.hs
Compiling Main ( Two-part.hs, ./Two-part.o )
ghc: linking ...
buzzard(152)% ghc --make Two-part
ghc-5.04.2: no input files
Usage: For basic information, try
On Tue, 25 Feb 2003, Simon Marlow wrote:
Something like the following seems to be occurring.
The program `Concurrent.forkIO`s several threads. Two of
these auxiliary
threads each fork a process (with `GHC.Conc.forkProcess`).
Just as the
second forked process is about to
George Russell wrote:
(2) The logical way of spotting whether a file is actually there is the
queryFile function, documented for example here:
http://haskell.cs.yale.edu/ghc/docs/latest/html/hslibs/files-and-directories.html
But sadly the queryFile function does not appear to be in the
The attached program works under hugs -98 but fails with GHC 5.04.2
with:
Params2b.hs:6:
No instance for `Show (r String)'
When deriving the `Show' instance for type `S'
Params2b.hs:6:
No instance for `Show (r Int)'
When deriving the `Show' instance for type `S'
Simon Marlow wrote:
On Mon, Mar 17, 2003 at 10:33:47AM +, Ross Paterson wrote:
GHC doesn't recognize literals like 9e2, and nor does lex.
Correction:
GHC doesn't recognize 9e2
lex is confused by 0xy, 0oy, 9e+y and 9.0e+y
Fixed GHC, I'll leave lex to someone more familiar with
FYI:
On page http://www.haskell.org/ghc/ the text The Haskell Wish List is
linked to
http://www.pms.informatik.uni-muenchen.de/forschung/haskell-wish-list/.
That page is woefully out of date; in particular, access to the wish
list fails.
___
The `shows` function for type `Handle` is inappropriately impure. In my
opinion, showing a handle should merely identify it as a handle and
distinguish it from other handles. The information currently provided
by showing a handle should be provided with some other function; that
function should
The following may not be a bug, but it surprised me. Why does the
circularity cause GHC fits?
swan(106)% cat NestStateT.hs
{-# OPTIONS -fglasgow-exts #-}
import Control.Monad.State
newtype S1 = S1 [T1 ()]
newtype T1 a = T1 (StateT S1 IO a )
deriving Monad
main = undefined
swan(105)% ghci
to approximate? Could one try to type check and bail out if
that fails?
But I'll put your example in a comment in
the source code as an example of a safe one that's rejected!
Simon
| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
| Behalf Of Dean Herington
At 1:52 PM +0100 9/6/04, Simon Marlow wrote:
On 06 September 2004 13:43, Simon Peyton-Jones wrote:
* The link step needs -package flags, because it only gets .o files,
and we didn't want it to start hunting through .hi files (though that
would be possible)
Just to expand on this a little: it's
With GHC 6.4, interpreted or compiled, on Windows and Mac OS X,
evaluating the expression (4^(4^44))::Integer causes a crash.
On Mac, the message is:
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.4, for Haskell 98.
/ /_\\/ __ / /___| |
I'm trying to give Grapefruit a try. I installed it as described in
section 4.1 of http://www.haskell.org/haskellwiki/Grapefruit. When I
tried to run the Simple.hs example, I got the problem shown below.
Any ideas?
My machine is running Windows XP Pro 2002 SP3.
TIA
Dean
GHCi, version
-0.0.0.0 ... linking ... done.
*** Exception: Cannot initialize GUI.
At 3:58 PM -0400 5/23/09, Dean Herington wrote:
I'm trying to give Grapefruit a try. I installed it as described in
section 4.1 of http://www.haskell.org/haskellwiki/Grapefruit. When I
tried to run the Simple.hs example, I got
At 10:56 PM +0200 4/2/05, Benjamin Franksen wrote:
On Saturday 02 April 2005 22:29, Peter Hercek wrote:
What is $ function good for?
Mostly for avoiding parentheses. $ is right associative and has lowest
precedence, whereas normal application is left associative and binds most
tightly:
f $ g $
AM, Ian Lynagh
mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote:
This is caused by a change in the HUnit library, from
assertFailure msg = ioError (userError (hunitPrefix ++ msg))
to
assertFailure msg = E.throwDyn (HUnitFailure msg)
I've had no luck contacting Dean Herington using
Is the posix library (-package posix) supposed to be supported on
Windows? If not (as I expect to have confirmed), what are the
alternatives for process control on Windows?
Dean
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
that existing threads in the forking process don't get in the way.
I read something on this topic (involving some sort of pervasive locking
strategy) recently, but can't recall where. Anybody remember?
Dean Herington
Marcus Shawcroft wrote:
Hi,
I want to use a thread in concurrent haskell
A minor suggestion: Let :m *M apply to compiled modules as well as
interpreted. In other words, :m +M requests all top-level entities
(accepting only exported ones for compiled modules) while :m *M requests
only exported entities (whether the module is compiled or interpreted).
More generally,
It turns out that, besides having a multithreaded process do
`forkProcess` and `executeFile` atomically, I also want to have a
multithreaded process do `forkProcess` (without `executeFile`) and
execute without any of the preexisting threads. This can be done by
having a lock that all threads
I can't figure out how to get GHC to recognize my OPTIONS pragmas in a
literate source file. Neither
{-# OPTIONS -fglasgow-exts #-}
nor
{-# OPTIONS -fglasgow-exts #-}
works as the first line in the file. Can anybody tell me what I'm doing
wrong?
Thanks.
--Dean
Thanks, that did it.
Did I miss this subtlety in the documentation, or should it be added
there?
Dean
On Mon, 21 Jan 2002, Sigbjorn Finne wrote:
Try
{-# OPTIONS -fglasgow-exts #-}
i.e., no space between '' and '{'.
--sigbjorn
- Original Message -
From: Dean Herington
Can someone explain the following warning?
---
module Warning where
type A = IO ()
class CA t
where a :: t - A
instance CA ()
where a = return
instance (CA t) = CA (IO t)
where a = (= a)
data B = B A
class CB t
where b :: t - B
instance (CA t) = CB (IO
. The best solution I've come up with so far, which is
unsatisfying, is to have this thread poll periodically (that is, loop
over (getAnyProcessStatus False False) and (threadDelay)). Is there a
better way?
Dean Herington
___
Glasgow-haskell-users
Let me ask a naive question concerning the implementation of threading in
the GHC RTS. Would it be feasible to support an alternative strategy for
mapping Haskell threads onto OS threads, namely that the two sets are kept
in one-to-one correspondence? The thread multiplexing and migration that
Simon Marlow wrote:
Simon Marlow:
[Lazy I/O] 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.
Surely they are
On 26 Nov 2002, Alastair Reid wrote:
ps Better names than 'native' and 'green' surely exist. Something
which conveys the idea that the thread will be remembered for later
use seems appropriate but no good words spring to mind.
Perhaps bound and free?
On 26 Nov 2002, Alastair Reid wrote:
Umm, Alastair, I think you've got things a bit mixed up here. Did
you mean two ways to create a native thread?
No.
There are currently three ways to create a Haskell thread (forkIO,
foreign export, finalizers) and Wolfgang has proposed a fourth
I have a program that dies, saying simply Killed. How can I tell what
that means? I presume the program is suffering a ThreadKilled exception,
and I guess it may be due to stack or heap overflow. (The program is
processing a 50MB file.) Profiling, even with -xc, yields no information.
Dean
On 29 Nov 2002, Alastair Reid wrote:
Consider Haskell functions a,b,c,d and C functions A,B,C,D and a call
pattern
a - A - b - B - c - C - d - D
That is, a calls A, calls b, calls B, calls ...
Suppose we want A,B,C,D executed by the same foreign thread.
Each of a,b,c,d are
George Russell wrote:
This isn't a bug, just a suggestion. It's not even a very important
suggestion, but one that might be worth implementing if it's easy and you can
find the the time. Or perhaps I am just doing things the wrong way?
The point is that I sometimes have something like the
According to the Haddock documentation for Control.Monad at
http://www.haskell.org/ghc/, `IO` is an instance of `MonadPlus`.
1. Where in documentation is this instance described?
2. Where in source code is this instance implemented?
3. Could links to the answers to 1 and 2 be added to the Haddock
Ketil Z. Malde wrote:
Simon Marlow [EMAIL PROTECTED] writes:
-- | add data from a file to the histogram
addFile :: FiniteMap String Int - String - IO (FiniteMap
String Int)
addFile fm name = do
x - readFile name
return (addHist fm x)
-- |
Simon Peyton-Jones wrote:
Interesting example!
| Coincidentally, I tripped over this subtlety myself just last night.
(I,
| too, often use '$' to avoid nested parentheses.) I concluded it was
an
| instance of the partial-application restriction that I found
described in
| section 7.11.4
:
Dean Herington [EMAIL PROTECTED] writes:
Ketil Z. Malde wrote:
-- | add data from a file to the histogram
addFile :: FiniteMap String Int - String - IO (FiniteMap String Int)
addFile fm name = do
x - readFile name
return (addHist fm x)
I changed this to read x
to wait4(), but I'm over my head
here.
Thanks in advance.
Dean
- Original Message -
From: Dean Herington [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 16:17
Subject: child process statistics
Does anyone know how to get the process statistics
Can GHC be invoked somehow via the #! mechanism? Put another way, is
there a GHC analogue to runhugs?
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
1 - 100 of 155 matches
Mail list logo