fix warnings and doctests

This commit is contained in:
Ryan Mulligan 2019-07-28 20:23:57 -07:00
parent 4f8fd114fc
commit 59172c23f3
2 changed files with 8 additions and 8 deletions

View File

@ -19,11 +19,12 @@ import Utils (UpdateEnv(..), Version, nixBuildOptions, runtimeDir)
default (T.Text)
data BinaryCheck = BinaryCheck
{ filePath :: FilePath
, zeroExitCode :: Bool
, versionPresent :: Bool
}
data BinaryCheck =
BinaryCheck
{ filePath :: FilePath
, zeroExitCode :: Bool
, versionPresent :: Bool
}
-- | Construct regex: [^\.]*${version}\.*\s*
versionRegex :: Text -> RE' ()
@ -41,7 +42,7 @@ checkTestsBuild attrPath =
(T.unpack attrPath) ++ ".tests or {}"
]
in catchany_sh
(do Shell.canFail $ Shelly.run "nix-build" (map T.pack nixBuildCmd)
(do _ <- Shell.canFail $ Shelly.run "nix-build" (map T.pack nixBuildCmd)
code <- lastExitCode
return $ code == 0)
(\_ -> return False)

View File

@ -8,8 +8,6 @@ import qualified Data.Text as T
import Data.Time.Clock (UTCTime, addUTCTime, getCurrentTime)
import Data.Time.Format (defaultTimeLocale, formatTime, iso8601DateFormat)
-- $setup
-- import Data.Time.Format (parseTimeOrError)
data Time m a where
Now :: Time m UTCTime
@ -28,6 +26,7 @@ runPure t =
-- | Return the UTC time 1 hour ago
--
-- $setup
-- >>> import Data.Time.Format (parseTimeOrError)
-- >>> let exampleCurrentTime = parseTimeOrError False defaultTimeLocale "%Y-%-m-%-d" "2019-06-06" :: UTCTime
--
-- Examples: