Skip to content

Instantly share code, notes, and snippets.

@3noch
Created August 6, 2017 04:09
Show Gist options
  • Save 3noch/ee701840dd63f8be65661427782bd6a3 to your computer and use it in GitHub Desktop.
Save 3noch/ee701840dd63f8be65661427782bd6a3 to your computer and use it in GitHub Desktop.
Function Application at Type Level (a.k.a. Open GADT)
{-# LANGUAGE PolyKinds, TypeFamilies, TypeOperators #-}
type family ($) (f :: k1) (x :: k2) :: k3
data Id
type instance Id $ x = x
data DoSomething
type instance DoSomething $ x = Either x x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment