[commit: haddock] master: Add RankNTypes test case to ImplicitParams.hs (6ca2767)

git at git.haskell.org git at git.haskell.org
Sun Feb 23 22:29:44 UTC 2014


Repository : ssh://git@git.haskell.org/haddock

On branch  : master
Link       : http://git.haskell.org/haddock.git/commitdiff/6ca276702d04c9183caa98d1848f6aa5b88a8755

>---------------------------------------------------------------

commit 6ca276702d04c9183caa98d1848f6aa5b88a8755
Author: Niklas Haas <git at nand.wakku.to>
Date:   Sun Feb 23 16:11:22 2014 +0100

    Add RankNTypes test case to ImplicitParams.hs
    
    This test actually tests what #260 originally reported - I omitted the
    RankNTypes scenario from the original fix because I realized it's not
    relevant to the underlying issue and indeed, this renders as intended
    now. Still good to have more tests.


>---------------------------------------------------------------

6ca276702d04c9183caa98d1848f6aa5b88a8755
 html-test/ref/ImplicitParams.html |   22 ++++++++++++++++++++++
 html-test/src/ImplicitParams.hs   |    7 +++++--
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/html-test/ref/ImplicitParams.html b/html-test/ref/ImplicitParams.html
index 0219b32..83e8b09 100644
--- a/html-test/ref/ImplicitParams.html
+++ b/html-test/ref/ImplicitParams.html
@@ -51,6 +51,20 @@ window.onload = function () {pageLoad();setSynopsis("mini_ImplicitParams.html");
 	    > <a name="t:X" class="def"
 	    >X</a
 	    ></p
+	  ><div class="subs constructors"
+	  ><p class="caption"
+	    >Constructors</p
+	    ><table
+	    ><tr
+	      ><td class="src"
+		><a name="v:X" class="def"
+		  >X</a
+		  ></td
+		><td class="doc empty"
+		> </td
+		></tr
+	      ></table
+	    ></div
 	  ></div
 	><div class="top"
 	><p class="src"
@@ -76,6 +90,14 @@ window.onload = function () {pageLoad();setSynopsis("mini_ImplicitParams.html");
 	    >X</a
 	    >)</p
 	  ></div
+	><div class="top"
+	><p class="src"
+	  ><a name="v:f" class="def"
+	    >f</a
+	    > ::  ((?x :: <a href="ImplicitParams.html#t:X"
+	    >X</a
+	    >) => a) -> a</p
+	  ></div
 	></div
       ></div
     ><div id="footer"
diff --git a/html-test/src/ImplicitParams.hs b/html-test/src/ImplicitParams.hs
index 4595b8f..3ca9157 100644
--- a/html-test/src/ImplicitParams.hs
+++ b/html-test/src/ImplicitParams.hs
@@ -1,10 +1,13 @@
-{-# LANGUAGE ImplicitParams #-}
+{-# LANGUAGE ImplicitParams, RankNTypes #-}
 module ImplicitParams where
 
-data X
+data X = X
 
 c :: (?x :: X) => X
 c = ?x
 
 d :: (?x :: X, ?y :: X) => (X, X)
 d = (?x, ?y)
+
+f :: ((?x :: X) => a) -> a
+f a = let ?x = X in a



More information about the ghc-commits mailing list