Re: [Haskell-cafe] Thunks

2010-10-15 Thread Bernie Pope
On 15 October 2010 07:53, Mihai Maruseac mihai.marus...@gmail.com wrote: Hi, Is there a way to determine the order in which thunks are created and expanded/evaluated in Haskell (GHC)? I'm looking mainly at some existing interface but if there is only something in the GHC source it will

[Haskell-cafe] Re: MonadCatchIO, finally and the error monad

2010-10-15 Thread oleg
Michael Snoyman wrote: I have a recommendation of how to fix this: the MonadCatchIO typeclass should be extended to include finally, onException and everything else. We can provide default definitions which will work for most monads, and short-circuiting monads like ErrorT (and I imagine

[Haskell-cafe] Re: MonadCatchIO, finally and the error monad

2010-10-15 Thread Michael Snoyman
On Fri, Oct 15, 2010 at 9:35 AM, o...@okmij.org wrote: Michael Snoyman wrote: I have a recommendation of how to fix this: the MonadCatchIO typeclass should be extended to include finally, onException and everything else. We can provide default definitions which will work for most monads,

Re: [Haskell-cafe] allocation for pure FFI functions

2010-10-15 Thread Duncan Coutts
On Thu, 2010-10-14 at 17:45 +, Johannes Waldmann wrote: Hi. I wonder how to do the following properly. I have one (large) C type, let's call it T, and I want to sell it as an abstract type in Haskell. I want to use C functions as if they were of type T - T (pure function, returns a

[Haskell-cafe] Re: MonadCatchIO, finally and the error monad

2010-10-15 Thread oleg
Michael Snoyman wrote: I would prefer if the test read as: test33 = fmap (== Left throwError) $ test3c (throwError throwError :: ErrorT String IO String) Which never in fact returns True. Or, more to the point, the test is never even called, since the runtime exception prevents it.

[Haskell-cafe] Re: MonadCatchIO, finally and the error monad

2010-10-15 Thread Michael Snoyman
On Fri, Oct 15, 2010 at 10:22 AM, o...@okmij.org wrote: Michael Snoyman wrote: I would prefer if the test read as: test33 = fmap (== Left throwError) $ test3c (throwError throwError ::  ErrorT String IO String) Which never in fact returns True. Or, more to the point, the test is never

[Haskell-cafe] downloading GHC

2010-10-15 Thread Ketil Malde
I needed GHC on a new machine, and went to download a binary tarball. First, I go to http://haskell.org/ghc/download_ghc_6_12_3.html, which kindly suggests to get the Haskell Platform instead. Then, at http://hackage.haskell.org/platform/linux.html, I'm told that I first need GHC, and pointed

Re: [Haskell-cafe] Thunks

2010-10-15 Thread Ketil Malde
Bernie Pope florbit...@gmail.com writes: You can use side effects to observe the order of evaluation, by wrapping observed expressions (thunks) with some IO computation inside unsafePerformIO. Not what OP asks for, but I've used a variant of this as a rather hackish to provide progress

[Haskell-cafe] Re: allocation for quot;purequot; FFI functions

2010-10-15 Thread Johannes Waldmann
Duncan Coutts duncan.coutts at googlemail.com writes: It is exactly for this purpose that the Haskell FFI library includes unsafePerformIO. This is basically *the* legitimate use case for it, so you don't need to feel bad about it. OK, thanks. Then this means my C type is a ForeignPtr, and

Re: [Haskell-cafe] Increasing number of parameters

2010-10-15 Thread Jacek Generowicz
Thanks Brandon! I really like the addParam utility, value val prompt = Question prompt (show val) (readCheck val) addParam :: (Show a) = (funTy - String - qty) - (a - funTy) - String - (a - qty) addParam qmakr fun string v = qmakr (fun v) (string++ ++show v) prefix1 = addParam value

[Haskell-cafe] Re: Who is afraid of arrows, was Re: ANNOUNCE: Haskell XML Toolbox Version 9.0.0

2010-10-15 Thread Heinrich Apfelmus
Uwe Schmidt wrote: In HXT, the concept of a filter is the most important one. This concept is a natural generalisation of a function (and that's what arrows are). A user has to grasp this idea of a filter. And he/she can do this even without knowing anything about arrows or monads. People

[Haskell-cafe] Re: Increasing number of parameters

2010-10-15 Thread Kevin Jardine
Jacek, I haven't been following this thread in any detail, so I apologise if I misunderstand your goal, but the ctm function in the polyToMonoid library (which maps its parameters to any specified monoid) appears to work in just this way. It keeps consuming parameters until you hand it to the

Re: [Haskell-cafe] Re: Increasing number of parameters

2010-10-15 Thread Jacek Generowicz
On 2010 Oct 15, at 11:53, Kevin Jardine wrote: Jacek, I haven't been following this thread in any detail, so I apologise if I misunderstand your goal, My goal (in this thread, at least) is to become a better Haskell programmer, rather than to actually write any specific program. Yes,

Re: [Haskell-cafe] Re: Who is afraid of arrows, was Re: ANNOUNCE: Haskell XML Toolbox Version 9.0.0

2010-10-15 Thread Malcolm Wallace
On 15 Oct 2010, at 10:44, Heinrich Apfelmus wrote: Personally, I would be much happier with the slogan HXT = XML transformations with filters. Browsing through Manuel's thesis, I discover that your combinators are quite slick ( , choiceA , when, guards ), it's just that they are a very

Re: [Haskell-cafe] Client-extensible heterogeneous types (Duck-typed variadic functions?)

2010-10-15 Thread Jacek Generowicz
Using Brandon's code as a starting point (as it's far neater than mine), let's try asking some questions about fractions (I've included the whole program at the end). questions = [ addition 1 2, addition (1%2) (1%3) ] This works, but the the fractions are shown as 1 % 2 and to make it

