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

Re: Expected behavior of deriving Ord?

2008-03-19 Thread Conal Elliott
, 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 AddBounds a = MinBound | NoBound a | MaxBound deriving (Eq, Ord, Read, Show) I

Re: Expected behavior of deriving Ord?

2008-03-20 Thread Conal Elliott
}, 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 greatest elements. The problem with the derived instance

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

Re: Expected behavior of deriving Ord?

2008-03-31 Thread Conal Elliott
, 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 I ran into trouble with represents a value as a list

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

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

Re: desperately seeking RULES help

2008-06-07 Thread Conal Elliott
- Int) - (a - a) test h g = onInt h . onInt g 2008/6/7 Conal Elliott [EMAIL PROTECTED]: 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

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 Sat, Jun 7, 2008 at 5:07 AM

Re: desperately seeking RULES help

2008-06-09 Thread Conal Elliott
are involved, because there are no rules for fint (it's a fresh, local function). Simon *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Conal Elliott *Sent:* 07 June 2008 17:26 *To:* glasgow-haskell-users@haskell.org *Subject:* Re: desperately seeking RULES help

Advice sought for 6.9 and Arrow/Category

2008-07-14 Thread Conal Elliott
I want to use ghc-6.9 for improved support of type families, but I see that the change to the Arrow interface breaks some of my libraries (since () is no longer a method of Arrow). Will this change really be in ghc-6.9? Does anyone have coping strategies for keeping libraries working in 6.8 *and*

Re: Advice sought for 6.9 and Arrow/Category

2008-07-15 Thread Conal Elliott
All code that defines Arrow instance breaks, because () is not a method of Arrow. I have a lot of such instances, so I'm now adding #if directives to test for ghc-6.9 or later. - Conal On Mon, Jul 14, 2008 at 8:38 PM, Don Stewart [EMAIL PROTECTED] wrote: conal: I want to use ghc-6.9 for

Bug in type equality constraints?

2008-07-15 Thread Conal Elliott
I'm converting some code from functionally dependencies to associated types, and I've run into a problem with equality constraints and subclasses. The classes: class AdditiveGroup v = VectorSpace v where type Scalar v :: * (*^) :: Scalar v - v - v class VectorSpace v =

Re: Advice sought for 6.9 and Arrow/Category

2008-07-15 Thread Conal Elliott
? - Conal On Tue, Jul 15, 2008 at 4:43 PM, Conal Elliott [EMAIL PROTECTED] wrote: All code that defines Arrow instance breaks, because () is not a method of Arrow. I have a lot of such instances, so I'm now adding #if directives to test for ghc-6.9 or later. - Conal On Mon, Jul 14, 2008 at 8

problem submitting ghc bug in trac

2008-07-17 Thread Conal Elliott
I logged onto the ghc trac, am trying to submit a ghc bug report, and I get TICKET_CREATE privileges are required to perform this operation. How do I get TICKET_CREATE privileges? I do see logged in as conal. - Conal ___ Glasgow-haskell-users mailing

ghc-6.11 + OpenGL/GLUT crashes on WinXP

2008-10-25 Thread Conal Elliott
I'm getting crashes from ghc-6.10.0.20081007 and ghc-6.11.20081024 when doing a very simple GLUT program (below) with OpenGL-2.2.1.1 and GLUT-2.1.1.2 (the latest from Hackage), running on WinXP. It works fine on ghc-6.9.20080622 . I'd appreciate hearing about other attempts with these versions

Re: [Haskell-cafe] ghc-6.11 + OpenGL/GLUT crashes on WinXP

2008-10-28 Thread Conal Elliott
of GLUT (with patched glutGetProcAddress [attached]) - darcs version of OpenGL Getting freeglut going with ghc on windows is a bit involved. I could write a walkthrough if there's enough interest. David 2008/10/25 Conal Elliott [EMAIL PROTECTED] I'm getting crashes from ghc

Re: [Haskell-cafe] Re: ghc-6.11 + OpenGL/GLUT crashes on WinXP

2008-10-28 Thread Conal Elliott
. On Tue, Oct 28, 2008 at 4:03 PM, Matti Niemenmaa [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Conal Elliott wrote: I am using glut32 rather than freeglut (and no need for patching the darcs GLUT). I wonder if glut32-vs-freeglut could account for crash-vs-nocrash on 6.10 and 6.11

trouble compiling OpenGL package with ghc 6.10.1 (undefined GLUT_BITMAP_8_BY_13 etc)

2008-11-06 Thread Conal Elliott
While building the GLUT package (GLUT-2.1.1.2) with ghc 6.10.1, I get the following errors. I recently compiled this same version successfully in ghc-6.11.20081103. Any idea what's gone wrong? [20 of 21] Compiling Graphics.UI.GLUT.Begin ( Graphics/UI/GLUT/Begin.hs,

Re: trouble compiling OpenGL package with ghc 6.10.1 (undefined GLUT_BITMAP_8_BY_13 etc)

2008-11-06 Thread Conal Elliott
Hm. This problem seems to have gone away on its own. Never mind- Conal On Thu, Nov 6, 2008 at 1:46 PM, Conal Elliott [EMAIL PROTECTED] wrote: While building the GLUT package (GLUT-2.1.1.2) with ghc 6.10.1, I get the following errors. I recently compiled this same version

A lazy (~) pattern cannot bind existential type variables?

2008-11-15 Thread Conal Elliott
What is the reasoning behind the ghc restriction that A lazy (~) pattern cannot bind existential type variables? This error came up for me in the following code: -- | Add a continuation. data WithCont h b c = forall a. WC (h b a) (a - c) instance Functor (WithCont h b) where

Re: A lazy (~) pattern cannot bind existential type variables?

2008-11-16 Thread Conal Elliott
. I'm not sure it's possible in GHC. -- ryan On Sat, Nov 15, 2008 at 10:33 PM, Conal Elliott [EMAIL PROTECTED] wrote: What is the reasoning behind the ghc restriction that A lazy (~) pattern cannot bind existential type variables? This error came up for me in the following code

Re: problem with echo prompting in ghci (visible in emacs)

2008-11-16 Thread Conal Elliott
I'm still looking for a solution to this problem. I've heard from a few people who are affected also, but not any solution. Barring a solution to ghci's behavior, does someone have an emacs-based workaround? - Conal On Tue, Nov 11, 2008 at 4:41 PM, Conal Elliott [EMAIL PROTECTED] wrote

Re: problem with echo prompting in ghci (visible in emacs)

2008-11-17 Thread Conal Elliott
, Conal Elliott [EMAIL PROTECTED] wrote: ghci echoes all of my input in emacs, when run via haskell-mode or via M-x shell, which then confuses various useful haskell-mode features. I built it from sources. At the time I didn't have libedit-dev, so today I installed libedit-dev (version 2.11

Exporting an #include from one package to another?

2008-11-21 Thread Conal Elliott
Is there a way to package up an #include like to share across (be #include'd into) various other haskell packages? I have some standard templates for type class instances that I can't define as instances without creating lots of overlapping instances. I can write an include file easily enough,

Re: Exporting an #include from one package to another?

2008-11-25 Thread Conal Elliott
wonderful! i'll try it out. thanks, duncan. On Sat, Nov 22, 2008 at 5:31 AM, Duncan Coutts [EMAIL PROTECTED]wrote: On Fri, 2008-11-21 at 18:28 -0800, Conal Elliott wrote: Is there a way to package up an #include like to share across (be #include'd into) various other haskell packages

black hole detection and concurrency

2008-12-25 Thread Conal Elliott
I'm looking for information about black hole detection with ghc. I'm getting loop where I don't think there is an actual black hole. I get this message sometimes with the unamb package, which is implemented with unsafePerformIO, concurrency, and killThread, as described in

Fwd: black hole detection and concurrency

2008-12-26 Thread Conal Elliott
++ ++ s) return x) killNote s tid = throwTo tid (ErrorCall s) And a GHCi session: *Un go in: ff in: fg in: f in: g out: True fg out: True ff interactive: ff *** Exception: ff Cheers, Sterl. On Dec 26, 2008, at 1:15 AM, Conal Elliott wrote: I'm looking for information about

