Coder Social home page Coder Social logo

Comments (8)

ndmitchell avatar ndmitchell commented on April 27, 2024 1

Have you read https://hackage.haskell.org/package/uniplate-1.6.12/docs/Data-Generics-Uniplate-Data.html, particularly the part about UNIPLATE_VERBOSE? Table computation can give a massive speed difference, so setting it to -1 is worthwhile to see if that's an initial issue.

from derive.

ndmitchell avatar ndmitchell commented on April 27, 2024

Do you actually use UniplateDirect? I generally switched to Uniplate.Data for most of my programs, which has the advantage of no instances required. Doesn't sound too hard, but really looking for other people to fix it, as per #6 (which it seems you've already found).

from derive.

ddssff avatar ddssff commented on April 27, 2024

I was looking for the option of using UniplateDirect because what I have now is incredibly slow. I will give the fix a shot, and if I can do it I will be more confident about taking on #6.

from derive.

ddssff avatar ddssff commented on April 27, 2024

Neil, do you know why loading Example.hs gives me

derive: Don't know how to derive type class: Eq

from derive.

ndmitchell avatar ndmitchell commented on April 27, 2024

Yep, in the last release I ripped out everything GHC could derive itself on the basis people should use GHC in preference to derive and I could avoid porting those definitions to the new Haskell-src-exts library. I suspect I didn't update the example.

from derive.

ddssff avatar ddssff commented on April 27, 2024

Lately I've become leery of GHC.Generics - it creates huge declarations when there are a lot of constructors, and the results take a long time to compile.

from derive.

ndmitchell avatar ndmitchell commented on April 27, 2024

I meant that Eq is baked into the compiler, not just that it could be done using Generics. That said, a Generic solution while taking a long time to compile is often to be preferred to a preprocessor.

from derive.

ddssff avatar ddssff commented on April 27, 2024

On the other hand, I just eliminated all the Generic instances from our GHCJS application (using custom implementations of deriveSerialize and deriveJSON instead) and the javascript executable size dropped from 52M to 36M. I wonder if there will be a performance hit?

from derive.

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.