r/purescript • • 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

7 comments sorted by

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 user

This 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.