Re: [Haskell] How to generate a dll?

2006-09-07 Thread Michael Marte
Andreas, one more pointer: http://haskell.org/haskellwiki/GHC:FAQ#GHC_on_Windows Michael Andreas Marth wrote: Hallo! I want to make my Haskell program usable from Visual Basic. What is the way to go? (I tried the way the user guide for ghc 6.4.2 describes but the resulting dll was not

Re: [Haskell] H/Direct (HaskellDirect) still maintained?

2006-09-07 Thread Gracjan Polak
2006/9/6, Andreas Marth [EMAIL PROTECTED]: Hallo! Does anybody know if H/Direct (also known as HaskellDirect) is still maintained? Doesn't seem to be... You might want to look for thread Haskell to call Microsoft COM (Dispatch) in haskell-cafe archive. Marc Weber was able to create a script

[Haskell] AOSD 2007: final call

2006-09-07 Thread Oege . de . Moor
AOSD 2007: FINAL CALL FOR RESEARCH PAPERS 6th Conference on Aspect-Oriented Software Development http://www.aosd.net/2007/cfc/research.php THREE weeks until deadline Abstracts: September 22 Full papers: September 29

Re: [Haskell] How to generate a dll?

2006-09-07 Thread Andreas Marth
From: Michael Marte [EMAIL PROTECTED] To: Andreas Marth [EMAIL PROTECTED] Cc: haskell@haskell.org Sent: Wednesday, September 06, 2006 6:04 PM Subject: Re: [Haskell] How to generate a dll? Andreas, I am using a DLL generated by ghc 6.4.2 in combination with Visual C++ 2005. Some useful links:

[Haskell] Re: H/Direct (HaskellDirect) still maintained?

2006-09-07 Thread Simon Marlow
Gracjan Polak wrote: 2006/9/6, Andreas Marth [EMAIL PROTECTED]: Hallo! Does anybody know if H/Direct (also known as HaskellDirect) is still maintained? Doesn't seem to be... You might want to look for thread Haskell to call Microsoft COM (Dispatch) in haskell-cafe archive. Marc Weber was

Re: [Haskell] How to generate a dll?

