diff options
author | Hécate Moonlight <Kleidukos@users.noreply.github.com> | 2021-02-07 16:21:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-07 16:21:29 +0100 |
commit | 9dab3bdc9f31c0389e69f21c2199f874d151ccb7 (patch) | |
tree | 36252b271f70ae2730063a39dff19fdfb4fadf8d /html-test | |
parent | a10d042ac76c990764250244ac801db16858b6ee (diff) | |
parent | 62bf25cb0931e761e8b2ff082a703d79386fc8bc (diff) |
Merge pull request #1314 from tweag/show-linear-backport
Backport #1238 (linear types) to ghc-9.0
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..48ad04e2 --- /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="Linuwial" + /><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 |