[Haskell-cafe] hackage.haskell.org cannot be accessed?

2010-08-12 Thread Magicloud Magiclouds
Hi, Today I found out that I cannot access hackage.haskell.org. I have tried vpn/proxy to see if my network has something wrong. No luck. -- 竹密岂妨流水过 山高哪阻野云飞 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] hackage.haskell.org cannot be accessed?

2010-08-12 Thread Ivan Lazar Miljenovic
On 12 August 2010 16:45, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi,  Today I found out that I cannot access hackage.haskell.org. I have tried vpn/proxy to see if my network has something wrong. No luck. http://downforeveryoneorjustme.com/http://hackage.haskell.org agrees.

Re: [Haskell-cafe] Accepting and returning polyvariadic functions

2010-08-12 Thread Will Jones
Hi Tillmann, That's worked a treat -- thanks ever so much :) Will On Wed, Aug 11, 2010 at 7:50 PM, Tillmann Rendel ren...@mathematik.uni-marburg.de wrote: Will Jones wrote: f :: Int - IO () f = undefined g :: Int - Int - IO () g = undefined h :: Int - Int - Int - IO () h

Re: [Haskell-cafe] On documentation

2010-08-12 Thread David Waern
2010/7/23 Ivan Miljenovic ivan.miljeno...@gmail.com: On 22 July 2010 18:33, David Waern david.wa...@gmail.com wrote: [snip] We currently only support concrete examples (i.e. unit tests), but the plan is to add support for QuickCheck properties. Would you have some kind of inbuilt time

Re: [Haskell-cafe] ghc in macports

2010-08-12 Thread Benedict Eastaugh
On 11 August 2010 15:49, Ozgur Akgun ozgurak...@gmail.com wrote: Personally, I'd like to use the macports version, if the ghc version there was resonably recent (having 2 versions, a stable and an edge could be a good idea?) You could use Homebrew instead. That has a fairly up-to-date version

[Haskell-cafe] Is there a pure Haskell gzip/bzip compression module out there?

2010-08-12 Thread C K Kashyap
Hi All, I looked at Hackage and found a couple of pure Haskell modules for un-compression. Are there any for comression? I found Huffman compression - but what I need is something that I can uncompress with standard tools. -- Regards, Kashyap ___

Re: [Haskell-cafe] ghc in macports

2010-08-12 Thread Ozgur Akgun
sounds good to me. where can I find the list of packages (or whatever they call them in homebrew, formula?) available? On 12 August 2010 11:49, Benedict Eastaugh ionf...@gmail.com wrote: On 11 August 2010 15:49, Ozgur Akgun ozgurak...@gmail.com wrote: Personally, I'd like to use the macports

Re: [Haskell-cafe] ghc in macports

2010-08-12 Thread Hans Aberg
On 12 Aug 2010, at 12:49, Benedict Eastaugh wrote: On 11 August 2010 15:49, Ozgur Akgun ozgurak...@gmail.com wrote: Personally, I'd like to use the macports version, if the ghc version there was resonably recent (having 2 versions, a stable and an edge could be a good idea?) You could

Re: [Haskell-cafe] ghc in macports

2010-08-12 Thread Max Bolingbroke
On 12 August 2010 12:17, Ozgur Akgun ozgurak...@gmail.com wrote: sounds good to me. where can I find the list of packages (or whatever they call them in homebrew, formula?) available? Homebrew only makes available GHC and the Platform:

Re: [Haskell-cafe] Is there a pure Haskell gzip/bzip compression module out there?

2010-08-12 Thread Max Bolingbroke
On 12 August 2010 12:10, C K Kashyap ckkash...@gmail.com wrote: I looked at Hackage and found a couple of pure Haskell modules for un-compression. Are there any for comression? I found Huffman compression - but what I need is something that I can uncompress with standard tools. The zlib

Re: [Haskell-cafe] Is there a pure Haskell gzip/bzip compression module out there?

2010-08-12 Thread Yuras Shumovich
2010/8/12 Max Bolingbroke batterseapo...@hotmail.com: On 12 August 2010 12:10, C K Kashyap ckkash...@gmail.com wrote: http://hackage.haskell.org/packages/archive/zlib/0.4.0.2/doc/html/Codec-Compression-GZip.html It is not pure haskell implementation. As I know there are no pure implementation.

Re: [Haskell-cafe] ghc in macports

2010-08-12 Thread Ozgur Akgun
On 12 August 2010 12:52, Hans Aberg haber...@telia.com wrote: On http://wiki.github.com/mxcl/homebrew/installation it says: delete /usr/local/include and/usr/local/lib So its not for those that also installs standard distributions, it seems. I thought this was just a recommendation. --

Re: [Haskell-cafe] Is there a pure Haskell gzip/bzip compression module out there?

2010-08-12 Thread C K Kashyap
It's for a purely academic purpose :) On Thu, Aug 12, 2010 at 5:30 PM, Yuras Shumovich shumovi...@gmail.comwrote: 2010/8/12 Max Bolingbroke batterseapo...@hotmail.com: On 12 August 2010 12:10, C K Kashyap ckkash...@gmail.com wrote:

[Haskell-cafe] Workshop on ML 2010 - Call for Participation

2010-08-12 Thread Matthew Fluet
The 2010 ACM SIGPLAN Workshop on ML http://www.cs.rit.edu/~mtf/ml2010 Baltimore, Maryland, United States Sunday, September 26, 2010 co-located with ICFP 2010 Call for

Re: [Haskell-cafe] ghc in macports

2010-08-12 Thread Hans Aberg
On 12 Aug 2010, at 14:08, Ozgur Akgun wrote: On http://wiki.github.com/mxcl/homebrew/installation it says: delete /usr/local/include and/usr/local/lib So its not for those that also installs standard distributions, it seems. I thought this was just a recommendation. It also says:

[Haskell-cafe] A GHC error message puzzle

2010-08-12 Thread Yitzchak Gale
The file error_puzzle.hs begins like this: main = do inp - readFile input writeFile output $ process inp process :: String - String When compiled with GHC 6.12.3 and run, it gives the following result: $ ./error_puzzle error_puzzle: output: hClose: illegal operation (handle is finalized)

Re: [Haskell-cafe] A GHC error message puzzle

2010-08-12 Thread Pierre-Etienne Meunier
Hi, readFile is lazy IO, so the unsafePerformIO or equivalents are already there. It should be enough to invent a strict process function, but which ghc 6.12.3 isn't able to figure out that it is strict. Does it still work with : writeFile output $! process inp This raises another question :

Re: [Haskell-cafe] hackage.haskell.org cannot be accessed?

2010-08-12 Thread Don Stewart
ivan.miljenovic: On 12 August 2010 16:45, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi,  Today I found out that I cannot access hackage.haskell.org. I have tried vpn/proxy to see if my network has something wrong. No luck.

Re: [Haskell-cafe] A GHC error message puzzle

2010-08-12 Thread Sebastian Fischer
Give a definition for process and an input file that reproduce this result. Quite probably not the intended solution: process :: String - String process _ = error output: hClose: illegal operation (handle is finalized) Have fun! Sebastian -- Underestimating the novelty of the

Re: [Haskell-cafe] hackage.haskell.org cannot be accessed?

2010-08-12 Thread Christopher Done
We can only be so immutable. ;-) /groan On 12 August 2010 17:50, Don Stewart d...@galois.com wrote: ivan.miljenovic: On 12 August 2010 16:45, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi,  Today I found out that I cannot access hackage.haskell.org. I have tried vpn/proxy

[Haskell-cafe] universal quantification is to type instantiations as existential quantification is to what