Re: [reactive] Re: black hole detection and concurrency

2008-12-28 Thread Conal Elliott
This is a neat trick indeed! I'd appreciate an explanation of killing one's own thread and then continuing (with a restart in this case). How does the post-kill resumption occur? That is, how does control pass to the tail-recursive call after the self-kill? - Conal 2008/12/28 Peter

Re: [reactive] Re: black hole detection and concurrency

2008-12-28 Thread Conal Elliott
Thanks very much for these ideas. Peter Verswyvelen suggested running the example repeatedly to see if it always runs correctly. He found, and I verified, that the example runs fine with Bertram's last version of unamb below, *unless* it's compiled with -threaded and run with +RTS -N2. In the

Re: [reactive] Re: black hole detection and concurrency

2009-01-03 Thread Conal Elliott
: Conal Elliott wrote: Thanks very much for these ideas. Peter Verswyvelen suggested running the example repeatedly to see if it always runs correctly. He found, and I verified, that the example runs fine with Bertram's last version of unamb below, *unless* it's compiled with -threaded and run

Re: [reactive] Re: black hole detection and concurrency

2009-01-06 Thread Conal Elliott
needs the whnf. This is a fairly naive guess. I don't know this machinery well enough to have confidence. What do you think? - Conal On Tue, Jan 6, 2009 at 6:27 AM, Simon Marlow marlo...@gmail.com wrote: Conal Elliott wrote: Indeed -- many thanks to Bertram, Sterling, Peter others

