Re: [Haskell-cafe] type-level integers using type families

2008-05-31 Thread Bertram Felgenhauer
Peter Gavin wrote: Roberto Zunino wrote: Maybe he wants, given cond :: Cond x y z = x - y - z tt :: True true_exp :: a false_exp :: untypable that cond tt true_exp false_exp :: a That is the type of false_exp is lazily inferred, so that type errors do not make inference fail

Re: [Haskell-cafe] type-level integers using type families

2008-05-30 Thread Roberto Zunino
Manuel M T Chakravarty wrote: Peter Gavin: will work if the non-taken branch can't be unified with anything. Is this planned? Is it even feasible? I don't think i entirely understand the question. Maybe he wants, given cond :: Cond x y z = x - y - z tt :: True true_exp :: a

Re: [Haskell-cafe] type-level integers using type families

2008-05-29 Thread Isaac Dupree
Peter Gavin wrote: Has anyone else tried implementing type-level integers using type families? I tried using a couple of other type level arithmetic libraries (including type-level on Hackage) and they felt a bit clumsy to use. I started looking at type families and realized I could pretty

Re: [Haskell-cafe] type-level integers using type families

2008-05-29 Thread Manuel M T Chakravarty
Peter Gavin: Has anyone else tried implementing type-level integers using type families? I tried using a couple of other type level arithmetic libraries (including type-level on Hackage) and they felt a bit clumsy to use. I started looking at type families and realized I could pretty

[Haskell-cafe] type-level integers using type families

2008-05-28 Thread Peter Gavin
Has anyone else tried implementing type-level integers using type families? I tried using a couple of other type level arithmetic libraries (including type-level on Hackage) and they felt a bit clumsy to use. I started looking at type families and realized I could pretty much build an entire