aboutsummaryrefslogtreecommitdiff
path: root/src/Hiking.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Hiking.hs')
-rw-r--r--src/Hiking.hs42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/Hiking.hs b/src/Hiking.hs
new file mode 100644
index 0000000..2d04b4f
--- /dev/null
+++ b/src/Hiking.hs
@@ -0,0 +1,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
+ ]