Skip to content

Instantly share code, notes, and snippets.

@gallais
Created October 26, 2016 07:58
Show Gist options
  • Save gallais/5510ec24b445e1b1ee6b4ca0a86d830a to your computer and use it in GitHub Desktop.
Save gallais/5510ec24b445e1b1ee6b4ca0a86d830a to your computer and use it in GitHub Desktop.
{-# OPTIONS_GHC -fdefer-type-errors #-}
{-# LANGUAGE RankNTypes #-}
module NumList where
import Data.Void
type NumList a = Num a => [a]
first :: NumList a -> a
first = head
elt :: a
elt = first [0]
argh :: Void
argh = elt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment