diff options
author | Alex Biehl <alexbiehl@gmail.com> | 2017-06-03 20:37:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-03 20:37:28 +0200 |
commit | bfb3563f730fd1c973a6611a0fba3435fb1df489 (patch) | |
tree | 78fe1e944e74c7840bc64cb03ea33b4e23e0ed7e /html-test | |
parent | 75e1e19d0d6c139c3c7d9b77b2928e6eb286dd48 (diff) |
Allow user defined signatures for pattern synonyms (#631)
Diffstat (limited to 'html-test')
-rw-r--r-- | html-test/ref/PatternSyns.html | 29 | ||||
-rw-r--r-- | html-test/src/PatternSyns.hs | 5 |
2 files changed, 34 insertions, 0 deletions
diff --git a/html-test/ref/PatternSyns.html b/html-test/ref/PatternSyns.html index 9f0caaa2..2cf936b3 100644 --- a/html-test/ref/PatternSyns.html +++ b/html-test/ref/PatternSyns.html @@ -118,6 +118,16 @@ window.onload = function () {pageLoad();}; > k a (b :: k). <a href="#" >(><)</a > k a b</li + ><li class="src short" + ><span class="keyword" + >pattern</span + > <a href="#" + >PatWithExplicitSig</a + > :: <a href="#" + >Eq</a + > somex => somex -> <a href="#" + >FooType</a + > somex</li ></ul ></div ><div id="interface" @@ -279,6 +289,25 @@ window.onload = function () {pageLoad();}; ></p ></div ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >pattern</span + > <a id="v:PatWithExplicitSig" class="def" + >PatWithExplicitSig</a + > :: <a href="#" + >Eq</a + > somex => somex -> <a href="#" + >FooType</a + > somex <a href="#" class="selflink" + >#</a + ></p + ><div class="doc" + ><p + >Earlier ghc versions didn't allow explicit signatures + on pattern synonyms.</p + ></div + ></div ></div ></div ><div id="footer" diff --git a/html-test/src/PatternSyns.hs b/html-test/src/PatternSyns.hs index 8af5eb23..a8de113c 100644 --- a/html-test/src/PatternSyns.hs +++ b/html-test/src/PatternSyns.hs @@ -20,3 +20,8 @@ data (a :: *) >< b = Empty -- | Pattern for 'Empty' pattern E = Empty + +-- | Earlier ghc versions didn't allow explicit signatures +-- on pattern synonyms. +pattern PatWithExplicitSig :: Eq somex => somex -> FooType somex +pattern PatWithExplicitSig x = FooCtor x |