I wonder why you can't compile type-nats? It should just work. You could
email ghc-devs and Iavor (type-nats author, cc'd) explaining exactly what goes
wrong. You may need the type-nats branch of some libraries, I'm not sure
Simon
Microsoft Research Limited (company number 03369488) is regist
Hi everybody,
I have a question about deriving automatically a Show instance when using
GADT.
It works in this situation:
{-# LANGUAGE GADTs #-}
data Male
data Female
data Person gender where
Dead :: Person gender
Alive :: { name :: String
, w
Hi TP,
On 17/05/13 15:32, TP wrote:
| [...]
|
| So I modify my code by removing "deriving Show", and adding the line:
|
| instance Show (Person gender)
|
|
| But now, I obtain:
|
| $ runghc test_show.hs
| GHC stack-space overflow: current l
Hi,
Patrick Browne wrote:
In am trying to understand why some equations are ok and others not.
I suspect that in Haskell equations are definitions rather than assertions.
Yes. Haskell function definitions look like equations, but in many ways,
they aren't. Here is an example for an equation
Adam Gundry wrote:
[...]
> To use standalone deriving, you need to write
>
>> deriving instance Show (Person gender)
>
> and everything will work fine. By writing
>
>> instance Show (Person gender)
>
> you are instead giving an instance with no methods, and the default
> methods in the Show cl
On Sat, May 18, 2013 at 9:11 AM, TP wrote:
>
> So the following version does not work:
>
> [..]
> data Person :: Gender -> * where
> Dead :: Person Gender -- WHAT DO I PUT HERE
> Alive :: { name :: String
> , weight :: Float
>
Hey thanks Simon and Levor, I've reported the problem month ago, and I
see today the commit-id for type-nats is still not changed. So I
thought the problem remains. Let me first try the compile process
again tonight, and report the compile process in more detail.
2013/5/17 Simon Peyton-Jones :
> I