diff options
author | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-04-11 16:58:34 +0100 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-04-11 18:13:30 +0100 |
commit | af3b1444239027170f5e99a6dd67c1e2c6c44432 (patch) | |
tree | 2afa4e4bfafbe1c9492e5fd44e0969cac06e14b9 /html-test | |
parent | b4210d41de296ee0f9d212e8d5b9fc186880a3e7 (diff) |
Parse identifiers with ^ and ⋆ in them.
Fixes #298.
Diffstat (limited to 'html-test')
-rw-r--r-- | html-test/ref/Bug298.html | 133 | ||||
-rw-r--r-- | html-test/src/Bug298.hs | 22 |
2 files changed, 155 insertions, 0 deletions
diff --git a/html-test/ref/Bug298.html b/html-test/ref/Bug298.html new file mode 100644 index 00000000..03ed5eeb --- /dev/null +++ b/html-test/ref/Bug298.html @@ -0,0 +1,133 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" +><head + ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" + /><title + >Bug298</title + ><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" + /><script src="haddock-util.js" type="text/javascript" + ></script + ><script type="text/javascript" + >//<![CDATA[ +window.onload = function () {pageLoad();setSynopsis("mini_Bug298.html");}; +//]]> +</script + ></head + ><body + ><div id="package-header" + ><ul class="links" id="page-menu" + ><li + ><a href="" + >Contents</a + ></li + ><li + ><a href="" + >Index</a + ></li + ></ul + ><p class="caption empty" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >Safe-Inferred</td + ></tr + ></table + ><p class="caption" + >Bug298</p + ></div + ><div id="synopsis" + ><p id="control.syn" class="caption expander" onclick="toggleSection('syn')" + >Synopsis</p + ><ul id="section.syn" class="hide" onclick="toggleSection('syn')" + ><li class="src short" + ><a href="" + >(<^>)</a + > :: (a -> a) -> a -> a</li + ><li class="src short" + ><a href="" + >(<^)</a + > :: a -> a -> a</li + ><li class="src short" + ><a href="" + >(^>)</a + > :: a -> a -> a</li + ><li class="src short" + ><a href="" + >(⋆^)</a + > :: a -> a -> a</li + ><li class="src short" + ><a href="" + >f</a + > :: ()</li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:-60--94--62-" class="def" + >(<^>)</a + > :: (a -> a) -> a -> a</p + ></div + ><div class="top" + ><p class="src" + ><a name="v:-60--94-" class="def" + >(<^)</a + > :: a -> a -> a</p + ></div + ><div class="top" + ><p class="src" + ><a name="v:-94--62-" class="def" + >(^>)</a + > :: a -> a -> a</p + ></div + ><div class="top" + ><p class="src" + ><a name="v:-8902--94-" class="def" + >(⋆^)</a + > :: a -> a -> a</p + ></div + ><div class="top" + ><p class="src" + ><a name="v:f" class="def" + >f</a + > :: ()</p + ><div class="doc" + ><p + >Links to <code + ><a href="" + ><^></a + ></code + > and <code + ><a href="" + >^></a + ></code + >, <code + ><a href="" + ><^</a + ></code + > and <code + ><a href="" + >⋆^</a + ></code + >.</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.15.0</p + ></div + ></body + ></html +> diff --git a/html-test/src/Bug298.hs b/html-test/src/Bug298.hs new file mode 100644 index 00000000..07d6fa0c --- /dev/null +++ b/html-test/src/Bug298.hs @@ -0,0 +1,22 @@ +-- We introduced a regression in 2.14.x where we don't consider +-- identifiers with ^ as valid. We test that the regression goes away +-- here. It's a silly typo in the parser, really. Same with ★ which is a valid +-- symbol according to the 2010 report. +module Bug298 where + + +(<^>) :: (a -> a) -> a -> a +x <^> y = x y + +(<^) :: a -> a -> a +x <^ y = x + +(^>) :: a -> a -> a +x ^> y = y + +(⋆^) :: a -> a -> a +x ⋆^ y = y + +-- | Links to '<^>' and '^>', '<^' and '⋆^'. +f :: () +f = () |