r/purescript • u/tuxkimo • Mar 14 '16
Announcing purescript-localstorage - alpha testers appreciated :-)
https://pursuit.purescript.org/packages/purescript-localstorage/0.1.2
Typesafe local storage, with a minimum amount of boilerplate.
I just finished it, it compiles and the basic example in test/Main.purs works, otherwise it is completely untested.
Enjoy! (Bug reports welcome!)
10
Upvotes
View all comments
Show parent comment
1
u/tuxkimo Mar 25 '16 edited Mar 25 '16
in fact - even the example in the Readme, would need an explicit type annotation, when written with strings as keys:
user <- localStorage.getItem "UserConfig"log $ gShow userThis would not work without a type annotation, as gShow is also generic - so the compiler has no way of figuring out of what type the retrieved value is.