aboutsummaryrefslogtreecommitdiff
path: root/html-test
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2014-08-21 21:09:51 +0200
committerNiklas Haas <git@nand.wakku.to>2014-08-24 08:14:35 +0200
commitfb2a6bf0a53fb243dfe3f769c340236ab73763a9 (patch)
tree9877f8ef41934b053d91ab1ee531b98b7bc0965f /html-test
parent26a44b9f3f539e93f499eea4eda6a354f46b20da (diff)
Omit unnecessary foralls and fix #315
This also fixes #86.
Diffstat (limited to 'html-test')
-rw-r--r--html-test/ref/FunArgs.html120
-rw-r--r--html-test/src/FunArgs.hs23
2 files changed, 139 insertions, 4 deletions
diff --git a/html-test/ref/FunArgs.html b/html-test/ref/FunArgs.html
index d3fea6b7..5c1fe892 100644
--- a/html-test/ref/FunArgs.html
+++ b/html-test/ref/FunArgs.html
@@ -55,9 +55,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_FunArgs.html");};
><table
><tr
><td class="src"
- >:: <span class="keyword"
- >forall</span
- > a . <a href=""
+ >:: <a href=""
>Ord</a
> a</td
><td class="doc empty"
@@ -154,6 +152,122 @@ window.onload = function () {pageLoad();setSynopsis("mini_FunArgs.html");};
></table
></div
></div
+ ><div class="top"
+ ><p class="src"
+ ><a name="v:h" class="def"
+ >h</a
+ ></p
+ ><div class="subs arguments"
+ ><p class="caption"
+ >Arguments</p
+ ><table
+ ><tr
+ ><td class="src"
+ >:: a</td
+ ><td class="doc"
+ ><p
+ >First argument</p
+ ></td
+ ></tr
+ ><tr
+ ><td class="src"
+ >-&gt; b</td
+ ><td class="doc"
+ ><p
+ >Second argument</p
+ ></td
+ ></tr
+ ><tr
+ ><td class="src"
+ >-&gt; c</td
+ ><td class="doc"
+ ><p
+ >Third argument</p
+ ></td
+ ></tr
+ ><tr
+ ><td class="src"
+ >-&gt; d</td
+ ><td class="doc"
+ ><p
+ >Result</p
+ ></td
+ ></tr
+ ></table
+ ></div
+ ></div
+ ><div class="top"
+ ><p class="src"
+ ><a name="v:i" class="def"
+ >i</a
+ ></p
+ ><div class="subs arguments"
+ ><p class="caption"
+ >Arguments</p
+ ><table
+ ><tr
+ ><td class="src"
+ >:: <span class="keyword"
+ >forall</span
+ > (b :: <a href=""
+ >()</a
+ >). (d ~ <a href=""
+ >()</a
+ >)</td
+ ><td class="doc empty"
+ >&nbsp;</td
+ ></tr
+ ><tr
+ ><td class="src"
+ >=&gt; a b c d</td
+ ><td class="doc"
+ ><p
+ >abcd</p
+ ></td
+ ></tr
+ ><tr
+ ><td class="src"
+ >-&gt; ()</td
+ ><td class="doc"
+ ><p
+ >Result</p
+ ></td
+ ></tr
+ ></table
+ ></div
+ ></div
+ ><div class="top"
+ ><p class="src"
+ ><a name="v:j" class="def"
+ >j</a
+ ></p
+ ><div class="subs arguments"
+ ><p class="caption"
+ >Arguments</p
+ ><table
+ ><tr
+ ><td class="src"
+ >:: <span class="keyword"
+ >forall</span
+ > (a :: <a href=""
+ >()</a
+ >). proxy a</td
+ ><td class="doc"
+ ><p
+ >First argument</p
+ ></td
+ ></tr
+ ><tr
+ ><td class="src"
+ >-&gt; b</td
+ ><td class="doc"
+ ><p
+ >Result</p
+ ></td
+ ></tr
+ ></table
+ ></div
+ ></div
></div
></div
><div id="footer"
diff --git a/html-test/src/FunArgs.hs b/html-test/src/FunArgs.hs
index cfde185d..24e1ccff 100644
--- a/html-test/src/FunArgs.hs
+++ b/html-test/src/FunArgs.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE ExplicitForAll #-}
+{-# LANGUAGE RankNTypes, DataKinds, TypeFamilies #-}
module FunArgs where
f :: forall a. Ord a
@@ -15,3 +15,24 @@ g :: a -- ^ First argument
-> c -- ^ Third argument
-> d -- ^ Result
g = undefined
+
+
+h :: forall a b c
+ . a -- ^ First argument
+ -> b -- ^ Second argument
+ -> c -- ^ Third argument
+ -> forall d. d -- ^ Result
+h = undefined
+
+
+i :: forall a (b :: ()) d. (d ~ '())
+ => forall c
+ . a b c d -- ^ abcd
+ -> () -- ^ Result
+i = undefined
+
+
+j :: forall proxy (a :: ()) b
+ . proxy a -- ^ First argument
+ -> b -- ^ Result
+j = undefined