GithubHelp home page GithubHelp logo

paf31 / dovetail Goto Github PK

View Code? Open in Web Editor NEW
118.0 118.0 3.0 2.33 MB

A PureScript interpreter in Haskell

Home Page: http://functorial.com/dovetail

License: BSD 3-Clause "New" or "Revised" License

Haskell 98.99% Shell 0.13% PureScript 0.35% Dhall 0.53%
haskell purescript

dovetail's People

Contributors

paf31 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dovetail's Issues

Debugger

I'll collect notes here as I start to think about general purpose debugging tools for Dovetail-enabled DSLs.

Dictionary representation is incorrect

This code:

class X a where
  x :: a

instance X String where
 x = ""

results in error

  Inexhaustive pattern match

In context:
  dict
  = { "x": ⋯ }

when evaluating x, presumably because the representation of type class dictionaries is not actually meant to be a record.

Improved FFI builder

  • Generate externs along with environment for foreign imports
  • Support foreign types

Support for delimited continuations

It would be great to be able to capture the current continuation, or a delimited continuation, or possibly even serialize a continuation. This would make it possible to use PureScript for scripting Haskell in some really interesting ways, but serializable continuations might be tricky since FFI functions would need to be defunctionalized somehow, which might mean using something like static pointers.

Test suite of hackage release doesn't compile

Building test suite 'dovetail-test' for dovetail-0.1.1.0..
[1 of 2] Compiling Main             ( test/Spec.hs, dist/build/dovetail-test/dovetail-test-tmp/Main.o )

test/Spec.hs:198:15: error: Not in scope: ‘goldenFile’
    |
198 |               goldenFile = "test-files" </> name </> "golden",
    |               ^^^^^^^^^^

test/Spec.hs:199:15: error: Not in scope: ‘actualFile’
    |
199 |               actualFile = Just ("test-files" </> name </> "actual"),
    |               ^^^^^^^^^^

test/Spec.hs:210:28: error:
    Not in scope: type constructor or class ‘GenericArbitrary’
    |
210 |     deriving Arbitrary via GenericArbitrary ExampleRecord1
    |                            ^^^^^^^^^^^^^^^^

GHC 8.10.7

How exciting!

Oddly I’ve wanted something like this for a while.

  • External facing DSLs (like my jl) within Haskell
  • For a “close enough to Haskell that you could embed it with TH”
  • Using PureScript for server side dev instead of Haskell potentially
  • Testing my client side code with a Haskell test suite - something I am currently doing with QuickJS
  • Server-side rendering of client side code
  • Exploring hot reloading

So thanks for sharing this, it opens up a lot of possibilities.

Effect

Hi, do you have a plan already for modelling Effect? The FFI doesn't mention it yet.

Perhaps you plan to add it to the FFI?

Or else, perhaps you might use a tagged approach where the Effect type is a tagged initial free-monad style thing and then it just returns constructors which a user of dovetail could interpret?

Thanks.

What’s your experience like so far with this?

I assume you’ve been using this for a project, @paf31. What’s your experience been like so far? Trade offs? What was good, bad, or surprising?

I am still interested in exploring it for scripting. Just limited in time.

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.