Re: [Haskell-cafe] does try force evaluation of IO value

2012-10-05 Thread Roman Cheplyaka
* s9gf4...@gmail.com [2012-10-05 17:19:21+0600] > > Prelude Control.Exception> r <- try (return $ error "bam") :: IO (Either > > SomeException Int) Prelude Control.Exception> r > > Right *** Exception: bam > Wow, this is realy breaking news for me. Where can i read more about this > magic ?

Re: [Haskell-cafe] Panic loading network on windows (GHC 7.6.1)

2012-10-05 Thread JP Moresmau
Well, cabal-install installed and works fine. Not sure why on my own package that I'm trying to port to GHC 7.6 it doesn't work... I'll try to investigate further. Thanks JP On Fri, Oct 5, 2012 at 6:02 PM, Johan Tibell wrote: > On Fri, Oct 5, 2012 at 5:31 PM, JP Moresmau wrote: >> Hello, I've

[Haskell-cafe] Windows - Creating FreeGLUT DLL

2012-10-05 Thread Thiago Negri
I'm trying OpenGL on Haskell and couldn't create the FreeGLUT DLL myself. I did follow this tutorial: http://netsuperbrain.com/blog/posts/freeglut-windows-hopengl-hglut/ But when I put my DLL on the folder of the binary, it complains about "initGlut". Using the DLL pointed by FreeGLUT official s

Re: [Haskell-cafe] Panic loading network on windows (GHC 7.6.1)

2012-10-05 Thread Johan Tibell
On Fri, Oct 5, 2012 at 5:31 PM, JP Moresmau wrote: > Hello, I've installed Cabal and cabal-install 1.16 (which required > network) on a new GHC 7.6.1 install and everything went well, except > now when building a package requiring network I get: > > Loading package network-2.4.0.1 ... ghc.exe: Unk

[Haskell-cafe] Panic loading network on windows (GHC 7.6.1)

2012-10-05 Thread JP Moresmau
Hello, I've installed Cabal and cabal-install 1.16 (which required network) on a new GHC 7.6.1 install and everything went well, except now when building a package requiring network I get: Loading package network-2.4.0.1 ... ghc.exe: Unknown PEi386 section name `.idata $4' (while processing: c:/gh

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Roman Cheplyaka
I can do that indeed, and I guess I could reimplement everything I have at the moment on top of HUnit. However, an important part of functionality isn't there at the moment — golden file management. You should be able to say, "for this test, take its current output and write it to the correspondin

[Haskell-cafe] ANNOUNCE: luachunk-0.1

2012-10-05 Thread Anupam Jain
Hi all, I just released luachunk-0.1 on Hackage (http://github.com/ajnsit/luachunk). Luachunk is a small library to read and write Lua 5.1 bytecode chunks. It is modeled after ChunkSpy.lua (http://luaforge.net/projects/chunkspy/) though the code is written from scratch. A pretty listing printer fo

Re: [Haskell-cafe] referential transparency? (for fixity of local operators)

2012-10-05 Thread wren ng thornton
On 10/5/12 7:11 AM, Johannes Waldmann wrote: I was really surprised at the following: *Main> 1 + 2 * 3 7 *Main> ( \ (+) (*) -> 1 + 2 * 3 ) (+) (*) 9 because I was somehow assuming that either a) the Prelude fixities of the operators are kept After dealing with how Coq handles infix operator

Re: [Haskell-cafe] ANN: cabal-install-1.16.0 (and Cabal-1.16.0.1)

2012-10-05 Thread JP Moresmau
The very day before this announcement, I was porting my buildwrapper library to GHC 7.6.1, and then noticed that I couldn't get a version of cabal-install built with the Cabal library shipped with GHC. I thought "I'm not going to bother anybody, I'll just wait", and the next day, hop, there it is!

Re: [Haskell-cafe] referential transparency? (for fixity of local operators)

2012-10-05 Thread Clark Gaebel
Compile with -Wall and the flaw becomes obvious: :2:5: Warning: This binding for `+' shadows the existing binding imported from `Prelude' (and originally defined in `GHC.Num') :2:9: Warning: This binding for `*' shadows the existing binding imported from `Pre

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Simon Hengel
> 1. It's hard to guess at the moment how a good interface to the "pure >golden" part should look like. Maybe just produce HUnit assertions, e.g.: goldenVsFile :: FilePath -> FilePath -> IO () -> Assertion That way it works with plain HUnit main = runTestTT $ TestLabel "someAction

Re: [Haskell-cafe] referential transparency? (for fixity of local operators)

2012-10-05 Thread Roman Cheplyaka
* Johannes Waldmann [2012-10-05 11:11:48+] > I was really surprised at the following: > > *Main> 1 + 2 * 3 > 7 > > *Main> ( \ (+) (*) -> 1 + 2 * 3 ) (+) (*) > 9 > > because I was somehow assuming that either > > a) the Prelude fixities of the operators are kept > b) or they are undefined,

Re: [Haskell-cafe] does try force evaluation of IO value

2012-10-05 Thread s9gf4ult
> Prelude Control.Exception> r <- try (return $ error "bam") :: IO (Either > SomeException Int) Prelude Control.Exception> r > Right *** Exception: bam Wow, this is realy breaking news for me. Where can i read more about this magic ? ___ Haskell-Caf