Re: [Haskell-cafe] Client-extensible heterogeneous types (Duck-typed variadic functions?)

2010-10-15 Thread Jacek Generowicz
On 2010 Oct 15, at 13:32, Jacek Generowicz wrote: questions = [ addition 1 2, addition (1%2) (1%3) ] My problem is that I don't see where I could add a type signature, but still keep addition :: a - a - Question polymorphic. Well, OK, I could write addition 1 (2 :: Int)

[Haskell-cafe] deploying applications that use plugins

2010-10-15 Thread Stefan Kersten
hi all, i am working on an application that evaluates haskell code entered by the user using the plugins package [1]; now i want to deploy the application as a self-contained .app bundle on OSX, i.e. the end user should not have to install anything in addition. what do i need to bundle in order

[Haskell-cafe] All binary strings of a given length

2010-10-15 Thread rgowka1
Hi - How can I generate all binary string of a given length? The type signature would something like - genbin :: Int - [String] For example genbin 2 would give [00,11,01,10] and genbin 3 would give [000,001,010,011,100,101,110,111] etc.. thanks.. ___

Re: [Haskell-cafe] All binary strings of a given length

2010-10-15 Thread Eugene Kirpichov
genbin = flip replicateM 01 2010/10/15 rgowka1 rgow...@gmail.com: Hi - How can I generate all binary string of a given length? The type signature would something like - genbin :: Int - [String] For example genbin 2 would give [00,11,01,10] and genbin 3 would give

Re: [Haskell-cafe] All binary strings of a given length

2010-10-15 Thread Eugene Kirpichov
Here's why it works: genbin 3 = replicateM 3 01 = (unfold replicateM) do x1 - 01; x2 - 01 ; x3 - 01; return [x1,x2,x3] = your desired result (enumerate all combinations of x1,x2,x3 with each being 0 or 1). 2010/10/15 Eugene Kirpichov ekirpic...@gmail.com: genbin = flip replicateM 01

Re: [Haskell-cafe] allocation for pure FFI functions

2010-10-15 Thread Nicolas Pouillard
On Fri, 15 Oct 2010 09:07:22 +0100, Duncan Coutts duncan.cou...@googlemail.com wrote: On Thu, 2010-10-14 at 17:45 +, Johannes Waldmann wrote: Hi. I wonder how to do the following properly. I have one (large) C type, let's call it T, and I want to sell it as an abstract type in

Re: [Haskell-cafe] All binary strings of a given length

