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
It looks like the optimizer is getting confused when the value being
evaluated is an IO action (nota bene: 'evaluate m' where m :: IO a
is pretty odd, as far as things go). File a bug?
Cheers,
Edward
Excerpts from Albert Y. C. Lai's message of Thu Nov 08 10:04:15 -0800 2012:
On 12-11-08 01:01
Hello Simon,
I think the confusion here is focused on what exactly it is that
the NFData class offers:
class NFData a where
rnf :: a - ()
rnf can be thought of a function which produces a thunk (for unit)
which, when forced, fully evaluates the function. With this in hand,
it's pretty
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
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
Hello Jonas,
Like other top-level definitions, these instances are considered CAFs
(constant applicative forms), so these instances will in fact usually
be evaluated only once per type X.
import System.IO.Unsafe
class C a where
dflt :: a
instance C Int where
dflt =
differently?
Regards,
Jonas
On 29 June 2012 15:55, Edward Z. Yang ezy...@mit.edu wrote:
Hello Jonas,
Like other top-level definitions, these instances are considered CAFs
(constant applicative forms), so these instances will in fact usually
be evaluated only once per type X.
import
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,
Excerpts from Bas van Dijk's message of Thu May 03 11:10:38 -0400 2012:
As can be seen, the putMVar is executed successfully. So why do I get
the message: thread blocked indefinitely in an MVar operation?
GHC will send BlockedIndefinitelyOnMVar to all threads involved
in the deadlock, so it's
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
So, it would be pretty interesting if we could have an ST s style
mechanism, where the data structure is not allowed to escape.
But I wonder if this would be too cumbersome for anyone to use.
Edward
Excerpts from Simon Marlow's message of Fri Apr 20 06:07:20 -0400 2012:
On 19/04/2012 11:45,
Excerpts from Brandon Allbery's message of Fri Apr 20 19:31:54 -0400 2012:
So, it would be pretty interesting if we could have an ST s style
mechanism, where the data structure is not allowed to escape.
But I wonder if this would be too cumbersome for anyone to use.
Isn't this what
Hello all,
I recently ran into a rather reproduceable bug where I would
get this error from the event manager:
/dev/null: hClose: user error (Pattern match failure in do expression at
libraries/base/System/Event/Thread.hs:83:3-10)
The program was doing some rather strange things:
- It
Check out compiler/basicTypes/Demand.lhs
Cheers,
Edward
Excerpts from Johan Tibell's message of Wed Mar 07 18:21:56 -0500 2012:
Hi,
If someone could clearly specify the exact interpretation of these
LLSL(ULL) strictness/demand annotations shown by ghc --show-iface I'd
like to try to write
This is the important bit of code in the file:
instance Outputable Demand where
ppr Top = char 'T'
ppr Abs = char 'A'
ppr Bot = char 'B'
ppr (Defer ds) = char 'D' ppr ds
ppr (Eval ds) = char 'U' ppr ds
ppr (Box (Eval ds)) =
Arguably, what should happen is we redo the format for machine-parseability
and use that in future versions of GHC.
Edward
Excerpts from Johan Tibell's message of Wed Mar 07 23:38:06 -0500 2012:
Thanks Edward. I'll try to summarize this in human readable form and
publish it on the wiki.
--
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!
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
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 Heka Treep's message of Mon Jan 23 13:56:47 -0500 2012:
adding the message queue (with Chan, MVar or STM) for each process will not
help in this kind of imitation.
Why not? Instead of returning a thread ID, send the write end of a Chan
which the thread is waiting on. You can send
Excerpts from Heka Treep's message of Mon Jan 23 15:11:51 -0500 2012:
import Control.Monad.STM
import Control.Concurrent
import Control.Concurrent.STM.TChan
spawn f = do
mbox - newTChanIO
forkIO $ f mbox
Excerpts from Heka Treep's message of Mon Jan 23 16:20:51 -0500 2012:
actor :: TChan String - IO ()
actor mbox = forever $ do
putStrLn call to actor...
msg - atomically $ do
isEmpty - isEmptyTChan mbox
if isEmpty then return Nothing else readTChan mbox = return . Just
when
Excerpts from Edward Z. Yang's message of Fri Jan 20 23:44:02 -0500 2012:
If multiple assignment is rare enough in straight line code, I might
be able to take the conservative approach and just say
a - used multiple times
Which I don't think will cause any problems in the inlining step
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
Hello Sanket,
What happens if you run this experiment with 5 threads in the C function,
and have GHC run RTS with -N7? (e.g. five C threads + seven GHC threads = 12
threads on your 12-core box.)
Edward
Excerpts from Sanket Agrawal's message of Tue Jan 17 23:31:38 -0500 2012:
I posted this
Hello all,
I was wondering if the following style of register assignment ever
shows up in C-- code generated by GHC:
a = R1
I32[a] = 1
a = R2
I32[a] = 2
That is to say, there are two disjoint live ranges of a: we could rename
all instances of a in the first and second lines to
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
Hmm, this kind of sounds like GHC is assuming that it has control over
all of the threads, and when this assumption fails bad things happen.
(We use lightweight threads, and use the operating system threads that
map to pthreads sparingly.) I'm sure Simon Marlow could give a more accurate
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
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
Excerpts from Greg Weber's message of Sun Oct 09 12:39:03 -0400 2011:
So first of all I am wondering if a sum type comparison does in fact scale
linearly or if there are optimizations in place to make the lookup constant
or logarithmic. Second, I as wondering (for the routing case) if Haskell
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
I think it would be a pretty interesting project. :^)
Edward
Excerpts from Ryan Newton's message of Wed Aug 24 15:18:48 -0400 2011:
Ah, and there's no core-haskell facility presently? Thanks.
On Wed, Aug 24, 2011 at 12:14 AM, Edward Z. Yang ezy...@mit.edu wrote:
Since most of GHC's
at 8:48 AM, Edward Z. Yang ezy...@mit.edu wrote:
I think this ticket sums it up very nicely!
Cheers,
Edward
Excerpts from Max Bolingbroke's message of Mon Aug 22 04:07:59 -0400 2011:
On 21 August 2011 19:20, Edward Z. Yang ezy...@mit.edu wrote:
And no sooner do I send this email
I think this ticket sums it up very nicely!
Cheers,
Edward
Excerpts from Max Bolingbroke's message of Mon Aug 22 04:07:59 -0400 2011:
On 21 August 2011 19:20, Edward Z. Yang ezy...@mit.edu wrote:
And no sooner do I send this email do I realize we have 'inline' built-in,
so I can probably
And no sooner do I send this email do I realize we have 'inline' built-in,
so I can probably experiment with this right now...
Edward
Excerpts from Edward Z. Yang's message of Sun Aug 21 14:18:23 -0400 2011:
Hello all,
It occurred to me that it might not be too difficult to use GHC's
stg_newArrayzh in rts/PrimOps.cmm doesn't appear to give any indication,
so this might be a good patch to add. But I'm curious: what would
allocating Array#s of size 0 do? Null pointers? That sounds dangerous...
Edward
Excerpts from Johan Tibell's message of Fri Aug 19 11:04:48 -0400 2011:
Hi,
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
Excerpts from Victor Nazarov's message of Tue Aug 02 19:12:55 -0400 2011:
I can parse arguments myself
and throw the rest of them to parseDynamicFlags, but GHC's flags are
really complicated and I'm not aware
of any argument parsing library that can be used to filter out some
specified flags
This is supposed to get defined as a command line argument to the preprocessor,
see compiler/main/DriverPipeline.hs. Are you saying you don't see it when you
run hsc2hs? Maybe someone else is calling a preprocessor but missing some of
these arguments...
Edward
PM, Edward Z. Yang ezy...@mit.edu wrote:
This is supposed to get defined as a command line argument to the
preprocessor,
see compiler/main/DriverPipeline.hs. Are you saying you don't see it when
you
run hsc2hs? Maybe someone else is calling a preprocessor but missing some
Hello Brandon,
The answer is subtle, and has to do with what references are kept in code,
which make an object considered reachable. Essentially, the main thread
itself keeps the MVar live while it still has forking to do, so that
it cannot get garbage collected and trigger these errors.
Here
Excerpts from Felipe Almeida Lessa's message of Sun Jul 24 22:02:36 -0400 2011:
Does anything change if you somehow force a GC sometime after good2?
Perhaps with some calculation generating garbage, perhaps with
performGC. IIRC, the runtime detects BlockedIndefinitelyOnMVar on GC.
But I'm
Not currently, but I am planning on adding this functionality in the near
future.
Excerpts from Tim Docker's message of Wed Jul 20 13:44:41 -0400 2011:
The +RTS -s runtime arguments give some useful details the memory
usage of a program on exit. eg:
102,536 bytes allocated in the
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
Hello Justin,
If you grep Hoopl's source code for wrapFR and wrapBR, you can find
uses of the methods. For example:
thenFwdRw :: forall m n f. Monad m
= FwdRewrite m n f
- FwdRewrite m n f
- FwdRewrite m n f
-- @ end comb1.tex
thenFwdRw
Yay! This is very exciting :-)
Edward
Excerpts from Simon Peyton-Jones's message of Wed Jun 22 12:57:28 -0400 2011:
Friends
I have long advertised a plan to allow so-called superclass equalities. I've
just pushed patches to implement them. So now you can write
class (F a ~ b) = C a
All of the GHC repos are mirrored to Github, which offers similar
facilities. Of course, it wouldn't be too much work to setup
gitweb on darcs.haskell.org, I don't think.
Edward
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
In case it wasn't clear, I'd very much be in favor of implementing
this refinement.
Cheers,
Edward
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
I ran into some more code like this, and I realized there was something
pretty important: the majority of let-bindings do not have any free varaibles.
They could very well be floated to the top level without having to make any
source level changes.
So maybe let should be generalized, if no free
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
To chime in, latest validate for me on x86-32 had two fails:
OVERALL SUMMARY for test run started at Sun May 15 16:16:28 BST 2011
2773 total tests, which gave rise to
10058 test cases, of which
0 caused framework failures
7598 were skipped
2377 expected passes
81
:46:01 -0500 2011:
On 21/02/2011 01:08, Edward Z. Yang wrote:
Excerpts from Tyson Whitehead's message of Sun Feb 20 07:14:56 -0500 2011:
I believe a back trace on the actual call stack is generally considered not
that useful in a lazy language as it corresponds to the evaluation
sequence
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
Excerpts from Denys Rtveliashvili's message of Thu Apr 28 04:41:48 -0400 2011:
Well.. I found some places in C-- compiler which are supposed to convert
division and multiplication by 2^n into shifts. And I believe these work
sometimes.
However in this case I am a bit puzzled because even if
No, you have to use the 'interruptible' keyword.
Cheers,
Edward
Excerpts from Bas van Dijk's message of Sat Apr 23 20:07:05 -0400 2011:
Hello,
Quick question: are safe/unsafe FFI calls interruptible?
Thanks,
Bas
___
Glasgow-haskell-users
Excerpts from Bas van Dijk's message of Sun Apr 24 12:23:19 -0400 2011:
On 24 April 2011 10:26, Edward Z. Yang ezy...@mit.edu wrote:
No, you have to use the 'interruptible' keyword.
Good, I need them to be uninterruptible. So I guess I can apply
uninterruptibleMask_ only to the 'acquire lock
Excerpts from Bas van Dijk's message of Sun Apr 24 16:10:46 -0400 2011:
Well the whole block of code is under a mask_ so if FFI calls are not
interruptible the queued up exceptions should not be fired.
Ah, I didn't know that. I think it would be extremely surprising
for users if FFI calls ever
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
101 - 200 of 364 matches
Mail list logo