Re: desperately seeking RULES help

2008-06-07 Thread Conal Elliott
Is it by intention that -fno-method-sharing works only from the command line, not in an OPTIONS_GHC pragma? On Sat, Jun 7, 2008 at 9:23 AM, Conal Elliott <[EMAIL PROTECTED]> wrote: > Thanks a million, Lennart! -fno-method-sharing was the missing piece. - > Conal > > > On

Re: desperately seeking RULES help

2008-06-07 Thread Conal Elliott
forall m . toInt (fromInt m) = m > #-} > > {-# INLINE onInt #-} > onInt :: AsInt a => (Int -> Int) -> (a -> a) > onInt f x = fromInt (f (toInt x)) > > test :: AsInt a => (Int -> Int) -> (Int -> Int) -> (a -> a) > test h g = onInt h . onInt g >

desperately seeking RULES help

2008-06-06 Thread Conal Elliott
I'm trying to do some fusion in ghc, and I'd greatly appreciate help with the code below (which is simplified from fusion on linear maps). I've tried every variation I can think of, and always something prevents the fusion. Help, please! Thanks, - Conal {-# OPTIONS_GHC -O2 -Wall -fglasgow-exts

whence _stub.c ?

2008-05-17 Thread Conal Elliott
what causes ghc to emit a stub.c file? - Conal ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Expected behavior of "deriving Ord"?

2008-03-31 Thread Conal Elliott
to one of its arguments, but a pointer-equality test would fail, and a semantic equality test would block. Cheers, - Conal On Mon, Mar 31, 2008 at 1:34 AM, Christian Maeder <[EMAIL PROTECTED]> wrote: > Christian Maeder wrote: > > Conal Elliott wrote: > >> The type argument

simple CSE?

2008-03-28 Thread Conal Elliott
I'd like to know if it's possible to get GHC to perform some simple CSE for function-level programming. Here's a simple example: liftA2 (*) sin sin :: Double -> Double which inlines and simplifies to \ t -> sin t * sin t A more realistic, equivalent, example: let b = sin <$> id in l

Re: Expected behavior of "deriving Ord"?

2008-03-20 Thread Conal Elliott
10.1145/99370.99402}, publisher = {ACM}, address = {New York, NY, USA}, } On Thu, Mar 20, 2008 at 11:00 AM, Christian Maeder <[EMAIL PROTECTED]> wrote: > Conal Elliott wrote: > > AddBounds makes total orders from total orders. It just adds new least > > and

Re: Expected behavior of "deriving Ord"?

2008-03-20 Thread Conal Elliott
lt;=) and compares cannot. - Conal On Thu, Mar 20, 2008 at 2:00 AM, Christian Maeder <[EMAIL PROTECTED]> wrote: > Conal Elliott wrote: > > I have an algebraic data type (not newtype) that derives Ord: > > > > data AddBounds a = MinBound | NoBound a | MaxBound >

Re: Expected behavior of "deriving Ord"?

2008-03-19 Thread Conal Elliott
`max` _ = MaxBound Cheers, - Conal On Wed, Mar 19, 2008 at 2:35 PM, Duncan Coutts <[EMAIL PROTECTED]> wrote: > > On Wed, 2008-03-19 at 14:11 -0700, Conal Elliott wrote: > > I have an algebraic data type (not newtype) that derives Ord: > > > > data AddBou

Expected behavior of "deriving Ord"?

2008-03-19 Thread Conal Elliott
I have an algebraic data type (not newtype) that derives Ord: data AddBounds a = MinBound | NoBound a | MaxBound deriving (Eq, Ord, Read, Show) I was hoping to get a min method defined in terms of the min method of the type argument (a). Instead, I think GHC is producing something in

Change to deriving in 6.7 ??

2007-08-16 Thread Conal Elliott
I'm running ghc-6.7.20070802 and getting a new error message that didn't show up with ghc-6.6. Code: -- | Pairing for unary type constructors. newtype Pair1 f g a = Pair1 {unPair1 :: (f a, g a)} deriving (Eq, Ord, Show) Error message: src/Data/Tupler.hs:26:0: No instances

