Comments (5)
By the way, the StringMap.t
was created using what I understand to be OCaml's "module functors":
module StringMap = Map.Make(String);
This is my attempt at getting a general purpose dictionary. I suppose I could also model it as:
type KeywordList('a) = list(("string", 'a))
but I'd rather not since I'll get O(n)
performance instead of the log n
offered by Map
.
from milk.
abstract types are definitely supported, but I imagine the error message could be better. Here's an example types.json
where "helpers"
is provided
https://github.com/jaredly/veoluz/blob/master/types.json#L6
and the TypeHelpers.re
that provides serialization and deserialization for the abstract type https://github.com/jaredly/veoluz/blob/master/ui/TypeHelpers.re
from milk.
Thanks for sharing this. So is the advice to add "TypeHelpers" to my types.json
file?
from milk.
yup! And for the abstract type that you want to support, add manual serialization & deserialization functions. (the example there is for Belt's String Set and String Map)
from milk.
Excellent! Thanks, @jaredly! And thanks for such a great library. As I get more comfortable in this ecosystem, I'd love to contribute.
from milk.
Related Issues (8)
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 milk.