Re: flexible contexts and context reduction

2008-03-26 Thread Ganesh Sittampalam
On Wed, 26 Mar 2008, Ross Paterson wrote: On Wed, Mar 26, 2008 at 08:52:43PM +, Ganesh Sittampalam wrote: I'm a bit confused about why the following program doesn't compile (in any of 6.6.1, 6.8.1 and 6.9.20080316). Shouldn't the Ord (a, b) context be reduced? To use bar, you need (Ord

GHC 6.10 changes for recursive calls to class instances

2009-02-19 Thread Ganesh Sittampalam
Hi, I have a problem in GHC 6.10 with functions in a class instance calling other functions in the same class instance. It seems that the dictionary is freshly constructed for this call, despite being already available. The reason I care is that I want to memoise some expensive computations

finalizers on handles

2009-06-20 Thread Ganesh Sittampalam
Hi, I recently spent a while debugging a problem where a program deadlocked in the non-threaded runtime, but ran fine in the threaded runtime, despite the program having no blocking FFI calls, and boiled it down to the following test case: module Main(main) where import System import

Re: finalizers on handles

2009-06-23 Thread Ganesh Sittampalam
On Tue, 23 Jun 2009, Brandon S. Allbery KF8NH wrote: On Jun 23, 2009, at 09:41 , Simon Marlow wrote: main = do (ih, oh, _, _) - runInteractiveProcess cat [] Nothing Nothing comphszp - hGetContents oh print (length comphszp) -- hClose ih -- with this line they both deadlock Note that you can

array-0.2.0.0 doesn't build with 6.12rc1

