r/purescript • • Jul 17 '25

Is it worth learning PureScript? So far the experience was less than ideal.

9 Upvotes

I am not a Java or SQL programmer, but I was able to quickly get up and going. The error messages made sense. The documentation had plenty of excellent examples.

Here you get confusing type errors. Some examples on the web appear to be broken on purpose, so they are useless. Type signatures are not examples. There is very little traffic on the discourse. Copilot gives nonsense answers and even contradicts itself.

So, I am asking, is there a light at the end of the tunnel? How did you get over the inability to write a simple variant of a simple project?

Was it worth to persist and why?


r/purescript • • Mar 04 '23

How can I get the pulp docs generator to just generate docs for my files?

Post image
9 Upvotes

r/purescript • • Oct 17 '21

[ANN] purescript-html-codegen-halogen

9 Upvotes

I did my web mock-up by writing HTML files and found it troublesome to rewrite them manually to Halogen code, so I wrote this small library to do the work for me. Hopes it is helpful for others.

https://github.com/ongyiren1994/purescript-html-codegen-halogen


r/purescript • • Jul 03 '21

RealWorld App size too big. Did I do something wrong?

9 Upvotes

https://github.com/thomashoneyman/purescript-halogen-realworld

508kB It's what I got with it gziped. Didn't find the recommended way to uglify it.

Maybe I did something wrong? What is the size it should be? (of the js boundle I mean)


r/purescript • • Mar 18 '21

Reactive programming or reactive values in purescript?

9 Upvotes

It seems that functional reactive programming is more suitable for animation and network than for interactive GUI widgets.

https://hackage.haskell.org/package/keera-hails-reactivevalues looks more suitable for interactive GUI widgets.

Reactive values look similar to reactive programming.

I wonder whether there are purescript libraries for reactive values or reactive programming.


r/purescript • • Mar 09 '21

Update: PureScript port of Monad Challenges

9 Upvotes

Per my earlier post, I've finished a first, rough pass at porting the Monad Challenges to PureScript. I did (most) of the exercises again in PureScript, so it should be solvable. Please let me know if you find any problems.

https://blog.curlyfri.es/monad-challenges-purescript/


r/purescript • • May 12 '20

How would you suggest Purescript in twenty words.

9 Upvotes

Checking out Purescript for our consumer app. We have a lot of people using the app daily and all of are devs love functional, but get too few chances to use it outside of side projects. Curios what the community would say in twenty words :)

When we first start using it, it will be vital business logic mostly. But then may expand to cover more areas.


r/purescript • • May 06 '20

purescript-firestore

Thumbnail
github.com
9 Upvotes

r/purescript • • Apr 14 '20

Can anyone please explain this sentence in I read in a blog post?

9 Upvotes

In the trouble with typed errors, the author describes the difficulties in having a massive error type in a Haskell application like this:

data AllErrorsEver
     = AllParseError ParseError
     | AllLookupError LookupError
     | AllHeadError HeadError
     | AllWhateverError WhateverError
     | FileNotFound FileNotFoundError
     | etc...

And said (more or less) that the ideal would be functions returning something like:

foo :: String -> Either (HeadError + LookupError + ParseError) Integer

He then says:

In PureScript or OCaml, you can use open variant types to do this flawlessly. Haskell doesn’t have open variants

Can anyone please explain what an "open variant type" is and how I can use it for validation in purescript? Extra points for a link to a blog/article, as google hasn't returned much for me.

Thanks!


r/purescript • • Mar 16 '20

elm-ui equivalent in purescript?

9 Upvotes

So recently I discovered purescript, and from the limited things I've read, it seems like a nice alternative to elm (which I also like, but purescript seems to do some extra things that make it a bit closer to haskell)

Is there a library for purescript similar to elm-ui? https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/

I've never been a fan of doing html/css and when I discovered elm-ui it was one of the best things ever in regards to web dev for me... anyone know if something similar exists under purescript?


r/purescript • • May 07 '19

