aboutsummaryrefslogtreecommitdiff
path: root/src/Hiking.hs
blob: 2d04b4fe3b80479157daa71037686af4eedee161 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
module Hiking (Hiking(..), header, values) where

import           Data.Text
import qualified Data.Text as T

data Hiking = Hiking
  { name        :: Text
  , description :: Text
  , lat         :: Text
  , lng         :: Text
  , url         :: Text
  , duration    :: Text
  , distance    :: Text
  , elevation   :: Text
  , difficulty  :: Text
  } deriving (Eq, Show)

header :: [Text]
header =
  [ "name"
  , "lat"
  , "lng"
  , "link"
  , "durée"
  , "distance"
  , "dénivelé"
  , "color"
  , "infos"
  ]

values :: Hiking -> [Text]
values h =
  [ name h
  , lat h
  , lng h
  , url h
  , duration h
  , distance h
  , elevation h
  , difficulty h
  , description h
  ]