diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-12-16 20:03:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 20:03:14 +0100 |
commit | b4b4d896d2d68d6c48e7db7bfe95c185ca0709cb (patch) | |
tree | 7831f2cdb6cb4e65a7761f8f61d341cb1e6c31f4 /html-test | |
parent | 059acb11d6134ee0d896bcf73c870958557a3909 (diff) |
Display linear/multiplicity arrows correctly (#1238)
Previously we were ignoring multiplicity and displayed
a %1 -> b as a -> b.
Diffstat (limited to 'html-test')
-rw-r--r-- | html-test/ref/LinearTypes.html | 108 | ||||
-rw-r--r-- | html-test/src/LinearTypes.hs | 14 |
2 files changed, 122 insertions, 0 deletions
diff --git a/html-test/ref/LinearTypes.html b/html-test/ref/LinearTypes.html new file mode 100644 index 00000000..18cd060a --- /dev/null +++ b/html-test/ref/LinearTypes.html @@ -0,0 +1,108 @@ +<html xmlns="http://www.w3.org/1999/xhtml" +><head + ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" + /><meta name="viewport" content="width=device-width, initial-scale=1" + /><title + >LinearTypes</title + ><link href="#" rel="stylesheet" type="text/css" title="NewOcean" + /><link rel="stylesheet" type="text/css" href="#" + /><link rel="stylesheet" type="text/css" href="#" + /><script src="haddock-bundle.min.js" async="async" type="text/javascript" + ></script + ><script type="text/x-mathjax-config" + >MathJax.Hub.Config({ tex2jax: { processClass: "mathjax", ignoreClass: ".*" } });</script + ><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript" + ></script + ></head + ><body + ><div id="package-header" + ><span class="caption empty" + > </span + ><ul class="links" id="page-menu" + ><li + ><a href="#" + >Contents</a + ></li + ><li + ><a href="#" + >Index</a + ></li + ></ul + ></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" + >LinearTypes</p + ></div + ><div id="synopsis" + ><details id="syn" + ><summary + >Synopsis</summary + ><ul class="details-toggle" data-details-id="syn" + ><li class="src short" + ><a href="#" + >unrestricted</a + > :: a -> b</li + ><li class="src short" + ><a href="#" + >linear</a + > :: a %1 -> b</li + ><li class="src short" + ><a href="#" + >poly</a + > :: a %m -> b</li + ></ul + ></details + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a id="v:unrestricted" class="def" + >unrestricted</a + > :: a -> b <a href="#" class="selflink" + >#</a + ></p + ><div class="doc" + ><p + >Does something unrestricted.</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a id="v:linear" class="def" + >linear</a + > :: a %1 -> b <a href="#" class="selflink" + >#</a + ></p + ><div class="doc" + ><p + >Does something linear.</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a id="v:poly" class="def" + >poly</a + > :: a %m -> b <a href="#" class="selflink" + >#</a + ></p + ><div class="doc" + ><p + >Does something polymorphic.</p + ></div + ></div + ></div + ></div + ></body + ></html +> diff --git a/html-test/src/LinearTypes.hs b/html-test/src/LinearTypes.hs new file mode 100644 index 00000000..cb4eb138 --- /dev/null +++ b/html-test/src/LinearTypes.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE LinearTypes #-} +module LinearTypes where + +-- | Does something unrestricted. +unrestricted :: a -> b +unrestricted = undefined + +-- | Does something linear. +linear :: a %1 -> b +linear = linear + +-- | Does something polymorphic. +poly :: a %m -> b +poly = poly |