This is completely irrelevant, but the .chs extension is
already taken by the c2hs tool.
Cheers,
Edward
Excerpts from Niklas Hambüchen's message of Tue Sep 10 00:30:41 -0700 2013:
Impressed by the productivity of my Ruby-writing friends, I have
recently come across Cucumber: http://cukes.info
Hi Dear Haskellers,
I have this small program to grep recursively in parallel. It works fine,
but generates the last line empty. Is this empty line coming from
mapConcurrently()?
Thanks,
Hong
-- mygrepr.hs
-- lrf.pl is an old Perl script to get all non-duplicate files recursively
under the
Hello Ömer,
First off, welcome to the wonderful world of GHC development! I
recommend that you subscribe to the ghc-devs mailing list and
direct GHC specific questions there:
http://www.haskell.org/mailman/listinfo/ghc-devs
While doing this, I think one feature would greatly help me
I am pleased to announce that Issue 22 of the Monad Reader is now available.
http://themonadreader.files.wordpress.com/2013/08/issue22.pdf
Issue 22 consists of the following two articles:
* Generalized Algebraic Data Types in Haskell by Anton Dergunov
* Error Reporting Parsers: a Monad
shiftL has the wrong type: Bits a = a - Int - a
so it is expecting the value in the IORef to be an Int.
Edward
Excerpts from Joerg Fritsch's message of Thu Jul 18 10:08:22 -0700 2013:
All, what is wrong w the below code?
I get an type error related to the operation shiftL
import
In my opinion, when you are rebinding a variable with the same name,
there is usually another way to structure your code which eliminates
the variable.
If you would like to write:
let x = foo input in
let x = bar x in
let x = baz x in
instead, write
baz . bar . foo $ input
If
The notion of equivalence you are talking about (normally L is referred
to as a context) is 'extensional equality'; that is, functions f
and g are equal if forall x, f x = g x. It's pretty easy to give
a pair of functions which are not alpha equivalent but are observationally
equivalent:
if
Excerpts from Timon Gehr's message of Thu May 02 14:16:45 -0700 2013:
Those are not lambda terms.
Furthermore, if those terms are rewritten to operate on church numerals,
they have the same unique normal form, namely λλλ 3 2 (3 2 1).
The trick is to define the second one as x * 2 (and assume
I had similar work situation before. What I did was: install a CentOS
virtual machine on Windows at home (CentOS version should be compatible to
your RHEL5 version, and do not update it), then play with Haskell within
CentOS. Your executables will be runnable on RHEL5.
On Sat, Apr 27, 2013 at
Z. Yang ezy...@mit.edu wrote:
I've got a solution for this problem and it will form the basis of
Repa 4, which I'm hoping to finish a paper about for the upcoming
Haskell Symposium.
Sounds great! You should forward me a preprint when you have something
in presentable shape. I suppose
Note that, unfortunately, GHC's exhaustiveness checker is *not* good
enough to figure out that your predicates are covering. :o) Perhaps
there is an improvement to be had here.
Edward
Excerpts from Albert Y. C. Lai's message of Mon Apr 22 00:51:46 -0700 2013:
When I was writing
Hello all, (cc'd stream fusion paper authors)
I noticed that the current implementation of stream fusion does
not support multiple-return stream combinators, e.g.
break :: (a - Bool) - [a] - ([a], [a]). I thought a little
bit about how might one go about implement this, but the problem
seems
I've got a solution for this problem and it will form the basis of
Repa 4, which I'm hoping to finish a paper about for the upcoming
Haskell Symposium.
Sounds great! You should forward me a preprint when you have something
in presentable shape. I suppose before then, I should look at
I now have a paper draft describing the system in more detail. It also
comes with a brief explanation of how GHC's profiling works, which should
also be helpful for people who haven't read the original profiling
paper.
http://ezyang.com/papers/ezyang13-rlimits.pdf
Edward
Excerpts from
Call for Copy: The Monad.Reader - Issue 22
Another ICFP submission deadline has come and gone: why not celebrate by
submitting something to The Monad.Reader? Whether you're an established
academic or have only just started learning Haskell, if you
While block and unblock have been removed from base, they are still
implementable
in modern GHC. So another possible future is to deprecate MonadCatchIO
(which should have been done a while ago, honestly!), but manually redefine
the functions so that old code keeps working.
Edward
Excerpts
If you are doing IO operations, then the operation is hardly atomic, is it?
Just take from the MVar, compute, and when you're done, put a value
back on the MVar. So long as you can guarantee all users of the MVar
take before putting, you will have the desired semantics.
Something worth
I am pleased to announce that Issue 21 of the Monad Reader is now available.
http://themonadreader.files.wordpress.com/2013/03/issue21.pdf
Issue 21 consists of the following two articles:
* A Functional Approach to Neural Networks by Amy de Buitléir, Michael
Russell, Mark Daly
*
Hey folks,
Have you ever wanted to implement this function in Haskell?
-- | Forks a thread, but kills it if it has more than 'limit'
-- bytes resident on the heap.
forkIOWithSpaceLimit :: IO () - {- limit -} Int - IO ThreadId
Well, now you can! I have a proposal and set of patches
coverage at the moment is that there may be some primops that infinite
loop, and there are probably other bugs, but I do not believe they are
insurmountable.
Edward
Excerpts from Gwern Branwen's message of Fri Mar 15 14:39:50 -0700 2013:
On Fri, Mar 15, 2013 at 5:17 PM, Edward Z. Yang ezy
I also support this suggestion. Although, do we have the build infrastructure
for this?!
Edward
Excerpts from Michael Orlitzky's message of Mon Mar 11 19:52:12 -0700 2013:
On 03/11/2013 11:48 AM, Brent Yorgey wrote:
So I'd like to do it again this time around, and am looking for
Excerpts from Tom Ellis's message of Sat Mar 09 00:34:41 -0800 2013:
I've never looked at evaluate before but I've just found it's haddock and
given it some thought.
http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Exception-Base.html#v:evaluate
Since it is
Are these equivalent? If not, under what circumstances are they not
equivalent? When should you use each?
evaluate a return b
a `seq` return b
return (a `seq` b)
Furthermore, consider:
- Does the answer change when a = b? In such a case, is 'return $! b'
permissible?
-
https://status.heroku.com/incidents/489
Unsigned Hackage packages are a ticking time bomb.
Cheers,
Edward
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
As long as we upload packages via plain HTTP, signing won't help though.
I don't think that's true? If the package is tampered with, then the
signature will be invalid; if the signature is also forged, then the
private key is compromised and we can blacklist it. We care only
about integrity,
Excerpts from Joachim Breitner's message of Wed Jan 30 12:59:48 -0800 2013:
another reason why Cabal is no package manager¹.
Based on the linked post, it seems that you are arguing that cabal-install is
not a package manager, and thus it is not necessary for it to duplicate
the work that real
Excerpts from Ramana Kumar's message of Wed Jan 30 14:46:26 -0800 2013:
This argument seems specious. Whether or not cabal-install is or not
intended to be a package manager, users expect it to act like one (as
users expect rubygems to be a package manager), and, at the end of the
day,
Excerpts from Joachim Breitner's message of Wed Jan 30 14:57:28 -0800 2013:
I’m not against cryptographically signed packages on hackage. In fact, I
would whole-heatedly appreciate it, as it would make my work as a
package maintainer easier.
I was taking the opportunity to point out an
There are two senses in which deepseq can be overkill:
1. The structure was already strict, and deepseq just forces another
no-op traversal of the entire structure. This hypothetically affects
seq too, although seq is quite cheap so it's not a problem.
2. deepseq evaluates too much, when it was
Second Call for Copy: The Monad.Reader - Issue 21
-
Whether you're an established academic or have only just started
learning Haskell, if you have something to say, please consider
writing an article for The Monad.Reader! The submission deadline
The monoid instance is necessary to ensure adherence to the monad laws.
Cheers,
Edward
Excerpts from Petr P's message of Sat Dec 08 10:59:25 -0800 2012:
The class is defined as
class (Monoid w, Monad m) = MonadWriter w m | m - w where
...
What is the reason for the Monoid constrait?
Excerpts from Roman Cheplyaka's message of Sat Dec 08 14:00:52 -0800 2012:
* Edward Z. Yang ezy...@mit.edu [2012-12-08 11:19:01-0800]
The monoid instance is necessary to ensure adherence to the monad laws.
This doesn't make any sense to me. Are you sure you're talking about the
MonadWriter
First of all, I don't see why two tells should be equivalent to one
tell. Imagine a MonadWriter that additionally records the number of
times 'tell' has been called. (You might argue that your last equation
should be a MonadWriter class law, but that's a different story — we're
talking about
Excerpts from Holger Siegel's message of Sat Dec 08 15:27:38 -0800 2012:
For deriving a monoid instance of w from monad (Writer w), you will need
function execWriter:: Writer w a - w, but in case of a general instance of
(MonadWriter w m) you would have to use function listen :: m a - m (a, w)
Hello Janek,
What happens if you do the benchmark without unsafePerformIO involved?
Edward
Excerpts from Janek S.'s message of Fri Nov 23 10:44:15 -0500 2012:
I am using Criterion library to benchmark C code called via FFI bindings and
I've ran into a
problem that looks like a bug.
The
Running the sample code on GHC 7.4.2, I don't see the one
fast, rest slow behavior. What version of GHC are you running?
Edward
Excerpts from Janek S.'s message of Fri Nov 23 13:42:03 -0500 2012:
What happens if you do the benchmark without unsafePerformIO involved?
I removed
Call for Copy: The Monad.Reader - Issue 21
Whether you're an established academic or have only just started
learning Haskell, if you have something to say, please consider
writing an article for The Monad.Reader! The submission deadline
for Issue 21
Haskell already does this, to some extent, in the design of imprecise
exceptions. But note that bottom *does* have well defined behavior, so
these optimizations are not very desirable.
Edward
Excerpts from David Feuer's message of Thu Sep 06 19:35:43 -0400 2012:
I have no plans to do such a
Excerpts from David Feuer's message of Fri Sep 07 12:06:00 -0400 2012:
They're not *usually* desirable, but when the code has been proven not to
fall into bottom, there doesn't seem to be much point in ensuring that
things will work right if it does. This sort of thing only really makes
sense
Ah, egg in my face, I appear to have misremembered how ListT is implemented ^_^
http://www.haskell.org/haskellwiki/ListT_done_right may be relevant.
Edward
Excerpts from Edward Z. Yang's message of Sat Aug 25 01:51:40 -0400 2012:
Hello Henry,
In such cases, it is often worth thinking about
*It’s not dead, it’s resting!*
I am pleased to announce that Issue 20 of the Monad Reader is now available.
http://themonadreader.files.wordpress.com/2012/08/issue20.pdf
Issue 20 consists of the following three articles:
- Enumeration of Tuples with Hyperplanes by Tillmann Vogt
-
Hello Henry,
In such cases, it is often worth thinking about how you would implement
such a scheme manually, without using pre-existing monads. You will
quickly see that the two candidate types:
s - ([a], s)
[s - (a, s)]
both will not work (exercise: what semantics do they give?) In
I find both heavy and redundant. The first forces me to specify if I want
an argument of not (with the constructors MR and NR)
I'm sorry, I don't understand what you mean here.
Do you know of a construction/abstraction that allows having or not an
argument (a variable number of arguments,
If you mean, per 'ST s a', no: you can generate as many
STRefs as you want.
Edward
Excerpts from KC's message of Mon Apr 23 14:32:57 -0400 2012:
Is it only one data structure per ST monad?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Call for Copy: The Monad.Reader - Issue 20 - DEADLINE EXTENSION
---
Whether you're an established academic or have only just started learning
Haskell, if you have something to say, please consider writing an article for
The Monad.Reader!
Second Call for Copy: The Monad.Reader - Issue 20
-
Whether you're an established academic or have only just started
learning Haskell, if you have something to say, please consider
writing an article for The Monad.Reader! The submission deadline
Excerpts from Mikhail Vorozhtsov's message of Sun Jan 29 05:34:17 -0500 2012:
You are trying to make bottoms a new null pointers. Sometimes it just
doesn't worth the effort (or depends on the interpreter you use). I want
to have the option to say: sorry, in this particular case (monad) I
There are some terms for these cases, but they are a bit ad hoc.
length is what we might call spine-strict; head is head-strict.
Projection analysis takes the approach that we can more precisely
characterize the strictness only by considering both what is passed
to the function as input, as well
Excerpts from Mikhail Vorozhtsov's message of Tue Jan 24 07:26:35 -0500 2012:
Sure, but note that evaluate for IO is implemented with seq# under the hood,
so as long as you actually get ordering in your monad it's fairly
straightforward
to implement evaluate. (Remember that the ability
Excerpts from Mikhail Vorozhtsov's message of Sat Jan 21 09:25:07 -0500 2012:
But I also believe that you can't use this as justification to stick your
head in the sand, and pretend bottoms don't exist (regardless of whether or
not we'rd talking about asynchronous exceptions.) The reason is
Oleg has described a grody hack which achieves this effect.
http://okmij.org/ftp/Haskell/types.html#partial-sigs
I agree more first class support for this would be nice.
Edward
Excerpts from Nicholas Tung's message of Thu Jan 19 15:37:28 -0500 2012:
Dear all,
I wanted to voice
Hello Gregory,
The original (1998!) conversation can be found here:
http://www.mail-archive.com/haskell@haskell.org/msg03002.html
I think Simon Peyton-Jones' example really sums up the whole issue:
But [MonadZero] really sticks in my craw. How can we explain this:
f ::
Oh, I'm sorry! On a closer reading of your message, you're asking not
only asking why 'fail' was added to Monad, but why unfailable patterns
were removed.
Well, from the message linked:
In Haskell 1.4 g would not be in MonadZero because (a,b) is unfailable
(it can't fail to match). But
Aw, that is really suboptimal. Have you filed a bug?
Edward
Excerpts from Michael Snoyman's message of Thu Jan 19 23:29:59 -0500 2012:
On Fri, Jan 20, 2012 at 5:23 AM, Edward Z. Yang ezy...@mit.edu wrote:
Oh, I'm sorry! On a closer reading of your message, you're asking not
only asking why
:41 AM, Edward Z. Yang ezy...@mit.edu wrote:
Aw, that is really suboptimal. Have you filed a bug?
I think it's a feature, not a bug. When dealing with monads that
provide nice[1] implementations of `fail`, you can (ab)use this to
avoid writing a bunch of case expressions. I remember reading
Hello folks,
I was curious whether or not it is possible to lift an arbitrary
IO (IO a) - IO a function to MonadBaseControl IO m = m (m a) - m a.
That is, implement a function:
liftJoin :: MonadBaseControl mb m = (mb (mb (StM m a)) - mb (StM m a)) - m
(m a) - m a
The difficulty seems to be
Excerpts from Mikhail Vorozhtsov's message of Wed Jan 18 08:47:37 -0500 2012:
Well, that's the kind of language we live in. The denotation of our
language
always permits for bottom values, and it's not a terribly far jump from
there
to undefined and error foo. I don't consider the
I'd like to remind everyone that Hac Boston, a Haskell hackathon is being held
January 20-22, 2012 at MIT (rooms 4-159 and 4-261) in Cambridge, MA.
The hackathon will officially kick off at 2:30 Friday afternoon, and go
until 5pm on Sunday with the occasional break for sleep.
Everyone is welcome
Hello Mikhail,
Thanks for continuing to be willing to participate in a lively discussion. :-)
Excerpts from Mikhail Vorozhtsov's message of Mon Jan 16 08:17:57 -0500 2012:
On 01/16/2012 02:15 PM, Edward Z. Yang wrote:
Anders and I thought a little more about your example, and we first wanted
Hello Mikhail,
Sorry, long email. tl;dr I think it makes more sense for throw/catch/mask to
be bundled together, and it is the case that splitting these up doesn't address
the original issue monad-control was designed to solve.
~ * ~
Anders and I thought a
Excerpts from Mikhail Vorozhtsov's message of Tue Jan 10 09:54:38 -0500 2012:
On 01/10/2012 12:17 AM, Edward Z. Yang wrote:
Hello Mikhail,
Hi.
(Apologies for reviving a two month old thread). Have you put some thought
into
whether or not these extra classes generalize in a way
Hello Mikhail,
(Apologies for reviving a two month old thread). Have you put some thought into
whether or not these extra classes generalize in a way that is not /quite/ as
general as MonadBaseControl (so as to give you the power you need) but still
allow you to implement the functionality you
I'm pleased to announce that I, Edward Z. Yang, will be taking
over Brent Yorgey's role as lead editor of the Monad Reader!
Call for Copy: The Monad.Reader - Issue 20
Whether you're an established academic or have only just started
learning Haskell
Here's an alternative perspective to consider: consider some
data structure, such as a queue. There are two ways you can
implement this, one the imperative way, with mutators, and the
other the purely functional way, with no destructive updates.
The question then, I ask, is how easy does a
1. a function f is strict if f ⊥ = ⊥
2. ⊥ represents any computation which does not terminate, i.e. an
exception or an infinite loop
3. strict describes the denotational semantics
People, could you please make up your mind already? It has been more
than 13 years.
I have to admit, I'm a
When I attempt to build on Ubuntu, I get:
ezyang@javelin:~$ cabal install hxournal
Resolving dependencies...
Configuring hxournal-0.5.0.0...
Preprocessing library hxournal-0.5.0.0...
In file included from /usr/include/gtk-2.0/gdk/gdkscreen.h:32:0,
from
Very fancy! I am a big fan of Xournal, so I will have to take this for a spin.
Edward
Excerpts from Ian-Woo Kim's message of Mon Dec 12 06:56:09 -0500 2011:
Hi, everyone,
I am very pleased to announce a pen notetaking program: hxournal,
which is written entirely in haskell using gtk2hs.
I'd hazard that if you went 'containers' and looked at what instances were
implemented, that would give you a good idea. :^) (For example,
if you look at Data.MAp, it has NFData, Typeable2 and Data instances.)
Edward
Excerpts from Christoph Breitkopf's message of Thu Dec 08 11:12:06 -0500 2011:
libgmp and libffi are external libraries not associated with
Haskell, so I don't think -static (which is for Haskell libraries)
applies to them. You'll have the same problem with any other
sort of library of this type, like libdl and friends ;-)
Edward
Excerpts from Jason Dusek's message of Sat
It seems like you would, going by semantics of System F, where types
with type variables name a certain subset of types, = constraints
further restrict the types of the same shape (are they an
independent kind of restriction?), so typeclass declarations
with/without = specify a partial order over
Ketil,
For your particular problem, unevaluated thunks should be easy
to check: dump a heap profile and look for a decreasing allocation
of thunks.
That being said, IntMap is spine strict, so that will all be evaluated,
and if your threads are accessing disjoint keys there should be no
Just making sure: have you looked at the Data.Data module yet?
Edward
Excerpts from Karel Gardas's message of Tue Oct 04 12:02:34 -0400 2011:
Hello,
I'm trying to find out if it's possible to use Haskell data type
definition capability to define types and compile defined types into
What are you actually trying to do? This seems like a rather
unusual function.
Edward
Excerpts from sdiyazg's message of Sun Oct 02 15:17:07 -0400 2011:
Finally I got what I meant:
class ExpandTuple t where
type Result t
expand :: t-Result t
instance (Integral a)=ExpandTuple
Hello Wishnu,
That is slightly odd. What CPU and operating system are you running on?
Include Kernel versions if Linux.
Cheers,
Edward
Excerpts from Wishnu Prasetya's message of Sun Aug 14 14:11:36 -0400 2011:
Hi guys,
I'm new in parallel programming with Haskell. I made a simple test
Ah, good catch. :-)
Edward
Excerpts from Iustin Pop's message of Sun Aug 14 14:25:02 -0400 2011:
On Sun, Aug 14, 2011 at 08:11:36PM +0200, Wishnu Prasetya wrote:
Hi guys,
I'm new in parallel programming with Haskell. I made a simple test
program using that par combinator etc, and was a
Hello all,
I was recently reading Asynchronous Exceptions as an Effect by Harrison,
Allwein, Gill and Procter, and noticed at the end that they found an error
in the operational semantics described in Asynchronous Exceptions in Haskell
by the Simons and Andrew Moran. Does anyone know what this
Sounds like something that could use a GHC Trac feature request.
Edward
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
The documentation seems to indicate that the behaviour should be blocking,
so if it's not, might be a bug.
withResource :: MonadCatchIO m = Pool a - (a - m b) - m b
Temporarily take a resource from a Pool, perform an action with it, and
return it to the pool afterwards.
* If the
-Pool.html
.
My original intention of splitting pool off from persistent was so
others could use it. If Bryan's maintaining resource-pool instead, I'd
have no problem deprecating pool and using resource-pool in its place.
Michael
On Sun, Jun 12, 2011 at 12:06 PM, Edward Z. Yang ezy
Yes, the tree was broken for some time between yesterday and today, and you
appear to have gotten unlikely. It should have been fixed now, so you should
try again.
Cheers,
Edward
Excerpts from Scott Lawrence's message of Sat Jun 11 12:44:18 -0400 2011:
Trying to compile GHC7 from source (as
It appears the build is still broken. Sorry! Please stand by, or roll
back the last set of commits.
Edward
Excerpts from Scott Lawrence's message of Sat Jun 11 12:44:18 -0400 2011:
Trying to compile GHC7 from source (as the ubuntu repository is still on
GHC6), I came across the following error
That sounds like a plausible reason why naive copying explodes space.
Something like string interning would be good here... and since you're
hashing already...
Edward
Excerpts from Daniel Fischer's message of Wed Jun 01 06:46:24 -0400 2011:
On Wednesday 01 June 2011 12:28:28, John Lato wrote:
Hello Aleksandar,
It is possible that the iteratees library is space leaking; I recall some
recent discussion to this effect. Your example seems simple enough that
you might recompile with a version of iteratees that has -auto-all enabled.
Unfortunately, it's not really a safe bet to assume your
I believe this transformation is called the 'full laziness' optimization.
It can introduce space leaks if the computationally expensive test is
replaced with a reference to a space expensive value.
Edward
Excerpts from Yves Parès's message of Tue May 31 15:14:07 -0400 2011:
Hello Café,
An idea
Hello Ken,
Strictly speaking, you only need Rank-2 types. This indeed the right
way to fix the problem.
Cheers,
Edward
Excerpts from Ken Takusagawa II's message of Wed May 04 02:00:49 -0400 2011:
I run into the following type error:
foo :: ST s (STRef s Int) - Int
foo p = (runST (p =
Excerpts from Heinrich Apfelmus's message of Mon Apr 25 04:01:03 -0400 2011:
The thing is that lazy evaluation is referentially transparent while I
don't care about [(1,4),(2,2)] vs [(2,2),(1,4)] is not.
Perhaps more precisely, laziness's memoization properties rely on the
referential
Hello Mike,
I cannot reproduce using GHC HEAD (though it seems to hang on GHC 7.0.3),
so my guess is the bug has been fixed.
cvs-ghc, any guesses which patch this might have been?
Cheers,
Edward
Excerpts from mike frai's message of Sat Apr 30 14:50:17 -0400 2011:
Hi,
While using Michael
Others have answered your real question (I think) adequately, but if I'm
pedantic and answer precisely what you ask:
You can compile GHC with llvm by adding -fllvm to your build.mk file:
GhcHcOpts += -fllvm
Cheers,
Edward
Excerpts from Magicloud Magiclouds's message of Thu Apr 28 21:49:11
Laziness can be viewed as a form of controlled mutation, where
we overwrite a thunk with its actual value, thus only running
the code once and reaping great time benefits.
I've been toying around with some ideas where we do alternative
forms of controlled mutation. One such idea has to do with
Hmm, this is a bit peculiar. The problem is you don't get
control over how gmapQ invokes the function toSql: it will
only ever be done with the type signature Data d = d - u.
There is good reason for this too: imagined you tried to run
gmapQ toSql on a data-type that contained a member that was
Where did 'query' come from?
Edward
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
message of Sun Apr 24 17:41:23 -0400 2011:
Edward Z. Yang ezy...@mit.edu writes:
I've been toying around with some ideas where we do alternative
forms of controlled mutation. One such idea has to do with memoization.
[..]
Hash tables take advantage of this fact by simply chaining together
This is a fairly nontrivial problem. First off, let me tell you
what you do not /actually/ want to happen: you don't want the OS
level thread performing the foreign call to actually be killed;
most C code is not written a way that can gracefully recover from
this, and unless you have explicit
Hello Svante,
I have a few recommendations, places where I'd check:
1. Consult the arguments passed to read() usign GDB (your libc has
debugging symbols) and see if they are obviously wrong. It seems
more plausible that they are something that would be right for
Linux, but not so right
Simon Marlow and I had this conversation not too long ago, and the answer
is no. However, this is definitely something that would be useful for
a lot of people (GHC developers included!)
Cheers,
Edward
Excerpts from Ryan Newton's message of Sun Apr 10 17:30:50 -0400 2011:
Hi cafe,
The
Excerpts from Grigory Sarnitskiy's message of Sat Apr 09 13:26:28 -0400 2011:
I guess that deciding whether two functions are equal in most cases is
algorithmically impossible. However maybe there exists quite a large domain
of decidable cases? If so, how can I employ that in Haskell?
In the
I don't know if there's a way to disable it, but you can wrap all your
spawned threads with an exception handler that catches BlockedIndefinitelyOnMVar
and ignores it. If the thread blocks indefinitely, it's as good as dead,
so there won't be any difference in behavior.
Cheers,
Edward
Excerpts from Jason Dagit's message of Tue Mar 29 00:43:10 -0400 2011:
I was reading up on the documentation for alloca and friends[1], which says,
If any of the allocation functions fails, a value of
Excerpts from Max Bolingbroke's message of Fri Mar 11 05:15:34 -0500 2011:
AFAIK this decision was reversed because SPJ found a simple way to
support them. Indeed, they work fine in 7.0.2 and generate warnings.
Correct. About a week-ish ago I submitted a patch to update the docs.
Cheers,
The trick is to write the rank-2 type in the function that runs
the monad, and leave the typeclasses skolemized.
Here's an example:
-- | Typeclass for monads that write or read to a network. Useful
-- if you define operations that need to work for all such monads.
-- You're expected to put
1 - 100 of 219 matches
Mail list logo