2010-10-15 Thread Michael Snoyman
Not the most efficient, but easy to understand: genbin 0 = [] genbin 1 = [0, 1] genbin i = map ('0' :) x ++ map ('1' :) x where x = genbin $ i - 1 On Fri, Oct 15, 2010 at 2:21 PM, rgowka1 rgow...@gmail.com wrote: Hi - How can I generate all binary string of a given length? The type

[Haskell-cafe] Re: All binary strings of a given length

2010-10-15 Thread rgowka1
Amazing, will never find this in any other languagw. But ghci crashes for bigger input. Like genbin 20. How to scale this function? On 10/15/10, Eugene Kirpichov ekirpic...@gmail.com wrote: Here's why it works: genbin 3 = replicateM 3 01 = (unfold replicateM) do x1 - 01; x2 - 01 ; x3 - 01;

Re: [Haskell-cafe] Re: All binary strings of a given length

2010-10-15 Thread Aleksandar Dimitrov
On Fri, 15 Oct 2010 14:34:42 +0200, rgowka1 rgow...@gmail.com wrote: Amazing, will never find this in any other languagw. But ghci crashes for bigger input. Like genbin 20. How to scale this function? Well, scaling this isn't really possible, because of its complexity. It generates all

Re: [Haskell-cafe] Re: All binary strings of a given length

2010-10-15 Thread Eugene Kirpichov
Actually my ghci doesn't crash for genbin 25 (haven't tried further), though it eats quite a bit of memory. How are you going to use these bit strings? Do you need all of them at once? 2010/10/15 Aleksandar Dimitrov aleks.dimit...@googlemail.com: On Fri, 15 Oct 2010 14:34:42 +0200, rgowka1

[Haskell-cafe] dph question

