Code Monkey home page Code Monkey logo

Comments (6)

phadej avatar phadej commented on July 30, 2024

If we specify other-extensions: UnboxedTuples, than cabal-doctest can detect that.

Alternatively, is there a reason not to use -fobject-code always?

from cabal-doctest.

RyanGlScott avatar RyanGlScott commented on July 30, 2024

If we specify other-extensions: UnboxedTuples, than cabal-doctest can detect that.

Ah, interesting idea.

Alternatively, is there a reason not to use -fobject-code always?

I don't think we'd want to do this, since we'd be significantly increasing the time it takes for doctest to process each file, since it now has to compile each one. And in the end, doctest would (IIRC) still run the tests themselves in interpreted mode, so I don't think you'd even get any performance benefits from using object code.

from cabal-doctest.

phadej avatar phadej commented on July 30, 2024

I see, slowing doctest is quite bad, they are slow to begin with.

I can take a look on structs tomorrow.

from cabal-doctest.

ekmett avatar ekmett commented on July 30, 2024

I think we have to use -fobject-code in this case, as we can't construct 'foo' from ghci, no?

from cabal-doctest.

ekmett avatar ekmett commented on July 30, 2024

This is how I've had to work around this in the past anyways. We're asking doctest to build in a very different manner to support a feature that isn't available to the bytecode compiler. It seems reasonable to have to ask.

from cabal-doctest.

RyanGlScott avatar RyanGlScott commented on July 30, 2024

I think we have to use -fobject-code in this case, as we can't construct 'foo' from ghci, no?

Certainly. The question is: what is the best way to inform cabal-doctest that -fobject-code should be used in this specific instance? Currently, we have to hack it in to doctests.hs directly, but we're moving towards being able to specify x-doctest-options: -fobject-code in structs.cabal soon.

from cabal-doctest.

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.