Haskell Type System Features

Discussions center on advanced typing concepts in Haskell like type classes, phantom types, linear types, structural typing, and type families, with comparisons to features in languages like OCaml, SML, and Rust.

➡️ Stable 0.5x Programming Languages
4,718
Comments
20
Years Active
5
Top Authors
#4221
Topic ID

Activity Over Time

2007
2
2008
8
2009
33
2010
77
2011
97
2012
124
2013
221
2014
350
2015
328
2016
348
2017
335
2018
320
2019
325
2020
442
2021
376
2022
340
2023
340
2024
295
2025
343
2026
14

Keywords

GAT en.m T0 NonEmptyArray HKT AdaResources SML NonNegativeInteger haskell.org faculty.cs type types haskell function classes linear declaration constructor type safety return

Sample Comments

pron Feb 28, 2023 View on HN

Function types are structural in Haskell.

dllthomas Dec 1, 2015 View on HN

Why aren't type classes the solution you're looking for?

dpc_pw Dec 28, 2020 View on HN

I'm not a Haskeler, but didn't they add affine/linear types recently that could help?

mjburgess Jan 11, 2021 View on HN

Haskell is structurally typed...

lang_agnostic Apr 24, 2024 View on HN

Isn't this just phantom types in other programming languages?

neonsunset Feb 5, 2025 View on HN

It can be done but that requires a better, more expressive type system.

haskellandchill Aug 16, 2017 View on HN

Interesting, didn't know it had something like type families. Thanks!

lyxsus Aug 3, 2022 View on HN

Isn’t it similar to linear types in haskell?

pas Sep 26, 2024 View on HN

GAT solves typing problems (by making a subset of HKT possible)

flippinburgers Nov 17, 2021 View on HN

What is functional programming without a type system.