Re: [GHC] #981: implicit parameters, type synonyms, and $

2006-12-09 Thread GHC
#981: implicit parameters, type synonyms, and $ -+-- Reporter: [EMAIL PROTECTED] | Owner: Type: bug | Status: new Priority: normal | Milestone:

Re: [GHC] #1001: ghc-6.6: panic! (the 'impossible' happened) interactiveUI:flush when hiding haskell98 and importing IO

2006-12-09 Thread GHC
#1001: ghc-6.6: panic! (the 'impossible' happened) interactiveUI:flush when hiding haskell98 and importing IO +--- Reporter: [EMAIL PROTECTED] | Owner: igloo Type: bug |

Re: ghc-6.6-src-extralibs.tar.bz2

2006-12-09 Thread Sven Panne
Am Freitag, 8. Dezember 2006 21:08 schrieb Ian Lynagh: This will probably have been made with whatever OpenGL was in darcs when the build was done (the binary distributions come from the nightly builds). [...] OK, so in a nutshell: Everything is fine with the binary releases, it can just be

difficult profiling example

2006-12-09 Thread Serge D. Mechveliani
This is again on the time profiling in ghc-6.6. Who could, please, guess what is happening? main = putStr (showsList newProveds \n) where ... ((_, newProveds), _) = {-# SCC

Re: [Haskell] GHC Error question

2006-12-09 Thread Lennart Augustsson
Your two examples are different, the second one is rejected by the type checker, with or without a signature. The first one isn't. Tell me how this make sense: 1. I enter the definition for f. 2. I ask ghc for the type of f and get an answer. 3. I take the answer and tell ghc this is

[Haskell] ANNOUNCE: ZMachine 0.0

2006-12-09 Thread Samuel Bronson
I've written a (partial) Z-machine interpreter in Haskell. It is missing lots of stuff, but I got it to the point where it doesn't cause actual pain to play with it ;-). It uses gtk2hs for the interface, though other interfaces could be implemented without actually changing the interpreter

Re: [Haskell] ANNOUNCE: ZMachine 0.0

2006-12-09 Thread Samuel Bronson
On 12/9/06, Neil Mitchell [EMAIL PROTECTED] wrote: Hi Samuel, For future releases can you put up a little description of what a Z Machine is in the email? Hmm. That would probably be a good idea ;-). But I don't see why I can't do that now, too. Except I actually want to describe the

Re: [Haskell] Num is such a fat and greedy class

2006-12-09 Thread David House
On 08/12/06, Dan Weston [EMAIL PROTECTED] wrote: The following observations are not new, insightful, or gracious, but I Wouldn't the following be more useful/general? class Subtraction a b | a - b where (-) :: a - a - b If you split them up like this, things like quadRoots take an unwieldly

[Haskell-cafe] Dynamic types through unsafeCoerce

