From 258242ccfc5fb03c15f7faaef12f36aadfe51e70 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Wed, 22 Sep 2021 12:19:29 -0400 Subject: [PATCH] haddock documentation for Types.Url and Types.newUrl --- src/Types.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Types.hs b/src/Types.hs index 3d197d8..7564721 100644 --- a/src/Types.hs +++ b/src/Types.hs @@ -25,14 +25,21 @@ module Types ( newUrl ) where +-- | Defines the basic parts of a URL data Url = Url { protocol :: String + -- ^ the protocol, e.g.: HTTPS , host :: String + -- ^ the hostname (and optional port) , path :: [String] + -- ^ the path as a list of nested directories , params :: [(String, Maybe String)] + -- ^ the parameters and their optional values , anchor :: Maybe String + -- ^ the anchor text } deriving (Eq, Show) +-- | default value for a 'Url' newUrl :: Url newUrl = Url "" "" [] [] Nothing