2010-10-15 Thread Warren Harris
I trying to learn a bit about data parallel haskell, and started from the wiki page here: http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell. Two questions: The examples express the dot product as: dotp_double xs ys = sumP [:x *

Fwd: [Haskell-cafe] Fuzzy time deltas

2010-10-15 Thread Alberto G. Corona
Michael, The package Workflow has persistent timeouts (can wait for years and restart on system failure if embedded in the workflow monad, although it can run in the IO monad, with no recovery). They are composable with any action in the STM monad with orElse: flag - getTimeoutFlag $

Re: [Haskell-cafe] Re: All binary strings of a given length

2010-10-15 Thread Daniel Gorín
I expect this one to run in constant space: import Data.Bits genbin :: Int - [String] genbin n = map (showFixed n) [0..2^n-1::Int] where showFixed n i = map (bool '1' '0' . testBit i) [n-1,n-2..0] bool t f b = if b then t else f Daniel On Oct 15, 2010, at 9:43 AM, Eugene

Re: [Haskell-cafe] Re: All binary strings of a given length

2010-10-15 Thread rgowka1
Thanks Daniel. But genbin 32 gives an empty list.. works till 31. On Fri, Oct 15, 2010 at 9:05 AM, Daniel Gorín dgo...@dc.uba.ar wrote: I expect this one to run in constant space: import Data.Bits genbin :: Int - [String] genbin n = map (showFixed n) [0..2^n-1::Int]    where showFixed n i

Re: [Haskell-cafe] Re: All binary strings of a given length

2010-10-15 Thread Steve Schafer
On Fri, 15 Oct 2010 09:16:58 -0400, rgowka1 rgow...@gmail.com wrote: But genbin 32 gives an empty list.. works till 31. That's because Daniel uses values of type Int as intermediate storage during the computation, and Int values are only 32 bits long. By replacing Int with Integer (which does

[Haskell-cafe] Re: dph question

2010-10-15 Thread steffen
I trying to learn a bit about data parallel haskell, and started from the wiki page here:http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell. Two questions: The examples express the dot product as: dotp_double xs ys = sumP [:x *

Re: [Haskell-cafe] dph question

2010-10-15 Thread Daniel Fischer
On Friday 15 October 2010 14:59:18, Warren Harris wrote: I trying to learn a bit about data parallel haskell, and started from the wiki page here: http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell. Two questions: The examples express the dot product as: dotp_double xs ys = sumP

Re: [Haskell-cafe] dph question

2010-10-15 Thread Warren Harris
Got it - thanks. Any idea about the run-away process problem? Thanks, Warren On Fri, Oct 15, 2010 at 9:32 AM, Daniel Fischer daniel.is.fisc...@web.dewrote: On Friday 15 October 2010 14:59:18, Warren Harris wrote: I trying to learn a bit about data parallel haskell, and started from the

Re: [Haskell-cafe] Increasing number of parameters

2010-10-15 Thread Jacek Generowicz
On 2010 Oct 15, at 11:38, Jacek Generowicz wrote: [...] So I'm trying to get to grips with a simpler variation on the same theme, and I'm still failing. I'm trying to write something along the lines of addArg :: nArgFn - a - nPlus1ArgFn addArg fn a = (a+) fn where =

[Haskell-cafe] ANNOUNCE: darcs 2.5 release candidate 1

2010-10-15 Thread Reinier Lamers
The darcs team would like to announce the immediate availability of darcs 2.5 release candidate 1 (also known as darcs 2.4.99.1 due to Cabal restrictions). If no blocking issues are found in the coming week, we will finally releease darcs 2.5. Important changes since darcs 2.4.4 are: *

Re: [Haskell-cafe] downloading GHC

2010-10-15 Thread Don Stewart
ketil: I needed GHC on a new machine, and went to download a binary tarball. First, I go to http://haskell.org/ghc/download_ghc_6_12_3.html, which kindly suggests to get the Haskell Platform instead. Then, at http://hackage.haskell.org/platform/linux.html, I'm told that I first need

Re: [Haskell-cafe] Bulletproof resource management

2010-10-15 Thread Florian Weimer
* Henning Thielemann: Some open/close pairs have corresponding 'with' functions, that are implemented using Exception.bracket. You can also use them within GHCi. I think using both manual resource deallocation and finalizers makes everything more complicated and more unreliable. It seems

Re: [Haskell-cafe] Re: Who is afraid of arrows, was Re: ANNOUNCE: Haskell XML Toolbox Version 9.0.0

2010-10-15 Thread Nikitiskiy Dmitriy
15.10.2010 15:03, Malcolm Wallace пишет: On 15 Oct 2010, at 10:44, Heinrich Apfelmus wrote: Personally, I would be much happier with the slogan HXT = XML transformations with filters. Browsing through Manuel's thesis, I discover that your combinators are quite slick ( , choiceA , when,

Re: [Haskell-cafe] IORef memory leak

2010-10-15 Thread Evan Laforge
The latter. atomicModifyIORef is harder though still, since it is a primop with the same properties as modifyIORef :/ So would it make sense to create a strict modifyIORef' function? Very much so. In fact, I'd argue the vast majority of uses are for the WHNF-strict version. I just fixed a

Re: [Haskell-cafe] Bulletproof resource management

2010-10-15 Thread Antoine Latter
On Fri, Oct 15, 2010 at 11:09 AM, Florian Weimer f...@deneb.enyo.de wrote: * Henning Thielemann: Some open/close pairs have corresponding 'with' functions, that are implemented using Exception.bracket. You can also use them within GHCi. I think using both manual resource deallocation and

Re: [Haskell-cafe] downloading GHC

2010-10-15 Thread Ketil Malde
Don Stewart d...@galois.com writes: First, I go to http://haskell.org/ghc/download_ghc_6_12_3.html, which kindly suggests to get the Haskell Platform instead. Then, at http://hackage.haskell.org/platform/linux.html, I'm told that I first need GHC, and pointed back to the GHC download page.

Re: [Haskell-cafe] downloading GHC

2010-10-15 Thread Ketil Malde
Don Stewart d...@galois.com writes: Linux users don't have easy binary installers, usually. Speaking about which - this is made a lot more difficult than it need be due to the way libc doesn't work with statically linked executables. Basically, it seems to manually load hardwired dynamic

Re: [Haskell-cafe] downloading GHC

2010-10-15 Thread Paulo Tanimoto
On Fri, Oct 15, 2010 at 1:47 PM, Ketil Malde ke...@malde.org wrote: Uh, AFAIC, it's only a documentation bug - the GHC page seems to say that GHC comes with HP, the HP page tells to go get GHC first.  I'd just change it to something like: GHC:  Click here to download... then go see Haskell

[Haskell-cafe] An interesting paper from Google

2010-10-15 Thread Andrew Coppin
http://k1024.org/~iusty/papers/icfp10-haskell-reagent.pdf I'm sure some of you have seen this already. For those who lack the time or inclination to read through the (six) pages of this report, here's the summary... We [i.e., the report authors] took a production Python system and rewrote

Re: [Haskell-cafe] IORef memory leak

2010-10-15 Thread Gregory Collins
Evan Laforge qdun...@gmail.com writes: The only workaround I could find is to immediately read the value back out and 'seq' on it, but it's ugly. Yep! C'est la vie unfortunately. The way atomicModifyIORef works is that the new value isn't actually evaluated at all; GHC just swaps the old

[Haskell-cafe] In what language...?

2010-10-15 Thread Andrew Coppin
Yesterday I read a rather interesting paper: http://www.cl.cam.ac.uk/~mb566/papers/tacc-hs09.pdf It's fascinating stuff, and I *think* I understand the gist of what it's saying. However, the paper is utterly festooned with formulas that look so absurdly over-the-top that they might almost be

Re: [Haskell-cafe] In what language...?

2010-10-15 Thread Gregory Collins
Andrew Coppin andrewcop...@btinternet.com writes: Does anybody have any idea which particular dialect of pure math this paper is speaking? (And where I can go read about it...) It's pretty garden-variety programming language/type theory. I can recommend Benjamin Pierce's Types and Programming

Re: [Haskell-cafe] In what language...?

2010-10-15 Thread Thomas DuBuisson
I think you would enjoy reading (and working) through TAPL[1] and/or Software Foundations[2] if this interests you. Cheers, Thomas [1] http://www.amazon.com/Types-Programming-Languages-Benjamin-Pierce/dp/0262162091 [2] http://www.cis.upenn.edu/~bcpierce/sf/ On Fri, Oct 15, 2010 at 1:36 PM,

Re: [Haskell-cafe] In what language...?

2010-10-15 Thread Alexander Solla
On Oct 15, 2010, at 1:36 PM, Andrew Coppin wrote: Does anybody have any idea which particular dialect of pure math this paper is speaking? (And where I can go read about it...) It's some kind of typed logic with lambda abstraction and some notion of witnessing, using Gertzen (I think!)

Re: [Haskell-cafe] Yi on Windows

2010-10-15 Thread Jeff Wheeler
On Thu, Oct 14, 2010 at 1:41 PM, Peter Marks pe...@indigomail.net wrote: If you start Yi with no config file, press any key, press h, choose a key binding, then save the file, you get a file c:\Users\peter\.yi\yi.hs Oh, indeed. I didn't realize that. The behavior is defined in

[Haskell-cafe] Strict Core?

2010-10-15 Thread Gregory Crosswhite
Hey everyone, Out of curiosity, are there any plans for GHC to eventually use the Strict Core language described in http://www.cl.cam.ac.uk/~mb566/papers/tacc-hs09.pdf? Cheers, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] An interesting paper from Google

2010-10-15 Thread Iustin Pop
On Fri, Oct 15, 2010 at 09:28:09PM +0100, Andrew Coppin wrote: http://k1024.org/~iusty/papers/icfp10-haskell-reagent.pdf I'm sure some of you have seen this already. For those who lack the time or inclination to read through the (six) pages of this report, here's the summary... Nice

Re: [Haskell-cafe] Strict Core?

2010-10-15 Thread Andrew Coppin
On 15/10/2010 10:27 PM, Gregory Crosswhite wrote: Hey everyone, Out of curiosity, are there any plans for GHC to eventually use the Strict Core language described in http://www.cl.cam.ac.uk/~mb566/papers/tacc-hs09.pdf? Is that because I just mentioned the paper? Regardless, I'd be quite

Re: [Haskell-cafe] An interesting paper from Google

2010-10-15 Thread Andrew Coppin
On 15/10/2010 10:43 PM, Iustin Pop wrote: On Fri, Oct 15, 2010 at 09:28:09PM +0100, Andrew Coppin wrote: http://k1024.org/~iusty/papers/icfp10-haskell-reagent.pdf I'm sure some of you have seen this already. For those who lack the time or inclination to read through the (six) pages of this

Re: [Haskell-cafe] Strict Core?

2010-10-15 Thread Gregory Crosswhite
Yes, I had seen this paper before and wondered the same thing at the time, but it was only just now when you brought the paper up that I realized I could ask people about it here. :-) On 10/15/2010 03:01 PM, Andrew Coppin wrote: On 15/10/2010 10:27 PM, Gregory Crosswhite wrote: Hey

[Haskell-cafe] An interesting paper on VM-friendly GC

2010-10-15 Thread Andrew Coppin
Somebody showed me this the other day, and I thought it was interesting: http://www.cs.umass.edu/~emery/pubs/f034-hertz.pdf Basically, we designed a garbage collector which tries to avoid touching memory pages that have been swapped out to disk just because we need to do a GC sweep. Which is

Re: [Haskell-cafe] An interesting paper from Google

2010-10-15 Thread Iustin Pop
On Fri, Oct 15, 2010 at 11:08:14PM +0100, Andrew Coppin wrote: On 15/10/2010 10:43 PM, Iustin Pop wrote: On Fri, Oct 15, 2010 at 09:28:09PM +0100, Andrew Coppin wrote: I'm surprised about the profiler. They seem really, really impressed with it. Which is interesting to me, since I can never

Re: [Haskell-cafe] Strict Core?

2010-10-15 Thread Andrew Coppin
On 15/10/2010 11:10 PM, Gregory Crosswhite wrote: Yes, I had seen this paper before and wondered the same thing at the time, but it was only just now when you brought the paper up that I realized I could ask people about it here. :-) I wonder if anybody has a list somewhere of really cool