2006-12-09 Thread Alfonso Acosta
Hi, I've been using Data.Dynamic but the Typeable requirement doesn't go well with FFI declarations (which don't accept type contexts). This is a little example of what I would like to do: data MyDyn = MyDyn myToDyn :: a - MyDyn myToDyn = unsafeCoerce myFromDyn :: MyDyn - a myFromDyn =

[Haskell-cafe] One question...

2006-12-09 Thread Waldemar Biernacki
Hello to everyone! Two days ago I have found Haskell in Internet. It sounds very nice. I have read some articles, few examples, ... yes it sounds nice. Now my problem is connected with the non-update object feature. I can't write variable instead object because - from the meaning of the word (

Re: [Haskell-cafe] One question...

2006-12-09 Thread Neil Mitchell
Hi Waldmar, Now my problem is connected with the non-update object feature. I can't write variable instead object because - from the meaning of the word ( variable ) - it has the possibility to CHANGE its value. Yes that my problem :-( main = do username - read_info_from_user

Re: [Haskell-cafe] One question...

2006-12-09 Thread Dan Mead
To think properly in haskell when you need side effects you should look at monads and how they are used in I/O. I'm no expert but most applications i've seen start like this main = do x -getArgs mapM_ somefunction(x) do is a construct that lets you have a bunch of IO statements

Re: [Haskell-cafe] One question...

2006-12-09 Thread Donald Bruce Stewart
wb: Hello to everyone! Two days ago I have found Haskell in Internet. It sounds very nice. I have read some articles, few examples, ... yes it sounds nice. Great! Welcome to Haskell. Now my problem is connected with the non-update object feature. I can't write variable instead object

Re: [Haskell-cafe] SMP support in GHC 6.6 on PPC Macs

2006-12-09 Thread Ian Lynagh
On Sat, Nov 25, 2006 at 11:28:13PM +, Ivan Tomac wrote: I've noticed that code compiled with -threaded doesn't like +RTS - Nthread count as an argument. This seems to be the case with both the binary distribution of GHC 6.6 at www.haskell.org/ghc as well as the version I built from

Re: [Haskell-cafe] One question...

2006-12-09 Thread Claus Reinke
Hello yourself!-) Two days ago I have found Haskell in Internet. It sounds very nice. I have read some articles, few examples, ... yes it sounds nice. you need to try it as well. haskell.org has information, tutorials, interactive implementations (and to answer the likely follow-on question:

Re: [Haskell-cafe] One question...

2006-12-09 Thread Bulat Ziganshin
Hello Waldemar, Saturday, December 9, 2006, 7:57:52 PM, you wrote: 1. At the beginning the user should write her/his name (for instance as the application parameter). 2. Let's assume that the application has many various functions defined inside, and - after printing each of the outputs -

Re: [Haskell-cafe] Dynamic types through unsafeCoerce

2006-12-09 Thread Taral
On 12/9/06, Alfonso Acosta [EMAIL PROTECTED] wrote: I've been using Data.Dynamic but the Typeable requirement doesn't go well with FFI declarations (which don't accept type contexts). Can you be a little more specific? mt2mgt :: MyType a b - MyGenType mt2mgt = MyGenType.myToDyn mgt2mt ::

Re: [Haskell-cafe] Dynamic types through unsafeCoerce

2006-12-09 Thread Alfonso Acosta
On 12/9/06, Taral [EMAIL PROTECTED] wrote: On 12/9/06, Alfonso Acosta [EMAIL PROTECTED] wrote: I've been using Data.Dynamic but the Typeable requirement doesn't go well with FFI declarations (which don't accept type contexts). Can you be a little more specific? Functions like this one are

Re: [Haskell-cafe] Dynamic types through unsafeCoerce

2006-12-09 Thread Udo Stenzel
Alfonso Acosta wrote: I've been using Data.Dynamic but the Typeable requirement doesn't go well with FFI declarations (which don't accept type contexts). You wouldn't need a Typeable context anyway; what's biting you is that Dynamic is not one of the primitive types that can pass across the

Re: [Haskell-cafe] Dynamic types through unsafeCoerce

2006-12-09 Thread Alfonso Acosta
On 12/9/06, Udo Stenzel [EMAIL PROTECTED] wrote: You wouldn't need a Typeable context anyway; what's biting you is that Dynamic is not one of the primitive types that can pass across the FFI. There are good reasons for that and unsafeCoerce certainly cannot invalidate them. You want a

Re: [Haskell-cafe] Dynamic types through unsafeCoerce

2006-12-09 Thread Taral
On 12/9/06, Alfonso Acosta [EMAIL PROTECTED] wrote: Functions like this one are not directy exportable myfunc :: (Tyeable a, Typeable b) = MyType a b ... Well, that's true. Then again, you can't export that type anyway without use of a StablePtr. All StablePtrs are exportable. Uhm thinking

Re: [Haskell-cafe] Dynamic types through unsafeCoerce

2006-12-09 Thread Lemmih
On 12/9/06, Alfonso Acosta [EMAIL PROTECTED] wrote: On 12/9/06, Udo Stenzel [EMAIL PROTECTED] wrote: You wouldn't need a Typeable context anyway; what's biting you is that Dynamic is not one of the primitive types that can pass across the FFI. There are good reasons for that and unsafeCoerce

[Haskell-cafe] New Layout Rule take 2

2006-12-09 Thread John Meacham
I have made some improvements to the algorithm, and I am happy to say that with some minor tweaks, it correctly lays out the programs in the nofib suite. the algorithm is not much more complicated than the current one in the report, but doesn't have the parse-error rule. it does require a single

[Haskell-cafe] laziness

2006-12-09 Thread Ranjan Bagchi
Hi -- I'm using ghc 6.6, and I had some questions about the extend of laziness and foldr. I've noticed the following: x = foldr (:) [] [1..] (take 10) x yields [1..10] Which is great.. however, what I'd like to fold the list over a tuple: foo x (l,payload) = ((x:l), payload) (x,_) = foldr