redundancies

This commit is contained in:
Keagan McClelland
2020-02-27 15:04:29 -07:00
parent b8ce0c1b16
commit 36c9c056ed
3 changed files with 1 additions and 10 deletions

View File

@@ -21,10 +21,8 @@ import System.Directory
import Yesod.Core
import Foundation
import Handler.Types.Status
import Lib.Registry
import Lib.Semver
import Lib.Types.Semver
import System.FilePath ((<.>))
import System.Posix.Files (fileSize, getFileStatus)

View File

@@ -5,8 +5,6 @@ module Handler.Types.Status where
import Startlude
import Data.Aeson
import Data.Char
import qualified Data.Text as T
import Yesod.Core.Content
import Lib.Types.Semver
@@ -31,9 +29,3 @@ instance ToContent (Maybe AppVersionRes) where
toContent = toContent . toJSON
instance ToTypedContent (Maybe AppVersionRes) where
toTypedContent = toTypedContent . toJSON
-- querySpec :: Text -> Maybe AppVersionSpecification
-- querySpec = readMaybe . toS . T.filter (not . isSpace)
-- querySpecD :: AppVersionSpecification -> Maybe Text -> AppVersionSpecification
-- querySpecD defaultSpec = fromMaybe defaultSpec . querySpec

View File

@@ -5,6 +5,7 @@ import Startlude
import Lib.Types.Semver
(<||) :: HasAppVersion a => a -> AppVersionSpecification -> Bool
(<||) a AppVersionAny = True
(<||) a (AppVersionSpecification SVEquals av1) = version a == av1
(<||) a (AppVersionSpecification SVLessThan av1) = version a < av1
(<||) a (AppVersionSpecification SVGreaterThan av1) = version a > av1