Re: [Haskell-cafe] An interesting paper from Google

2010-10-15 Thread Andrew Coppin
On 15/10/2010 11:18 PM, Iustin Pop wrote: I know about zipWith. And if the profile tells me I spend too much time in zipWith, it means a few things: - zipWith might have to force evaluation of the results, hence the incorrect attribution of costs - if even after that zipWith is the culprit,

[Haskell-cafe] Ambiguous type variable

2010-10-15 Thread Jacek Generowicz
-- Given a definition of view which is essentially a synonym for show: class View a where view :: a - String instance View Int where view = show -- why does show 2 compile, while view 2 gives an -- 'Ambiguous type variable' error fine = view (2::Int) noProblem

Re: [Haskell-cafe] Ambiguous type variable

2010-10-15 Thread Christopher Done
On 16 October 2010 00:47, Jacek Generowicz jacek.generow...@cern.ch wrote: -- why does show 2 compile, while view 2 gives an -- 'Ambiguous type variable' error fine                  = view (2::Int) noProblem             = show 2 ambiguousTypeVariable = view 2 Don't integral literals default

Re: [Haskell-cafe] Ambiguous type variable

2010-10-15 Thread Ivan Lazar Miljenovic
On 16 October 2010 09:47, Jacek Generowicz jacek.generow...@cern.ch wrote: -- Given a definition of view which is essentially a synonym for show: class View a where    view :: a - String instance View Int where    view = show -- why does show 2 compile, while view 2 gives an --

