Remove tag haskell
article thumbnail

Dependent and Refinement Types: Why?

Xebia

Haskell actually forces this separation; the type of an operation like reading a line is tagged with IO : readLine :: IO String In other functional languages, like Scala or Kotlin, this separation is not enforced by the compiler. Let me share with you a third example of what we can achieve with a simple “type tag.”

article thumbnail

Higher-Kinded Data in Scala

Xebia

Higher-kinded data is a reasonably well-known concept in the Haskell world, but I haven’t seen many people talking about it in Scala. This article was originally published at 47deg.com on January 19, 2021 The other day I came across a nice use case for a concept known as “higher-kinded data” that I thought was worth sharing.

Data 130
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

Domain Modeling in Haskell - Follow the Types

Ruminations of a Programmer

With Haskell you don't have any escape route - you've to be functional and model your domain artifacts as functions that compose. With Haskell way of thinking you think in types, keep your pure functional code separate from impure side-effecting logic and use the myriads of ways to compose your computations. Without further ado.

article thumbnail

The power of IO in Haskell

Xebia

The IO here refers to the idea of wrapping and tagging your effectful actions within a special type, with the goal of offering better control over its execution. from Haskell’s base library with more modern incarnations, such as Arrow Fx , Bow Effects , ZIO , and Cats Effect , Haskell seems quite underpowered in the IO arena.

Resources 130
article thumbnail

Functional Domain Modeling in Rust – Part 1

Xebia

In Haskell, this pattern is supported via the newtype declaration, which allows the programmer to define a new type identical to an existing one except for its name. However, sum types, also known as enums or tagged unions, represent data that can take on one of several possible values. How could we fix this?

article thumbnail

Interview with an Intiface Haptics Engineer

David Walsh

We currently ship the main library in Rust, with bindings in C#, Javascript/WASM, Java, and Python, and people have made bindings for languages like Haskell and Go. Finally, being able to present the project to people on their turf (programming language/platform) instead of ours is a constant ongoing challenge. Unimaginably boring.