2006-09-07 Thread Anatoly Zaretsky
On 9/7/06, Andreas Marth [EMAIL PROTECTED] wrote: I meant that the dll crashed Excel wenn I stopped the debugging mode and also if I used it in a VB-projekt it crahed that when stopped. Hi, Andreas! Try adding these lines to your DllMain: if (reason == DLL_PROCESS_DETACH) {

[GHC] #891: hsc2hs tries to remove an open file

2006-09-07 Thread GHC
#891: hsc2hs tries to remove an open file -+-- Reporter: eivuokko |Owner: Type: bug | Status: new Priority: normal|Milestone: Component: Compiler |

Re: [GHC] #891: hsc2hs tries to remove an open file

2006-09-07 Thread Sigbjorn Finne
This is a long standing, irksome Win32 timing issue, and is not GC related (AFAICR, it was reproducible in straight C code). A better workaround, which was experimented with in STABLE at some point, is to simply delay the clean up of the files until the end of hsc2hs's run --sigbjorn GHC

Re: [GHC] #891: hsc2hs tries to remove an open file

2006-09-07 Thread GHC
#891: hsc2hs tries to remove an open file ---+ Reporter: eivuokko | Owner: Type: bug | Status: new Priority: normal| Milestone: Component: Compiler |

Re: [GHC] #877: Template Haskell doesn't parse data decls properly

2006-09-07 Thread GHC
#877: Template Haskell doesn't parse data decls properly -+-- Reporter: [EMAIL PROTECTED] | Owner: Type: bug | Status: closed Priority: normal

[GHC] #892: TH does not have Lift instances for Maybe and Either

2006-09-07 Thread GHC
#892: TH does not have Lift instances for Maybe and Either -+-- Reporter: guest |Owner: Type: bug | Status: new Priority: lowest|

Re: [GHC] #892: TH does not have Lift instances for Maybe and Either

2006-09-07 Thread GHC
#892: TH does not have Lift instances for Maybe and Either ---+ Reporter: guest | Owner: Type: bug | Status: new Priority: lowest|

Re: [GHC] #892: TH does not have Lift instances for Maybe and Either

2006-09-07 Thread GHC
#892: TH does not have Lift instances for Maybe and Either ---+ Reporter: guest | Owner: Type: bug | Status: closed Priority: lowest|

RE: lexically-scoped type variables in GHC 6.6

2006-09-07 Thread Simon Peyton-Jones
| With reference to the documentation [about lexically scoped type variables] that just appeared in darcs: For the benefit of others, the draft 6.6 documentation is here http://www.haskell.org/ghc/dist/current/docs/users_guide/type-extensions .html#scoped-type-variables | Result type

more fixups for GHC docs

2006-09-07 Thread Bulat Ziganshin
Hello glasgow-haskell-users, 1. section 7.11.6 contains small typo - both %note are %note foo while CORE pragmas use foo and bar 2. section 7.13 notes that generic classes was broken in GHC 5.02. afaik, they worked at least in GHC 6.4 also it will be great if each paragraph of Release Notes

Re: lexically-scoped type variables in GHC 6.6

2006-09-07 Thread Brian Hulley
Ross Paterson wrote: data T = forall a. MkT [a] k :: T - T k (forall a. MkT [t]) = MkT t3 where t3::[a] = [t,t,t] What was wrong with the example in the documentation? k :: T - T k (MkT [t::a]) = MkT t3 where t3::[a] = [t,t,t] The type of (t) is (a) -

Re: lexically-scoped type variables in GHC 6.6

2006-09-07 Thread Brian Hulley
Brian Hulley wrote: Ross Paterson wrote: data T = forall a. MkT [a] k :: T - T k (forall a. MkT [t]) = MkT t3 where t3::[a] = [t,t,t] What was wrong with the example in the documentation? k :: T - T k (MkT [t::a]) = MkT t3 where t3::[a] = [t,t,t] The

Fwd: Re[2]: What causes hsc2hs permission denied errors during build?

2006-09-07 Thread Brian Smith
On 9/7/06, Bulat Ziganshin [EMAIL PROTECTED] wrote: Hello Esa,Thursday, September 7, 2006, 1:34:13 PM, you wrote: The problem is that removeFile is called for a file that has an open handle, because the handle is not garbage collected yet. a workaround may be to call performGC just before

Re: more fixups for GHC docs

2006-09-07 Thread Ian Lynagh
Hi Bulat, On Thu, Sep 07, 2006 at 07:26:38PM +0400, Bulat Ziganshin wrote: 1. section 7.11.6 contains small typo - both %note are %note foo while CORE pragmas use foo and bar 2. section 7.13 notes that generic classes was broken in GHC 5.02. afaik, they worked at least in GHC 6.4 Both

[Haskell-cafe] head as a total function

2006-09-07 Thread oleg
Jo'n Fairbairn wrote in response to Neil Mitchell: And as you go on to say, if you apply it to the infinite list, who cares if you used head. Head is only unsafe on an empty list. So the problem then becomes can you detect unsafe calls to head and let the programmer know. No, that's the

Re[2]: [Haskell-cafe] Reading integers

2006-09-07 Thread Bulat Ziganshin
Hello Neil, Thursday, September 7, 2006, 1:45:03 AM, you wrote: Currently I have a single module that provides reading operations for Integers and Ints. I'm not quite sure what to do with it. Get it into base! Where it is, or what its called is less relevant - perhaps entirely decoupled

Re: [Haskell-cafe] head as a total function

2006-09-07 Thread Bulat Ziganshin
Hello oleg, Thursday, September 7, 2006, 10:28:00 AM, you wrote: P.S. Algol68 was my favorite language too. +1 :) it was the first imperative language supporting closures, after all -- Best regards, Bulatmailto:[EMAIL PROTECTED]

Re: [Haskell-cafe] how do you debug programs?

