GithubHelp home page GithubHelp logo

Comments (8)

DougBurke avatar DougBurke commented on May 23, 2024

If I hack around the above, with

#if MIN_VERSION_base(4,7,0)
--import Data.OldTypeable        ( Typeable1 )
--import Data.Typeable           ( gcast1, typeOf1 )
import Data.OldTypeable           ( Typeable1, gcast1, typeOf1 )
#else
import Data.Typeable           ( Typeable1, gcast1, typeOf1 )
#endif

which produces lots of deprecation warnings but does compile, then TemplateHaskell.hs fails to compile, with four messages , stemming from the following change:

src/Data/Acid/TemplateHaskell.hs:260:22:
    Couldn't match expected type ‛m0 Type -> DecQ’
                with actual type ‛Q Dec’
    The function ‛tySynInstD’ is applied to three arguments,
    but its type ‛Name -> TySynEqnQ -> DecQ’ has only two
    In the expression:
      tySynInstD ''MethodResult [structType] (return resultType)
    In the third argument of ‛instanceD’, namely
      ‛[tySynInstD ''MethodResult [structType] (return resultType),
        tySynInstD ''MethodState [structType] (return stateType)]’

from acid-state.

DougBurke avatar DougBurke commented on May 23, 2024

The following change compiles

#if MIN_VERSION_template_haskell(2,9,0)
                   [ tySynInstD ''MethodResult (tySynEqn [structType] (return resultType))
                   , tySynInstD ''MethodState  (tySynEqn [structType] (return stateType))
#else
                   [ tySynInstD ''MethodResult [structType] (return resultType)
                   , tySynInstD ''MethodState  [structType] (return stateType)
#endif 

but the next error is back to the Typeable changes:

src/Data/Acid/Memory.hs:130:38:
    Could not deduce (Data.OldTypeable.Internal.Typeable1 MemoryState)
      arising from a use of ‛mkAnyState’
    from the context (IsAcidic st)
      bound by the type signature for
                 toAcidState :: IsAcidic st => MemoryState st -> AcidState st
      at src/Data/Acid/Memory.hs:121:16-60
    ...

and at this point I'm not sure my simple hacking is going to fix it.

from acid-state.

cartazio avatar cartazio commented on May 23, 2024

GHC 7.8 has polykinded typeable, and TH has some changes in 7.8

point being: typeable1 isn't needed for 7.8. EVERYTHING is typeable. :)

not sure how that deals with the TH problem though

from acid-state.

schell avatar schell commented on May 23, 2024

I ran into the same problem, but just followed the rabbit down its hole a little deeper. Please review my changes!

from acid-state.

cartazio avatar cartazio commented on May 23, 2024

@schell check out my comment :)

from acid-state.

DougBurke avatar DougBurke commented on May 23, 2024

Thanks for diving that little-bit further down the rabbit hole. This builds for me, and it seems to work when using an Acid Store created with ghc 7.6.3 (although I haven't actually checked to see I'm using any of the API touched by this change).

from acid-state.

DougBurke avatar DougBurke commented on May 23, 2024

The patch builds for me. Whether it's the 'correct' answer I'll leave for
someone else :-)

Thanks,
Doug
On Nov 26, 2013 11:48 PM, "Carter Tazio Schonwald" [email protected]
wrote:

@schell check out my comment :)


Reply to this email directly or view it on GitHub.

from acid-state.

schell avatar schell commented on May 23, 2024

I'll go back and change those CPP marks and commit again ASAP. :)

from acid-state.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.