Comments (7)
Yeah, I already test drove using GHCJS on Dhall. If I remember correctly, the main issue I ran into was that the import system didn't work for URLs, but I suppose that it's still useful if people want to "Try Dhall" in the browser. The main limitation will be the absence of the Prelude
from dhall-lang.
The main limitation will be the absence of the Prelude
Since we already put the whole Haskell runtime as JS into the browser, supplying the Prelude should not be that much overhead, right?
I’d love to expose the library parts to Purescript and reuse the typechecker, parser and awesome error reporting. Maybe by going through yet another json export-/import step it’s possible get something like (very non-performant) Purescript import.
from dhall-lang.
Oh yeah, I forgot that we support customizable import resolution, so this should be doable if we use the Haskell API translated to JavaScript
from dhall-lang.
Now we just need somebody to implement a zero-copy data view from GHCJS output to Purescript structures. :P
from dhall-lang.
So, I’ve had some success and set up a repo.
philip@katara ~/c/h/dhall-js (master)>
nix-build -I nixpkgs=/home/philip/nixpkgs release.nix --option build-use-substitutes false -A small
/nix/store/mxlcim7c9binajhgny02my3fp3lzy310-export-test-small
philip@katara ~/c/h/dhall-js (master)> nix-shell -p nodejs --run "node ./result"
Object (fromList [("bar",String "Hello DhallJS!"),("foo",Number 23.0)])
^C⏎
philip@katara ~/c/h/dhall-js (master)>
nix-build -I nixpkgs=/home/philip/nixpkgs release.nix --option build-use-substitutes false -A small
/nix/store/mxlcim7c9binajhgny02my3fp3lzy310-export-test-small
philip@katara ~/c/h/dhall-js (master)>
du -ha /nix/store/mxlcim7c9binajhgny02my3fp3lzy310-export-test-small
624K /nix/store/mxlcim7c9binajhgny02my3fp3lzy310-export-test-small
philip@katara ~/c/h/dhall-js (master)>
nix-build -I nixpkgs=/home/philip/nixpkgs release.nix --option build-use-substitutes false -A orig
/nix/store/zmp0qarqnd3c1i7yva0jmfypn89smmv8-export-test
philip@katara ~/c/h/dhall-js (master)>
du -ha /nix/store/zmp0qarqnd3c1i7yva0jmfypn89smmv8-export-test
2.3M /nix/store/zmp0qarqnd3c1i7yva0jmfypn89smmv8-export-test
from dhall-lang.
Nice job! :)
from dhall-lang.
This is fixed by dhall-lang/dhall-haskell#734
from dhall-lang.
Related Issues (20)
- `with` record update syntax removes other record fields HOT 4
- ABNF grammar should list "as Bytes" import mode
- Should the ABNF grammar disallow shebangs inside expressions? HOT 1
- eta-reducing to merge HOT 4
- Builtins operators reference: Missing record projection HOT 2
- ABNF grammar should explicitly disallow keywords as identifiers? HOT 2
- ABNF grammar should include a mandatory whitespace after `import-hashed`? HOT 1
- Improvements and fixes in the standard documentation HOT 3
- Is this an incorrect test file: `dhall-lang/tests/import/success/unit/ImportRelativeToHomeB.dhall`? HOT 2
- Link to non existing tweet
- A minimalistic proposal for do-notation
- Thoughts on introducing a minimum amount of type inference in Dhall HOT 1
- Introduce Bytes/length and Text/length as built-ins? HOT 3
- Is there a security hole: malicious sha256-protected cached content? HOT 1
- Eta-equivalence in `assert`? HOT 13
- A type level equivalent of the `with` keyword HOT 11
- Convert assertions to Leibniz equality types HOT 3
- A minimalistic proposal for adding row and column polymorphism to Dhall HOT 2
- A proposal for a "lightweight Dhall implementations" standard
- Year, Month, and Date extraction from a Date HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dhall-lang.