Re: Loop unrolling + fusion ?

2009-03-09 Thread Brandon S. Allbery KF8NH
On 2009 Mar 9, at 9:32, Claus Reinke wrote: One way out would be to treat the whole mutual recursion as a single entity, either implicitly, as I indicated, or explicitly, as I interpret Brandon's somewhat ambiguous comment. In other words, the peel/unroll limits would apply to a whole group

Re: Loop unrolling + fusion ?

2009-03-09 Thread Max Bolingbroke
2009/3/9 Claus Reinke : But if you annotate all your unrolled and peeled new definitions as > NOINLINE, do you still get the optimizations you want? There are probably a > few GHC optimizations that can "look through" non-recursive > lets, but RULES are not among those. The benefit that comes imm

Re: Loop unrolling + fusion ?

2009-03-09 Thread Claus Reinke
let f = ..f.. in f{n,m} -PEEL-> let f = ..f.. in ..f{n-1,m}.. Probably what you intend here is that you create one copy of the definition every round rather than one per call site, is that right? I don't think so - ultimately, the point of both peeling and unrolling is to unfold a definition

GHC and Haskell Standard wrt floatRange...

2009-03-09 Thread Tyson Whitehead
I think there might be a difference between C/GHC and the Haskell Standard's idea of the range of the exponential. Specifically, the comment in gcc's float.h (i.e., where GHC appears to gets its definition from) says /* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */ wh

Re: Loop unrolling + fusion ?

2009-03-09 Thread Max Bolingbroke
2009/3/9 Claus Reinke : >>> let f = ..f.. in f{n,m} -PEEL-> let f = ..f.. in ..f{n-1,m}.. > >> Probably what you intend here is that you create one copy of the >> definition every round rather than one per call site, is that right? > > I don't think so - ultimately, the point of both peeling and un

Re: Type functions and ambiguity

2009-03-09 Thread Dan Doel
On Monday 09 March 2009 11:56:14 am Simon Peyton-Jones wrote: > For what it's worth, here's why. Suppose we have > > type family N a :: * > > f :: forall a. N a -> Int > f = > > g :: forall b. N b -> Int > g x = 1 + f x > > The defn of 'g' fails with a very

Re: Cygwin version

2009-03-09 Thread Tuomo Valkonen
On 2009-03-09, Tuomo Valkonen wrote: > On 2009-03-09, John Meacham wrote: >> perhaps the most recent non-cabalized ghc build might be worth a try. I >> think darcs still compiles with ghc 6.6, but am not positive., > > Mingw-bootstrap, source, or both? Tried with both. Got: ghc.exe: unkno

Type functions and ambiguity

2009-03-09 Thread Simon Peyton-Jones
Dan's example fails thus: | Map.hs:25:19: | Couldn't match expected type `Nest n1 f b' |against inferred type `Nest n1 f1 b' | In the expression: fmap (deepFMap n f) | In the definition of `deepFMap': | deepFMap (S n) f = fmap (deepFMap n f) | | for reasons I don'

Re: Loop unrolling + fusion ?

2009-03-09 Thread Simon Marlow
Claus Reinke wrote: That was one of my questions in the optimization and rewrite rules thread: shouldn't -fvia-C be supported (as a non-default option) for at least as long as the alternative isn't a clear win in all cases? The trouble with supporting multiple backends is that the cost in term

Re: Loop unrolling + fusion ?

2009-03-09 Thread Claus Reinke
{-# INLINE f PEEL n #-} inline calls *into* recursive f (called loop peeling for loops) {-# INLINE f UNROLL m #-} inline recursive calls to f *inside* f (called loop unrolling for loops) {-# INLINE f PEEL n UNROLL m #-} combine the previous two The problem here is that this only works

Re: Loop unrolling + fusion ?

2009-03-09 Thread Claus Reinke
let f = ..f.. in f{n,m} -PEEL-> let f = ..f.. in ..f{n-1,m}.. Probably what you intend here is that you create one copy of the definition every round rather than one per call site, is that right? I don't think so - ultimately, the point of both peeling and unrolling is to unfold a definition

Re: Cygwin version

2009-03-09 Thread Tuomo Valkonen
On 2009-03-09, John Meacham wrote: > perhaps the most recent non-cabalized ghc build might be worth a try. I > think darcs still compiles with ghc 6.6, but am not positive., Mingw-bootstrap, source, or both? > remember ghc working on cygwin at some point. I have been in a similar > position in

Re: Cygwin version

2009-03-09 Thread Duncan Coutts
On Sun, 2009-03-08 at 12:29 +, Tuomo Valkonen wrote: > I want a _real_ cygwin version of darcs. The non-deterministic > pseudo-cygwin *nix/Windows hybrid currently available has just > too many problems integrating into cygwin, that I want to use as > my TeXing and minor coding environment. A

Re: Cygwin version

2009-03-09 Thread John Meacham
On Sun, Mar 08, 2009 at 11:46:07PM +, Tuomo Valkonen wrote: > No: > > Configuring extensible-exceptions-0.1.0.0... > cabal-bin.exe: Cannot find the program 'ghc' at > '/c/bin/ghc-6.10.1.20090308/bin/ghc' or on the path > > 'ldd libraries/cabal-bin.exe' finds no cygwin dependencies

Re: Cygwin version

2009-03-09 Thread Simon Marlow
Tuomo Valkonen wrote: On 2009-03-08, John Meacham wrote: if you follow those steps, but then don't override the host in the ./configure step to just let it pick up the cygwin environment will it work properly? John No: Configuring extensible-exceptions-0.1.0.0... cabal-bin.e

Re: a possibility to redefine built-in GHCi commands

2009-03-09 Thread Simon Marlow
Peter Hercek wrote: Hi GHCi users, I would like to be able to redefine the built-in GHCi commands. The idea is that when searching for a command the user defined commands would be searched first and only then the built-in commands would be searched. If user wants to invoke a built-in command

Reliability of trace?

2009-03-09 Thread Colin Paul Adams
I'm trying to use Debug.Trace to debug some tree-walking that I've written. It seems to me that I am missing some traces on intermediate function calls. I guess that ghc is re-arranging the code in such a way that some of these intermediate calls disappear. Anyway of stopping this? I already speci

Re: Loop unrolling + fusion ?

2009-03-09 Thread Max Bolingbroke
2009/3/9 Roman Leshchinskiy : > The problem here is that this only works for directly recursive functions > which I, for instance, don't normally use in high-performance code. Most of > my loops are pipelines of collective combinators like map, filter, fold etc. > because these are the ones that ca

Re: finally part run twice on Ctrl-C

2009-03-09 Thread Neil Mitchell
Hi I have filed bug http://hackage.haskell.org/trac/ghc/ticket/3081 to track this issue, marking it as effecting Windows only. Thanks Neil On Fri, Feb 27, 2009 at 8:45 AM, Philip K.F. Hölzenspies wrote: > On Friday 27 February 2009 09:39:14 Neil Mitchell wrote: >> It looks like you are running