Skip to content

Instantly share code, notes, and snippets.

@glaebhoerl
glaebhoerl / A.hs
Last active July 4, 2017 23:56 — forked from rwbarton/A.hs
-- Code taken from http://stackoverflow.com/questions/12735274/breaking-data-set-integrity-without-generalizednewtypederiving/12744568#12744568
-- Discussion on haskell-cafe: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/100870
-- http://www.haskell.org/pipermail/haskell-cafe/2012-October/103984.html
-- Modified to remove orphan instances by rwbarton
-- Simplified by glaebhoerl
module A (A(..), Set, empty, insert, on) where
import Data.Set
import Data.Function
@glaebhoerl
glaebhoerl / GHC_Query
Created October 6, 2012 12:10 — forked from nfrisby/GHC_Query
Exploring kind-indexed type constraints in GHC 7.6
{-# LANGUAGE PolyKinds, GADTs, DataKinds, TypeFamilies, TypeOperators,
MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,
UndecidableInstances #-}
module GHC_Query where
data Proxy (t :: k) = Proxy
data KindProxy (t :: *) = KindProxy -- a type-level proxy for kinds
data Nat = Z | S Nat