Re: [Haskell-cafe] Deriving class instances using DrIFT

2006-10-30 Thread Einar Karttunen
On 29.10 19:56, John Meacham wrote: Since DrIFT can only understand haskell source code, it can't derive instances for anything you don't have the original source to. such as things in the pre-compiled libraries that come with ghc. you will likely have to write out those instances by hand.

Re: [Haskell-cafe] Deriving class instances using DrIFT

2006-10-30 Thread Daniel McAllansmith
On Monday 30 October 2006 22:18, Einar Karttunen wrote: On 29.10 19:56, John Meacham wrote: Since DrIFT can only understand haskell source code, it can't derive instances for anything you don't have the original source to. Ahhh, ok. such as things in the pre-compiled libraries that

Re: [Haskell-cafe] Deriving class instances using DrIFT

2006-10-30 Thread John Meacham
On Tue, Oct 31, 2006 at 07:46:05AM +1300, Daniel McAllansmith wrote: Hmmm, seems strange that it can successfully derive for the Data.Maybe type but not the Data.Word32 type. I didn't think it would have access to any original source from my ghc install, there only seems to be hi files. It

[Haskell-cafe] Deriving class instances using DrIFT

2006-10-29 Thread Daniel McAllansmith
Hi. I'm trying to derive some instances using DrIFT, but it will only work for me when I'm deriving for types in the current file or in the prelude. For example, this works: module Test where {-! for Maybe derive : Haskell2Xml !-} this works: module Test where data Foo = Foo {-! for Foo

Re: [Haskell-cafe] Deriving class instances using DrIFT

2006-10-29 Thread John Meacham
On Mon, Oct 30, 2006 at 01:24:58PM +1300, Daniel McAllansmith wrote: I'm trying to derive some instances using DrIFT, but it will only work for me when I'm deriving for types in the current file or in the prelude. Since DrIFT can only understand haskell source code, it can't derive instances