2006-09-07 Thread Tamas K Papp
On Wed, Sep 06, 2006 at 11:34:05AM +0200, Pepe Iborra wrote: Hi Tamas There are several ways to debug a Haskell program. The most advanced ones are based in offline analysis of traces, I think Hat [1] is the most up-to-date tool for this. There is a Windows port of Hat at [5]. Another

Re: [Haskell-cafe] NaN, Infinity literals

2006-09-07 Thread Chris Kuklewicz
You want the RealFloat class functions: http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t%3ARealFloat Tamas K Papp wrote: Hi, Is there a way to use NaN and Infinity as literals, or at least to test if a value is NaN or Infinity? I tried *Main let nan=0/0 *Main nan NaN

Re: [Haskell-cafe] NaN, Infinity literals

2006-09-07 Thread Bertram Felgenhauer
Hi, Tamas K Papp wrote: Is there a way to use NaN and Infinity as literals, or at least to test if a value is NaN or Infinity? *Main let nan=0/0 *Main nan NaN *Main nan==0/0 False This is correct according to the IEEE 754 standard, which defines that NaN compares unequal to everything,

Re: [Haskell-cafe] NaN, Infinity literals

2006-09-07 Thread Udo Stenzel
Tamas K Papp wrote: Is there a way to use NaN and Infinity as literals, or at least to test if a value is NaN or Infinity? *Main let nan=0/0 *Main nan NaN *Main nan==0/0 False so storing the value does not work... Not sure what you mean here. In IEEE floating point, NaN is not equal

Re: [Haskell-cafe] Monad laws

2006-09-07 Thread Brian Hulley
Deokhwan Kim wrote: What is the practical meaning of monad laws? (M, return, =) is not qualified as a category-theoretical monad, if the following laws are not satisfied: 1. (return x) = f == f x 2. m = return == m 3. (m = f) = g == m (\x - f x = g) But what practical problems can

Re: Re[2]: [Haskell-cafe] Reading integers

2006-09-07 Thread Lennart Augustsson
What about negative numbers? Also, don't use (ord c - ord '0'), it doesn't work with Unicode digits. That's why there is a digitToInt function. -- Lennart On Sep 7, 2006, at 02:12 , Bulat Ziganshin wrote: readI = foldl f 0 where f m c | isDigit c = fromIntegral (ord c - ord '0')

Re: [Haskell-cafe] Re: how do you debug programs?

2006-09-07 Thread Claus Reinke
thinking helps, but claiming that tools can't help doesn't. Lets be absolutely clear about this: I've never claimed that tools can't help. In this thread I've been using the term debugger in the narrow sense implied by the OP's question -- something that steps through the execution of the

Re: [Haskell-cafe] Monad laws

2006-09-07 Thread Lennart Augustsson
Brian, Are you really sure Haskell compilers do that optimization? I would regard a compiler that does optimizations that are justified by laws that the compiler cannot check as broken. -- Lennart On Sep 7, 2006, at 08:50 , Brian Hulley wrote: Deokhwan Kim wrote: What is the

Re: [Haskell-cafe] Monad laws

2006-09-07 Thread Robert Dockins
On Sep 7, 2006, at 9:04 AM, Lennart Augustsson wrote: Brian, Are you really sure Haskell compilers do that optimization? I would regard a compiler that does optimizations that are justified by laws that the compiler cannot check as broken. What, like list fusion? ;-) Although, more

Re: [Haskell-cafe] Re: how do you debug programs?

2006-09-07 Thread David Roundy
On Thu, Sep 07, 2006 at 06:21:01AM +0100, Jn Fairbairn wrote: David Roundy [EMAIL PROTECTED] writes: On Wed, Sep 06, 2006 at 09:56:17AM -0700, Jason Dagit wrote: Or maybe even more extreme you could use template haskell or the c preprocessor to fill in the line number + column.

Re: Re[2]: [Haskell-cafe] Reading integers

2006-09-07 Thread Bertram Felgenhauer
Lennart Augustsson wrote: Also, don't use (ord c - ord '0'), it doesn't work with Unicode digits. That's why there is a digitToInt function. FWIW, in Haskell 98, isDigit and digitToInt are defined as isDigit c= c = '0' c = '9' digitToInt :: Char - Int digitToInt c |

