From 7e53f628440169f90cfb6aeeaf74ffbe2b1cfa6d Mon Sep 17 00:00:00 2001 From: nand Date: Tue, 11 Feb 2014 16:51:27 +0100 Subject: 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 --- html-test/src/PatternSyns.hs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 html-test/src/PatternSyns.hs (limited to 'html-test/src/PatternSyns.hs') 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 -- cgit v1.2.3