[Haskell-cafe] isFunction

2008-01-04 Thread john lask
Oleg provided the following code to test whether a is a function, this code will not type check in hugs, due to the overlapping instances in IsFunction (x-y) f IsFunction x f and the functional dependency | a- b ERROR isfunction.lhs:43 - Instances are not consistent with dependencies ***

RE: Re[6]: [Haskell-cafe] Is there anyone out there who can translate C# generics into Haskell?

2008-01-04 Thread Nicholls, Mark
You may be right...but learning is not an atomic thingwherever I start I will get strange things happening. -Original Message- From: Bulat Ziganshin [mailto:[EMAIL PROTECTED] Sent: 03 January 2008 18:59 To: Nicholls, Mark Cc: Bulat Ziganshin; haskell-cafe@haskell.org Subject: Re[6]:

RE: [Haskell-cafe] Refactoring status

2008-01-04 Thread Henning Thielemann
On Thu, 3 Jan 2008, Peter Verswyvelen wrote: I believe type signatures are the very essence of Haskell documentation! I'd much rather see a program with type signatures for functions and little (or no) comments over programs with no type signatures and ambigious comments (if any comments

[Haskell-cafe] Re: [darcs-devel] announcing darcs 2.0.0pre2

2008-01-04 Thread Simon Marlow
David Roundy wrote: On Thu, Jan 03, 2008 at 11:11:40AM +, Simon Marlow wrote: David Roundy wrote: Anyhow, could you retry this test with the above change in methodology, and let me know if (a) the pull is still slow the first time and (b) if it's much faster the second time (after the

[Haskell-cafe] Re: An interesting monad: Prompt

2008-01-04 Thread apfelmus
Felipe Lessa wrote: Ryan Ingram wrote: [snip] data Prompt (p :: * - *) :: (* - *) where PromptDone :: result - Prompt p result -- a is the type needed to continue the computation Prompt :: p a - (a - Prompt p result) - Prompt p result [snip] runPromptM :: Monad m = (forall a. p a

Re: [Haskell-cafe] Re: An interesting monad: Prompt

2008-01-04 Thread Felipe Lessa
On Jan 4, 2008 9:59 AM, apfelmus [EMAIL PROTECTED] wrote: Felipe Lessa wrote: How can we prove that (runPromptM prompt === id)? I was trying to go with You probably mean runPromptM id = id Actually, I meant an specialization of 'runPromptM prompt': runPromptM id :: (Monad p) =

[Haskell-cafe] GHC on LLVM (was Re: ANN / CFP - LLVM bindings for Haskell)

2008-01-04 Thread Jules Bean
Ryan Dickie wrote: Maybe I am asking an uninformed n00b question but how come GHC has fvia-C and are also working on an asm backend. Is there any reason why they could not build off the work of LLVM (which supports various architectures) then ditch those two backends and call it a day? You

RE: [Haskell-cafe] Refactoring status

2008-01-04 Thread Peter Verswyvelen
Types cannot always be derived automatically, especially when coming to Haskell extensions. Sometimes you also want to restrict the type. E.g. for asTypeOf _ y = y you explicitly want the type asTypeOf :: a - a - a not the automatically derived one: asTypeOf :: b - a - a Yes, sometimes it

RE: Re[2]: [Haskell-cafe] Refactoring status

2008-01-04 Thread Peter Verswyvelen
the same is possible for Haskell - it's possible to add to code type signatures deduced by the compiler Ha! Yes, HaRe also has the facility to do this have I plugged it enough yet? :-) Sounds great! But could you add support for arrows so I can use it for my Yampa experiments? Please? :)

Re: [Haskell-cafe] Refactoring status

2008-01-04 Thread Felipe Lessa
On Jan 4, 2008 4:19 PM, Peter Verswyvelen [EMAIL PROTECTED] wrote: Yes, but it would be nice to attach some parameter-comment to the types no? Now a lot of documentation is written in the style the 7th parameter is Not very user friendly :) Haddock allows you to put documentation inside

RE: [Haskell-cafe] Refactoring status

2008-01-04 Thread Henning Thielemann
On Fri, 4 Jan 2008, Peter Verswyvelen wrote: Yes, sometimes it is neccerary to give an explicit type. But in so many cases, type inference works fine no? What I usually do, is use the GHCi t: command, copy/paste that in my code, and then make the type signature more specific if it has to be.

RE: [Haskell-cafe] Refactoring status

2008-01-04 Thread Peter Verswyvelen
It's already possible to write asTypeOf :: a {- ^ the input value to be passed through -} - a {- ^ the value is ignored, but the type is unified with the first parameter -} - a {- ^ the value of the first parameter -} Nice. Still using first parameter though ;-)

Re: [Haskell-cafe] Refactoring status

2008-01-04 Thread Felipe Lessa
On Jan 4, 2008 5:52 PM, Peter Verswyvelen [EMAIL PROTECTED] wrote: It's already possible to write asTypeOf :: a {- ^ the input value to be passed through -} - a {- ^ the value is ignored, but the type is unified with the first parameter -} - a {- ^ the value of the first

[Haskell-cafe] ANN / CFC: minimalistic haskell blogging web application (perpubplat)

2008-01-04 Thread Paul Brown
All -- I've spent some time on cleaning up my hobby blog publishing software and setting up a darcs repository, so I'll throw it out there for criticism or suggestions: darcs get http://datapr0n.com/repos/perpubplat It's running my blog (http://mult.ifario.us). It's relatively lightweight in

RE: [Haskell-cafe] Refactoring status

2008-01-04 Thread Henning Thielemann
On Fri, 4 Jan 2008, Peter Verswyvelen wrote: It's already possible to write asTypeOf :: a {- ^ the input value to be passed through -} - a {- ^ the value is ignored, but the type is unified with the first parameter -} - a {- ^ the value of the first parameter -} Nice.

RE: [Haskell-cafe] Refactoring status

2008-01-04 Thread Peter Verswyvelen
Nice. Still using first parameter though ;-) This was the problem I mentioned earlier. I tend to write comments like {- | @asTypeOf x y@ returns the value of @x@, while the types of @x@ and @y@ are unified -} asTypeOf :: a - a - a This way I can introduce parameter names for the reader.

Re: [Haskell-cafe] HsColour version confusion

2008-01-04 Thread Ian Lynagh
On Thu, Jan 03, 2008 at 06:12:05PM +, Adrian Hey wrote: ..the latest version is 1.9. But the latest version in Hackage is 1.6, the latest version in the ftp downloads dir is 1.8, unless you want a pre-compiled windows version in which case you're stuck with 1.3 :-) The history looks like

Re: [Haskell-cafe] Re: Hackage web page

2008-01-04 Thread gwern0
On 2008.01.02 17:20:04 +, Duncan Coutts [EMAIL PROTECTED] scribbled 0.8K characters: In message [EMAIL PROTECTED] Neil Mitchell [EMAIL PROTECTED] writes: Hi, The hackage web page confuses me: http://hackage.haskell.org/packages/hackage.html Hackage has now graduated from being a

[Haskell-cafe] bytestring 0.9.0.4

2008-01-04 Thread Don Stewart
2.5 years after the first release, bytestring 0.9.0.4 is now available on hackage, http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bytestring-0.9.0.4 Changes since the 0.9 release include: * support for bytestring literals (use -XOverloadedStrings) * make