Re: Proposal: EPHEMERAL pragma

2012-10-25 Thread Jan-Willem Maessen
On Thu, Oct 25, 2012 at 9:56 AM, José Pedro Magalhães j...@cs.uu.nl wrote: Hi all, Following up on a chat with Simon Peyton Jones at ICFP, I would like to discuss the possible introduction of a EPHEMERAL pragma. For example: {-# EPHEMERAL Rep #-} data Rep = ... This pragma would

Re: Proposal: EPHEMERAL pragma

2012-10-25 Thread Jan-Willem Maessen
INLINABLE (that is, make their code available for inlining in other modules). 3. Emit a warning if the generated core code still contains uses of Rep. Are you restricting Rep to non-recursive uses? Or has GHC's inliner finally learned how to behave well in the presence of recursion? -Jan-Willem

Re: Stealing ideas from the latest GCC release

2012-03-22 Thread Jan-Willem Maessen
growth. Wait, I thought this is essentially what constructor specialization does? I suppose we might then keep around the old body. Or will these behave differently in the presence of, say, different constant Int arguments? -Jan-Willem Maessen

Re: Records in Haskell

2012-01-14 Thread Jan-Willem Maessen
at this point: can records have unboxed fields? I'm worried a bit about the kinds that can appear in a has constraint: A feature of SORF is that you can write functions like this   k :: Has r f Int = r - Int   k r = r.f + 1 I'm thinking out loud about the implementation implications here. -Jan-Willem

Re: Unwanted eta-expansion

2011-10-09 Thread Jan-Willem Maessen
On Sun, Oct 9, 2011 at 10:54 AM, Roman Cheplyaka r...@ro-che.info wrote: * Jan-Willem Maessen jmaes...@alum.mit.edu [2011-10-08 12:32:18-0400] It seems to be a common misconception that eta-abstracting your functions in this way will speed up or otherwise improve your code. Simon PJ has

Re: Two Proposals

2011-10-09 Thread Jan-Willem Maessen
2011/10/5 Simon Peyton-Jones simo...@microsoft.com: |  In the spirit of don't let the perfect be the enemy of the good |  though, I'm solidly in favor of the original proposal as it is. This is my thought too.  George is proposing to extend Haskell's existing mechanism for numeric literals

Re: Unwanted eta-expansion

2011-10-08 Thread Jan-Willem Maessen
potentially very beneficial. For example, the following *might* be a worthwhile definition of foldl: {-# INLINE foldl #-} foldl f = loop where loop a [] = a loop a (x:xs) = loop (f a x) xs -Jan-Willem Maessen [*] Note that GHC actually treats the free variables of the closure (x and r

Re: Reducing the cost of garbage collecting small arrays

2011-06-23 Thread Jan-Willem Maessen
On Thu, Jun 23, 2011 at 4:54 AM, Johan Tibell johan.tib...@gmail.com wrote: On Thu, Jun 23, 2011 at 8:27 AM, Johan Tibell johan.tib...@gmail.com wrote: Is 5 the optimal number of bits to slice off at a time (ie the best fanout)?  It sounds like node copy cost on insert argues for a slightly

Re: Reducing the cost of garbage collecting small arrays

2011-06-22 Thread Jan-Willem Maessen
On Wed, Jun 22, 2011 at 12:33 PM, Johan Tibell johan.tib...@gmail.com wrote: Hi, Now when we can efficiently copy small arrays I've gone back to benchmarking/optimizing my hash array mapped trie data structure. The data structure's performance depends on how efficiently we can

Re: Class constraints for associated type synonyms

2011-04-01 Thread Jan-Willem Maessen
On Thu, Mar 24, 2011 at 11:36 AM, Simon Peyton-Jones simo...@microsoft.com wrote: | class Monoid (GeneratorOf a) = Generable a where |   type GeneratorOf a :: * - * |   construct :: GeneratorOf a - a | | Now, it seems I need FlexibleInstances to do this when I'm using an | associated type

Class constraints for associated type synonyms

2011-03-23 Thread Jan-Willem Maessen
whenever I use associated types in my programs? -Jan-Willem Maessen ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: compilation of pattern-matching?

2009-03-25 Thread Jan-Willem Maessen
On Mar 25, 2009, at 5:18 AM, Simon Peyton-Jones wrote: Indeed GHC does not attempt to retain the order of alternatives, although a) it might be possible to do so by paying more attention in numerous places b) GHC may do so already, by accident, in certain cases ... * Which plan performs