Re: [reactive] Re: black hole detection and concurrency

2009-01-07 Thread Conal Elliott
running your TestRace program for quite a while on 4 processors without any hangs now. Cheers, Simon Conal Elliott wrote: I don't know if the bug would explain loop. My guess is that the black-hole-detection code is incorrectly concluding there is a black hole because a thunk

ghci finding include files exported from other packages?

2009-03-15 Thread Conal Elliott
The applicative-numbers package [1] provides an include file. With ghci, the include file isn't being found, though with cabal+ghc it is found. My test source is just two lines: {-# LANGUAGE CPP #-} #include ApplicativeNumeric-inc.hs I'd sure appreciate it if someone could take a look at the

Re: ghci finding include files exported from other packages?

2009-03-15 Thread Conal Elliott
. - Conal On Sun, Mar 15, 2009 at 5:27 AM, Duncan Coutts duncan.cou...@worc.ox.ac.ukwrote: On Sat, 2009-03-14 at 23:43 -0700, Conal Elliott wrote: The applicative-numbers package [1] provides an include file. With ghci, the include file isn't being found, though with cabal+ghc it is found

Re: ghci finding include files exported from other packages?

2009-03-15 Thread Conal Elliott
-15 at 09:13 -0700, Conal Elliott wrote: That did it. I've added :set -package applicative-numbers to my .ghci and am back in business. Thanks! IIUC, there's an inconsistency in ghci's treatment of modules vs include files, in that modules will be found without -package, but include

Re: ghci finding include files exported from other packages?

2009-03-16 Thread Conal Elliott
On Mon, Mar 16, 2009 at 2:47 PM, Duncan Coutts duncan.cou...@worc.ox.ac.ukwrote: On Mon, 2009-03-16 at 12:13 +, Simon Marlow wrote: This sounds like a chicken and egg problem. To know which package include directories to use GHCi needs to know which packages your module uses.

spurious non-exhaustive pattern warnings?

