aboutsummaryrefslogtreecommitdiff
path: root/html-test/src
diff options
context:
space:
mode:
authornand <git@nand.wakku.to>2014-02-11 16:51:27 +0100
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-02-11 15:56:50 +0000
commit7e53f628440169f90cfb6aeeaf74ffbe2b1cfa6d (patch)
tree734bbf18a921a80e689a604d344391e9c2b7ed46 /html-test/src
parentbc5756d062bbc5cad5d4fa60798435ed020c518e (diff)
Add test case for PatternSynonyms
This just tests various stuff including poly-kinded patterns and operator patterns to make sure the rendering isn't broken. Signed-off-by: Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
Diffstat (limited to 'html-test/src')
-rw-r--r--html-test/src/PatternSyns.hs22
1 files changed, 22 insertions, 0 deletions
diff --git a/html-test/src/PatternSyns.hs b/html-test/src/PatternSyns.hs
new file mode 100644
index 00000000..8af5eb23
--- /dev/null
+++ b/html-test/src/PatternSyns.hs
@@ -0,0 +1,22 @@
+{-# LANGUAGE PatternSynonyms, PolyKinds, TypeOperators #-}
+
+-- | Testing some pattern synonyms
+module PatternSyns where
+
+-- | FooType doc
+data FooType x = FooCtor x
+
+-- | Pattern synonym for 'Foo' x
+pattern Foo x = FooCtor x
+
+-- | Pattern synonym for 'Bar' x
+pattern Bar x = FooCtor (Foo x)
+
+-- | Pattern synonym for (':<->')
+pattern x :<-> y = (Foo x, Bar y)
+
+-- | Doc for ('><')
+data (a :: *) >< b = Empty
+
+-- | Pattern for 'Empty'
+pattern E = Empty