This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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 |