Learning materials

Pretty printing with a package like Glam can be quite confusing at first: it may take some time to get used to the API, and when writing your first pretty printers it may be difficult to get the desired look.

Don’t be scared, that’s normal! The topic is quite challenging, but that’s nothing that some practice cannot fix. There are plenty of learning materials to get you started, and all the tutorials will walk you through many examples.

If you still find the package has some rough edges that could be improved, if you feel like you’re still not getting how something works, if you’re having any kind of problem with Glam, or even if you just feel like having a chat… please do reach out! I’d love to help and your feedback is always appreciated 💜

You can find me on Twitter, hanging around the Gleam Discord server, and I always check the issues and discussions in the Glam repo.

Step-by-step tutorials

The best way to get started is by reading the Glam tutorials that will guide you through some example projects to showcase the library API.

You will learn how pretty printing works and write some glamorous pretty printers for a variety of data structures: simple string lists, todo lists and JSON.

I suggest you work through the tutorials in this order:

Full code examples

If step-by-step tutorials are not your thing, you can still have a look at the full code examples in the project repository.

Package API

Of course you can also have a look at the package API: every function is commented and has a small example to showcase how it can be used.

Search Document