[commit: base] master: Add GHC.IP for the new implicit-parameter story (1941b5d)
Simon Peyton Jones
simonpj at microsoft.com
Thu Jun 14 09:00:36 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/1941b5d02fce0b0b1eaad7672df85e8872d49c1a
>---------------------------------------------------------------
commit 1941b5d02fce0b0b1eaad7672df85e8872d49c1a
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Jun 13 17:24:02 2012 +0100
Add GHC.IP for the new implicit-parameter story
>---------------------------------------------------------------
GHC/IP.hs | 14 ++++++++++++++
base.cabal | 1 +
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/GHC/IP.hs b/GHC/IP.hs
new file mode 100644
index 0000000..762f26b
--- /dev/null
+++ b/GHC/IP.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE FunctionalDependencies #-}
+{-# LANGUAGE KindSignatures #-}
+{-# LANGUAGE DataKinds #-}
+{-# OPTIONS_GHC -XNoImplicitPrelude #-}
+module GHC.IP (IP(..)) where
+
+import GHC.TypeLits
+
+-- | The syntax @?x :: a@ is desugared into @IP "x" a@
+class IP (x :: Symbol) a | x -> a where
+ ip :: a
+
+
diff --git a/base.cabal b/base.cabal
index ea553d2..367f45b 100644
--- a/base.cabal
+++ b/base.cabal
@@ -84,6 +84,7 @@ Library {
GHC.IOArray,
GHC.IOBase,
GHC.IORef,
+ GHC.IP,
GHC.Int,
GHC.List,
GHC.MVar,
More information about the Cvs-libraries
mailing list