aboutsummaryrefslogtreecommitdiff
path: root/html-test/src/Bug975.hs
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2018-11-25 10:32:22 -0800
committerAlec Theriault <alec.theriault@gmail.com>2018-11-26 11:11:28 -0800
commita36ab92b289b4d6b707696eef49145bc7ced4957 (patch)
treea640a73c0f04132f60ac6ba39645521341866407 /html-test/src/Bug975.hs
parent8c785e2c46d3e37d14ab7888d96005ea2c69f37f (diff)
More uniform handling of `forall`'s in HTML/LaTeX
* don't forget to print explicit `forall`'s when there are arg docs * when printing an explicit `forall`, print all tyvars Fixes #973
Diffstat (limited to 'html-test/src/Bug975.hs')
-rw-r--r--html-test/src/Bug975.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/html-test/src/Bug975.hs b/html-test/src/Bug975.hs
new file mode 100644
index 00000000..97ebabda
--- /dev/null
+++ b/html-test/src/Bug975.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE ExplicitForAll #-}
+module Bug973 where
+
+showRead
+ :: forall a b. (Show a, Read b)
+ => a -- ^ this gets turned into a string...
+ -> b -- ^ ...from which this is read
+showRead = read . show
+
+-- | Same as 'showRead', but with type variable order flipped
+showRead'
+ :: forall b a. (Show a, Read b)
+ => a -- ^ this gets turned into a string...
+ -> b -- ^ ...from which this is read
+showRead' = read . show