2010-08-12 Thread Joshua Ball
Hi, If I have a universally quantified type mapInt :: forall a. (Int - a) - [Int] - [a] I can instantiate that function over a type and get a beta-reduced version of the type mapInt [String] :: (Int - String) - [Int] - [String] (I'm borrowing syntax from Pierce here since I don't think

Re: [Haskell-cafe] universal quantification is to type instantiations as existential quantification is to what

2010-08-12 Thread Daniel Peebles
The existential is a pair where one component is a type, and the type of the second component depends on the value (i.e., which type went in the first component) of the first. It's often called a sigma type when you have full dependent types. So your exists a. (Int - a) - [Int] - [a] type might

Re: [Haskell-cafe] A GHC error message puzzle

2010-08-12 Thread Yitzchak Gale
Sebastian Fischer wrote:    process _ = error output: hClose: illegal operation (handle is finalized) Haha, very good! But I'm thinking of a case where GHC really does print out the error message. -Yitz ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] ADT patch/update

2010-08-12 Thread Sergey Mironov
2010/8/8 Stephen Tetley stephen.tet...@gmail.com: Maybe this paper is close? Type-safe diff for families of datatypes Eelco Lempsink Sean Leather Andres Löh Thanks a lot! Just what I need.. and more trickier than I thought. They represent any ADT as a tree and use diff algorithm for trees to

Re: [Haskell-cafe] ghc in macports

2010-08-12 Thread Gaius Hammond
On 12 Aug 2010, at 12:52, Hans Aberg wrote: its not for those that also installs standard distributions, it seems. But what's wrong with the binaries listed here: http://haskell.org/ghc/ Fairly easy to install. Yes and no; on OSX 10.5.8 it works better to install GHC from the binary

Re: [Haskell-cafe] Re: Haskell in Industry

2010-08-12 Thread Ben Moseley
it's clear that FP ideas are becoming mainstream _without_ any need of help from the financial community This is far from clear - unless you want to deny that the financial community has had any impact on FP... due to Objective C with its Smalltalk influence ...and it's interesting to

Re: [Haskell-cafe] universal quantification is to type instantiations as existential quantification is to what

2010-08-12 Thread Tillmann Rendel
Hi, to understand forall and exists in types, I find it helpful to look at the terms which have such types. Joshua Ball wrote: mapInt :: forall a. (Int - a) - [Int] - [a] I can instantiate that function over a type and get a beta-reduced version of the type mapInt [String] :: (Int -

[Haskell-cafe] Re: A GHC error message puzzle

2010-08-12 Thread Simon Marlow
On 12/08/10 15:09, Yitzchak Gale wrote: The file error_puzzle.hs begins like this: main = do inp- readFile input writeFile output $ process inp process :: String - String When compiled with GHC 6.12.3 and run, it gives the following result: $ ./error_puzzle error_puzzle: output:

[Haskell-cafe] ANNOUNCE: Sifflet visual programming language, release 1.0!

2010-08-12 Thread gdweber
Sifflet 1.0 is now available on Hackage. Sifflet is a visual, functional programming language and support system for students learning about recursion. Sifflet programmers define functions by drawing diagrams, and the Sifflet interpreter uses diagrams to show how the function calls are evaluated.

Re: [Haskell-cafe] Re: A GHC error message puzzle

2010-08-12 Thread Wei Hu
Anyone care to explain why? I also tested a slightly changed program pasted below, and am very confused. main = do -- This call doesn't terminate, why? print $ nonTermination a -- Comment the above line to test the rest of the code -- RTS detects the loop and bails out print $

Re: [Haskell-cafe] Re: A GHC error message puzzle

2010-08-12 Thread Jason Dagit
On Thu, Aug 12, 2010 at 1:25 PM, Wei Hu wei@gmail.com wrote: Anyone care to explain why? I also tested a slightly changed program pasted below, and am very confused. main = do -- This call doesn't terminate, why? print $ nonTermination a -- Comment the above line to test the

Re: [Haskell-cafe] Re: A GHC error message puzzle

2010-08-12 Thread Wei Hu
Threaded or not doesn't seem to make a difference. I just noticed with optimization turned on, RTS does detect the loop. On Thu, Aug 12, 2010 at 4:28 PM, Jason Dagit da...@codersbase.com wrote: On Thu, Aug 12, 2010 at 1:25 PM, Wei Hu wei@gmail.com wrote: Anyone care to explain why? I

[Haskell-cafe] Re: A GHC error message puzzle

2010-08-12 Thread Yitzchak Gale
Simon Marlow wrote: process xs = blackhole where blackhole = tail blackhole We have a winner! Perhaps I should have stipulated that members of the GHC team and their family members are not eligible to participate. Regards, Yitz ___ Haskell-Cafe

Re: [Haskell-cafe] ADT patch/update

2010-08-12 Thread Nathan Howell
There is an existing implementation on hackage: http://hackage.haskell.org/packages/archive/gdiff/1.0/doc/html/Data-Generic-Diff.html On Thu, Aug 12, 2010 at 11:45 AM, Sergey Mironov ier...@gmail.com wrote: 2010/8/8 Stephen Tetley stephen.tet...@gmail.com: Maybe this paper is close?

Re: [Haskell-cafe] Re: A GHC error message puzzle

2010-08-12 Thread Yitzchak Gale
Wei Hu wrote: nonTermination _ = blackhole where blackhole = blackhole My original example was actually: process :: String - String process = let x = x in x Regards, Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] A GHC error message puzzle

2010-08-12 Thread Yitzchak Gale
Pierre-Etienne Meunier wrote: Does it still work with : writeFile output $! process inp You're right, that changes things. Then the program prints: loop That would have given it away, of course. :) Regards, Yitz ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] A GHC error message puzzle

2010-08-12 Thread aditya siram
When I tried this it never returned, there was no error. -deech On Thu, Aug 12, 2010 at 4:04 PM, Yitzchak Gale g...@sefer.org wrote: Pierre-Etienne Meunier wrote: Does it still work with : writeFile output $! process inp You're right, that changes things. Then the program prints: loop

[Haskell-cafe] Re: A GHC error message puzzle

2010-08-12 Thread Sebastian Fischer
Wei Hu wrote: nonTermination _ = blackhole where blackhole = blackhole My original example was actually: process :: String - String process = let x = x in x process = process works just as well. What about the other part of the solution: What is the cause of the error? Of course,

Re: [Haskell-cafe] Re: A GHC error message puzzle

2010-08-12 Thread Yitzchak Gale
Sebastian Fischer wrote:    process = process Nice! What about the other part of the solution: What is the cause of the error? Of course, the cause is the black hole. But why is it not reported? Hmm. On second thought, perhaps it was a good idea after all that I did not exclude GHC team

Re: [Haskell-cafe] ghc in macports

2010-08-12 Thread Hans Aberg
On 12 Aug 2010, at 20:46, Gaius Hammond wrote: its not for those that also installs standard distributions, it seems. But what's wrong with the binaries listed here: http://haskell.org/ghc/ Fairly easy to install. Yes and no; on OSX 10.5.8 it works better to install GHC from the binary

Re: [Haskell-cafe] Re: A GHC error message puzzle

2010-08-12 Thread Tillmann Rendel
Hi, the reading is not needed to make it happen. main = writeFile output blackhole where blackhole = blackhole In fact, writing is not needed either. main = bracket (openFile output WriteMode) hClose (\hdl - blackhole `seq` return ()) blackhole = blackhole Note that

Re: [Haskell-cafe] universal quantification is to type instantiations as existential quantification is to what

2010-08-12 Thread wren ng thornton
Daniel Peebles wrote: The existential is a pair where one component is a type, and the type of the second component depends on the value (i.e., which type went in the first component) of the first. It's often called a sigma type when you have full dependent types. Not quite. Strong-sigma is a

Re: [Haskell-cafe] universal quantification is to type instantiations as existential quantification is to what

2010-08-12 Thread wren ng thornton
Joshua Ball wrote: Hi, If I have a universally quantified type mapInt :: forall a. (Int - a) - [Int] - [a] I can instantiate that function over a type and get a beta-reduced version of the type mapInt [String] :: (Int - String) - [Int] - [String] (I'm borrowing syntax from Pierce here since

Re: [Haskell-cafe] universal quantification is to type instantiations as existential quantification is to what

2010-08-12 Thread Dan Doel
On Thursday 12 August 2010 7:59:09 pm wren ng thornton wrote: Not quite. Strong-sigma is a dependent pair where you can project both elements. Weak-sigma is a dependent pair where you can only project the first element (because the second is erased). Existentials are dependent pairs where you

[Haskell-cafe] Build failure for PortMidi on mac: incorrect Block.h

2010-08-12 Thread Brian Victor
I'm trying to build PortMidi on the mac, and get the error shown below. It appears that an OSX header is trying to include a Block.h file and getting the GHC Block.h instead of the one it expects. I'm new to Haskell and even newer to cabal, so I'm not sure how to go about solving this.

[Haskell-cafe] Trying to compile Glade Gtk2Hs demo / cabal install glade problem

2010-08-12 Thread Peter Schmitz
(I am posting this to Cafe and Gtk2Hs Users; if you subscribe to both, please reply to Cafe; but I will see your replies either place; thanks much.) I am trying to compile the Gtk2Hs demo program GladeTest.hs (located in the ...\demo\glade dir), under MS Windows XP. The error I get is:

[Haskell-cafe] How do you change the mouse position?

2010-08-12 Thread Eitan Goldshtrom
In C++, maybe Java, I remember using a Robot to change the location of the mouse on the screen. My intention is to do something like in an FPS game where the mouse is always centered to make sure it doesn't run into the edges of the screen. How can I do that in Haskell? I'm using OpenGL, so if

Re: [Haskell-cafe] How do you change the mouse position?

2010-08-12 Thread Stephen Sinclair
On Thu, Aug 12, 2010 at 10:50 PM, Eitan Goldshtrom thesource...@gmail.com wrote: In C++, maybe Java, I remember using a Robot to change the location of the mouse on the screen. My intention is to do something like in an FPS game where the mouse is always centered to make sure it doesn't run

Re: [Haskell-cafe] How do you change the mouse position?

2010-08-12 Thread Eitan Goldshtrom
Thanks. That is exactly what I was looking for. I really appreciate the help. -Eitan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe