Git Product home page Git Product logo

Comments (2)

conal avatar conal commented on August 24, 2024

I implemented translation support for coproducts in an earlier version of the CtoC plugin, and it wasn't complicated. I haven't gotten around to it for the current implementation. I guess I'm waiting for a fun use case. Do you have one in mind?

from concat.

kbr- avatar kbr- commented on August 24, 2024

Hi Conal,

thanks for the answer!
Indeed I do have a use :D It's not really "useful" but I certainly find it "fun"(ny).
I'm actually writing a... Haskell to C++ compiler, using your plugin.
The Cartesian Closed part is already working (at least for the simple examples I tried), together with part of NumCat.

Check it out: https://github.com/kbr-/concat-cpp
Running it produces a C++ program (which doesn't output anything: it evaluates an expression translated form Haskell inside main, just for me to check that it compiles). It requires the lib.h file (from the repo) and the boost variant library. I tested it with g++ v6.3.0.

The compiler is currently very stupid, producing some unnecessary lambdas etc. These can be eliminated with better implementations of the categories. But I just wanted to prove that it's doable for now.

from concat.

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.