From eaf0a0b51f452398f3c64882a334f90b920df794 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 13 Mar 2014 08:53:41 +0100 Subject: Display minimal complete definitions for type classes This corresponds to the new {-# MINIMAL #-} pragma present in GHC 7.8+. I also cleaned up some of the places in which ExportDecl is used to make adding fields easier in the future. Lots of test cases have been updated since they now render with minimality information. --- html-test/ref/DeprecatedClass.html | 16 +++ html-test/ref/Hash.html | 8 ++ html-test/ref/Minimal.html | 273 +++++++++++++++++++++++++++++++++++++ html-test/ref/Test.html | 14 ++ html-test/ref/Ticket61.html | 8 ++ 5 files changed, 319 insertions(+) create mode 100644 html-test/ref/Minimal.html (limited to 'html-test/ref') diff --git a/html-test/ref/DeprecatedClass.html b/html-test/ref/DeprecatedClass.html index c8799bf2..76c0c173 100644 --- a/html-test/ref/DeprecatedClass.html +++ b/html-test/ref/DeprecatedClass.html @@ -95,6 +95,14 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedClass.html") >

some class

Minimal complete definition

foo

Methods

Deprecated: SomeOtherClass

Minimal complete definition

bar

Methods

A class of types which can be hashed.

Minimal complete definition

hash

Methods

+Minimal
Safe HaskellSafe-Inferred

Minimal

Description

This tests the new MINIMAL pragma present in GHC 7.8

Documentation

class Foo a where

Minimal complete definition

foo, bar | bar, bat | foo, bat | fooBarBat

Methods

foo, bat, bar :: a

Any two of these are required...

fooBarBat :: (a, a, a)

.. or just this

class Weird a where

Minimal complete definition

a, b, c | d | e, (f | g)

Methods

a, g, f, e, d, c, b :: a

class NoMins a where

Minimal complete definition

x, y

Methods

x, z, y :: a

class FullMin a where

Methods

aaa, bbb :: a

class PartialMin a where

Minimal complete definition

ccc, ddd

Methods

ccc :: a

class EmptyMin a where

Minimal complete definition

Nothing

Methods

eee, fff :: a

diff --git a/html-test/ref/Test.html b/html-test/ref/Test.html index 6b74e108..5d738a54 100644 --- a/html-test/ref/Test.html +++ b/html-test/ref/Test.html @@ -1583,6 +1583,12 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");}; >

This is a class declaration with no methods (or no methods exported)

Minimal complete definition

ee

a where

Minimal complete definition

ff

Methods

a where

Minimal complete definition

f

Methods