Skip to content

Commit

Permalink
Remove unnecessary conditional compilation for parseTimeM (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-TChen authored Nov 11, 2020
1 parent b23e17a commit ab9eea7
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/Hakyll/Web/Template/Context.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ import Data.List (intercalate, tails)
import Data.Semigroup (Semigroup (..))
#endif
import Data.Time.Clock (UTCTime (..))
import Data.Time.Format (formatTime)
import qualified Data.Time.Format as TF
import Data.Time.Format (formatTime, parseTimeM)
import Data.Time.Locale.Compat (TimeLocale, defaultTimeLocale)
import Hakyll.Core.Compiler
import Hakyll.Core.Compiler.Internal
Expand Down Expand Up @@ -463,10 +462,3 @@ teaserFieldWithSeparator separator key snapshot = field key $ \item -> do
missingField :: Context a
missingField = Context $ \k _ _ -> noResult $
"Missing field '" ++ k ++ "' in context"

parseTimeM :: Bool -> TimeLocale -> String -> String -> Maybe UTCTime
#if MIN_VERSION_time(1,5,0)
parseTimeM = TF.parseTimeM
#else
parseTimeM _ = TF.parseTime
#endif

0 comments on commit ab9eea7

Please sign in to comment.