mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-31 04:03:40 +00:00
redundancies
This commit is contained in:
@@ -21,10 +21,8 @@ import System.Directory
|
|||||||
import Yesod.Core
|
import Yesod.Core
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import Handler.Types.Status
|
|
||||||
import Lib.Registry
|
import Lib.Registry
|
||||||
import Lib.Semver
|
import Lib.Semver
|
||||||
import Lib.Types.Semver
|
|
||||||
import System.FilePath ((<.>))
|
import System.FilePath ((<.>))
|
||||||
import System.Posix.Files (fileSize, getFileStatus)
|
import System.Posix.Files (fileSize, getFileStatus)
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ module Handler.Types.Status where
|
|||||||
import Startlude
|
import Startlude
|
||||||
|
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Char
|
|
||||||
import qualified Data.Text as T
|
|
||||||
import Yesod.Core.Content
|
import Yesod.Core.Content
|
||||||
|
|
||||||
import Lib.Types.Semver
|
import Lib.Types.Semver
|
||||||
@@ -31,9 +29,3 @@ instance ToContent (Maybe AppVersionRes) where
|
|||||||
toContent = toContent . toJSON
|
toContent = toContent . toJSON
|
||||||
instance ToTypedContent (Maybe AppVersionRes) where
|
instance ToTypedContent (Maybe AppVersionRes) where
|
||||||
toTypedContent = toTypedContent . toJSON
|
toTypedContent = toTypedContent . toJSON
|
||||||
|
|
||||||
-- querySpec :: Text -> Maybe AppVersionSpecification
|
|
||||||
-- querySpec = readMaybe . toS . T.filter (not . isSpace)
|
|
||||||
|
|
||||||
-- querySpecD :: AppVersionSpecification -> Maybe Text -> AppVersionSpecification
|
|
||||||
-- querySpecD defaultSpec = fromMaybe defaultSpec . querySpec
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import Startlude
|
|||||||
import Lib.Types.Semver
|
import Lib.Types.Semver
|
||||||
|
|
||||||
(<||) :: HasAppVersion a => a -> AppVersionSpecification -> Bool
|
(<||) :: HasAppVersion a => a -> AppVersionSpecification -> Bool
|
||||||
|
(<||) a AppVersionAny = True
|
||||||
(<||) a (AppVersionSpecification SVEquals av1) = version a == av1
|
(<||) a (AppVersionSpecification SVEquals av1) = version a == av1
|
||||||
(<||) a (AppVersionSpecification SVLessThan av1) = version a < av1
|
(<||) a (AppVersionSpecification SVLessThan av1) = version a < av1
|
||||||
(<||) a (AppVersionSpecification SVGreaterThan av1) = version a > av1
|
(<||) a (AppVersionSpecification SVGreaterThan av1) = version a > av1
|
||||||
|
|||||||
Reference in New Issue
Block a user