Re: Segmentation fault in program

2001-02-09 Thread Sigbjorn Finne
"T.J. Brown" [EMAIL PROTECTED] writes: I'm trying to write a program (in C) that calls a function that is implemented in Haskell. ... The problem I'm seeing is that depending on the size of the buffer, the program segmentation faults. I don't see any obvious reason that this is happening

Re: Funny global thing?

2001-02-09 Thread Reuben Thomas
I'm getting some strange error messages when trying to compile Ralf Hinze's lhs2TeX under GHC 4.08.1 and a pretty recent cygwin install on Windows 2000. The strange thing is that I was able to compile these sources previously, with the same ghc but an older cygwin. Any ideas? I've not run

RE: Hello World program core dumps with GHC 4.08.1 on HPUX 10.2 0

2001-02-09 Thread Simon Marlow
That's great info, thanks. I think I'll paste this message into the code :-) Is there any way to detect at compilation time which scheme we should be using? Presumably switching the JMP to use an indirection will break GHC on older versions of HPUX. Cheers, Simon Thanks for the

FixIO/ Tackling Awkward Squad

2001-02-09 Thread Ronald Legere
Dear Haskellers, After enjoying "Tackling the Awkward Squad" (Simon Peyton Jones), I wonder what other elements of the squad can be tackled in a simular way? Right now I am thinking about FixIO. This little bugger seems to show up in a lot of code! Can we give it an operational semantics a

Detail: laziness in show

2001-02-09 Thread Patrik Jansson
I just uncountered an interesting example of (hidden) laziness - here is a very short session with hugs (February 2000): Prelude undefined :: String " Program error: {undefined} Note the starting double quote on the line before the error! In a more complicated context this puzzled me for a

Re: Revamping the numeric classes

2001-02-09 Thread Bjorn Lisper
I see. So you can transform arbitrary function of type a-b-c to a function of type [a]-b-[c], by applying \f x y - map (\z - f z y) x and similarly a-b-c to a-[b]-[c]. But then there are two ways of transforming a-b-c to [a]-[b]-[[c] There should be no transformation to type

Chat Live with a CPA

2001-02-09 Thread info
FREE Chat with a CPA on your tax questions, wondering what 8a on your 1040 means. Our CPAs will answer your questions FREE. Need a CPA in your area? Search our 450,000 CPA database by city, state and industry. a href="http://www.cpadirectory.com/cpadirectory/askacpa/ask_live_chat.cfm"

Re: Revamping the numeric classes

2001-02-09 Thread Marcin 'Qrczak' Kowalczyk
Fri, 9 Feb 2001 15:21:45 +0100 (MET), Bjorn Lisper [EMAIL PROTECTED] pisze: No, the transformation is a single step procedure where a term is transformed into a typeable term (if possible) with a minimal amount of lifting. You don't compose transformations. So functions implicitly lifted

Re: FixIO/ Tackling Awkward Squad

2001-02-09 Thread Ronald Legere
I am responding to my own email:) First, I didnt know about the whole mdo thing in hugs98 jan 2001. Also there are some papers that discuss semantics if you search for mdo or recusive monads. Anyway, it turns out that fixIO doenst work the way I wanted anyway. I guess I really need to understand

Types from values using existential types?

