Re: type families & type-level recursion

2008-10-23 Thread Peter Gavin
Manuel M T Chakravarty wrote: Peter Gavin: Manuel M T Chakravarty wrote: Peter Gavin: > instance ( NaturalT n > , zero ~ (n :==: D0) > , zero ~ True ) > => TestIter n True where > testIter _ _ = "" I am wondering why you are writing (zer

Re: type families & type-level recursion

2008-10-23 Thread Peter Gavin
Peter Gavin wrote: Any ideas why I should get this? I'm using ghc-6.10.0.20081007 (but I'm currently building the latest HEAD, which should be done shortly). Ok, the ghc build finished, and I tested my code again against the new build, and it compiles & works fine. I'll p

Re: type families & type-level recursion

2008-10-23 Thread Peter Gavin
Manuel M T Chakravarty wrote: Peter Gavin: > instance ( NaturalT n > , zero ~ (n :==: D0) > , zero ~ True ) > => TestIter n True where > testIter _ _ = "" I am wondering why you are writing (zero ~ (n :==: D0), zero ~ True) instead os just

Re: type families & type-level recursion

2008-10-22 Thread Peter Gavin
, is that right? I actually think the equality as a superclass is what made the code fail to compile, because when I removed it, the compilation completed successfully. Thanks again, Pete Sorry not to be more help. Simon -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTEC

type families & type-level recursion

2008-10-21 Thread Peter Gavin
r? Is this sort of thing not really allowed by type families? I really need to be able to do things like this, because a project I'm working on depends on compile time verification of the size of certain data structures which are parameterized by one of these type-level integers, and