Skip to content

Instantly share code, notes, and snippets.

View davdar's full-sized avatar

David Darais davdar

View GitHub Profile
@davdar
davdar / gist:6144184
Created August 2, 2013 23:07
small example that breaks GHC type safety by combining GADTs and TypeFamilies
{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving #-}
module Test where
newtype Age = Age Int
deriving (Foo)
type family F a :: *
type instance F Int = Int
type instance F Age = Bool