Re: [Haskell-cafe] Vanishing polymorphism

2007-05-09 Thread Tom Schrijvers
To cut a long story short, could someone explain why: :t negate negate :: forall a. (Num a) = a - a :t let f (fn :: forall a . Num a = a - a) r s = (fn r, fn s) in f negate let f (fn :: forall a . Num a = a - a) r s = (fn r, fn s) in f negate :: forall r s. (Num r, Num s) = r -

Re: [Haskell-cafe] Vanishing polymorphism

2007-05-09 Thread Tom Schrijvers
On Tue, 8 May 2007, David House wrote: On 08/05/07, Matthew Sackman [EMAIL PROTECTED] wrote: :t let f r s = (return negate) = (\(fn::forall n . (Num n) = n - n) - return (fn r, fn s)) in f interactive:1:35: Couldn't match expected type `a - a' against inferred type `forall n.

[Haskell-cafe] Roles == type classes ???

2007-05-09 Thread Magnus Therning
The way roles/traits are described in [1] (and the pages it links to) make me think of Haskell type classes. Am I completely off in doing that? /M [1]: http://griddlenoise.blogspot.com/2007/05/traits-roles-as-alternative-to-abstract.html -- Magnus Therning

Re: [Haskell-cafe] Roles == type classes ???

2007-05-09 Thread Ketil Malde
On Wed, 2007-05-09 at 10:41 +0100, Magnus Therning wrote: The way roles/traits are described in [1] (and the pages it links to) make me think of Haskell type classes. Am I completely off in doing that? At http://mail.python.org/pipermail/python-3000/2007-April/007026.html we find this

[Haskell-cafe] Re: How to decrease ghc link time

2007-05-09 Thread Simon Marlow
Georg Sauthoff wrote: well, I work with a Haskell project which I regulary compile with ghc. I am a bit unhappy with the link time of the project (i.e. the time ghc needs to link everyting). The project consinst of ~60 Haskell and ~25 foreign files. Some parts of the project are organized

[Haskell-cafe] Re: How to decrease ghc link time

2007-05-09 Thread Georg Sauthoff
Simon Marlow [EMAIL PROTECTED] wrote: Hi, Georg Sauthoff wrote: I am a bit unhappy with the link time of the project (i.e. the time ghc needs to link everyting). The project consinst of ~60 Haskell and ~25 foreign files. [..] Make sure everything being linked is on the local file system

Re: [Haskell-cafe] built-in lists vs inductively defined list

2007-05-09 Thread Stefan O'Rear
On Wed, May 09, 2007 at 02:45:34PM +0100, Jos? Miguel Vila?a wrote: Can someone tell me if would be any difference (beside syntax) between the built-in Haskell list with [] and : and lists given by a inductive datatype definition like data List a = Nil | Cons a (List a) This is, is any of

Re: [Haskell-cafe] built-in lists vs inductively defined list

2007-05-09 Thread Nils Anders Danielsson
On Wed, 09 May 2007, Stefan O'Rear [EMAIL PROTECTED] wrote: To the best of my knowledge, there are no optimizations specific to [] in the compiler proper. However, the standard library has a *lot* of speed hacks you will need to duplicate! Some of which are not expressible in ordinary

Re: [Haskell-cafe] Safe forward-mode AD in Haskell?

2007-05-09 Thread Björn Buckwalter
d :: Num a = (forall b. (Num b) = (a - b) - b - b) - a - a d f x = let (Bundle y y') = f lift (Bundle x 1) in y' The key change is in the type of d, which now accepts a polymorphic function on numbers, but passes in a lift function, which allows us to pass in higher-level variables. In one

Re: [Haskell-cafe] built-in lists vs inductively defined list

2007-05-09 Thread Tomasz Zielonka
On Wed, May 09, 2007 at 04:11:40PM +0200, Nils Anders Danielsson wrote: On Wed, 09 May 2007, Stefan O'Rear [EMAIL PROTECTED] wrote: To the best of my knowledge, there are no optimizations specific to [] in the compiler proper. However, the standard library has a *lot* of speed hacks you

[Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-09 Thread Joel Reymont
Folks, I have finished an alpha version of my EasyLanguage [1] to C# compiler and need to deploy it on Amazon EC2/S3. The compiler web interface is very simple: paste EL code, get back C# code or the same EL code with the error highlighted. I view the site as more than just a compiler,

Re: Re [Haskell-cafe] Vanishing polymorphism

2007-05-09 Thread David House
On 08/05/07, Matthew Sackman [EMAIL PROTECTED] wrote: :t let f r s = let g (fn::forall n . (Num n) = n - n) = return (fn r, fn s) in (return negate) = g in f Ah, I may have been off the mark earlier. I think the problem is due to the fact that you can't pass higher-order polymorphic

Re: [Haskell-cafe] generate Haskell code from model

2007-05-09 Thread Steffen Mazanek
I have done some experiments relating to our discussion. The approach to generate Haskell code from UML class diagrams is not very promising. However one may define a visual notation of Haskell (this is no new idea of course), provide better tool support (in particular editor+code generator) and

RE: [Haskell-cafe] built-in lists vs inductively defined list

2007-05-09 Thread José Miguel Vilaça
Hi again, IMHO for what concerns to the language they only differ in syntax. They are equal up to constructor names. What could be the case is that some compiler could do some optimizations that end up with better performance in time and space when using lists. But for what people gently ask me,

Re: [Haskell-cafe] generate Haskell code from model

2007-05-09 Thread Neil Mitchell
Hi Steffen, It sounds a lot to me like: * Create a visual meta-language * Program with diagrams * Translate to Haskell If thats the case, how is Translate to Haskell different from Translate to C++? It only makes a difference if you go in and edit the result, but then you've lost your model?

Re: [Haskell-cafe] built-in lists vs inductively defined list

2007-05-09 Thread Duncan Coutts
On Wed, 2007-05-09 at 09:08 -0700, Jason Morton wrote: I'd love to understand these rewrite-rules a little better; could anyone point me to where (if?) they are documented? Here's a list of papers on fusion and deforestation:

[Haskell-cafe] Object Files Become Downloader.Obfuskated

2007-05-09 Thread SevenThunders
I discovered a curious thing after a compiling a medium sized Haskell project using the 64 bit linux Haskell GHC 6.6.1 compiler. Several of the generated object files (.o) show up as containing the virus Downloader.Obfuskated by my AVG anti-virus program when viewing the files from windows xp