How do I external libraries (especially in psc-package)?

9 Upvotes

Hello everyone. I'm new to PureScript, savoring it as a switch from Elm because many things look more convenient (infixes, type classes, flexibility, FFI, etc...).

But there's something cheesy in FFI. It seems handier to bundle external libraries with our project (not a library to be published, yet), so we wouldn't need to worry about embedding it separately. But how?

The point is: we take the recent state of the ecosystem, and psc-package is more and more preferred. We see that it works in the `purescript-` namespace. How can we bundle our FFI dependencies (like CodeMirror or highlight.js) in a psc-package based project (and build it together with PS code)?

As far as I know, there are existing ways to do it outside of psc-package (let this thread be even more useful):

  • HTML <script> embedding (purescript-jquery), which is OK for non-NPM libraries, yet some of them exist in npm repositories (same for CodeMirror), but Node-based ones are in possible scope.

  • Bower installation (purescript-sammy), which is OK too, but we recall to the point here?

  • npm chaining (purescript-react, example at the link), which looks difficult (no guides found yet) and scary (building without pulp? oka~y).

And nothing clear about psc-package (EDIT: look below). Would be glad for some existing examples or even guides. Nix compatibility notes are optional but useful.

EDIT: resolved with Spago + Parcel + Yarn combination like at this repo.


r/purescript • • Feb 17 '19

Call for Presentations: Compose NYC 2019

Thumbnail
composeconference.org
9 Upvotes

r/purescript • • Dec 21 '18

Apply multiple functors as arguments to a function (Applicatives)

Thumbnail
medium.com
9 Upvotes

r/purescript • • Nov 28 '18

Applicative Functors for multiple arguments​

Thumbnail
medium.com
9 Upvotes

r/purescript • • Jul 29 '18

Formless: a new form library for Halogen (Feedback Wanted)

Thumbnail
purescript-users.ml
9 Upvotes

r/purescript • • Apr 30 '18

Features you want future PureScript to *not* have? [Discussion]

Thumbnail
purescript-users.ml
9 Upvotes

r/purescript • • Apr 17 '18

First official version of purty, a pretty-printer for PS

Thumbnail
bintray.com
9 Upvotes

r/purescript • • Mar 13 '18

Is there an example of purescript + haskell (backend) based app in open source.

9 Upvotes

I recently finished work on my reflex based app tenjinreader.com, and wanted to see how it compares with purescript.

I have never used purescript and have little knowledge of its ecosystem. But I would like to see what is good here.


r/purescript • • Nov 22 '17

monadic streams library -- initial release

Thumbnail pursuit.purescript.org
9 Upvotes

r/purescript • • Nov 15 '17

Extended Infix Notation

9 Upvotes

I always thought this was a neat feature which PureScript had, but with limited use cases (and the possibility of abuse).

What do you use it for? I've found a couple of use cases:

  1. Turning n-ary functions into binary associative operators, like applying Map.unionWith to one argument:

    map1 `Map.unionWith (+)` map2

  2. Turning lenses/folds/setters into infix operators:

    show `map` [1, 2, 3]

    show `map <<< map` [Just 1, Just 2, Nothing, Just 3]

    logShow `traverse_ <<< traverse_` [Just 1, Just 2, Nothing, Just 3]


r/purescript • • Sep 08 '17

Blog post: multi-way trees in purescript

Thumbnail
danielfortes.com
9 Upvotes

r/purescript • • Jul 16 '17

Create types in PureScript with Semigroups

Thumbnail
medium.com
9 Upvotes

r/purescript • • Jul 12 '17

Fractal trees with PureScript

Thumbnail
blog.ploeh.dk
9 Upvotes

r/purescript • • Jul 10 '17

Embedding Elm into a Purescript-Halogen App - Qiita

Thumbnail
qiita.com
9 Upvotes

r/purescript • • Jun 23 '17

A collection of Either examples in PureScript compared with JavaScript

Thumbnail
medium.com
9 Upvotes