slamdata / purescript-echarts

Purescript bindings for Baidu's Echarts library
36 stars 16 forks source link

[BREAKING] Make built-in themes FFI-safe #40

Closed garyb closed 7 years ago

garyb commented 7 years ago

By making this change we get the best of both worlds in terms of the FFI behaviour:

  1. If a theme is unused it will be erased during DCE
  2. There should be no chance of DCE or webpack or whatever erasing the used themes, since they're part of a value that is now used.

Having the closed sum type of built in themes didn't really seem to have much advantage, as in theory that sum should be open as people could register their own themes for echarts via the FFI, so now all they have to do is construct one of these BuiltInTheme records.