purescript
Building a GraphQL-to-SQL compiler on Postgres, MSSQL and MySQL
Hasura 2.0 Engineering Overview
PureScript 0.14 Released
Halogen 5, a type-safe library for building user interfaces in PureScript
Bow Arch 0.1.0
https://medium.com/fuzzy-sharp/migrating-to-postgres-2dc1519...
TL;DR: persistent + esqueleto + servant
Now consider categories with various types of constructions (products, limits, exponentials, etc.) and you'll notice they correspond to requiring certain features in your language.
impact :: Web -> Web
Persistent data structures will let us reuse the best parts of the old web efficiently.Now I'm curious :)
http://try.purescript.org/?gist=63d81adf9f5257ffa4f576df2658...
The representation is fairly compact, so the requirements for a PureScript compiler backend are fairly minimal. You just have to translate all of the features of the IR:
- Functions with lexical scoping - Support for the primitive types defined by PureScript (we need to define some of these types more concretely in a specification) - A way to encode records. This could be something like JavaScript's objects, or just a map data structure.
The JS backend actually does more optimizations before code generation, but it starts from the same intermediate representation.
[1] https://github.com/paf31/24-days-of-purescript-2016/blob/mas...
Simulating a galaxy in Purescript
Dot Waves: A PureScript Short Story
Announcing PureScript 0.8
In some of the standard libraries, yes, that's true. However, it's possible to use PureScript without the standard libraries, and use alternatives such as Preface (a teaching library) or Neon (an alternative to Prelude)
https://github.com/paf31/purescript-preface
http://pursuit.purescript.org/packages/purescript-neon/0.1.1
npm install -g pulp purescript
should be enough now.
I think part of the problem is that type classes are so easy to abuse. When you have a problem like e.g. monad transformers, where a) you have a lot of boilerplate code which would be irksome if written out by hand, b) you have laws to make sure the generated code is sensible, and c) your types have exactly one such sensible instance, then classes are very nice. Abuses of type classes exist where any of the three above conditions fail to hold IMO, and a scrap-your-typeclasses approach can be very valuable then.
I will say that the types in Halogen seem more complex, but they can be justified by the fact that the coproduct machinery helps ensure all actions get handled somewhere. This may be possible with prisms, I'm not sure yet. This library [3] seems relevant.
One issue I've found, which I understand the Halogen folks are also finding, is that it is tricky to wire up action handlers such that a subcomponent can invoke an action and have a parent act on it and invoke its own action in response. Granted, this is a relatively infrequent use case, and you can always push such logic into some shared parent.
[1]: https://github.com/paf31/purescript-thermite/ [2]: https://github.com/zrho/purescript-optic-ui [3]: https://github.com/joneshf/purescript-totally
[1] http://package.elm-lang.org/packages/evancz/focus/1.0.1/Focu...