Re: Strictness in data declaration not matched in assembler?

2008-10-15 Thread Jan-Willem Maessen
On Oct 15, 2008, at 11:08 AM, Lennart Augustsson wrote: I totally agree. Getting the value of the field should just evaluate x and then use a pointer indirection; there should be no conditional jumps involved in getting the value. GHC is just doing the wrong thing. Can indirection nodes

Re: fundeps help

2007-12-03 Thread Jan-Willem Maessen
arguably unreadable! Hoping this will give me a bit of insight into SystemFC, -Jan-Willem Maessen You may also like to try the paper that Martin and I and others wrote about fundeps: http://research.microsoft.com/%7Esimonpj/papers/fd-chr Simon

Re: Annotation for unfolding wanted

2007-07-31 Thread Jan-Willem Maessen
On Jul 31, 2007, at 10:20 AM, Simon Peyton-Jones wrote: | However my point was more on a semantic point of view: If I write a function | in a recursive way, but actually do nothing else than a loop, I would like | a) that the compiler unrolls it to a loop and | b) that I can specify such a

Re: UTF-8 decoding error

2006-09-27 Thread Jan-Willem Maessen
functions. This is important because Unicode is constantly changing (mostly getting bigger). -Jan-Willem Maessen Fortress developer, Haskell hacker Matthew On Wednesday 20 September 2006 21:42, Duncan Coutts wrote: On Wed, 2006-09-20 at 18:14 +0200, Christian Maeder wrote: How can I

Re: Re[2]: [GHC] #876: stack overflow on 'length . filter odd $ [0.. 999999999]'

2006-09-01 Thread Jan-Willem Maessen
On Aug 31, 2006, at 3:03 PM, Simon Peyton-Jones wrote: (replying to me) | Actually, it's sufficient to do good arity-raising transformations, | and use the definition: |foldl f z xs = foldr (\x k a - k (f a x)) id xs z | | This yields code which looks a bit like this: | ... Absolutely

Re: Floating point problems

2006-08-30 Thread Jan-Willem Maessen
and seemed to work with limited testing and the vagaries of gcc as a back end. -Jan-Willem Maessen -- Lennart ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell

Re: IORefs and garbage collection

2006-04-18 Thread Jan-Willem Maessen
On Apr 18, 2006, at 4:05 PM, Ravi Nanavati wrote: I recently discovered that I'm running into the IORef / garbage collection issue described in the ghc user guide (at the bottom of the following page): http://www.haskell.org/ghc/docs/6.4/html/users_guide/faster.html I did a bit of

Re: storing highly shared data structures

2006-01-10 Thread Jan-Willem Maessen
On Jan 10, 2006, at 4:26 AM, Simon Marlow wrote: Christian Maeder wrote: Bulat Ziganshin wrote: CM My old version is faster, because the version with makeStableName does CM very much GC. CMMUT time 27.28s ( 28.91s elapsed) CMGCtime 133.98s (140.08s elapsed) try to add

Re: Optimizations for mutable structures?

2005-12-08 Thread Jan-Willem Maessen
serializability on most machines. That's a pretty strong guarantee. -Jan-Willem Maessen At least people coding in Haskell have an understanding of the underlying issues. Alas, this is far from true for even experiences coders of imperative languages. Seth

Optimizations for mutable structures?

2005-12-07 Thread Jan-Willem Maessen
? Is there a need yet? (I don't honestly know the answer!) -Jan-Willem Maessen ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Optimizations for mutable structures?

2005-12-07 Thread Jan-Willem Maessen
to clear up. On Dec 7, 2005, at 9:15 AM, Simon Marlow wrote: On 07 December 2005 13:38, Malcolm Wallace wrote: Jan-Willem Maessen [EMAIL PROTECTED] writes: - Fetch elimination for imperative reads: writeIORef r e acts readIORef r === writeIORef r e acts return e

Checking for WHNF (a horrible naughty thing)

2005-11-23 Thread Jan-Willem Maessen
-Willem Maessen ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Rules for use of unsafeThaw...

2005-11-03 Thread Jan-Willem Maessen
during the interval where the ambiguous references occur)? -Jan-Willem Maessen ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: jhc vs ghc and the surprising result involving ghc generated assembly.

2005-10-26 Thread Jan-Willem Maessen
-based calling convention by default? If you compiled the i386 code using __regparm(2), would you see the same speed difference? -Jan-Willem Maessen ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org