[Haskell-cafe] referential transparency? (for fixity of local operators)

2012-10-05 Thread Johannes Waldmann
I was really surprised at the following: *Main> 1 + 2 * 3 7 *Main> ( \ (+) (*) -> 1 + 2 * 3 ) (+) (*) 9 because I was somehow assuming that either a) the Prelude fixities of the operators are kept b) or they are undefined, so the parser rejects. but the Haskell standard says "Any operator lack

Re: [Haskell-cafe] does try force evaluation of IO value

2012-10-05 Thread Roman Cheplyaka
* s9gf4...@gmail.com [2012-10-05 16:52:52+0600] > > No, it won't force the return value. To do that, use evaluate > > http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Exc > > eption-Base.html#g:7 > But what is happening when exception is raised when consuming value from >

Re: [Haskell-cafe] does try force evaluation of IO value

2012-10-05 Thread s9gf4ult
> No, it won't force the return value. To do that, use evaluate > http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Exc > eption-Base.html#g:7 But what is happening when exception is raised when consuming value from result of "try" ? try has signature try :: Exception e => I

Re: [Haskell-cafe] does try force evaluation of IO value

2012-10-05 Thread Roman Cheplyaka
* s9gf4...@gmail.com [2012-10-05 16:02:03+0600] > if i have some lazy io action, assuming (maction :: IO a) which may raise > exceptions while running, will "try" force evaluation of "a" to determine is > exception raised or not ? > Sorry for my broken english. No, it won't force the return val

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Janek S.
> There are some technical advantages to SmallCheck (determinism, no need > to shrink etc.), but the main reason I prefer it is because it gives me > more confidence. With quickcheck, I know that it generated 100 tests, but > I've no idea what those tests are, and whether the RNG missed some > impo

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Janek S.
> Cool, looking forward to reading it! Well, the post is already finished: http://ics.p.lodz.pl/~stolarek/blog/2012/10/code-testing-in-haskell/ I was just going to publish it and then your email came up on the list. > I hope you won't forget to cover SmallCheck in your article as well. > Being al

[Haskell-cafe] does try force evaluation of IO value

2012-10-05 Thread s9gf4ult
if i have some lazy io action, assuming (maction :: IO a) which may raise exceptions while running, will "try" force evaluation of "a" to determine is exception raised or not ? Sorry for my broken english. ___ Haskell-Cafe mailing list Haskell-Cafe@has

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Roman Cheplyaka
* Janek S. [2012-10-05 11:50:53+0200] > > Cool, looking forward to reading it! > Well, the post is already finished: > http://ics.p.lodz.pl/~stolarek/blog/2012/10/code-testing-in-haskell/ > I was just going to publish it and then your email came up on the list. > > > I hope you won't forget to c

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Roman Cheplyaka
* Janek S. [2012-10-05 10:51:35+0200] > Talking about good timing - I was just finishing my post on code testing in > Haskell when your > announcement came up, so your library made it as a last minute news :) I > never used golden > approach to testing but it is good to know that it exists.

Re: [Haskell-cafe] total Data.Map.! function

2012-10-05 Thread Joachim Breitner
Hi Henning, Am Mittwoch, den 03.10.2012, 19:52 +0200 schrieb Henning Thielemann: > I wondered whether there is a brilliant typing technique that makes > Data.Map.! a total function. That is, is it possible to give (!) a type, > such that m!k expects a proof that the key k is actually present in

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Janek S.
Talking about good timing - I was just finishing my post on code testing in Haskell when your announcement came up, so your library made it as a last minute news :) I never used golden approach to testing but it is good to know that it exists. *I* think that it might be a good idea to separet

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Simon Hengel
> My justification (which you may or may not buy) is that, unlike, say, > Test.Framework.Providers.HUnit, this is not an adaptation of an existing > testing library to test-framework, but is a new library that just > happens to use test-framework. So it's more like Test.HUnit, although it > already

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Roman Cheplyaka
* Tim Docker [2012-10-05 12:19:40+1000] > Hi Roman, > > This sounds like a great idea. As you suggest, I've put this kind of > thing together in scripts many times, without a consistent framework. > > I haven't tried it yet, but have one question. When you call a > function like > > golden

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Roman Cheplyaka
* Gianfranco Alongi [2012-10-05 06:57:41+0200] > I'm a big fan of TDD and tend to approach all languages by learning > how to TDD in them. > > As such, you mention that this is similar, could you please send some > links about this? Sorry, I'm not sure I understand the question. Links about what

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Roman Cheplyaka
* Simon Hengel [2012-10-05 09:07:19+0200] > Hi, > > > I am glad to announce the first public release of > > test-framework-golden — a golden testing library. > > Nice! > > > The library is integrated with test-framework, so you can use golden > > tests in addition to SmallCheck/QuickCheck/HUnit

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Simon Hengel
Hi, > I am glad to announce the first public release of > test-framework-golden — a golden testing library. Nice! > The library is integrated with test-framework, so you can use golden > tests in addition to SmallCheck/QuickCheck/HUnit tests. I would suggest to rename the modules to Test.F