2009-03-30 Thread Conal Elliott
-- Why do I get warnings about non-exhaustive pattern matches in the -- following code? Is the compiler just not clever enough to notice that -- the uncovered cases are all type-incorrect? (ghc 6.11.20090115) {-# LANGUAGE TypeFamilies, EmptyDataDecls, TypeOperators , GADTs,

GADTs with strict fields?

2009-03-31 Thread Conal Elliott
Do strict fields work with GADTs? If so, what's the syntax for the strictness annotations? - Conal ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: GADTs with strict fields?

2009-03-31 Thread Conal Elliott
I got an answer: precede the argument types by a !. I didn't realize that type applications then have to be parenthesized. On Tue, Mar 31, 2009 at 4:18 PM, Conal Elliott co...@conal.net wrote: Do strict fields work with GADTs? If so, what's the syntax for the strictness annotations

How to #include into .lhs files?

2011-02-03 Thread Conal Elliott
Does anyone have a working example of #include'ing Haskell code into a bird-tracks-style .lhs file with GHC? Every way I try leads to parsing errors. Is there documentation about how it's supposed to work? Help much appreciated. - Conal ___

Re: How to #include into .lhs files?

2011-02-03 Thread Conal Elliott
...@googlemail.com wrote: On Thursday 03 February 2011 10:33:23, Conal Elliott wrote: Does anyone have a working example of #include'ing Haskell code into a bird-tracks-style .lhs file with GHC? Every way I try leads to parsing errors. Is there documentation about how it's supposed to work

Injective type families?

2011-02-14 Thread Conal Elliott
Is there a way to declare a type family to be injective? I have data Z data S n type family n :+: m type instance Z :+: m = m type instance S n :+: m = S (n :+: m) My intent is that (:+:) really is injective in each argument (holding the other as fixed), but I don't know how to persuade

Re: Injective type families?

2011-02-14 Thread Conal Elliott
at 1:28 PM, Conal Elliott co...@conal.net wrote: Is there a way to declare a type family to be injective? I have data Z data S n type family n :+: m type instance Z :+: m = m type instance S n :+: m = S (n :+: m) My intent is that (:+:) really is injective in each argument

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]

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

RE: working lazy memoizer for GHC?

2005-11-15 Thread Conal Elliott
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 package. Why is it deprecated anyway? -- Edit

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

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

Re: recent Windows installer for ghc head?

2007-05-02 Thread Conal Elliott
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 2007 20:03 *To:* glasgow-haskell-users@haskell.org *Subject:* recent Windows installer for ghc

Re: recent Windows installer for ghc head?

2007-05-04 Thread Conal Elliott
be able to run it just fine. Simon *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Conal Elliott *Sent:* 27 April 2007 20:03 *To:* glasgow-haskell-users@haskell.org *Subject:* recent Windows installer for ghc head? I'd like to try out the new improved combination

Re: Cost of Overloading vs. HOFs

2007-05-04 Thread Conal Elliott
Does anyone know what became of Dictionary-free Overloading by Partial Evaluation http://web.cecs.pdx.edu/%7Empj/pubs/pepm94.html? 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 to

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 wrote

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

Haddock problems with GHC 7.4.1

2012-02-04 Thread Conal Elliott
Since installing GHC 7.4.1 (from sources), I'm getting lots of complaints from 'ghc-pkg check', of the following form: Warning: haddock-interfaces: /usr/local/share/doc/transformers-0.2.2.0/html/transformers.haddock doesn't exist or isn't a file Warning: haddock-html:

Oddity with 'cabal install' in GHC 7.4.1

2012-02-04 Thread Conal Elliott
Since upgrading to 7.4.1, if I 'cabal install' successfully and then 'cabal install' a second time without first doing a 'ghc-pkg unregister package-name', I get the following complaint: cabal: The install plan contains reinstalls which can break your GHC installation. You can try

Re: Oddity with 'cabal install' in GHC 7.4.1

2012-02-04 Thread Conal Elliott
rather than get stopped. Regards, - Conal On Sat, Feb 4, 2012 at 9:51 PM, Andres Löh andres.l...@googlemail.comwrote: Hi Conal. On Sun, Feb 5, 2012 at 12:36 AM, Conal Elliott co...@conal.net wrote: Since upgrading to 7.4.1, if I 'cabal install' successfully and then 'cabal install

Re: Haddock problems with GHC 7.4.1

2012-02-05 Thread Conal Elliott
February 2012 00:17, Conal Elliott co...@conal.net wrote: Since installing GHC 7.4.1 (from sources), I'm getting lots of complaints from 'ghc-pkg check', of the following form: Warning: haddock-interfaces: /usr/local/share/doc/transformers-0.2.2.0/html/transformers.haddock doesn't exist

Re: Oddity with 'cabal install' in GHC 7.4.1

2012-02-05 Thread Conal Elliott
Ah -- so use cabal-dev for development and cabal-install when a version stabilizes? -- Conal On Sun, Feb 5, 2012 at 4:20 PM, Jason Dagit dag...@gmail.com wrote: On Sun, Feb 5, 2012 at 10:48 AM, Conal Elliott co...@conal.net wrote: On Sun, Feb 5, 2012 at 12:43 AM, Andres Löh andres.l

Re: Type operators in GHC

2012-09-06 Thread Conal Elliott
Oh dear. I'm very sorry to have missed this discussion back in January. I'd be awfully sad to lose pretty infix notation for type variables of kind * - * - *. I use them extensively in my libraries and projects, and pretty notation matters. I'd be okay switching to some convention other than lack

Re: Type operators in GHC

2012-09-16 Thread Conal Elliott
Type variable operator Any other opinions? Simon From: conal.elli...@gmail.com [mailto:conal.elli...@gmail.com] On Behalf Of Conal Elliott Sent: 06 September 2012 23:59 To: Simon Peyton-Jones Cc: GHC users Subject: Re: Type operators in GHC Oh dear. I'm

Re: Type operators in GHC

2012-09-16 Thread Conal Elliott
operator Any other opinions? Simon From: conal.elli...@gmail.com [mailto:conal.elli...@gmail.com] On Behalf Of Conal Elliott Sent: 06 September 2012 23:59 To: Simon Peyton-Jones Cc: GHC users Subject: Re: Type operators in GHC Oh dear. I'm very sorry to have

Re: Type operators in GHC

2012-09-16 Thread Conal Elliott
operator ** ** Any other opinions? ** ** Simon ** ** *From:* conal.elli...@gmail.com [mailto:conal.elli...@gmail.com] *On Behalf Of *Conal Elliott *Sent:* 06 September 2012 23:59 *To:* Simon Peyton-Jones *Cc:* GHC users *Subject:* Re: Type operators in GHC ** ** Oh

Re: Type operators in GHC

2012-09-19 Thread Conal Elliott
Indeed -- lovely notational tricks, Iavor Edward! I think I'd be happy with one of these variations. At least worth experimenting with. -- Conal On Mon, Sep 17, 2012 at 8:05 PM, Carter Schonwald carter.schonw...@gmail.com wrote: 1) kudos to iavor and edward on the slick notation invention!

Re: Fundeps and type equality

2012-12-26 Thread Conal Elliott
if the transition happened yet. On Tue, Dec 25, 2012 at 6:15 PM, Conal Elliott co...@conal.net wrote: I ran into a simple falure with functional dependencies (in GHC 7.4.1): class Foo a ta | a - ta foo :: (Foo a ta, Foo a tb, Eq ta) = ta - tb - Bool foo = (==) I expected

Suppress Duplicate constraints warning?

2012-12-30 Thread Conal Elliott
Is there a way to suppress GHC's Duplicate constraints warning? I'm auto-generating some code, and it's a lot more convenient for me to leave the duplicates than filter them out. -- Conal ___ Glasgow-haskell-users mailing list

Re: Suppress Duplicate constraints warning?

2013-01-03 Thread Conal Elliott
to add one? (It would be easy to do.) Simon ** ** *From:* glasgow-haskell-users-boun...@haskell.org [mailto: glasgow-haskell-users-boun...@haskell.org] *On Behalf Of *Conal Elliott *Sent:* 30 December 2012 19:56 *To:* glasgow-haskell-users@haskell.org *Subject:* Suppress Duplicate

Re: Suppress Duplicate constraints warning?

2013-01-03 Thread Conal Elliott
Oh! I see it's already done. Thanks much! On Thu, Jan 3, 2013 at 11:55 AM, Conal Elliott co...@conal.net wrote: Yes, please do add a flag to suppress this duplicate constraints warning, e.g., -fno-warn-duplicate-constraints. Thanks! -- Conal On Mon, Dec 31, 2012 at 9:27 AM, Simon Peyton

Advice on type families and non-injectivity?

2013-01-13 Thread Conal Elliott
I sometimes run into trouble with lack of injectivity for type families. I'm trying to understand what's at the heart of these difficulties and whether I can avoid them. Also, whether some of the obstacles could be overcome with simple improvements to GHC. Here's a simple example: {-# LANGUAGE