2001-02-09 Thread Dylan Thurston
I recently had an idea to allow one to create types from values. This would have many uses in Haskell; e.g., it would be very nice to have a type of nxn matrices for n that are not necessarily statically determined. (It is easy to create a type of matrices and check that the sizes are

Re: Detail: laziness in show

2001-02-09 Thread Fergus Henderson
On 09-Feb-2001, Patrik Jansson [EMAIL PROTECTED] wrote: I just uncountered an interesting example of (hidden) laziness - here is a very short session with hugs (February 2000): Prelude undefined :: String " Program error: {undefined} Note the starting double quote on the line before the

Re: Types from values using existential types?

2001-02-09 Thread Fergus Henderson
On 09-Feb-2001, Dylan Thurston [EMAIL PROTECTED] wrote: I recently had an idea to allow one to create types from values. This would have many uses in Haskell; e.g., it would be very nice to have a type of nxn matrices for n that are not necessarily statically determined. (It is easy to

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-09 Thread Ketil Malde
Brian Boutel [EMAIL PROTECTED] writes: The fact that equality can be trivially defined as bottom does not imply that it should be a superclass of Num, it only explains that there is an ugly way of working around the problem. There is nothing trivial or ugly about a definition that reflects

In hoc signo vinces (Was: Revamping the numeric classes)

2001-02-09 Thread Jerzy Karczmarczuk
Marcin 'Qrczak' Kowalczyk wrote: JK Now, signum and abs seem to be quite distincts beasts. Signum seem JK to require Ord (and a generic zero...). Signum doesn't require Ord. signum z = z / abs z for complex numbers. Thank you, I know. And I ignore it. Calling "signum" the result of

Re: Revamping the numeric HUMAN ATTITUDE

2001-02-09 Thread Jerzy Karczmarczuk
Brian Boutel wrote: William Lee Irwin III wrote: The Standard Prelude serves its purpose well and accommodates the largest cross-section of users. Perhaps a Geek Prelude could accommodate the few of us who do need these sorts of schenanigans. Amen. Aha. And we will have The

Re: Show, Eq not necessary for Num [Was: Revamping the numeric c

2001-02-09 Thread Marcin 'Qrczak' Kowalczyk
Fri, 9 Feb 2001 11:48:33 -0500, Dylan Thurston [EMAIL PROTECTED] pisze: class (Show a, Read a, Eq a) = Comfortable a instance (Show a, Read a, Eq a) = Comfortable a Why isn't it legal? Because in Haskell 98 instance's head must be of the form of a type constructor applied to type

Re: 'Convertible' class?

2001-02-09 Thread Dylan Thurston
On Fri, Feb 09, 2001 at 12:05:09PM -0500, Dylan Thurston wrote: On Thu, Feb 08, 2001 at 04:06:24AM +, Marcin 'Qrczak' Kowalczyk wrote: You can put Num a in some instance's context, but you can't put Convertible Integer a. It's because instance contexts must constrain only type

Re: In hoc signo vinces (Was: Revamping the numeric classes)

2001-02-09 Thread William Lee Irwin III
Fri, 09 Feb 2001 10:52:39 +, Jerzy Karczmarczuk pisze: Again, a violation of the orthogonality principle. Needing division just to define signum. And of course a completely different approach do define the signum of integers. Or of polynomials... On Fri, Feb 09, 2001 at 07:19:21PM +,

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-09 Thread Brian Boutel
Ketil Malde wrote: Brian Boutel [EMAIL PROTECTED] writes: - Having a class hierarchy at all (or making any design decision) implies compromise. I think the argument is that we should move Eq and Show *out* of the Num hierarchy. Less hierarchy - less compromise. Can you demonstrate

Re: Haskell Implemetors Meeting

2001-02-09 Thread John Meacham
Another Haskell - Haskell transformation tool which I always thought would be useful (and perhaps exists?) would be a Haskell de-moduleizer. Basically it would take a Haskell program and follow its imports and spit out a single monolithic Haskell module. My first thought is that this should be

Re: Instances of multiple classes at once

2001-02-09 Thread Fergus Henderson
On 08-Feb-2001, Dylan Thurston [EMAIL PROTECTED] wrote: On Thu, Feb 08, 2001 at 09:41:56PM +1100, Fergus Henderson wrote: One point that needs to be resolved is the interaction with default methods. Consider class foo a where f :: ... f = ...

Re: Revamping the numeric classes

2001-02-09 Thread Fergus Henderson
On 08-Feb-2001, Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] wrote: I don't like the idea of treating the case "no explicit definitions were given because all have default definitions which are OK" differently than "some explicit definitions were given". I don't really like it that much

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-09 Thread Fergus Henderson
On 09-Feb-2001, Brian Boutel [EMAIL PROTECTED] wrote: Patrik Jansson wrote: The fact that equality can be trivially defined as bottom does not imply that it should be a superclass of Num, it only explains that there is an ugly way of working around the problem. ... There is nothing

Re: Show, Eq not necessary for Num [Was: Revamping the numeric classes]

2001-02-09 Thread Marcin 'Qrczak' Kowalczyk
Sat, 10 Feb 2001 14:09:59 +1300, Brian Boutel [EMAIL PROTECTED] pisze: Can you demonstrate a revised hierarchy without Eq? What would happen to Ord, and the numeric classes that require Eq because they need signum? signum doesn't require Eq. You can use signum without having Eq, and you can