From 9f2d1b933897a6330e5c8f9fa904e56ab40050ef Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Sat, 4 Aug 2018 11:51:30 -0400 Subject: Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests --- html-test/ref/TypeFamilies3.html | 356 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 356 insertions(+) create mode 100644 html-test/ref/TypeFamilies3.html (limited to 'html-test/ref/TypeFamilies3.html') diff --git a/html-test/ref/TypeFamilies3.html b/html-test/ref/TypeFamilies3.html new file mode 100644 index 00000000..2dadf435 --- /dev/null +++ b/html-test/ref/TypeFamilies3.html @@ -0,0 +1,356 @@ +TypeFamilies3

Safe HaskellSafe

TypeFamilies3

Synopsis
  • type family Foo a where ...
  • type family Bar a
  • data family Baz a

Documentation

type family Foo a where ... #

A closed type family

Equations

Foo () = Int
Foo _ = ()

type family Bar a #

An open family

Instances
type Bar Int #
Instance details

Defined in TypeFamilies3

type Bar Int = ()
type Bar () #
Instance details

Defined in TypeFamilies3

type Bar () = Int

data family Baz a #

A data family

Instances
newtype Baz Double #
Instance details

Defined in TypeFamilies3

newtype Baz Double = Baz3 Float
data Baz Int #
Instance details

Defined in TypeFamilies3

data Baz Int = Baz2 Bool
data Baz () #
Instance details

Defined in TypeFamilies3

data Baz () = Baz1
\ No newline at end of file -- cgit v1.2.3