]> Git — Sourcephile - majurity.git/blob - hjugement/tests/Types.hs
protocol: change: bump cabal version
[majurity.git] / hjugement / tests / 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 SchoolGrade
20 = ToReject
21 | Insufficient
22 | Acceptable
23 | Good
24 | VeryGood
25 | Perfect
26 deriving (Bounded, Enum, Eq, Ord, Show)
27
28 -- | Note that the grades 1, 2, 4, and 12 are absent.
29 data DanishSchoolGrade
30 = D0 -- ^ the completely unacceptable performance
31 | D3 -- ^ the very hesitant, very insufficient, and unsatisfactory performance
32 | D5 -- ^ the hesitant and not satisfactory performance
33 | D6 -- ^ the just acceptable performance
34 | D7 -- ^ the mediocre performance, slightly below average
35 | D8 -- ^ the average performance
36 | D9 -- ^ the good performance, a little above average
37 | D10 -- ^ the excellent but not particularly independent performance
38 | D11 -- ^ the independent and excellent performance
39 | D13 -- ^ the exceptionally independent and excellent performance
40 deriving (Bounded, Enum, Eq, Ord, Show)