PureScript opinions

From foldr
Jump to: navigation, search

Or: how rightfold uses PureScript. You may or may not agree. If you don't, that's fine, but you're wrong.

Don't use Char

See Strings.

Don't use effect rows

Effect rows are annoying to maintain and don't add enough type safety to overcome this annoyance. Use IO and IOSync from purescript-io instead of Eff and Aff.

Don't overuse unnewtyped records

They can't have instances, which is super annoying. Newtype them and take some time to write getters and setters (i.e. profunctor optics).

Keep instance names as short as possible

It reads much better and instance names are not used anywhere anyway. They don't have to be descriptive, just unique and short.

Don't use Foreign

Foreign is unsafe and unprincipled. Write FFI code instead. For JSON, use purescript-argonaut-core.

Use custom preludes for non-libraries

I don't want to maintain import Data.Maybe in every goddamn module.