RE: Proposal: Scoping rule change

2012-07-27 Thread Sittampalam, Ganesh
Hi Iavor, In your example using import qualified would also resolve the clash, although if you were importing two symbols from Text.PrettyPrint you might like to be able to use the other one unqualified. In my experience using the current module name for qualification is pretty rare already, but

RE: Proposal: Scoping rule change

2012-07-25 Thread Sittampalam, Ganesh
The ... foo ... in my example was intended to show that module M does look up 'foo'. From: Manuel M T Chakravarty [mailto:c...@cse.unsw.edu.au] Sent: 25 July 2012 08:26 To: Sittampalam, Ganesh Cc: Lennart Augustsson; Haskell Prime Subject: Re: Proposal: Scoping rule change If Lennart's

RE: Proposal: Scoping rule change

2012-07-25 Thread Sittampalam, Ganesh
rather than being imported from I - but as it doesn't avoid the need for them in general I'm not sure that it is worth it. Ganesh From: Manuel M T Chakravarty [mailto:c...@cse.unsw.edu.au] Sent: 25 July 2012 10:25 To: Sittampalam, Ganesh Cc: Lennart Augustsson; Haskell Prime Subject: Re

RE: Proposal: Scoping rule change

2012-07-24 Thread Sittampalam, Ganesh
If you're using unqualified and unrestricted imports, there's still the risk that another module will export something you care about, e.g. module M where import I -- currently exports foo import J -- might be changed in future to export foo ... foo ... So I think you need to use

weird behaviour of context resolution with FlexibleContexts and TypeFamilies

2011-02-23 Thread Sittampalam, Ganesh
Hi, If I build the code below with -DVER=2, I get a complaint about PatchInspect (PrimOf p) being missing from the context of cleverNamedResolve. This doesn't happen with -DVER=1 or -DVER=3 I presume that type class resolution is operating slightly differently in the different cases, but it's

RE: backward compatibility

2011-01-20 Thread Sittampalam, Ganesh
Simon Marlow wrote: Hopefully that explains why sometimes we make breaking changes. If the breaking change has a high enough impact, then it becomes worthwhile to add backwards compatibility (via warnings / deprecation or whatever). Of course from the point of view of the user, the

Re: [Haskell] Functor = Applicative = Monad

2010-12-14 Thread Sittampalam, Ganesh
John Smith wrote: I would like to formally propose that Monad become a subclass of Applicative, with a call for consensus by 1 February. I would prefer that we have some proposal like class aliases implemented before we start fundamental restructuring of basic type classes. This would help to

RE: Non-exhaustive pattern match(es) warning in lambda functions

2010-11-17 Thread Sittampalam, Ganesh
Mitar wrote: Hi! On Thu, Sep 23, 2010 at 2:19 PM, Christian Maeder christian.mae...@dfki.de wrote: I tend to introduce artificial error cases for the Impossible, to avoid warnings, although the compiler generated error messages are better to locate the problem. But this is often

MonoLocalBinds and darcs

2010-11-02 Thread Sittampalam, Ganesh
Hi, I've just been updating darcs 2.5 for GHC 7.0. I had to add about 40 signatures for MonoLocalBinds in about 140 files/30K LOC. Is that about normal? darcs does make fairly heavy use of rank 2 polymorphism which leads to quite a lot of local definitions needing to be polymorphic. Also,

RE: MonoLocalBinds and darcs

2010-11-02 Thread Sittampalam, Ganesh
Simon Marlow wrote: On 02/11/2010 07:37, Sittampalam, Ganesh wrote: I've just been updating darcs 2.5 for GHC 7.0. I had to add about 40 signatures for MonoLocalBinds in about 140 files/30K LOC. Is that about normal? darcs does make fairly heavy use of rank 2 polymorphism which leads to quite

RE: [Haskell-cafe] libffi mystery

2010-10-28 Thread Sittampalam, Ganesh
Conor McBride wrote: Is there some way I can get some more static linking to happen? I did poke about online a bit and found some remarks to the effect that GHC got so much more portable after switching to the dynamic libffi. That sounds great, but tough luck for me. So, being both

RE: [Haskell-cafe] Bug in HTTP (bad internal error handling)

2010-10-22 Thread Sittampalam, Ganesh
Bit Connor wrote: On Sat, Oct 16, 2010 at 10:29 AM, Claus Reinke claus.rei...@talk21.com wrote: After it catches this error, the function returns (line 376): return (fail (show e)) The fail is running in the Either monad (The Result type = Either). This calls the default Monad

RE: [Haskell-cafe] ANNOUNCE: tls, native TLS/SSL protocolimplementation

