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/ref/PatternSyns.html | 241 +++++++++++++++++++++++++++++++++++++++++ html-test/src/PatternSyns.hs | 22 ++++ 2 files changed, 263 insertions(+) create mode 100644 html-test/ref/PatternSyns.html create mode 100644 html-test/src/PatternSyns.hs diff --git a/html-test/ref/PatternSyns.html b/html-test/ref/PatternSyns.html new file mode 100644 index 00000000..36b3c3bd --- /dev/null +++ b/html-test/ref/PatternSyns.html @@ -0,0 +1,241 @@ + +PatternSyns
Safe HaskellSafe-Inferred

PatternSyns

Description

Testing some pattern synonyms

Synopsis

Documentation

data FooType x

FooType doc

Constructors

FooCtor x 

pattern Foo t :: FooType t

Pattern synonym for Foo x

pattern Bar t :: FooType (FooType t)

Pattern synonym for Bar x

pattern t :<-> t :: (FooType t, FooType (FooType t))

Pattern synonym for (:<->)

data a >< b

Doc for (><)

Constructors

Empty 

pattern E :: (><) k t t

Pattern for Empty

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