2009-10-31 Thread Ganesh Sittampalam
[ 6 of 10] Compiling Data.Array.IO( Data/Array/IO.hs, dist/build/Data/Array/IO.o ) Data/Array/IO.hs:73:13: `haFD' is not a (visible) field of constructor `Handle__' Data/Array/IO.hs:73:22: `haBuffer' is not a (visible) field of constructor `Handle__' Data/Array/IO.hs:73:36:

RE: GHC 6.12.1 and impredicative polymorphism

2009-11-02 Thread Ganesh Sittampalam
On Fri, 30 Oct 2009, Sittampalam, Ganesh wrote: Simon Peyton-Jones wrote: Fortunately, I don't think a lot of people use the feature in anger. Please yell if you *are* using impredicative polymorphism for something serious. But if you are, we need to think of a workaround. The current

Re: ANNOUNCE: GHC 7.0.1 Release Candidate 1

2010-09-27 Thread Ganesh Sittampalam
On Sun, 26 Sep 2010, Ian Lynagh wrote: We are pleased to announce the first release candidate for GHC 7.0.1: http://new-www.haskell.org/ghc/dist/7.0.1-rc1/ This includes the source tarball, installers for OS X and Windows, and bindists for amd64/Linux and i386/Linux. Please test as much

Re: MonoLocalBinds and darcs

2010-11-02 Thread Ganesh Sittampalam
Hi Neil, On Tue, 2 Nov 2010, Neil Mitchell wrote: Make sure you are using RC2 of the compiler, from what I remember RC1 required signatures it shouldn't have, or enabled MonoLocalBinds more than it should - RC2 required less signatures. However, your code could well just be heavily using the

Re: [darcs-users] How to develop on a (GHC) branch with darcs

2010-12-06 Thread Ganesh Sittampalam
On Mon, 6 Dec 2010, Simon Peyton-Jones wrote: I too wish there was a good solution here. I've taken to making dated repos, thus http://darcs.haskell.org/ghc-new-co-17Nov10 When it becomes unusable, I make a brand new repo, with a new date starting from HEAD, pull all the old

Re: [darcs-users] How to develop on a (GHC) branch with darcs

2010-12-09 Thread Ganesh Sittampalam
On Thu, 9 Dec 2010, Simon Marlow wrote: On 08/12/2010 17:39, Yitzchak Gale wrote: Some of those are already in the works, and all except possibly (5) are known to be within reach. So the answer is yes, this problem is now on the verge of being solved in Darcs. I think that might be a little

Re: [darcs-users] How to develop on a (GHC) branch with darcs

2010-12-09 Thread Ganesh Sittampalam
On Wed, 8 Dec 2010, Stephen J. Turnbull wrote: Ganesh Sittampalam writes: I think there are three things that can help with this problem: 1) a darcs rebase command. This will give you a nice way to manage the workflow already discussed, and you won't have to squish everything through

Re: weird behaviour of context resolution with FlexibleContexts and TypeFamilies

2011-02-25 Thread Ganesh Sittampalam
Hi Simon, You talk about the timing of application of the instance declaration instancePatchInspect (PrimOf p)) = Conflict p but the constraint is actually defined in the class declaration, and I don't have any instance declarations for Conflict p itself. classPatchInspect (PrimOf p)) =

Re: weird behaviour of context resolution with FlexibleContexts and TypeFamilies

2011-02-26 Thread Ganesh Sittampalam
in the meanwhile? Or I will do it tomorrow. Thanks! d- *From:* glasgow-haskell-users-boun...@haskell.org [glasgow-haskell-users-boun...@haskell.org] on behalf of Ganesh Sittampalam [gan...@earth.li] *Sent:* Friday

Re: Proposal to incorporate Haskell.org

2011-05-11 Thread Ganesh Sittampalam
On 11/05/2011 10:33, Yitzchak Gale wrote: Don Stewart wrote: The haskell.org committee... has decided to incorporate haskell.org as a legal entity. This email outlines our recommendation, and seeks input from the community on this decision. Thanks, good news! And thanks for posting to

accessing compilation parameters from template haskell

2011-09-15 Thread Ganesh Sittampalam
Hi, It would be useful to access the current compilation parameters or even an entire RunGhc monad from inside a Template Haskell splice. Is there any way to do this? The reason I want to do this is I'm using the ghc API at runtime to dynamically execute code, and I want both the dynamically

Re: Records in Haskell

2011-09-15 Thread Ganesh Sittampalam
On 15/09/2011 15:43, Ian Lynagh wrote: On Thu, Sep 15, 2011 at 08:47:30AM +, Simon Peyton-Jones wrote: Provoked the (very constructive) Yesod blog post on Limitations of Haskell, and the follow up discussion, I've started a wiki page to collect whatever ideas we have about the name

segfault/massive memory use when using Data.Bits.shiftL

2005-02-28 Thread Ganesh Sittampalam
Hi, The following either eats memory until killed or segfaults (I can't pin down a reason for the difference). Tested with GHC 6.2.2 and 6.4.20050212, with various different libgmp3s under various Redhat and Debian platforms, and WinXP. Prelude :m +Data.Bits Prelude Data.Bits

Re: segfault/massive memory use when using Data.Bits.shiftL

2005-02-28 Thread Ganesh Sittampalam
On Mon, 28 Feb 2005, Remi Turk wrote: On Mon, Feb 28, 2005 at 02:55:56PM +, Ganesh Sittampalam wrote: Prelude :m +Data.Bits Prelude Data.Bits 18446658724119492593 `shiftL` (-3586885994363551744) :: Integer and calculating, in your case, 2^3586885994363551744 is not something your

confusing GADT/scoped type variables behaviour

2007-10-22 Thread Ganesh Sittampalam
Hi, I'm having some trouble writing code that uses GADTs. I finally got something that is portable between GHC 6.6 and 6.8, but I don't really understand what's going on, and I'm a bit unhappy with the number of type signatures required. I'll explain them with a series of cut-down examples

Re: ghci changes in 6.8 that are not improvements

2007-11-21 Thread Ganesh Sittampalam
On Wed, 21 Nov 2007, Alex Jacobson wrote: Simon Marlow wrote: Alex Jacobson wrote: 1. just using : at the prompt caused a reload. Now you have to type :r. Interesting, I was not aware of that behaviour, so probably fixed it by accident :) Yeah, Igloo said the same thing. Everyone I

fundeps help

2007-12-01 Thread Ganesh Sittampalam
Hi, I'm trying to understand what fundeps do and don't let me do. One particular source of confusion is why the following program doesn't typecheck: {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} module Fundeps where class Dep a b | a - b, b - a conv :: (Dep a b1,Dep a b2)

Re: fundeps help

2007-12-03 Thread Ganesh Sittampalam
On Mon, 3 Dec 2007, Simon Peyton-Jones wrote: No, you didn't miss anything. I wouldn't expect anyone to write these types directly. But it can happen: class C a b | a-b instance C Int Bool class D x where op :: forall y. C x y = x - y instance D Int

readline package in GHC 6.0.1 on Windows

2003-09-17 Thread Ganesh Sittampalam
Hi, I notice that the readline package is missing from the Windows MSI build of GHC 6.0.1. Is this deliberate and/or a fundamental limitation of the Windows platform? Would I have to/be able to make my own Cygwin-based build to get it? Cheers, Ganesh

Re: accessing compilation parameters from template haskell

2011-09-16 Thread Ganesh Sittampalam
in *practice*! Q more or less *is* TcM. Still I don't really know how to get around this in a beautiful way. Simon | -Original Message- | From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-users- | boun...@haskell.org] On Behalf Of Ganesh Sittampalam | Sent

behaviour change in getDirectoryContents in GHC 7.2?

2011-11-01 Thread Ganesh Sittampalam
Hi, I'm just investigating what we can do about a problem with darcs' handling of non-ASCII filenames on GHC 7.2. The issue is apparently that as of GHC 7.2, getDirectoryContents now tries to decode filenames in the current locale, rather than converting a stream of bytes into characters:

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-02 Thread Ganesh Sittampalam
Hi Max, On 01/11/2011 10:23, Max Bolingbroke wrote: This is my implementation of Python's PEP 383 [1] for Haskell. IMHO this behaviour is much closer to what users expect.For example, getDirectoryContents . = print shows Unicode filenames properly. As a result of this change we were able

encoding and paths, again

2011-11-13 Thread Ganesh Sittampalam
Hi, I'm not entirely clear on what the overall situation will be once Simon M's patch to add .ByteString versions to unix is added in GHC 7.4.1. In particular the original problem darcs ran into was with getDirectoryContents in the directory package. That in turn uses the unix package on Posix

Re: [Haskell] Proposal to incorporate Haskell.org

2011-12-16 Thread Ganesh Sittampalam
Hi, As mentioned in the committee's annual report (http://haskellorg.wordpress.com/2011/10/26/first-year-report/), our attempt to join SFC has stalled because they don't have the capacity to accept new projects at the moment. We therefore applied to join SPI (http://www.spi-inc.org/), and they

Re: [Haskell] Proposal to incorporate Haskell.org

2011-12-16 Thread Ganesh Sittampalam
BTW as with the Don's original message about incorporating, I distributed this widely to increase awareness, but please restrict any feedback to haskell-cafe@ and committee@. Sorry for the noise! Ganesh On 16/12/2011 09:08, Ganesh Sittampalam wrote: Hi, As mentioned in the committee's

Re: Unit unboxed tuples

2011-12-23 Thread Ganesh Sittampalam
On 23/12/2011 13:46, Ian Lynagh wrote: On Fri, Dec 23, 2011 at 01:34:49PM +, Simon Peyton-Jones wrote: Arguments Boxed Unboxed 3 ( , , )(# , , #) 2 ( , ) (# , #) 1 0 () (# #) Simple, uniform. Uniform

problem with FFI and libsane

2012-06-06 Thread Ganesh Sittampalam
Hi, I'm having some trouble making Haskell bindings to libsane (a scanner access library: http://www.sane-project.org/) When I build the cut down sample of my code (below) with GHC 7.4.1 with the non-threaded runtime, it hangs at runtime in the call to c'sane_get_devices (after printing go).

Re: problem with FFI and libsane

2012-06-07 Thread Ganesh Sittampalam
On 07/06/2012 12:08, Simon Marlow wrote: I don't completely understand what is going wrong here, but it looks like an interaction between the RTS's use of a timer signal and the libsane library. You can make it work by turning off GHC's timer with +RTS -V0. [..] The signal has always been

Re: build failures when hiding non-visible imports

2012-08-20 Thread Ganesh Sittampalam
On 17/08/2012 11:18, Simon Peyton-Jones wrote: | Would it be reasonable to change ghc's behavior to treat this | (ie an 'import' statement that hides something that isn't exported) as a | warning instead of an error? Yes, that would be easy if it's what everyone wants. Any other opinions?

7.6.1 RC1 panic coVarsOfTcCo:Bind

2012-08-21 Thread Ganesh Sittampalam
Hi, I'm getting the panic below when building darcs 2.8 with GHC 7.6. It'll take some effort to cut it down or give repro instructions for an uncut-down version (I needed to hack a lot of underlying packages to be able to even get as far as doing this build), so could someone confirm that it's

Re: 7.6.1 RC1 panic coVarsOfTcCo:Bind

2012-08-24 Thread Ganesh Sittampalam
- | haskell-users-boun...@haskell.org] On Behalf Of Ganesh Sittampalam | Sent: 22 August 2012 06:32 | To: glasgow-haskell-users@haskell.org | Subject: 7.6.1 RC1 panic coVarsOfTcCo:Bind | | Hi, | | I'm getting the panic below when building darcs 2.8 with GHC 7.6. It'll | take some effort

Re: Installing binary tarball fails on Linux

2012-10-01 Thread Ganesh Sittampalam
On 01/10/2012 12:05, Simon Marlow wrote: This probably means that you have packages installed in your ~/.cabal from a 32-bit GHC and you're using a 64-bit one, or vice-versa. To avoid this problem you can configure cabal to put built packages into a directory containing the platform name.

Re: Dynamic libraries by default and GHC 7.8

2012-11-28 Thread Ganesh Sittampalam
On 28/11/2012 13:13, Ian Lynagh wrote: My general feeling about Windows is that it's ok for the end result to be a little annoying, because Windows DLLs *are* annoying and it's nothing to do with GHC. In particular I think in practice most Windows developers will have admin rights and could

Re: GHC 7.8 release?

2013-02-10 Thread Ganesh Sittampalam
On 10/02/2013 21:43, Ian Lynagh wrote: On Sun, Feb 10, 2013 at 09:30:23PM +, Simon Peyton-Jones wrote: | You may ask what use is a GHC release that doesn't cause a wave of updates? | And hence that doesn't work with at least some libraries. Well, it's a very useful | forcing

implicit params in instance contexts

2013-07-16 Thread Ganesh Sittampalam
Hi, It seems that from GHC 7.4, the prohibition on implicit parameter constraints in instance declarations has been relaxed. The program below gives the error Illegal constraint ?fooRev::Bool in GHC 7.2.1 but loads fine in GHC 7.4.2 and GHC 7.6.2. I can't spot anything about this in the release

Re: default roles

2013-10-07 Thread Ganesh Sittampalam
Is it possible to tie the role to whether the data constructor is visible or not? On 07/10/2013 14:26, Richard Eisenberg wrote: As you may have heard, /roles/ will be introduced with GHC 7.8. Roles are a mechanism to allow for safe 0-cost conversions between newtypes and their base types.

Re: default roles

2013-10-09 Thread Ganesh Sittampalam
I think it would be ok to expect the constructors to be visible, even though it might need to a lot being needed. BTW I think you might need S1 visible as well otherwise how would you convert (S1 True :: S Bool Int) into (S1 True :: S Bool Age)? If you don't derive the role from constructor

Re: RFC: include a cabal-install executable in future GHC releases

2014-01-21 Thread Ganesh Sittampalam
I feel this blurs the roles of GHC and the Platform. Can't the cabal-install that comes with the Platform can be used with a later GHC installation? If that's correct, then the only use case that this proposal covers is someone who wants to use a bleeding edge GHC and no other version on a new

Re: RFC: include a cabal-install executable in future GHC releases

2014-01-21 Thread Ganesh Sittampalam
releases. Ideally the binaries could be produced on a build bot. The very least we should have the Makefile in the cabal repo being able to create the binary in a reproducible manner. -- Johan On Tue, Jan 21, 2014 at 11:22 AM, Ganesh Sittampalam gan...@earth.li mailto:gan...@earth.li wrote

Re: ANNOUNCE: GHC 7.8.1 Release Candidate 1

2014-02-03 Thread Ganesh Sittampalam
Just to note a problem I encountered on Windows, which may well be user error. I unpacked the mingw tarball and added the bin directory from it to my path. cabal install then failed with cabal.exe: does not exist after producing some other output. Running with -v3 suggested that the actual

Re: PROPOSAL: Literate haskell and module file names

2014-03-16 Thread Ganesh Sittampalam
The behaviour could be invoked only for lower-case parts, but that may prove problematic on case-insensitive filesystems like Windows. On 16/03/2014 13:52, Carter Schonwald wrote: Idk, this behavior of doing Data.Vector.lhs seems pretty awesome. I actually might start doing that. That ghc

Re: [core libraries] Re: Tightening up on inferred type signatures

2014-04-30 Thread Ganesh Sittampalam
On 23/04/2014 20:04, dm-list-haskell-librar...@scs.stanford.edu wrote: Edward Kmett ekm...@gmail.com writes: You can wind up in perfectly legitimate situations where the name for the type you are working with isn't in scope, but where you can write a combinator that would infer to have that

exhausted simplifier ticks and hs-boot files

2019-08-05 Thread Ganesh Sittampalam
Hi, The code below (also attached - unzip and run go.sh) triggers the GHC panic "Simplifier ticks exhausted", and I'm unsure whether I should view it as an instance of the known infelicity in the inliner (https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/bugs.html#bugs-ghc) My code