2010-10-11 Thread Sittampalam, Ganesh
Vincent Hanquez wrote: On Fri, Oct 08, 2010 at 12:54:48PM +0100, Sittampalam, Ganesh wrote: What's the motivation for this? Well, I wanted to have a tls/ssl module that integrate nicely with haskell. until then the 2 solutions were: - shelling out to curl: that's not great, usually

RE: [Haskell-cafe] ANNOUNCE: tls, native TLS/SSL protocolimplementation

2010-10-08 Thread Sittampalam, Ganesh
Vincent Hanquez wrote: On Fri, Oct 08, 2010 at 11:14:01AM +0530, C K Kashyap wrote: Does native mean Haskell only - without FFI? Native means the implementation is in haskell, and the library is not using another implementation (in another language) to do the work: either through FFI as a

RE: [Haskell-cafe] base-3 - base-4

2010-09-03 Thread Sittampalam, Ganesh
Johannes Waldmann wrote: Is there a conversion guide for switching from base-3 to base-4? I noticed that ghc-HEAD (6.13) comes with base-4.3 (and no base-3). This will break an awful lot of packages (?), in fact the breakage starts with cabal-install (since it depends on HTTP which depends

RE: [Haskell-cafe] Page rank and GHC docs directory organization

2010-07-23 Thread Sittampalam, Ganesh
Ketil Malde wrote: Robin KAY komad...@gekkou.co.uk writes: the redirects and ignore the original URLs [2]. Using a 302 Found redirect instead might produce better results, at least for Google But the page you point to suggests 302 is discouraged, and says they don't help for the other

RE: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Sittampalam, Ganesh
Mark Wotton wrote: Perhaps cabal should print a warning if you have a Setup.hs file, _and_ try to use Simple? It'd at least give the hint that they're unhappy together. I think it should instead verify that Setup.hs is consistent with a Simple build. I don't know how much variation exists,

RE: [Haskell] Another Haskell job opportunity

2010-07-19 Thread Sittampalam, Ganesh
Simon Peyton-Jones wrote: A new Job entitles 'WANTED Haskell Developer - Investment Banking - Openings in London, NY and Asia' has been submitted by Carrington Fox (http://cufp.org/user/121). It will remain unavailable to general users until it is reviewed and published by one of our

RE: [Haskell-cafe] Ocaml for Haskellers tutorial

2010-04-16 Thread Sittampalam, Ganesh
Stephen Tetley wrote: I suspect the difference between the ML module system vs. typeclasses will be as important as lazy vs. strict. As a style point, Ocaml programmers don't seem too prone to combinator mania - so I think golf is a bit less popular over there. Both the lack of laziness

RE: interaction of GADTs and data families: a bug?

2010-04-15 Thread Sittampalam, Ganesh
Sebastian Fischer wrote: Dear GHC experts, Certain behaviour when using {-# LANGUAGE GADTs, TypeFamilies #-} surprises me. The following is accepted by GHC 6.12.1: data GADT a where BoolGADT :: GADT Bool foo :: GADT a - a - Int foo BoolGADT True = 42

RE: interaction of GADTs and data families: a bug?

2010-04-15 Thread Sittampalam, Ganesh
Sebastian Fischer wrote: With GADTs, the specific choice of constructor is what gives you the type matching functionality. My intention was to use a GADT as data family instance (hence, I wrote it in GADT style and it was accepted as such). Can't GADTs be used as data family instances?

RE: [Haskell-cafe] Re: Asynchronous exception wormholes kill modularity

2010-04-07 Thread Sittampalam, Ganesh
Simon Marlow wrote: I came to the conclusion that counting nesting layers doesn't solve the problem: the wormhole still exists in the form of nested unmasks. That is, a library function could always escape out of a masked context by writing unmask $ unmask $ unmask $ ... enough

RE: [Haskell-cafe] Re: Hackage accounts and real names

2010-04-06 Thread Sittampalam, Ganesh
Ivan Miljenovic wrote: 5) No-one is convincing anyone else to their point of view, so we have a stale mate. Would allowing pseudonyms but requiring them to be explicitly marked as such be an acceptable compromise? Ganesh

RE: [Haskell-cafe] Re: Where are the haskell elders?

2010-04-01 Thread Sittampalam, Ganesh
Günther Schmidt wrote: Is there a listing of sorts for all Haskell-relevant blogs? http://planet.haskell.org Ganesh === Please access the attached hyperlink for an important electronic communications disclaimer:

RE: static_wrapper imports in the FFI

2010-03-16 Thread Sittampalam, Ganesh
Try darcs optimize --reorder in your repo, or pull your patch into a freshly got repo. (Annoying internal detail of darcs - it probably won't use the tag unless it's clean, which requires that any patches not included in the tag should be after it in the repo order) -Original Message-

RE: Fixing floating point conversions.

2010-02-25 Thread Sittampalam, Ganesh
Nick Bowler wrote: *** Idea #3 *** Use a multi-parameter type class: We couldn't go down this route until MPTCs themselves are added to the language, which I think is unlikely to be soon as the whole fundeps/type families issue is still unresolved. Ganesh

RE: Negation

2010-02-09 Thread Sittampalam, Ganesh
Lennart Augustsson wrote: Of course unary minus should bind tighter than any infix operator. I remember suggesting this when the language was designed, but the Haskell committee was very set against it (mostly Joe Fasel I think). Are there archives of this discussion anywhere? Cheers,

RE: [Haskell-cafe] Lazy language on JVM/CLR

2010-02-09 Thread Sittampalam, Ganesh
Tom Lokhorst wrote: Also, I wonder if there is some efficient way of implementing the Lazy class, perhaps by having the Force method using runtime code generation to override itself. I don't know if this is possible, but I vaguely remember the Dynamic Language Runtime on .NET doing something

RE: [Haskell-cafe] Anyone up for Google SoC 2010?

2010-02-05 Thread Sittampalam, Ganesh
Gwern Branwen wrote: On Wed, Feb 3, 2010 at 8:14 PM, Henk-Jan van Tuyl hjgt...@chello.nl wrote: On Wed, 03 Feb 2010 23:34:34 +0100, Neil Mitchell ndmitch...@gmail.com wrote: Hi Gwern, Please update: haskell-src-exts - haskell-src **Unknown** This project was an unqualified success.  

RE: [Haskell-cafe] How to fulfill the code-reuse destiny of OOP?

2010-01-13 Thread Sittampalam, Ganesh
The problem with interfaces as a replacement for type classes is that they only provide dispatch based on the specific type of the first argument (i.e. the receiver). Type classes allow you to dispatch based on return type, and on the instantiations of generic parameters. Neither of these things

RE: [Haskell-cafe] mtl and transformers

2010-01-11 Thread Sittampalam, Ganesh
Ivan Lazar Miljenovic wrote: Martijn van Steenbergen mart...@van.steenbergen.nl writes: Another solution is to build your applications using Cabal and specify your dependency on mtl in the cabal file. But until we have cabal ghci, this completely fails for actual hacking purposes... Just

RE: [Haskell-cafe] darcs 2.4 beta 1 release

2010-01-06 Thread Sittampalam, Ganesh
Obviously source code documentation would be nice, but why is it show-stopping? Ivan Lazar Miljenovic wrote: I really feel that bug 1720 [1] is a show-stopping bug for darcs, especially since it means that building Haddock for darcs with GHC-6.12.* isn't possible. [1]

RE: [Haskell-cafe] Re: no sparks?

2009-12-21 Thread Sittampalam, Ganesh
\a b - Left a `amb` Right b From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Jamie Morgenstern Sent: 21 December 2009 16:50 To: Benedikt Huber Cc: haskell-cafe@haskell.org Subject: [Haskell-cafe] Re: no sparks? Thank

RE: (alpha) stick shift cabal install for GHC 6.12.1

2009-12-18 Thread Sittampalam, Ganesh
Dave Bayer wrote: There's clearly something wrong with this picture. A Rorschach blot test as to what's wrong, but I see people overreaching, if I have to wait weeks for a simple install tool, then months for the Haskell Platform to be ready. Hopefully future GHC releases will go more

RE: [Haskell-cafe] ANN: hakyll-0.1

2009-12-08 Thread Sittampalam, Ganesh
Gregory Crosswhite wrote: Tom Tobin wrote: The 3 clause BSD license is officially a GPL compatible license. See: http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses It is within the terms of the GPL to link GPL code to a bunch of BSD3 code as long as you abide by

RE: [Haskell-cafe] Announcing the GHC Bug Sweep

2009-11-17 Thread Sittampalam, Ganesh
Simon Marlow wrote: This is a game for the whole family! We don't care how much progress you make on each ticket, just as long as someone has taken a look and moved the ticket forward in some way. For example, you might check for duplicates, update the metadata, ask for more information

RE: [Haskell-cafe] Working with multiple projects

2009-11-11 Thread Sittampalam, Ganesh
To install a package from local sources, just run 'cabal install' in the directory with the package's .cabal file. Tony Morris wrote: I don't want to have to upload every time I make a minor change as I am working. Surely there is an easier way. Martijn van Steenbergen wrote: Tony Morris

RE: array-0.2.0.0 doesn't build with 6.12rc1

2009-11-02 Thread Sittampalam, Ganesh
Ross Paterson wrote: On Mon, Nov 02, 2009 at 02:05:01PM +, Simon Marlow wrote: You need array 0.3.0.0 which comes with GHC 6.12rc1, but is (probably) not on Hackage yet. No it isn't: array-0.3.0.0 will be defined by what's released in GHC 6.12. That creates a timing problem, given that

RE: array-0.2.0.0 doesn't build with 6.12rc1

2009-11-02 Thread Sittampalam, Ganesh
Ian Lynagh wrote: You already have the array 0.3.0.0 package if you installed the RC. The problem is that the darcs.cabal file says: build-depends: [...] array = 0.1 0.3, [...] so it's not using it. Oh, I see. Sorry for the noise - I got

RE: GHC 6.12.1 and impredicative polymorphism

2009-10-30 Thread Sittampalam, Ganesh
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 situation seems unsustainable. I think darcs is

RE: 6.12.1 release

2009-10-22 Thread Sittampalam, Ganesh
Simon Marlow wrote: The current dilemma we're facing with the 6.12.1 release is this: cabal-install still needs to be ported to the new version of Cabal, Duncan is snowed under and doesn't have time to work on it, but without cabal-install people can't easily test 6.12.1 RC and we can't test

RE: [Haskell-cafe] A proposals

2009-09-28 Thread Sittampalam, Ganesh
Martijn van Steenbergen wrote: wren ng thornton wrote: Another nice thing this suggests is the ability to use underscore as a pattern for when you know the compiler will infer the type but it's too complex to want to write out (e.g. while experimenting). I'd love this! F# has this and I

RE: [Haskell-cafe] Haskell - .NET

2009-09-16 Thread Sittampalam, Ganesh
I think Sigbjorn's binding (http://haskell.forkio.com/dotnet/ http://haskell.forkio.com/dotnet/ as linked below) is the most complete and likely to work, but it's still just a binding not a compiler backend. From: haskell-cafe-boun...@haskell.org

RE: [Haskell-cafe] Control.Exception base-3/base-4 woes

2009-09-11 Thread Sittampalam, Ganesh
Neil Brown wrote: Can anyone tell me how to fix this? I don't think that changing to always use Control.Exception would fix this, because I need to give a different type for catch in base-3 to base-4, so there's still the incompatibility to be dealt with.

RE: Libraries in the repo

2009-08-27 Thread Sittampalam, Ganesh
Simon Marlow wrote: I suggest if we stick with the independent repo approach that we have some automation to check that changes are indeed getting pushed upstream. Agreed. Can you think of an easy way to automate it? How about a cronjob that runs darcs send upstream-repo --to=some-list

RE: Libraries in the repo

2009-08-27 Thread Sittampalam, Ganesh
Simon Marlow wrote: On 27/08/2009 11:18, Sittampalam, Ganesh wrote: Simon Marlow wrote: I suggest if we stick with the independent repo approach that we have some automation to check that changes are indeed getting pushed upstream. Agreed. Can you think of an easy way to automate

RE: Libraries in the repo

2009-08-27 Thread Sittampalam, Ganesh
Simon Marlow wrote: Simon Marlow wrote: I suggest if we stick with the independent repo approach that we have some automation to check that changes are indeed getting pushed upstream. [snip unhelpful suggestion from me] Yes, it tells you that you've screwed up, rather than telling you

[Haskell] Credit Suisse is hiring

2009-08-17 Thread Sittampalam, Ganesh
Hi, Just to chime in with the spate of job advertisements, the Global Modelling and Analytics Group (GMAG) at Credit Suisse is once again looking to hire functional programmers. The group consists of about 130 people worldwide. The majority of the group are mathematicians engaged in

[Haskell-cafe] Credit Suisse is hiring

2009-08-17 Thread Sittampalam, Ganesh
Hi, Just to chime in with the spate of job advertisements, the Global Modelling and Analytics Group (GMAG) at Credit Suisse is once again looking to hire functional programmers. The group consists of about 130 people worldwide. The majority of the group are mathematicians engaged in

RE: [Haskell-cafe] Re: DDC compiler and effects; better than Haskell?

2009-08-13 Thread Sittampalam, Ganesh
What would preOrder foldr/foldl mean? What about preOrder (reverse . map) and preOrder (map . reverse) ? Another option would be for map to take a strategy as a parameter, sort of like Control.Parallel.Strategies. Peter Verswyvelen wrote: Well, in DDC I believe the order is left to right.

RE: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-28 Thread Sittampalam, Ganesh
Cale Gibbard wrote: There was a great related idea on #haskell the other day: Make explicit qualification unnecessary whenever there is a *unique* choice of module qualifications from those imported which would make the expression typecheck. Ambiguities would still need to be qualified, but

RE: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-28 Thread Sittampalam, Ganesh
(To be clear, this about Cale's proposal, not simonpj's one) Johannes Waldmann wrote: Sittampalam, Ganesh wrote: ... it would make it substantially less likely that subexpressions could be abstracted into a separate declaration without giving a type signature to fix the type of the new

RE: [Haskell-cafe] powerSet = filterM (const [True, False]) ... is this obfuscated haskell?

2009-07-28 Thread Sittampalam, Ganesh
perms = sortByM (const [True,False]) This doesn't seem right, since the comparison function is inconsistent and moreover the results will depend on the sorting algorithm chosen. Ganesh === Please access the attached

RE: [Haskell-cafe] powerSet = filterM (const [True, False]) ... is this obfuscated haskell?

2009-07-28 Thread Sittampalam, Ganesh
Sebastian Fischer wrote: On Jul 28, 2009, at 11:06 AM, Sittampalam, Ganesh wrote: perms = sortByM (const [True,False]) and moreover the results will depend on the sorting algorithm chosen. Is it only that different sorting algorithms enumerate all permutations in different orders

RE: StricterLabelledFieldSyntax

2009-07-27 Thread Sittampalam, Ganesh
Ian Lynagh wrote: Hi all, I've made a ticket and proposal page for making the labelled field syntax stricter, e.g. making this illegal: data A = A {x :: Int} y :: Maybe A y = Just A {x = 5} +1: The precedence here is an ugly wart. It's particularly annoying when teaching

RE: Fwd: Generating valid Haskell code using the GHC API pretty printer

2009-07-23 Thread Sittampalam, Ganesh
Niklas Broberg wrote: I believe, Language.Haskell.Pretty can properly output haskell code (and the GHC API should be able to do so, too. Does the GHC API output tabs?) Surely you mean Language.Haskell.Exts.Pretty, right? ;-) The haskell-src-exts library does not (yet) support full

RE: Proposal: Deprecate ExistentialQuantification

2009-07-23 Thread Sittampalam, Ganesh
One can use the following style of GADT definition, which avoids the type variables in the declaration: {-# LANGUAGE GADTs, KindSignatures #-} module GADT where data Foo :: * - * where Foo :: Int - Foo Int Iavor Diatchki wrote: Hello, Sorry for responding so late---I just saw the thread.

RE: [Haskell-cafe] Implicit concatenation in list comprehensions

2009-07-20 Thread Sittampalam, Ganesh
Roel van Dijk wrote: On Mon, Jul 20, 2009 at 1:27 PM, Roel van Dijkvandijk.r...@gmail.com wrote: I think the tuple sections are a great idea! It also makes tuple types and constructors more alike: x :: (,) String Double x = (,) Pi 3.14159 I just realised this is already in GHC :-) But

RE: Re[4]: Haskell 2010: libraries

2009-07-14 Thread Sittampalam, Ganesh
Bulat Ziganshin wrote: Hello Ganesh, Tuesday, July 14, 2009, 11:59:00 AM, you wrote: I don't have any strong opinion about whether there should be a library standard or not, but if there is a standard, how about putting the entire thing (perhaps including the Prelude) under the prefix

RE: finalizers on handles

2009-06-23 Thread Sittampalam, Ganesh
Simon Marlow wrote: On 20/06/2009 21:46, Ganesh Sittampalam wrote: If I'm right, is it really sensible for every handle to have this finalizer? Closing a pipe has externally visible side effects beyond just the release of resources, so it doesn't seem like it should happen

RE: Three patches for cabal

2009-06-18 Thread Sittampalam, Ganesh
Duncan Coutts wrote: Niklas's and my point is that the list of language extensions in Language.Haskell.Exceptions are differences from H98 so it should be MonoPatBinds to get the difference not NoMonoPatBinds to restore H98. In practise, since ghc uses MonoPatBinds by default it'd

RE: [Haskell-cafe] A small puzzle: inTwain as function of foldr

2009-06-04 Thread Sittampalam, Ganesh
Martijn van Steenbergen wrote: Consider the function inTwain that splits a list of even length evenly into two sublists: inTwain Hello world! (Hello ,world!) Is it possible to implement inTwain such that the recursion is done by one of the standard list folds? Does this help?

RE: [Haskell-cafe] Bool as type class to serve EDSLs.

2009-05-28 Thread Sittampalam, Ganesh
There are multiple possible classes that you might want under different circumstances (I think the most interesting issue is whether the class (==), () etc is in has a fundep from the type of the thing being compared to the type of the boolean), but if NoImplicitPrelude (or some other extension)

RE: [Haskell-cafe] I love purity, but it's killing me.

2009-05-27 Thread Sittampalam, Ganesh
Sebastiaan Visser wrote: On May 27, 2009, at 1:49 AM, Conal Elliott wrote: Hi Tom, I've been working on another code-generating graphics compiler, generating GPU code. As always, I run into the problem of efficient common subexpression elimination. In Pan, Vertigo Pajama, I used lazy

RE: [Haskell-cafe] I love purity, but it's killing me.

2009-05-27 Thread Sittampalam, Ganesh
Elliott Sent: 27 May 2009 16:14 To: Sittampalam, Ganesh Cc: Haskell Cafe Subject: Re: [Haskell-cafe] I love purity, but it's killing me. In my experience [1], observable sharing using GHC's stable names is a pretty effective solution to this problem. Plus unsafePerformIO and weak references

RE: [Haskell-cafe] Strange type error with associated type synonyms

2009-05-27 Thread Sittampalam, Ganesh
Simon Peyton-Jones wrote: NoMatchErr.hs:20:11: Couldn't match expected type `Memo d' against inferred type `Memo d1' NB: `Memo' is a (non-injective) type function In the second argument of `(.)', namely `appl' In the expression: abst . appl In the

RE: [Haskell-cafe] Re: [Haskell] [ANN] Safe Lazy IO in Haskell

2009-05-19 Thread Sittampalam, Ganesh
Nicolas Pouillard wrote: Excerpts from Ryan Ingram's message of Tue May 19 10:23:01 +0200 2009: To be fair, you can do this with some extensions; I first saw this in a paper on Oleg's site [1]. Here's some sample code: This seems like the same trick as the rmonad package:

RE: [Haskell-cafe] conflicting variable definitions in pattern

2009-05-15 Thread Sittampalam, Ganesh
Martin Hofmann wrote: It is pretty clear, that the following is not a valid Haskell pattern: foo (x:x:xs) = x:xs My questions is _why_ this is not allowed. IMHO, the semantics should be clear: The pattern is expected to succeed, iff 'x' is each time bound to the same term. How do you

RE: [Haskell-cafe] conflicting variable definitions in pattern

2009-05-15 Thread Sittampalam, Ganesh
Conor McBride wrote: On 15 May 2009, at 09:11, Sittampalam, Ganesh wrote: but then pattern matching can introduce Eq constraints which some might see as a bit odd. Doesn't seem that odd to me. Plenty of other language features come with constraints attached. It's the introduction

RE: GHCi's search path

2009-05-13 Thread Sittampalam, Ganesh
Peter Gammie wrote: On 13/05/2009, at 6:43 PM, Bayley, Alistair wrote: From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-users-boun...@haskell.org] On Behalf Of Peter Gammie The semantics I want is: - use the Cabal-built objects/hi files in dist/build if they're

RE: [Haskell-cafe] Removing mtl from the Haskell Platform

2009-05-13 Thread Sittampalam, Ganesh
rocon...@theorem.ca wrote: I think that use of the mtl should be deprecated so that we move on to improved monad transformer libraries. Having the mtl in the Haskell Platform does the opposite by further entrenching its use, possibly to the point where we may not be able to get rid of it for

RE: [darcs-users] [Haskell-cafe] Darcs as undo/redo system?

2009-05-12 Thread Sittampalam, Ganesh
Wolfgang Jeltsch wrote: Am Freitag, 8. Mai 2009 18:43 schrieb Jason Dagit: If you wanted to work on this, I would encourage you to read more about patch theory[1,2,3,4] and also try out libdarcs[5]. Is libdarcs the same as the darcs library package on Hackage (which exports the darcs API)?

RE: [Haskell-cafe] is value evaluated?

2009-05-09 Thread Sittampalam, Ganesh
Brandon S. Allbery KF8NH wrote: On May 8, 2009, at 16:31 , Sittampalam, Ganesh wrote: Brandon S. Allbery KF8NH wrote: Unless it catches exceptions itself (which strikes me as a bad idea; it becomes a trivial way to ignore exceptions, leading to bad programming practices) either they're

RE: [Haskell-cafe] Why is Bool no instance of Num and Bits?

2009-05-08 Thread Sittampalam, Ganesh
Stephan Friedrichs wrote: When looking for an xor function, I found one in Data.Bits but couldn't use it for Bool, because Bool is no instance of Bits and of Num (which would be necessary, because it's class (Num b) = Bits b). My question is: Why not? [...] quite trivial... Why is this

RE: [Haskell-cafe] is value evaluated?

2009-05-08 Thread Sittampalam, Ganesh
Brandon S. Allbery KF8NH wrote: On May 8, 2009, at 01:33 , Joe Fredette wrote: That strikes me as being bad in a I'm violating the Halting Problem sort of way- but I'm not sure how. Is there some contradictory construction that could be built from such a function? I don't think it is;

RE: [Haskell-cafe] is value evaluated?

2009-05-08 Thread Sittampalam, Ganesh
Brandon S. Allbery KF8NH wrote: On May 8, 2009, at 13:08 , Sittampalam, Ganesh wrote: Brandon S. Allbery KF8NH wrote: and therefore must be in IO. You may be thinking that it would return a result for _|_, but as described if you fed it _|_ it could only produce False (if the _|_ has been

RE: [Haskell-cafe] Data.Map and strictness (was: Is Haskell a GoodChoice for WebApplications?(ANN: Vocabulink))

2009-05-07 Thread Sittampalam, Ganesh
seq something like size map that will force a traversal of the entire tree, and ensure that the result is actually demanded, e.g. when writing to a TVar: do ... let map' = Data.Map.delete key map size map' `seq` writeTVar tvar map' ... (Not tested) Note that this also won't force any

RE: [Haskell-cafe] Template Haskell + Profiling

2009-04-24 Thread Sittampalam, Ganesh
Do your profiling builds with -osuf p_o -hisuf p_hi, and then run a non-profiling build first. This means that both sets of object/hi files are available which placates TH. Ganesh From: haskell-cafe-boun...@haskell.org

RE: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Sittampalam, Ganesh
Ryan Ingram wrote: There was another talk about compiling Haskell into Excel spreadsheets for finance, but I can't seem to locate it right now. It was an ICFP experience report. http://www.earth.li/~ganesh/research/paradise-icfp08 Ganesh

RE: [Haskell-cafe] (n+k) patterns

2009-04-23 Thread Sittampalam, Ganesh
Richard O'Keefe wrote: The thing is that it really seems bizarre to see this one feature singled out for non-implementation. If I can do the equivalent of n+k patterns by programming in the *type system*, why *not* in a pattern? Do you mean by something like the following? data Z = Z

RE: [Haskell-cafe] Re: ANNOUNCE: Utrecht Haskell Compiler (UHC) --first release

2009-04-23 Thread Sittampalam, Ganesh
Jon Fairbairn wrote: John A. De Goes j...@n-brain.net writes: That's absurd. You have no way to access private source code, so any decision on what features to exclude from future versions of Haskell must necessarily look at publicly accessible source code. This is all entirely beside the

RE: [Haskell-cafe] Re: ANNOUNCE: Utrecht Haskell Compiler (UHC) --firstrelease

2009-04-23 Thread Sittampalam, Ganesh
Jon Fairbairn wrote: Sittampalam, Ganesh ganesh.sittampa...@credit-suisse.com writes: So I would say that {Haskell 98 - (n+k)} is itself a worthwhile standard to implement. It's not a standard. You have to document the difference (waste of time), programmers have to notice the difference

RE: [Haskell-cafe] Re: ANNOUNCE: Utrecht Haskell Compiler (UHC) --first release

2009-04-20 Thread Sittampalam, Ganesh
Miguel Mitrofanov wrote: Jon Fairbairn wrote on 20.04.2009 13:59: Achim Schneider bars...@web.de writes: Jon Fairbairn jon.fairba...@cl.cam.ac.uk wrote: a...@cs.uu.nl writes: Utrecht Haskell Compiler -- first release, version 1.0.0

RE: [Haskell-cafe] ANNOUNCE: vacuum-cairo: a cairo frontend to vacuumfor live Haskell data visualization

2009-03-31 Thread Sittampalam, Ganesh
I have this problem too, but I don't understand it because librsvg-2-2.dll is in the same directory as the rest of the gtk2hs DLLs - c:/gtk2hs/0.10.0/bin on my system. Yesterday I was also having trouble with not being able to find the glib DLL but that problem has mysteriously vanished today

RE: [Haskell-cafe] Conditional compilation

2009-03-28 Thread Sittampalam, Ganesh
Robin Green wrote: I am writing some code for citation support in gitit, and all the #ifdefs I'm using to do conditional compilation are a bit tiresome. Suppose you have the requirement that a certain feature of your software be disable-able at compile time, to avoid having to pull in

RE: Specific denotations for pure types

2009-03-21 Thread Sittampalam, Ganesh
Are you proposing to ban all implementation-dependent behaviour everywhere in Haskell? (Or perhaps relegate it all to IO?) From: haskell-prime-boun...@haskell.org [mailto:haskell-prime-boun...@haskell.org] On Behalf Of Conal Elliott Sent: 21 March 2009 00:56 To:

RE: [Haskell-cafe] Re: Haskell Logo write-in candidate

2009-03-20 Thread Sittampalam, Ganesh
Jon Fairbairn wrote: semi-rant warning: This whole badge/logo business seems to me to be an excellent example of Parkinson's law of triviality (choosing the colour of the bikeshed). We have a large (too large) number of variations on relatively few themes and a really sophisticated

RE: [Haskell-cafe] Crash in GHCI - what is the correct behavior here?

2009-03-19 Thread Sittampalam, Ganesh
I also see a segfault on Windows XP SP2 and GHC 6.10.1, very quick so I'm fairly sure it's not memory. I agree this should be a bug report. From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Luke Palmer Sent: 19 March

RE: [Haskell-cafe] Does anybody dislike implicit params as much asI do?

2009-03-13 Thread Sittampalam, Ganesh
Jules Bean wrote: Thomas Hartman wrote: http://blog.patch-tag.com/2009/03/09/implicitparams-are-evil-thoughts- on-adapting-gitit/ I understand there are arguments for using IPs, but after this experience, the ImplicitParams extension is a code smell for me. It's not just you. Implicit

RE: [Haskell-cafe] Request: warn about language extensions that are not used

2009-03-12 Thread Sittampalam, Ganesh
As I understand it the current scheme is that you vote for a bug by adding yourself to the CC list. From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Peter Verswyvelen Sent: 12 March 2009 14:27 To: Conal Elliott Cc:

RE: [Haskell-cafe] Performance question

2009-02-26 Thread Sittampalam, Ganesh
Ben Lippmeier wrote: The first thing I would do is replace your isInCircle :: (Floating a, Ord a) = (a,a) - Bool with isInCircle :: (Double, Double) - Bool Can you point me to why that matters? At the machine level, GHC treats the (Floating a, Ord a) as an extra argument to the

RE: [Haskell-cafe] Re: Hoogle and Network.Socket

2009-02-25 Thread Sittampalam, Ganesh
Jonathan Cast wrote: On Wed, 2009-02-25 at 10:23 +, John Lato wrote: 4. Cross-platform concerns are something that responsible developers need to consider, just like localization and i18n. I.e., why *shouldn't* you think of that? Sorry, wtf? I have a *responsibility* to design

RE: [Haskell-cafe] Memoization local to a function

2009-02-25 Thread Sittampalam, Ganesh
Dusan Kolar wrote: Nevertheless, local version does not work. Restructure your code like this: fibL m = let allfib = 0:1:[allfib!!n + allfib!!(n+1) | n - [0..]] in allfib !! m fibL = let allfib = 0:1:[allfib!!n + allfib!!(n+1) | n - [0..]] in \m - allfib !! m i.e. move

RE: [Haskell-cafe] Hac5 projects page

2009-02-24 Thread Sittampalam, Ganesh
Wolfgang Jeltsch wrote: on http://www.haskell.org/haskellwiki/Hac5/Projects, you can list a project under Project descriptions and under Experiences. What's the difference? A project description is something you plan to work on, and an experience is something you could help other people

RE: [Haskell-cafe] ANNOUNCE: pqueue-mtl, stateful-mtl

2009-02-19 Thread Sittampalam, Ganesh
Henning Thielemann wrote: On Mon, 16 Feb 2009, Louis Wasserman wrote: Overnight I had the following thought, which I think could work rather well.  The most basic implementation of the idea is as follows: class MonadST s m | m - s where liftST :: ST s a - m a instance MonadST s (ST

RE: [Haskell-cafe] ANNOUNCE: pqueue-mtl, stateful-mtl

2009-02-16 Thread Sittampalam, Ganesh
Well, I think a type system like Clean's that had linear/uniqueness types could fix the issue by actually checking that the state is single-threaded (and thus stop you from applying it to a forking monad). But there's a fundamental operational problem that ST makes destructive updates, so to

RE: [Haskell-cafe] ANNOUNCE: pqueue-mtl, stateful-mtl

2009-02-16 Thread Sittampalam, Ganesh
: Louis Wasserman [mailto:wasserman.lo...@gmail.com] Sent: 16 February 2009 16:01 To: Sittampalam, Ganesh Cc: Dan Doel; Henning Thielemann; haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] ANNOUNCE: pqueue-mtl, stateful-mtl Overnight I had the following thought, which I think could work rather

RE: [Haskell-cafe] ANNOUNCE: pqueue-mtl, stateful-mtl

2009-02-16 Thread Sittampalam, Ganesh
Oh, I see, every derived monad has to have an 's' in its type somewhere. From: Louis Wasserman [mailto:wasserman.lo...@gmail.com] Sent: 16 February 2009 16:17 To: Sittampalam, Ganesh Cc: Dan Doel; Henning Thielemann; haskell-cafe@haskell.org Subject: Re

RE: [Haskell-cafe] ANNOUNCE: pqueue-mtl, stateful-mtl

2009-02-16 Thread Sittampalam, Ganesh
Dan Doel wrote: Someone already mentioned using Dynamic as an alternate base (for instance, use a Map of dynamics for underlying storage). Of course, the implementation of Dynamic in GHC uses unsafeCoerce, just like ST, so you may not count that. However, using GADTs, you can implement

RE: [Haskell-cafe] ANNOUNCE: pqueue-mtl, stateful-mtl

2009-02-15 Thread Sittampalam, Ganesh
Stateful-mtl provides an ST monad transformer, Is this safe? e.g. does it work correctly on [], Maybe etc? If not this should be flagged very prominently in the documentation. Cheers, Ganesh == Please access the

  1   2   >