]> Git — Sourcephile - majurity.git/blob - test/Types.hs
Fix majorityValue: update the middlemost correctly.
[majurity.git] / test / Types.hs
1 {-# LANGUAGE DeriveGeneric #-}
2 module Types where
3
4 import Data.Hashable
5 import GHC.Generics (Generic)
6 import Prelude
7
8 data G2 = No | Yes
9 deriving (Eq, Ord, Show)
10
11 data C1 = The
12 deriving (Eq, Ord, Show, Generic)
13 instance Hashable C1
14
15 data C2 = This | That
16 deriving (Eq, Ord, Show, Generic)
17 instance Hashable C2
18
19 data G6 = ToReject | Insufficient | Acceptable | Good | VeryGood | Perfect | TooGood
20 deriving (Bounded, Enum, Eq, Ord, Show)
21
22 -- | Note that the grades 1, 2, 4, and 12 are absent.
23 data DanishSchoolGrade
24 = D0 -- ^ the completely unacceptable performance
25 | D3 -- ^ the very hesitant, very insufficient, and unsatisfactory performance
26 | D5 -- ^ the hesitant and not satisfactory performance
27 | D6 -- ^ the just acceptable performance
28 | D7 -- ^ the mediocre performance, slightly below average
29 | D8 -- ^ the average performance
30 | D9 -- ^ the good performance, a little above average
31 | D10 -- ^ the excellent but not particularly independent performance
32 | D11 -- ^ the independent and excellent performance
33 | D13 -- ^ the exceptionally independent and excellent performance
34 deriving (Bounded, Enum, Eq, Ord, Show)