[Haskell-cafe] Deriving class instances using DrIFT

Daniel McAllansmith dm.maillists at gmail.com
Sun Oct 29 19:24:58 EST 2006


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 derive : Haskell2Xml !-}


but this doesn't:

>module Test where
>
>import Data.Word
>
>{-! for Word32 derive : Haskell2Xml !-}

It fails to load the first import, giving an error as follows:

{- Generated by DrIFT (Automatic class derivations for Haskell) -}
{-# LINE 1 "Test.hs" #-}
DrIFT: can't find module Data.Word

Any ideas as to why that is?


Thanks
Daniel


More information about the Haskell-Cafe mailing list