Re: Advice on type families and non-injectivity?

2013-01-13 Thread Conal Elliott
appear in the signature directly (e.g., something like 'a - F a' would be ok). -Iavor On Sun, Jan 13, 2013 at 11:10 AM, Conal Elliott co...@conal.net wrote: I sometimes run into trouble with lack of injectivity for type families. I'm trying to understand what's at the heart

Re: Advice on type families and non-injectivity?

2013-01-13 Thread Conal Elliott
...@tbi.univie.ac.at wrote: Hi, How would you infer a from F a? Given bar :: Bool, I can't see how one could go from Bool to F a = Bool and determine a uniquely. My question is not completely retorical, if there is an answer I would like to know it :-) Gruss, Christian * Conal Elliott co...@conal.net

Re: Advice on type families and non-injectivity?

2013-01-14 Thread Conal Elliott
[mailto:glasgow-haskell- | users-boun...@haskell.org] On Behalf Of Richard Eisenberg | Sent: 14 January 2013 03:47 | To: Conal Elliott | Cc: glasgow-haskell-users@haskell.org; Haskell Cafe | Subject: Re: Advice on type families and non-injectivity? | | Hi Conal, | | I agree that your initial example

Re: [Haskell-cafe] Advice on type families and non-injectivity?

2013-01-14 Thread Conal Elliott
for different types. On Sun, Jan 13, 2013 at 2:10 PM, Conal Elliott co...@conal.net wrote: I sometimes run into trouble with lack of injectivity for type families. I'm trying to understand what's at the heart of these difficulties and whether I can avoid them. Also, whether some of the obstacles

Simplifying Core pretty-printing via GHC API?

