Skip to content

Instantly share code, notes, and snippets.

View TheMatten's full-sized avatar
👨‍💻
Pressing keys until it typechecks.

TheMatten

👨‍💻
Pressing keys until it typechecks.
View GitHub Profile
@llelf
llelf / ip1.hs
Last active March 14, 2020 18:30
{-# LANGUAGE GADTs, ConstraintKinds, Rank2Types, ImplicitParams #-}
data Rec fields where
Rec :: fields => Rec fields
infixr 1 ?
(?) :: Rec fields -> (fields => r) -> r
Rec ? e = e
record :: Rec (?a :: Int, ?b :: String)