Re: [Haskell-cafe] how do you debug programs?

2006-09-07 Thread Pepe Iborra
On 07/09/2006, at 10:53, Tamas K Papp wrote: Dear Pepe, Thank you for the information. I finally ended up working with Debug.Trace, and found the bug very quickly. I also tried Hood, but couldn't load it in ghci: import Observe can't find the library, but % locate Observe

Re: [Haskell-cafe] Monad laws

2006-09-07 Thread Brian Hulley
Lennart Augustsson wrote: On Sep 7, 2006, at 08:50 , Brian Hulley wrote: Deokhwan Kim wrote: What is the practical meaning of monad laws? Afaiu the monad laws are needed so the compiler can do various optimizations, especially in regard to the do notation. Consider: g c = do

[Haskell-cafe] Re: Monad laws

2006-09-07 Thread Stefan Monnier
Are you really sure Haskell compilers do that optimization? I would regard a compiler that does optimizations that are justified by laws that the compiler cannot check as broken. You mean like the non-aliasing law in Fortran? Stefan ;-)

Re[4]: [Haskell-cafe] Reading integers

2006-09-07 Thread Bulat Ziganshin
Hello Bertram, Thursday, September 7, 2006, 6:01:17 PM, you wrote: Also, don't use (ord c - ord '0'), it doesn't work with Unicode digits. That's why there is a digitToInt function. making this a bit of a red herring. I can't comment on why Bulat doesn't like negative numbers. because my

Re: [Haskell-cafe] head as a total function

2006-09-07 Thread Bill Wood
On Thu, 2006-09-07 at 11:03 +0400, Bulat Ziganshin wrote: . . . it was the first imperative language supporting closures, after all Uh, what about lisp? The (MIT) lisp 1.4 manual (ca. 1965) refers to FUNCTION differing from QUOTE in that it handled free variables correctly; I take this to

Re: [Haskell-cafe] Reading integers

2006-09-07 Thread Bertram Felgenhauer
Hi, I've implemented replacements for readsPrec for Int and Integer in a module called Compat (in my darcs repository [1]) and measured their performance. There's some overhead when compared to the plain versions. For Integer, it's about 30% for single digit numbers, going down to about 10% at

Re: Re[2]: [Haskell-cafe] Reading integers

2006-09-07 Thread Brian Hulley
Bertram Felgenhauer wrote: I can't comment on why Bulat doesn't like negative numbers. Neither it seems, did the original Haskell committee - that's why we have to muddle along with a confusing unary minus operator instead of proper negative literals - see the thread beginning

Re: [Haskell-cafe] head as a total function

2006-09-07 Thread Jared Updike
it was the first imperative language supporting closures, after all Uh, what about lisp? For those who read the Foozles slides posted earlier [0], I must say he nailed this one, on slide 2. The (MIT) lisp 1.4 manual (ca. 1965) refers to FUNCTION differing from QUOTE in that it handled free

Re: [Haskell-cafe] map (-2) [1..5]

2006-09-07 Thread Cale Gibbard
On 17/08/06, Brian Hulley [EMAIL PROTECTED] wrote: Jared Updike wrote: In other words, superscripts bind tighter than prefix ops but prefix ops bind tighter than infix. I see. My point is that there already exists a convention[1] that the way to type in 2 -4 is -4^2 which means

Re: [Haskell-cafe] Monad laws

2006-09-07 Thread ajb
G'day all. Quoting Deokhwan Kim [EMAIL PROTECTED]: What is the practical meaning of monad laws? Interesting philosophical question. There will be an article on this topic in the next The Monad.Reader, so watch this space. But what practical problems can unsatisfying them cause? Pretty much

Re[2]: [Haskell-cafe] head as a total function

2006-09-07 Thread Bulat Ziganshin
Hello Bill, Thursday, September 7, 2006, 8:24:53 PM, you wrote: it was the first imperative language supporting closures, after all Uh, what about lisp? Lots of Idiotic Silly Parentheses? :) well, i say about more or less well-known non-FP languages. actually, i'm sure that some FBCPL