Re: How does GHC's testsuite work?

2017-10-30 Thread Edward Z. Yang
Excerpts from Sébastien Hinderer's message of 2017-10-30 16:39:24 +0100: > Dear Edward, > > Many thanks for your prompt response! > > Edward Z. Yang (2017/10/30 11:25 -0400): > > Actually, it's the reverse of what you said: like OCaml, GHC essentially > > has ~n

Re: How does GHC's testsuite work?

2017-10-30 Thread Edward Z. Yang
Actually, it's the reverse of what you said: like OCaml, GHC essentially has ~no unit tests; it's entirely Haskell programs which we compile (and sometimes run; a lot of tests are for the typechecker only so we don't bother running those.) The .T file is just a way of letting the Python driver

Re: How to get a heap visualization

2017-08-30 Thread Edward Z. Yang
Why not the plain old heap profiler? Edward Excerpts from Yitzchak Gale's message of 2017-08-30 18:34:05 +0300: > I need a simple heap visualization for debugging purposes. > I'm using GHC 8.0.2 to compile a large and complex yesod-based > web app. What's the quickest and easiest way? > >

Re: Profiling plugins

2017-06-11 Thread Edward Z. Yang
Hello M, Unfortunately, if you want detailed profiling, you will have to rebuild GHC with profiling. Note that you can basic heap profile information without rebuilding GHC. Edward Excerpts from M Farkas-Dyck's message of 2017-06-06 12:34:57 -0800: > How is this done? I am working on ConCat >

Re: Accessing the "original" names via GHC API

2017-01-25 Thread Edward Z. Yang
Hi Ranjit, Unfortunately you need more information to do this, since the set of modules which are available for import can vary depending on whether or not packages are hidden or not (not even counting whether or not a module is exposed or not!) The way GHC's pretty printer gives a good name is

Re: [Haskell-community] [Haskell-cafe] technical thoughts on stack

2016-09-15 Thread Edward Z. Yang
Excerpts from Harendra Kumar's message of 2016-09-15 13:02:50 +0530: > While I agree that stack.yaml is a frozen config, we do not necessarily > need a separate config file or a separate format for that. My main point > was a that a new user will have to understand two more languages >

FINAL CALL FOR TALKS (Aug 8 deadline): Haskell Implementors Workshop 2016, Sep 24, Nara

2016-08-01 Thread Edward Z. Yang
Deadline is in a week! Submit your talks! Call for Contributions ACM SIGPLAN Haskell Implementors' Workshop http://haskell.org/haskellwiki/HaskellImplementorsWorkshop/2016 Nara, Japan, 24 September, 2016 Co-located

Call for talks: Haskell Implementors Workshop 2016, Sep 24 (FIXED), Nara

2016-06-09 Thread Edward Z. Yang
Stegeman (ghcjs) * Niki Vazou (UCSD) * Stephanie Weirich (University of Pennsylvania) * Edward Z. Yang - chair (Stanford University) ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http

Call for talks: Haskell Implementors Workshop 2016, Aug 24, Nara

2016-06-09 Thread Edward Z. Yang
) * Stephanie Weirich (University of Pennsylvania) * Edward Z. Yang - chair (Stanford University) ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users

Re: idea: tool to suggest adding imports

2016-03-18 Thread Edward Z. Yang
Hello John, In my opinion, the big question is whether or not your Emacs extension should know how to build your Haskell project. Without this knowledge, (1) and (3) are non-starters, since you have to pass the right set of -package flags to GHC to get the process started. If you do assume you

Re: Discovery of source dependencies without --make

2015-12-13 Thread Edward Z. Yang
I missed context, but if you just want the topological graph, depanal will give you a module graph which you can then topsort with topSortModuleGraph (all in GhcMake). Then you can do what you want with the result. You will obviously need accurate targets but frontend plugins and guessTarget

Re: type error formatting

2015-10-23 Thread Edward Z. Yang
I think this is quite a reasonable suggestion. Edward Excerpts from Evan Laforge's message of 2015-10-23 19:48:07 -0700: > Here's a typical simple type error from GHC: > > Derive/Call/India/Pakhawaj.hs:142:62: > Couldn't match type ‘Text’ with ‘(a1, Syllable)’ > Expected type: [([(a1,