2013-05-01 Thread Conal Elliott
I'm using the GHC API to compile Haskell source code to Core. I'd like to pretty-print the result with the sort of simplifications I get with -dsuppress-type-applications, -dsuppress-uniques, etc (used in combination with -ddump-simpl on ghc's command line). How can I set these options via the GHC

Re: Simplifying Core pretty-printing via GHC API?

2013-05-01 Thread Conal Elliott
PM, Johan Tibell johan.tib...@gmail.com wrote: On Wed, May 1, 2013 at 2:13 PM, Conal Elliott co...@conal.net wrote: I'm using the GHC API to compile Haskell source code to Core. I'd like to pretty-print the result with the sort of simplifications I get with -dsuppress-type-applications

Module import and use in GHC plugin?

2013-05-29 Thread Conal Elliott
In writing GHC plugins, how can I (a) add a module import (preferably qualified) and (b) make vars/ids for names imported from the newly imported module (to insert in the transformed Core code)? If it's not possible to do what I want, I'd be willing to require an explicit import (say import

GHC 7.8.1: Many haddock-related complaints from 'ghc-pkg check'

2014-04-09 Thread Conal Elliott
I installed the binary distribution of GHC 7.8.1 for Mac OS this morning, cabal-installed a few packages, and now I get a *lot* of warnings about missing .haddock files: bash-3.2$ ghc-pkg check Warning: haddock-interfaces:

Re: GHC 7.8.1: Many haddock-related complaints from 'ghc-pkg check'

2014-04-09 Thread Conal Elliott
for random-1.0.1.1... Preprocessing library random-1.0.1.1... Haddock coverage: System/Random.hs:2:2: parse error on input '#' On Wed, Apr 9, 2014 at 10:46 AM, Conal Elliott co...@conal.net wrote: I installed the binary distribution of GHC 7.8.1 for Mac OS this morning, cabal

Re: GHC 7.8.1: Many haddock-related complaints from 'ghc-pkg check'

2014-04-09 Thread Conal Elliott
. A little terser than I'm after, but it helps. On Wed, Apr 9, 2014 at 10:53 AM, Conal Elliott co...@conal.net wrote: From a bit of experimentation, it appears that the problematic packages do indeed have Haddock failures. For instance, bash-3.2$ cd random-1.0.1.1/ bash-3.2$ cabal

Re: GHC 7.8.1: Many haddock-related complaints from 'ghc-pkg check'

2014-04-10 Thread Conal Elliott
look into on my Mavericks machine and see what's going wrong - I figured ./validate would have caught this, but perhaps something strange is going on. I filed a bug for you marked for 7.8.2: https://ghc.haskell.org/trac/ghc/ticket/8981 On Wed, Apr 9, 2014 at 1:07 PM, Conal Elliott co

Help with coercion roles?

2014-04-13 Thread Conal Elliott
I’m working on a GHC plugin (as part of my Haskell-to-hardware work) and running into trouble with coercions roles. Error message from Core Lint: Warning: In the expression: LambdaCCC.Lambda.lamvP# @ (GHC.Types.Bool → GHC.Types.Bool → GHC.Types.Bool → GHC.Types.Bool) @ (Simple.HasIf

Re: Help with coercion roles?

2014-04-14 Thread Conal Elliott
*From:* Glasgow-haskell-users [mailto:glasgow- haskell-users-boun...@haskell.org] *On Behalf Of *Conal Elliott *Sent:* 14 April 2014 06:00 *To:* ghc-d...@haskell.org; glasgow-haskell-users@haskell.org *Subject:* Help with coercion roles? I’m working on a GHC plugin (as part of my Haskell

Re: Help with coercion roles?

2014-04-14 Thread Conal Elliott
proving `EP (Bool - Bool - Bool - Bool) ~R EP (HasIf Bool)`, but if EP's role is nominal, then this is indeed bogus.) Richard On Apr 14, 2014, at 2:23 PM, Conal Elliott co...@conal.net wrote: Thanks for the pointers! I don't quite know how to get to the form you recommend from the existing

Re: Help with coercion roles?

2014-04-14 Thread Conal Elliott
, I would like to help you with a way forward -- let me know if there's a way I can. Richard On Apr 14, 2014, at 4:12 PM, Conal Elliott co...@conal.net wrote: Hi Richard, I'm working on compiling Haskell to hardware, as outlined at https://github.com/conal/lambda-ccc/blob/master/doc

Concrete syntax for open type kind?

2014-04-15 Thread Conal Elliott
I see ‘#’ for unlifted and ‘?’ for open kinds in compiler/parser/Parser.y: akind :: { IfaceKind } : '*' { ifaceLiftedTypeKind } | '#' { ifaceUnliftedTypeKind } | '?' { ifaceOpenTypeKind } | '(' kind ')' { $2 } kind

Re: Concrete syntax for open type kind?

2014-04-16 Thread Conal Elliott
that `a`’s kind is *. Any other kind (assuming these flags) would be printed. I hope this helps! Richard On Apr 15, 2014, at 7:39 PM, Conal Elliott co...@conal.net wrote: I see ‘#’ for unlifted and ‘?’ for open kinds in compiler/parser/Parser.y: akind :: { IfaceKind

Re: Concrete syntax for open type kind?

2014-04-18 Thread Conal Elliott
, there’s never enough time to do these things. Simon *From:* Glasgow-haskell-users [mailto: glasgow-haskell-users-boun...@haskell.org] *On Behalf Of *Conal Elliott *Sent:* 16 April 2014 18:01 *To:* Richard Eisenberg *Cc:* glasgow-haskell-users@haskell.org *Subject:* Re: Concrete syntax

Re: Concrete syntax for open type kind?

2014-04-21 Thread Conal Elliott
really stuck? S *From:* Glasgow-haskell-users [mailto: glasgow-haskell-users-boun...@haskell.org] *On Behalf Of *Conal Elliott *Sent:* 19 April 2014 01:11 *To:* Simon Peyton Jones *Cc:* glasgow-haskell-users@haskell.org *Subject:* Re: Concrete syntax for open type kind? Thanks

Help with cast error

2014-04-23 Thread Conal Elliott
I'd appreciate help with a cast-related Core Lint error I'm getting with a GHC plugin I'm working on: Argument value doesn't match argument type: Fun type: Enc (Vec ('S 'Z) Bool) ~ (Bool, ()) = EP (Enc (Vec ('S 'Z) Bool)) - EP (Bool, ()) Arg type: ~R# (Enc (Vec

Re: Help with cast error

2014-04-24 Thread Conal Elliott
...@haskell.org] *On Behalf Of *Conal Elliott *Sent:* 24 April 2014 01:29 *To:* glasgow-haskell-users@haskell.org; ghc-d...@haskell.org; Richard Eisenberg; Simon Peyton Jones *Subject:* Help with cast error I'd appreciate help with a cast-related Core Lint error I'm getting with a GHC plugin I'm

GHC rewrite rules and constructor wrappers?

2014-04-29 Thread Conal Elliott
I'm trying to sort out the relationship of GHC rewrite rules and constructor wrappers. I have rules like reify/(:) reifyEP (:) = kPrim VecSP This rule seems to fire for `reifyEP ($W:)` rather than `reifyEP (:)`. If I'm tracking (uncertain), `($W:)` inlines to `(:)`. Sometimes I'm able to

haskeline dylib failure on MacOS in GHC HEAD

2014-05-02 Thread Conal Elliott
I built GHC HEAD on MacOS 10.9.2 from GitHub yesterday and am getting an error when trying to use a problem (HERMIT) that uses haskeline: Loading package haskeline-0.7.1.2 ... command line: can't load .so/.DLL for:

Monomorphizing GHC Core?

2014-06-19 Thread Conal Elliott
Has anyone worked on a monomorphizing transformation for GHC Core? I understand that polymorphic recursion presents a challenge, and I do indeed want to work with polymorphic recursion but only on types for which the recursion bottoms out statically (i.e., each recursive call is on a smaller

Re: Monomorphizing GHC Core?

2014-06-19 Thread Conal Elliott
On Thu, Jun 19, 2014 at 3:28 PM, Conal Elliott co...@conal.net wrote: Has anyone worked on a monomorphizing transformation for GHC Core? I understand that polymorphic recursion presents a challenge, and I do indeed want to work with polymorphic recursion but only on types for which the recursion

Re: GHC rewrite rules for class operations & laws

2016-11-24 Thread Conal Elliott
; It’d be great if someone wanted to think through all this. > > > > Simon > > > > *From:* Glasgow-haskell-users [mailto:glasgow-haskell-users- > boun...@haskell.org] *On Behalf Of *Conal Elliott > *Sent:* 17 November 2016 16:40 > *To:* glasgow-haskell-users@haskell.org > *S

GHC rewrite rules for class operations & laws

2016-11-17 Thread Conal Elliott
Is it possible to apply GHC rewrite rules to class methods? From what I’ve read and seen, class methods get eliminated early by automatically-generated rules. Is there really no way to postpone such inlining until a later simplifier stage? The GHC Users Guide docs say no

Re: GHC rewrite rules for class operations & laws

2016-12-28 Thread Conal Elliott
t:13 gives more >> background. >> >> >> >> It’d be great if someone wanted to think through all this. >> >> >> >> Simon >> >> >> >> *From:* Glasgow-haskell-users [mailto:glasgow-haskell-users- >> boun..

Inlining phase control for derived methods?

2016-12-16 Thread Conal Elliott
Is it possible to control when *derived* methods get inlined, say postponing to the last simplifier phase? I'm thinking in particular of instances derived via GeneralizedNewtypeDeriving. -- Conal ___ Glasgow-haskell-users mailing list

Re: Inhibiting the specialiser?

2017-09-15 Thread Conal Elliott
ion of imported INLINABLE functions. Both of these flags are > "on" when using -O and -O2. > > -harendra > > On 15 September 2017 at 07:15, Conal Elliott <co...@conal.net> wrote: > >> Is there a GHC flag for inhibiting the specializer (but not all >> opt

Re: Inhibiting the specialiser?

2017-09-15 Thread Conal Elliott
Thanks. I somehow didn't notice that flag. On Fri, Sep 15, 2017 at 3:23 AM, Simon Peyton Jones <simo...@microsoft.com> wrote: > Did you try -fno-specialise? > > > > *From:* Glasgow-haskell-users [mailto:glasgow-haskell-users- > boun...@haskell.org] *On Behalf Of *Co

  1   2   >