| 1 |
{- |
| 2 |
- Language/TEI/Syntax/Reference.hs - references |
| 3 |
- |
| 4 |
- Copyright 2020,2022 Einhard Leichtfuß |
| 5 |
- |
| 6 |
- This file is part of ding2tei-haskell. |
| 7 |
- |
| 8 |
- ding2tei-haskell is free software: you can redistribute it and/or modify |
| 9 |
- it under the terms of the GNU Affero General Public License as published |
| 10 |
- by the Free Software Foundation, either version 3 of the License, or |
| 11 |
- (at your option) any later version. |
| 12 |
- |
| 13 |
- ding2tei-haskell is distributed in the hope that it will be useful, |
| 14 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
- GNU Affero General Public License for more details. |
| 17 |
- |
| 18 |
- You should have received a copy of the GNU Affero General Public License |
| 19 |
- along with ding2tei-haskell. If not, see <https://www.gnu.org/licenses/>. |
| 20 |
-} |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
module Language.TEI.Syntax.Reference |
| 27 |
( Ident(..) |
| 28 |
, ReferenceGroup(..) |
| 29 |
, Reference(..) |
| 30 |
, RefType(..) |
| 31 |
) where |
| 32 |
|
| 33 |
|
| 34 |
import Data.List.NonEmpty (NonEmpty) |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
data Ident = Ident String Int |
| 40 |
deriving (Show, Eq, Ord) |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
data ReferenceGroup |
| 45 |
= ReferenceGroup |
| 46 |
RefType |
| 47 |
(NonEmpty Reference) |
| 48 |
deriving (Show, Eq, Ord) |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
data Reference |
| 53 |
= Reference |
| 54 |
(Maybe Ident) |
| 55 |
String |
| 56 |
deriving (Show, Eq, Ord) |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
data RefType |
| 62 |
= Synonymy |
| 63 |
| Etymology |
| 64 |
| Comparison |
| 65 |
| Illustration |
| 66 |
| Related |
| 67 |
deriving (Eq, Ord) |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
instance Show RefType where |
| 72 |
show Synonymy = "syn" |
| 73 |
show Etymology = "etym" |
| 74 |
show Comparison = "cf" |
| 75 |
show Illustration = "illus" |
| 76 |
show Related = "see" |
| 77 |
|
| 78 |
|
| 79 |
-- vi: ft=haskell ts=2 sw=2 et |