Re: [Haskell-cafe] The evil GADTs extension in ghci 7.8.4 (maybe in other versions too?)

2015-06-04 Thread Edward Z. Yang
it be better to decouple GADT and MonoLocalBinds? 2015년 06월 04일 20:31에 Edward Z. Yang 이(가) 쓴 글: This is because -XGADTs implies -XMonoLocalBinds. Edward Excerpts from Ki Yung Ahn's message of 2015-06-04 20:29:50 -0700: \y - let x = (\z - y) in x x is a perfectly fine there whose

Re: [Haskell-cafe] The evil GADTs extension in ghci 7.8.4 (maybe in other versions too?)

2015-06-04 Thread Edward Z. Yang
This is because -XGADTs implies -XMonoLocalBinds. Edward Excerpts from Ki Yung Ahn's message of 2015-06-04 20:29:50 -0700: \y - let x = (\z - y) in x x is a perfectly fine there whose type is a - a. (1) With no options, ghci infers its type correctly. (2) However, with -XGADTs, type check

Re: SRC_HC_OPTS in perf build

2015-05-26 Thread Edward Z. Yang
Sounds like an oversight to me! Submit a fix? Excerpts from Jeremy's message of 2015-05-25 06:44:10 -0700: build.mk.sample contains the lines: # perf matches the default settings, repeated here for comparison: SRC_HC_OPTS = -O -H64m However, in config.mk.in this is: SRC_HC_OPTS +=

Re: runghc and GhcWithInterpreter

2015-04-06 Thread Edward Z. Yang
No, it's not supposed to work, since runghc interprets GHC code. runghc itself is just a little shell script which calls GHC proper with the -f flag, so I suppose the build system was just not set up to not create this link in that case. Edward Excerpts from Jeremy's message of 2015-04-06

Re: Binary bloat in 7.10

2015-04-01 Thread Edward Z. Yang
Yes, this does seem like a potential culprit, although we did do some measurements and I didn't think it was too bad. Maybe we were wrong! Edward Excerpts from Jeremy's message of 2015-04-01 07:26:55 -0700: Carter Schonwald wrote How much of this might be attributable to longer linker symbol

Re: Found hole

2015-01-20 Thread Edward Z. Yang
Hello Volker, All identifiers prefixed with an underscore are typed holes, see: https://downloads.haskell.org/~ghc/7.8.3/docs/html/users_guide/typed-holes.html Edward Excerpts from Volker Wysk's message of 2015-01-20 10:36:09 -0800: Hello! What is a hole? This program fails to compile:

Re: GHC 7.10 regression when using foldr

2015-01-20 Thread Edward Z. Yang
it reduces the warning volume and if it somehow manages to introduce any new warnings. I hesitate to make such a proposal this late in the release candidate game, but if it worked it'd be pretty damn compelling. -Edward On Tue, Jan 20, 2015 at 6:27 PM, Edward Z. Yang ezy...@mit.edu wrote

Re: GHC 7.10 regression when using foldr

2015-01-20 Thread Edward Z. Yang
, the results of -ddump-minimal-imports would be er.. less minimal. On Tue, Jan 20, 2015 at 6:47 PM, Edward Z. Yang ezy...@mit.edu wrote: I like this proposal: if you're explicit about an import that would otherwise be implicit by Prelude, you shouldn't get a warning for it. If it is not already

Re: Compiling a cabal project with LLVM on GHC 7.10 RC1

2015-01-07 Thread Edward Z. Yang
...is there -dynamic in the -v output? Don't you also want --disable-shared? Excerpts from Brandon Simmons's message of 2015-01-07 12:21:48 -0800: I've tried: $ cabal install --only-dependencies -w /usr/local/bin/ghc-7.10.0.20141222 --enable-tests --enable-benchmarks --ghc-option=-fllvm

Re: GHC 7.4.2 on Ubuntu Trusty

2015-01-04 Thread Edward Z. Yang
For the latter two, I think this should be a perfectly acceptable point release. For transformers, we could also just ifdef the Alternative into the GHC sources. Edward Excerpts from Herbert Valerio Riedel's message of 2015-01-04 00:22:28 -0800: Hello Edward, On 2015-01-04 at 08:54:58 +0100, Edward Z

