Re: [Haskell-cafe] ANNOUNCE: grid-1.1

2012-09-10 Thread Johannes Erber
Hi Amy, thank you for your nice package. While I used it I wrote a function that calculates all edges between all (neighboured) tiles in a grid. I though it could of interest for somebody else: http://hpaste.org/74520 Tested for rectangular and triangular grids. Still have the feeling it

Re: [Haskell-cafe] JavaScript (SpiderMonkey, V8, etc) embedded in GHC?

2012-09-10 Thread Bob Hutchison
Thanks Greg, interesting thought. It would work the other way around, but it'd be easy enough to set up a node server to run the javascript. There's no IO allowed or any other blocking operations so I can make this all automatic. Still, that's another moving part I'd just as soon not have.

[Haskell-cafe] extensible-exceptions no longer a part of GHC 7.6.1?

2012-09-10 Thread Peter Simons
Hi, 'extensible-exceptions' used to be a part of GHC, but it appears that the package has been dropped from 7.6.1. Yet, the release notes on haskell.org don't say anything about this subject (other than TODO). Was that change intentional? Take care, Peter

Re: [Haskell-cafe] extensible-exceptions no longer a part of GHC 7.6.1?

2012-09-10 Thread Paolo Capriotti
On Mon, Sep 10, 2012 at 3:05 PM, Peter Simons sim...@cryp.to wrote: Hi, 'extensible-exceptions' used to be a part of GHC, but it appears that the package has been dropped from 7.6.1. Yet, the release notes on haskell.org don't say anything about this subject (other than TODO). Was that

[Haskell-cafe] type variable in class instance

2012-09-10 Thread Corentin Dupont
Hello everybody! I'm soliciting once again your help! It's been several days I'm blocked by this problem: *{-# LANGUAGE DeriveDataTypeable #-} import Data.Typeable class (Typeable e) = Event e data Player = Player Intderiving (Typeable) data Message m = Message

Re: [Haskell-cafe] type variable in class instance

2012-09-10 Thread Stephen Tetley
Whilst dynamic typing isn't idiomatic for Haskell, it seems like you've decided you want it. So why not use Data.Dynamic rather than roll you're own dynamic typing with Typeable? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] type variable in class instance

2012-09-10 Thread Corentin Dupont
Hi Stephen, I wasn't aware of Data.Dynamic. I tried: *viewEvent :: Dynamic - IO () viewEvent event = do case fromDynamic event of Nothing - return () Just (Message s) - putStrLn $ show s* But still got the same error (Ambiguous type variable `t0' in the constraint: (Typeable

Re: [Haskell-cafe] type variable in class instance

2012-09-10 Thread Ryan Ingram
From the point of view of the language, Message () and Message Int and Message Player are all completely distinct types and may have different behavior--there's no way for it to know that they all have the same representation that only contains a String. The derived Typeable instance for Message

Re: [Haskell-cafe] type variable in class instance

2012-09-10 Thread Ryan Ingram
By the way, if you *really* want to do it your way, you can inspect the typeOf the event directly and look for your Message type (using typeRepTyCon from Data.Typeable), then unsafeCoerce into Message () to extract the String. import Unsafe.Coerce import Data.Typeable tyConMessage :: TyCon

[Haskell-cafe] The Architecture of the Mighttpd High-Speed Web Server

2012-09-10 Thread 山本和彦
Hello from Copenhagen, In last may, I wrote an article about Mighttpd in Japanese because a PR staff of IIJ asked me to do so. Since this article got popular in Japan, the PR staff decided to translate it into English. The English version is now open to the public: