de en es fr nl pl pt sv zh

haskell

Homomorphic static analysis

marcoshplace

It is somehow shared knowledge among Haskellers that applicatives allow performing static analysis, while monads do not. But what does it mean in practice? And what kind of static analysis is this referring to? The best answer I could find online is this answer on StackOverflow. In this post...

Categorical transformers

marcoshplace

Haskell is a programming language well known for its usage of monads and for the over-abundance of tutorials trying to explain them. This is not one of those posts. On the other hand, in this post I’ll try to convince you that Haskell without monads (as a main concept) is not only possible, but...

Either why or how

marcoshplace

Either is one of the easiest data structures which can be used to make your code safer and more composable. It is not particularly complex but sometimes it is still hard to grasp, especially for programmers used to a procedural or object oriented approach. In this post I’ll try to give an...

Introducing Haskell in Soisy

marcoshplace

Soisy is an Italian startup working in the fintech sector, providing a payment by instalments system to affiliated e-shops. Some months ago the need to release a new version of our risk engine emerged, so we started considering how to actually build it. The decision we took was to use Haskell....

Extensible Effects in the van Laarhoven Free Monad

wyrdartsinitiatives

Edit: you can find this code on Hackage at free-vl. Algebraic effects seem to be a sort of holy grail in functional programming. What I mean when I say “algebraic effect” here is: treating any effect like a value or type in your program, while also having some simple operations (an algebra) to...

FizzBuzz - Continuation Passing Style

wyrdartsinitiatives

For some reason I’ve been thinking about Continuation Passing Style a lot lately. I was reading some old code and realized it could have been simplified had it been done in a continuation monad. Did I really understand continuation passing style? When thinking about simple and unnecessary uses of...

Using Data.Proxy to Encode Types in your JSON Strings

wyrdartsinitiatives

yo dawg, I heard you like strings in your types so I put a type in your string so you could type check your strings while you stringify your types - Proxy “XZibit” The saying goes that one should encode as many invariants in the type system as possible. This way bad programs don’t type check,...

Data Families Make Types and Free Monads More Librarious

wyrdartsinitiatives

At the end of my post Type Families Make Life and Free Monads Simpler I conjectured whether it would be possible to write a “CRUD” library around the Free CrudF monad. The exact meaning of a library in this context is somewhat nuanced. What libraries look like when you’re doing type-level...

Type Families Make Life and Free Monads Simpler

wyrdartsinitiatives

After watching Ollie Charles’ talk on Strongly Typed Publish/Subscribe over Websocks via Singleton Types, I felt very inspired to try some type-level programming in Haskell. Along the way I stumbled across a really handy design pattern I thought I would share. Recently I’ve been working with...

Running the Nix package manager within a Docker Container

wyrdartsinitiatives

I love Nix. I’ve been running NixOS for the past few weeks and it’s been a great experience. However, I started a new job recently and have been thinking about our deployment pipeline and how we will manage build and run-time environments. Finding the boundary between Nix and Docker in this area...

Regex Substitution in Haskell

0xfe

I'm shocked and appalled at the fact that there is no generic regex substitution function in the GHC libraries. All I'm looking for is a simple function equivalent to perl's s/.../.../ expression. After digging around a bit, I found subRegex in regex-compat. While this works well, it does not use...