paf31 / dovetail Goto Github PK
View Code? Open in Web Editor NEWA PureScript interpreter in Haskell
Home Page: http://functorial.com/dovetail
License: BSD 3-Clause "New" or "Revised" License
A PureScript interpreter in Haskell
Home Page: http://functorial.com/dovetail
License: BSD 3-Clause "New" or "Revised" License
I'll collect notes here as I start to think about general purpose debugging tools for Dovetail-enabled DSLs.
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.
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.
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
Oddly I’ve wanted something like this for a while.
So thanks for sharing this, it opens up a lot of possibilities.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.