Skip to content

Instantly share code, notes, and snippets.

View 0cjs's full-sized avatar
🏠
Building an MC6800 simulator!

Curt J. Sampson 0cjs

🏠
Building an MC6800 simulator!
View GitHub Profile
@pchiusano
pchiusano / type-inhabitants.markdown
Last active January 7, 2023 17:23
Reasoning about type inhabitants in Haskell

This is material to go along with a 2014 Boston Haskell talk.

We are going to look at a series of type signatures in Haskell and explore how parametricity (or lack thereof) lets us constrain what a function is allowed to do.

Let's start with a decidedly non-generic function signature. What are the possible implementations of this function which typecheck?

wrangle :: Int -> Int