Re: [Haskell-cafe] An interesting paper on VM-friendly GC

2010-10-15 Thread Gregory Crosswhite
On 10/15/2010 03:15 PM, Andrew Coppin wrote: On the other hand, their implementation uses a modified Linux kernel, and no sane person is going to recompile their OS kernel with a custom patch just to run Haskell applications, so we can't do quite as well as they did. But still, and

Re: [Haskell-cafe] Ambiguous type variable

2010-10-15 Thread Jacek Generowicz
On 2010 Oct 16, at 00:51, Ivan Lazar Miljenovic wrote: On 16 October 2010 09:47, Jacek Generowicz jacek.generow...@cern.ch wrote: -- Given a definition of view which is essentially a synonym for show: class View a where view :: a - String instance View Int where view = show -- why

Re: [Haskell-cafe] IORef memory leak

2010-10-15 Thread Thomas Schilling
Correct, here's a video of Simon explaining the thunk blackholing issue and its solution in GHC 7: http://vimeo.com/15573590 On 15 October 2010 21:31, Gregory Collins g...@gregorycollins.net wrote: Evan Laforge qdun...@gmail.com writes: The only workaround I could find is to immediately read

Re: [Haskell-cafe] Ambiguous type variable

2010-10-15 Thread Jacek Generowicz
On 2010 Oct 16, at 01:14, Jacek Generowicz wrote: On 2010 Oct 16, at 00:51, Ivan Lazar Miljenovic wrote: 2 is a generic number. If you don't specify a type, it usually defaults to Integer. All Num instances that come in the Prelude have Show instances, so no matter which gets picked show 2

Re: [Haskell-cafe] Ambiguous type variable

2010-10-15 Thread Daniel Fischer
On Saturday 16 October 2010 01:14:51, Jacek Generowicz wrote: On 2010 Oct 16, at 00:51, Ivan Lazar Miljenovic wrote: On 16 October 2010 09:47, Jacek Generowicz jacek.generow...@cern.ch wrote: -- Given a definition of view which is essentially a synonym for show: class View a where

Re: [Haskell-cafe] Strict Core?

2010-10-15 Thread Luke Palmer
On Fri, Oct 15, 2010 at 4:21 PM, Andrew Coppin andrewcop...@btinternet.com wrote:  On 15/10/2010 11:10 PM, Gregory Crosswhite wrote:  Yes, I had seen this paper before and wondered the same thing at the time, but it was only just now when you brought the paper up that I realized I could ask

Re: [Haskell-cafe] Ambiguous type variable

2010-10-15 Thread Jacek Generowicz
jacek.generow...@cern.ch wrote: -- Given a definition of view which is essentially a synonym for show: class View a where view :: a - String instance View Int where view = show -- why does show 2 compile, while view 2 gives an -- 'Ambiguous type variable' error fine =

Re: [Haskell-cafe] Ambiguous type variable

2010-10-15 Thread Daniel Fischer
On Saturday 16 October 2010 01:18:55, Jacek Generowicz wrote: On 2010 Oct 16, at 01:14, Jacek Generowicz wrote: On 2010 Oct 16, at 00:51, Ivan Lazar Miljenovic wrote: 2 is a generic number. If you don't specify a type, it usually defaults to Integer. All Num instances that come in the

Re: [Haskell-cafe] downloading GHC

2010-10-15 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/15/10 11:26 , Don Stewart wrote: Linux users don't have easy binary installers, usually. What can we do about this bootstrapping problem? I thought the answer to that was supposed to be bug your distribution to package the Platform. - --

Re: [Haskell-cafe] Ambiguous type variable

2010-10-15 Thread Jacek Generowicz
On 2010 Oct 16, at 01:39, Daniel Fischer wrote: On Saturday 16 October 2010 01:18:55, Jacek Generowicz wrote: On 2010 Oct 16, at 01:14, Jacek Generowicz wrote: On 2010 Oct 16, at 00:51, Ivan Lazar Miljenovic wrote: 2 is a generic number. If you don't specify a type, it usually defaults to

Re: [Haskell-cafe] An interesting paper from Google

2010-10-15 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/15/10 16:28 , Andrew Coppin wrote: I'm surprised about the profiler. They seem really, really impressed with it. Which is interesting to me, since I can never seen to get anything sensible out of it. It always seems to claim that my program

Re: [Haskell-cafe] In what language...?

2010-10-15 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/15/10 16:36 , Andrew Coppin wrote: Does anybody have any idea which particular dialect of pure math this paper is speaking? (And where I can go read about it...) Type theory. It makes my head spin, too, since essentially my only exposure to

[Haskell-cafe] A rant against the blurb on the Haskell front page

2010-10-15 Thread Ben Franksen
This is a critique of the current 'Haskell Blurb', the first paragraph on www.haskell.org. This blurb should, IMO, give a concise description of what Haskell, the programming language, is, what makes it different from other languages, and why I should be interested in it. What it does, instead,

Re: [Haskell-cafe] A rant against the blurb on the Haskell front page

2010-10-15 Thread Don Stewart
Great! It's a Friday. Why not step in. Just some context, since the current blurb was born from a critique at CUFP 2007, prior to which the Haskell blurb was: Haskell is a general purpose, purely functional programming language. Haskell compilers are freely available for almost any

Re: [Haskell-cafe] A rant against the blurb on the Haskell front page

2010-10-15 Thread Donn Cave
Quoth Ben Franksen ben.frank...@online.de, Enough. I think I have made my point. Yes, though possibly a little overstated it. While it's easy to share your distaste for the blurb, if you take a generous attitude towards it, most of it is true enough. The implementation specific features are