Re: Cost of Overloading vs. HOFs

2007-05-04 Thread Conal Elliott
Cool. You know which types to consider because jhc is a whole-program compiler? Given the whole program, why not monomorphize, and inline away all of the dictionaries? - Conal On 5/4/07, John Meacham <[EMAIL PROTECTED]> wrote: On Fri, May 04, 2007 at 03:07:41PM -0700, Conal Elliott

Re: Cost of Overloading vs. HOFs

2007-05-04 Thread Conal Elliott
Does anyone know what became of Dictionary-free Overloading by Partial Evaluation ? Is it impractical for some reason? On 5/4/07, Adrian Hey <[EMAIL PROTECTED]> wrote: Hello, The GHC users guide says overloading "is death to performance if left

Re: recent Windows installer for ghc head?

2007-05-04 Thread Conal Elliott
`/cygdrive/c/ghc/ghc-6.7.20070404' > Finished configuring..to use, add > /cygdrive/c/ghc/ghc-6.7.20070404/bin/i386-unknown-cygwin32 > to your PATH. > bash-3.2$ > > > On 5/1/07, Simon Peyton-Jones <[EMAIL PROTECTED]> wrote: >> >> Following the "snaps

Re: recent Windows installer for ghc head?

2007-05-02 Thread Conal Elliott
/dist/current/dist/ghc-6.7.20070404-i386-unknown-mingw32.tar.bz2 That seems to be a tar bundle for Windows; it's not an msi but if you unpack it you should be able to run it just fine. Simon *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Conal Elliott *Sent:* 27 April

recent Windows installer for ghc head?

2007-04-27 Thread Conal Elliott
I'd like to try out the new & improved combination of type classes and GADTs, which I understand is only in head. Is there a recent working windows installer for head? Thanks, - Conal ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskel

problem with ghcprof on windows

2006-01-07 Thread Conal Elliott
When run ghcprof under Windows XP I get this message in uDraw: "Error: Cannot start application C:/TEMP/ghcprof30164.sh". That file does exist as a shell script: bash-3.00$ ls -l C:/TEMP/ghcprof30164.sh -rwxr-xr-x 1 Conal None 109 Jan 7 12:12 C:/TEMP/ghcprof30164.sh bash-3.00$ cat C:/TEMP/ghcpr

RE: working lazy memoizer for GHC?

2005-11-15 Thread Conal Elliott
lazy memoizer for GHC? Conal Elliott <[EMAIL PROTECTED]> wrote in article <[EMAIL PROTECTED]> in gmane.comp.lang.haskell.glasgow.user: > Does anyone have a working lazy memoizer (memo :: (a->b) -> (a->b)) for > GHC? - Conal There's a deprecated one in the util

working lazy memoizer for GHC?

2005-11-10 Thread Conal Elliott
Does anyone have a working lazy memoizer (memo :: (a->b) -> (a->b)) for GHC? - Conal ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Partial application of type constructors?

2005-04-18 Thread Conal Elliott
GHC 6.4 objects to the following simple program, pointing to the partial application of the type constructor AddL. Is there a work-around? {-# OPTIONS -fglasgow-exts #-} data LMap a b type AddL arr a b = a `arr` LMap a b data DFunA arr a b = DFunA (a `arr` b) (DFunA (AddL arr) a b

RE: infix type operators

2005-03-09 Thread Conal Elliott
Agreed. I was surprised by the language inconsistency when I discovered that symbols were ruled out for type variables. It just seemed natural to me when programming with arrows, and I'm surprised it hasn't shown itself useful before. - Conal -Original Message- From: [EMAIL PROTECTED] [

RE: foldr/build rule

1999-04-22 Thread Conal Elliott
p, zipWith, zipWith3, etc, in terms of repeat and "zipApp": -Original Message- From: Simon Peyton-Jones Sent: Thursday, April 22, 1999 2:46 AM To: 'Olaf Chitil'; Josef Sveningsson Cc: 'GHC users'; Simon Pe

<    1   2