Re: GHC 7.4.2 on Ubuntu Trusty

2015-01-03 Thread Edward Z. Yang
, Edward Z. Yang wrote: Excerpts from Yitzchak Gale's message of 2014-10-28 13:58:08 -0700: How about this: Currently, every GHC source distribution requires no later than its own version of GHC for bootstrapping. Going backwards, that chops up the sequence of GHC versions into tiny

Re: ANNOUNCE: GHC 7.10.1 Release Candidate 1 - problem with latest cabal-install

2015-01-01 Thread Edward Z. Yang
If you still have your old GHC around, it will be much better to compile the newest cabal-install using the *old GHC*, and then use that copy to bootstrap a copy of the newest cabal-install. Edward Excerpts from George Colpitts's message of 2015-01-01 12:08:44 -0500: ​$ ​ cabal update

Re: ANNOUNCE: GHC 7.10.1 Release Candidate 1 - problem with latest cabal-install

2015-01-01 Thread Edward Z. Yang
/index.html On Thu, Jan 1, 2015 at 2:54 PM, Edward Z. Yang ezy...@mit.edu wrote: If you still have your old GHC around, it will be much better to compile the newest cabal-install using the *old GHC*, and then use that copy to bootstrap a copy of the newest cabal-install. Edward

Re: ANNOUNCE: GHC 7.10.1 Release Candidate 1

2014-12-27 Thread Edward Z. Yang
Hello lonetiger, I don't think any relevant logic changed in 7.10; however, this commit may be relevant: commit 8fb03bfd768ea0d5c666bbe07a50cb05214bbe92 Author: Ian Lynagh ig...@earth.li Sun Mar 18 11:42:31 2012 Committer: Ian Lynagh ig...@earth.li Sun Mar 18 11:42:31 2012

Re: Thread behavior in 7.8.3

2014-10-29 Thread Edward Z. Yang
I don't think this is directly related to the problem, but if you have a thread that isn't yielding, you can force it to yield by using -fno-omit-yields on your code. It won't help if the non-yielding code is in a library, and it won't help if the problem was that you just weren't setting

Re: Thread behavior in 7.8.3

2014-10-29 Thread Edward Z. Yang
. Is that understanding correct? (technically, doesn't it change to yielding after stack checks or something like that?) On Thu, Oct 30, 2014 at 8:24 AM, Edward Z. Yang ezy...@mit.edu wrote: I don't think this is directly related to the problem, but if you have a thread that isn't

Re: GHC 7.4.2 on Ubuntu Trusty

2014-10-28 Thread Edward Z. Yang
Excerpts from Yitzchak Gale's message of 2014-10-28 13:58:08 -0700: How about this: Currently, every GHC source distribution requires no later than its own version of GHC for bootstrapping. Going backwards, that chops up the sequence of GHC versions into tiny incompatible pieces - there is no

Re: optimizing StgPtr allocate (Capability *cap, W_ n)

2014-10-16 Thread Edward Z. Yang
Hi Bulat, This seems quite reasonable to me. Have you eyeballed the assembly GCC produces to see that the hotpath is improved? If you can submit a patch that would be great! Cheers, Edward Excerpts from Bulat Ziganshin's message of 2014-10-14 10:08:59 -0700: Hello Glasgow-haskell-users, i'm

Re: hmatrix

2014-08-24 Thread Edward Z . Yang
Hello Adrian, This sounds like a definite bug in Cabal, in that it should report accordingly if it is looking for both static and dynamic versions of the library, and only finds the static one. Can you file a bug report? Thanks, Edward Excerpts from Adrian Victor Crisciu's message of

Re: hmatrix-0.16.0.4 installation problem

2014-08-22 Thread Edward Z . Yang
Excerpts from Adrian Victor Crisciu's message of 2014-08-22 10:55:00 +0100: I tried the following command line: cabal install --enable-documentation --extra-include-dirs=/usr;local/include --extra-lib-dirs=/usr/local/lib hmatrix Is that semicolon a typo? Edward

Re: hmatrix-0.16.0.4 installation problem

2014-08-21 Thread Edward Z . Yang
Hello Adrian, Are the header files for blas and lapack on your system? (I'm not sure what the configure script for other software was checking for.) Edward Excerpts from Adrian Victor Crisciu's message of 2014-08-21 14:22:58 +0100: Sorry! This is the the failed cabal install command and its

Re: 'import ccall unsafe' and parallelism

2014-08-14 Thread Edward Z . Yang
I have to agree with Brandon's diagnosis: unsafePerformIO will take out a lock, which is likely why you are seeing no parallelism. Edward Excerpts from Brandon Allbery's message of 2014-08-14 17:12:00 +0100: On Thu, Aug 14, 2014 at 11:54 AM, Christian Höner zu Siederdissen

Re: cabal repl failing silently on missing exposed-modules

2014-08-08 Thread Edward Z . Yang
If you haven't already, go file a bug on https://github.com/haskell/cabal/issues Edward Excerpts from cheater00 .'s message of 2014-08-06 15:18:04 +0100: Hi, I have just spent some time trying to figure out why all of a sudden cabal repl silently exits without an error message. What helped

Re: Failure compiling ghc-mtl with ghc-7.8.{2,3}

2014-07-20 Thread Edward Z . Yang
The last time I saw this error, it was because the package database was messed up (there was an instance of MonadIO in scope, but it was for the wrong package.) However, I don't know what the source of the problem is here. Edward Excerpts from i hamsa's message of 2014-07-20 08:26:52 +0100: I

Re: Failure compiling ghc-mtl with ghc-7.8.{2,3}

2014-07-20 Thread Edward Z . Yang
I found the problem. package ghc-7.8.3 requires transformers-0.3.0.0 package mtl-2.2.1 requires transformers-0.4.1.0 package exceptions-0.6.1 requires transformers-0.4.1.0 I wonder how is this ever supposed to work :( On Sun, Jul 20, 2014 at 9:01 PM, Edward Z. Yang ezy...@mit.edu wrote

Re: Using mutable array after an unsafeFreezeArray, and GC details

2014-05-12 Thread Edward Z . Yang
Excerpts from Brandon Simmons's message of 2014-05-10 13:57:40 -0700: Another silly question: when card-marking happens after a write or CAS, does that indicate this segment maybe contains old-to-new generation references, so be sure to preserve (scavenge?) them from collection ? In my initial

Re: Using mutable array after an unsafeFreezeArray, and GC details

2014-05-09 Thread Edward Z . Yang
Hello Brandon, Excerpts from Brandon Simmons's message of 2014-05-08 16:18:48 -0700: I have an unusual application with some unusual performance problems and I'm trying to understand how I might use unsafeFreezeArray to help me, as well as understand in detail what's going on with boxed

Re: Using mutable array after an unsafeFreezeArray, and GC details

2014-05-09 Thread Edward Z . Yang
Excerpts from Carter Schonwald's message of 2014-05-09 16:49:07 -0700: Any chance you could try to use storable or unboxed vectors? Neither of those will work if, at the end of the day, you need to store pointers to heap objects Edward ___

[Haskell] [Haskell-cafe] ANN: Monad.Reader Issue 23

2014-04-24 Thread Edward Z . Yang
I am pleased to announce that Issue 23 of the Monad Reader is now available. http://themonadreader.files.wordpress.com/2014/04/issue23.pdf http://themonadreader.wordpress.com/2014/04/23/issue-23/ Issue 23 consists of the following five articles: * FizzBuzz in Haskell by Embedding a

[Haskell] Monad.Reader #24 call for copy

2014-04-24 Thread Edward Z . Yang
Call for Copy: The Monad.Reader - Issue 24 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 24

Re: memory ordering

2013-12-31 Thread Edward Z . Yang
, and should do what I want. Assuming it works properly, of course. If I'm lucky it might even be optimized out. Thanks, John On Mon, Dec 30, 2013 at 6:04 AM, Edward Z. Yang ezy...@mit.edu wrote: Hello John, Here are some prior discussions (which I will attempt to summarize below

Re: memory ordering

2013-12-31 Thread Edward Z . Yang
Second, the optimizer is a bit more conservative when it comes to primop calls (internally referred to as unsafe foreign calls) Sorry, I need to correct myself here. Foreign primops, and most out-of-line primops, compile into jumps which end basic blocks, which constitute hard boundaries since

Re: memory ordering

2013-12-30 Thread Edward Z . Yang
Hello John, Here are some prior discussions (which I will attempt to summarize below): http://www.haskell.org/pipermail/haskell-cafe/2011-May/091878.html http://www.haskell.org/pipermail/haskell-prime/2006-April/001237.html

[Haskell] Monad.Reader #23 call for copy

2013-12-18 Thread Edward Z . Yang
Call for Copy: The Monad.Reader - Issue 23 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 23

Re: blocking parallel program

2013-10-19 Thread Edward Z. Yang
, it doesn't seem to help. Facundo On Sat, Oct 19, 2013 at 8:47 PM, Edward Z. Yang ezy...@mit.edu wrote: Hello Facundo, The reason is that you have compiled the program to be multithreaded, but it is not running with multiple cores. Compile also with -rtsopts and then pass +RTS -N2

Re: Trying to compile ghc HEAD on xubuntu 13.04-x64

2013-10-04 Thread Edward Z. Yang
As a workaround, add this to your mk/build.mk HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO BUILD_DOCBOOK_PS = NO BUILD_DOCBOOK_PDF = NO This is a bug. Edward Excerpts from Nathan Hüsken's message of Fri Oct 04 13:55:01 -0700 2013: Hey, because I have touble with ghci and packages

Re: 7.8 Release Update

2013-09-14 Thread Edward Z. Yang
of Mon Sep 09 16:15:45 -0700 2013: That sounds terrible expensive to do on every `cabal build` and its a cost most users won't understand (what was broken before?). On Mon, Sep 9, 2013 at 4:06 PM, Edward Z. Yang ezy...@mit.edu wrote: If I am building some Haskell executable using 'cabal

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Edward Z. Yang
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

Re: 7.8 Release Update

2013-09-09 Thread Edward Z. Yang
Excerpts from Kazu Yamamoto (山本和彦)'s message of Sun Sep 08 19:36:19 -0700 2013: % make show VALUE=GhcLibWays make -r --no-print-directory -f ghc.mk show GhcLibWays=v p dyn Yes, it looks like you are missing p_dyn from this list. I think this is a bug in the build system. When I

Re: 7.8 Release Update

2013-09-09 Thread Edward Z. Yang
I think Kazu is saying that when he builds something with profiling using cabal-install, it fails because cabal-install tries to build a dynamic version too. We don't want dyanmic/profiled libraries (there's no point, you can't load them into GHCi). Perhaps this is something that needs

Re: 7.8 Release Update

2013-09-09 Thread Edward Z. Yang
Hello Mikhail, It is a known issue that Template Haskell does not work with profiling (because GHCi and profiling do not work together, and TH uses GHCi's linker). [1] Actually, with the new linker patches that are landing soon we are not too far off from having this work. Edward [1]

Re: 7.8 Release Update

2013-09-09 Thread Edward Z. Yang
If I am building some Haskell executable using 'cabal build', the result should be *statically linked* by default. However, subtly, if I am building a Haskell library, I would like to be able to load the compiled version into GHCi. So it seems to me cabal should produce v, dyn (libs only, not

Re: 7.8 Release Update

2013-09-09 Thread Edward Z. Yang
, Sep 9, 2013 at 4:06 PM, Edward Z. Yang ezy...@mit.edu wrote: If I am building some Haskell executable using 'cabal build', the result should be *statically linked* by default. However, subtly, if I am building a Haskell library, I would like to be able to load the compiled version

Re: [Haskell-cafe] starting GHC development -- two questions

2013-08-08 Thread Edward Z. Yang
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

[Haskell-cafe] ANN: Monad.Reader Issue 22

2013-08-07 Thread Edward Z. Yang
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

Re: [Haskell-cafe] what is wrong w my IORef Word32 ?

2013-07-18 Thread Edward Z. Yang
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

Re: [Haskell-cafe] Non-recursive let [Was: GHC bug? Let with guards loops]

2013-07-10 Thread Edward Z. Yang
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

Re: executable stack flag

2013-07-09 Thread Edward Z. Yang
I took a look at the logs and none mentioned 'Hey, so it turns out we need executable stack for this', and as recently as Sep 17, 2011 there are patches for turning off executable stack (courtesy Gentoo). So probably it is just a regression, someone added some code which didn't turn off

Re: executable stack flag

2013-07-09 Thread Edward Z. Yang
I've gone ahead and fixed it, and referenced the patches in the ticket. Cheers, Edward Excerpts from Jens Petersen's message of Mon Jul 08 21:36:42 -0700 2013: Hi, We noticed [1] in Fedora that ghc (7.4 and 7.6) are linking executables (again [2]) with the executable stack flag set. I

Re: [Haskell-cafe] Lambda Calculus question on equivalence

2013-05-02 Thread Edward Z. Yang
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

Re: [Haskell-cafe] Lambda Calculus question on equivalence

2013-05-02 Thread Edward Z. Yang
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

Re: [Haskell-cafe] Stream fusion and span/break/group/init/tails

2013-04-22 Thread Edward Z. Yang
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

Re: [Haskell-cafe] conditional branching vs pattern matching: pwn3d by GHC

2013-04-22 Thread Edward Z. Yang
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

[Haskell-cafe] Stream fusion and span/break/group/init/tails

2013-04-21 Thread Edward Z. Yang
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

Re: [Haskell-cafe] Stream fusion and span/break/group/init/tails

2013-04-21 Thread Edward Z. Yang
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

Re: Why is GHC so much worse than JHC when computing the Ackermann function?

2013-04-20 Thread Edward Z. Yang
I don't seem to get the leak on latest GHC head. Running the program in GC debug mode in 7.6.2 is quite telling; the program is allocating *a lot* of megablocks. We probably fixed it though? Edward Excerpts from Mikhail Glushenkov's message of Sat Apr 20 01:55:10 -0700 2013: Hi all, This

Re: mask, catch, myThreadId, throwTo

2013-04-16 Thread Edward Z. Yang
OK, I've updated the docus. Excerpts from Felipe Almeida Lessa's message of Mon Apr 15 13:34:50 -0700 2013: Thanks a lot, you're correct! The trouble is, I was misguided by the Interruptible operations note [1] which states that The following operations are guaranteed not to be

Re: mask, catch, myThreadId, throwTo

2013-04-15 Thread Edward Z. Yang
Sounds like those docs need to be fixed, in that case. Edward Excerpts from Felipe Almeida Lessa's message of Mon Apr 15 13:34:50 -0700 2013: Thanks a lot, you're correct! The trouble is, I was misguided by the Interruptible operations note [1] which states that The following

Re: [Haskell-cafe] Resource Limits for Haskell

2013-04-01 Thread Edward Z. Yang
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

[Haskell] [Haskell-cafe] Monad.Reader #22 call for copy

2013-03-29 Thread Edward Z. Yang
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

[Haskell-cafe] Monad.Reader #22 call for copy

2013-03-29 Thread Edward Z. Yang
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

Re: [Haskell-cafe] Future of MonadCatchIO

2013-03-26 Thread Edward Z. Yang
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

Re: [Haskell-cafe] MVar which can not be null ?

2013-03-18 Thread Edward Z. Yang
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

[Haskell] ANN: Monad.Reader Issue 21

2013-03-16 Thread Edward Z. Yang
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 *

[Haskell-cafe] ANN: Monad.Reader Issue 21

2013-03-16 Thread Edward Z. Yang
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 *

[Haskell-cafe] Resource Limits for Haskell

2013-03-15 Thread Edward Z. Yang
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

Re: [Haskell-cafe] Resource Limits for Haskell

2013-03-15 Thread Edward Z. Yang
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

Re: Foreign.StablePtr: nullPtr double-free questions.

2013-03-13 Thread Edward Z. Yang
Excerpts from Remi Turk's message of Wed Mar 13 13:09:18 -0700 2013: Thanks for your quick reply. Could you elaborate on what a bit of overhead means? As a bit of context, I'm working on a small library for working with (im)mutable extendable tuples/records based on Storable and ForeignPtr,

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread Edward Z. Yang
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

RE: runghc -fdefer-type-errors

2013-03-11 Thread Edward Z. Yang
Excerpts from Simon Peyton-Jones's message of Mon Mar 11 16:04:31 -0700 2013: Aha. It is indeed true that ghc -fdefer-type-errors -w does not suppress the warnings that arise from the type errors; indeed there is no current way to do so. How to do that? To be kosher there should

Re: [Haskell-cafe] To seq or not to seq, that is the question

2013-03-09 Thread Edward Z. Yang
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

Re: Foreign.StablePtr: nullPtr double-free questions.

2013-03-08 Thread Edward Z. Yang
Excerpts from Remi Turk's message of Fri Mar 08 18:28:56 -0800 2013: Good night everyone, I have two questions with regards to some details of the Foreign.StablePtr module. [1] 1) The documentation suggests, but does not explicitly state, that castStablePtrToPtr `liftM` newStablePtr x

[Haskell-cafe] To seq or not to seq, that is the question

2013-03-08 Thread Edward Z. Yang
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? -

RE: Cloud Haskell and network latency issues with -threaded

2013-02-07 Thread Edward Z. Yang
Hey folks, The latency changes sound relevant to some work on the scheduler I'm doing; is there a place I can see the changes? Thanks, Edward Excerpts from Simon Peyton-Jones's message of Wed Feb 06 10:10:10 -0800 2013: I (with help from Kazu and helpful comments from Bryan and Johan) have

Re: Cloud Haskell and network latency issues with -threaded

2013-02-07 Thread Edward Z. Yang
-arv/commits/push-work-exchange-squashed . -Andi On Fri, Feb 8, 2013 at 12:10 AM, Edward Z. Yang ezy...@mit.edu wrote: Hey folks, The latency changes sound relevant to some work on the scheduler I'm doing; is there a place I can see the changes? Thanks, Edward Excerpts from

[Haskell-cafe] Ticking time bomb

2013-01-30 Thread Edward Z. Yang
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

Re: [Haskell-cafe] Ticking time bomb

2013-01-30 Thread Edward Z. Yang
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,

Re: [Haskell-cafe] Ticking time bomb

2013-01-30 Thread Edward Z. Yang
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

Re: [Haskell-cafe] Ticking time bomb

2013-01-30 Thread Edward Z. Yang
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,

Re: [Haskell-cafe] Ticking time bomb

2013-01-30 Thread Edward Z. Yang
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

Re: What is the scheduler type of GHC?

2013-01-16 Thread Edward Z. Yang
Excerpts from Magicloud Magiclouds's message of Wed Jan 16 00:32:00 -0800 2013: Hi, Just read a post about schedulers in erlang and go lang, which informed me that erlang is preemptive and go lang is cooperative. So which is used by GHC? From ghc wiki about rts, if the question is only

Re: [Haskell-cafe] Example programs with ample use of deepseq?

2013-01-07 Thread Edward Z. Yang
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

[Haskell] Second Call for Copy: Monad.Reader #21

2012-12-13 Thread Edward Z. Yang
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

[Haskell-cafe] Second Call for Copy: Monad.Reader #21

2012-12-13 Thread Edward Z. Yang
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

Re: Hoopl vs LLVM?

2012-12-10 Thread Edward Z. Yang
Hello Greg, Hoopl passes live in compiler/cmm; searching for DataflowLattice will turn up lattice definitions which are the core of the analyses and rewrites. Unfortunately, the number of true Hoopl optimizations was somewhat reduced when Simon Marlow did aggressive performance optimizations to

Re: [Haskell-cafe] mtl: Why there is Monoid w constraint in the definition of class MonadWriter?

2012-12-08 Thread Edward Z. Yang
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?

Re: [Haskell-cafe] mtl: Why there is Monoid w constraint in the definition of class MonadWriter?

2012-12-08 Thread Edward Z. Yang
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

Re: [Haskell-cafe] mtl: Why there is Monoid w constraint in the definition of class MonadWriter?

2012-12-08 Thread Edward Z. Yang
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

  1   2   3   4   >