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
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.
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
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
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
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
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
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
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
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:
10 matches
Mail list logo