[Agda] Building Agda with ghc-6.12.3: build failure on geniplate

Nils Anders Danielsson nad at chalmers.se
Thu Oct 11 11:20:02 CEST 2012


On 2012-10-10 22:21, Guillaume Brunerie wrote:
> I’m trying to build Agda with ghc-6.12.3 (on the computers of the
> Institute for Advanced Study), but geniplate-0.6.0.2 fails to build.
> I’ve searched on Internet and it seems that this problem is known and
> that Nils Anders Danielsson has already sent a patch to make geniplate
> build with ghc-6.12.3 but this patch does not seem to have been
> applied upstream and I can’t find it anywhere.
>
> Where can I find this patch?

In my local copy of Geniplate.hs the Quasi instance is defined as
follows:

   instance Quasi U where
       qNewName = lift . qNewName
       qReport b = lift . qReport b
       qRecover = error "Data.Generics.Geniplate: qRecover not implemented"
       qReify = lift . qReify
   #if MIN_VERSION_template_haskell(2,7,0)
       qReifyInstances n = lift . qReifyInstances n
   #elif MIN_VERSION_template_haskell(2,5,0)
       qClassInstances n = lift . qClassInstances n
   #endif
       qLocation = lift qLocation
       qRunIO = lift . qRunIO
   #if MIN_VERSION_template_haskell(2,7,0)
       qLookupName ns = lift . qLookupName ns
       qAddDependentFile = lift . qAddDependentFile
   #endif

Furthermore the LANGUAGE pragma has the following form:

   {-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances, PatternGuards, CPP #-}

This seems to make Geniplate work on GHC 6.12.3, 7.0.4, 7.4.2 and 7.6.1.

-- 
/NAD



More information about the Agda mailing list