Re: [Haskell-cafe] Dynamic and equality

2013-07-21 Thread Alberto G. Corona
You can define: data EqDyn= forall a.(Typeable a, Eq a)= EqDyn a instance Eq EqDyn where (EqDyn x) == (EqDyn y)= typeOf x== typeOf y x== unsafeCoerce y unsafeCoerce is safe synce the expression assures that types are equal 2013/7/20 adam vogt vogt.a...@gmail.com On Sat, Jul 20, 2013 at

[Haskell-cafe] Choosing an xml parser

2013-07-21 Thread L Corbijn
Hello Cafe, I am trying to write a library to parse (and process) the OpenGL xml spec into haskell values. The problem is that I don't know what xml library to choose. So far I can think of the following requirements: - Some error reporting, possibly warning for unparsed elements (as that

Re: [Haskell-cafe] catching IO errors in a monad transformer stack

2013-07-21 Thread Arie Peterson
On Thursday 18 July 2013 23:05:33 Eric Rasmussen wrote: […] Would there be any interest in cleaning that up and adding it (or something similar) to Control.Monad.CatchIO? […] MonadCatchIO-transformers is being deprecated, as recently GHC has removed the 'block' and 'unblock' functions,

Re: [Haskell-cafe] Choosing an xml parser

2013-07-21 Thread Carlos López-Camey
Hi L, I have used TagSoup, it is fine and simple. http://community.haskell.org/~ndm/tagsoup/ 2013/7/21 L Corbijn aspergesoe...@gmail.com Hello Cafe, I am trying to write a library to parse (and process) the OpenGL xml spec into haskell values. The problem is that I don't know what xml

Re: [Haskell-cafe] [Haskell] [ANN] Initial release of the threepenny-gui library, version 0.1.0.0

2013-07-21 Thread Sergey Mironov
Hi, I have a Path problem when installing threepenny-gui from Hackage. Probably somtething trivial. Sergey src/BarTab.hs:9:8: Could not find module `Paths' Use -v to see a list of the files searched for. Failed to install threepenny-gui-0.1.0.0 cabal: Error: some packages failed to

Re: [Haskell-cafe] catching IO errors in a monad transformer stack

2013-07-21 Thread Eric Rasmussen
Arie, Thanks for calling that out. The most useful part for my case is the MonadCatchIO implementation of catch: catch :: Exception e = m a - (e - m a) - m a Hoogle shows a few similar functions for that type signature, but they won't work for the case of catching an IOException in an arbitrary

Re: [Haskell-cafe] [Haskell] [ANN] Initial release of the threepenny-gui library, version 0.1.0.0

2013-07-21 Thread Henning Thielemann
On Sun, 21 Jul 2013, Sergey Mironov wrote: Hi, I have a Path problem when installing threepenny-gui from Hackage. Probably somtething trivial. I have written a small script cabal-upload that tries to compile a package before uploading it to Hackage. That helps to assert that all required

Re: [Haskell-cafe] [Haskell] [ANN] Initial release of the threepenny-gui library, version 0.1.0.0

2013-07-21 Thread Heinrich Apfelmus
Henning Thielemann wrote: On Sun, 21 Jul 2013, Sergey Mironov wrote: Hi, I have a Path problem when installing threepenny-gui from Hackage. Probably somtething trivial. I have written a small script cabal-upload that tries to compile a package before uploading it to Hackage. That helps to

Re: [Haskell-cafe] Wrapping all fields of a data type in e.g. Maybe

2013-07-21 Thread Michael Orlitzky
On 07/20/2013 04:49 PM, adam vogt wrote: Hi Michael, It's fairly straightforward to generate the new data with template haskell [1], and on the same page, section 10.7 'generic' zipWith is likely to be similar to your merging code. [1]

Re: [Haskell-cafe] catching IO errors in a monad transformer stack

2013-07-21 Thread John Lato
I think most people use monad-control these days for catching exceptions in monad stacks (http://hackage.haskell.org/package/monad-control-0.3.2.1). The very convenient lifted-base package ( http://hackage.haskell.org/package/lifted-base) depends on it and exports a function