Re: Profiling and Data.HashTable

2005-10-14 Thread Jan-Willem Maessen
(if anything) is being used to test Data.HashTable? I'd be willing to undertake very small amounts of fiddling if I could be sure I wasn't slowing down something which mattered.] -Jan-Willem Maessen Suggestions? -k -- If I haven't seen further, it is by standing in the footprints of giants

Re: addListToFM

2005-06-03 Thread Jan-Willem Maessen
difficult. But for other structures the union approach may work better (a randomly-balanced tree I'm fiddling with has this property, I think). That argues for presence in the library. -Jan-Willem Maessen ___ Glasgow-haskell-users mailing list

Re: Map library

2005-06-03 Thread Jan-Willem Maessen
these most general possible functions into a Map implementation? I'm guessing there won't be general agreement on the names / types of the actions, but the general idea is tested and sound. -Jan-Willem Maessen ___ Glasgow-haskell-users mailing list

Re: Can't compile GHC

2005-05-09 Thread Jan-Willem Maessen
on Solaris nowadays. -Jan-Willem Maessen I agree with you, Daniel, that this is a terribly unfortunate state of affairs, but as has already been said, the folks who are doing the actual work (I ain't one of 'em) have decided that making ghc easier to bootstrap onto a supported platform

RE: fast IO in ghc

2002-04-03 Thread Jan-Willem Maessen
Simon Peyton-Jones [EMAIL PROTECTED] writes: And, with a lot of help from Koen, I'm about to fold in a much more efficient implementation of Read, which may help. Any of the guilty parties want to give a quick overview of how it's going to work? -Jan-Willem Maessen

Re: Straightforward conversion from Int - Word

2002-02-26 Thread Jan-Willem Maessen
Simon Marlow notes: But fromIntegral *does* do the right thing, doesn't it? Numeric.showHex (fromIntegral (-1 :: Int32) :: Word32) 0x Interesting. The fact that this fooled Julian as well as me suggests the behavior needs to be better documented. Interestingly, hugs yields

RE: The size of things

2002-02-15 Thread Jan-Willem Maessen
wanted is an unboxed list class structure similar to the hierarchy of unboxed arrays. That's quite a bit more complicated. -Jan-Willem Maessen ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell

Re: State Transformer

2002-01-11 Thread Jan-Willem Maessen
face to the world, but use mutation internally. In this respect, ST is actually better than IO, albeit less well-supported. -Jan-Willem Maessen [Note that the above paper presents the version of ST contained in the LazyST library these days (if my memory serves me right). The arguments about

Re: Questions about sharing

2001-12-08 Thread Jan-Willem Maessen
no matter what we do in 2) above] Thus we get the best of both worlds---efficient thunk update and reasonable space consumption. -Jan-Willem Maessen ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow

RE: ghc --make feature request

2001-10-26 Thread Jan-Willem Maessen
on a function I've changed, even if I don't think the changes were very significant. -Jan-Willem Maessen ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

RE: Working character by character in Haskell

2001-10-19 Thread Jan-Willem Maessen
easier to use, actually portable, etc. The effort would surely be repaid. Plus, I'm curious to hear about any challenges which may be involved in pulling this off. :-) If it's genuinely tricky, the tricks are likely to be generally useful for other stream-ish things. -Jan-Willem Maessen Eager

RE: Lightningspeed haskell

2001-02-28 Thread Jan-Willem Maessen
is a terrible idea. -Jan-Willem Maessen Eager Haskell project [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Minimal typing derivations and free theorems...

2000-04-27 Thread Jan-Willem Maessen
s or other mtd-based optimizations. And, in fact, its bottom-ness means we can assign such a minimal type to each occurrence, so that the sharing of the bottom expression need not introduce spurious polymorphism. -Jan-Willem Maessen

Inlining errors...

2000-04-19 Thread Jan-Willem Maessen
being refereed is thus likely to be revised, but if you're interested in a pre-print take a look (there are no pointers to it from elsewhere at the moment): @unpublished{bottomExtract, AUTHOR = {Jan-Willem Maessen}, YEAR = {1999}, month= Mar, TITLE= {Bottom

MVar behavior...

2000-04-13 Thread Jan-Willem Maessen
bly both of takeMVar/putMVar must be suspensive. The non-suspensive behaviors are nice, but should be captured using separate operations. Cooking them up using multiple MVars will work, but is arguably only necessary because the implementation isn't flexible enough. -Jan-Willem Maessen