mirror of
https://github.com/sol/hpack.git
synced 2024-10-04 11:47:15 +03:00
Remove dead code
This commit is contained in:
parent
4776f22164
commit
3797a772b7
@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
@ -132,24 +131,13 @@ instance FromValue Dependency where
|
||||
name = o .: "name"
|
||||
|
||||
depPkgName :: D.Dependency -> String
|
||||
#if MIN_VERSION_Cabal(2,0,0)
|
||||
depPkgName = D.unPackageName . D.depPkgName
|
||||
#else
|
||||
depPkgName (D.Dependency (D.PackageName name) _) = name
|
||||
#endif
|
||||
|
||||
depVerRange :: D.Dependency -> D.VersionRange
|
||||
#if MIN_VERSION_Cabal(2,0,0)
|
||||
depVerRange = D.depVerRange
|
||||
#else
|
||||
depVerRange (D.Dependency _ versionRange) = versionRange
|
||||
#endif
|
||||
|
||||
parseDependency :: Monad m => String -> m (String, DependencyVersion)
|
||||
parseDependency = liftM fromCabal . parseCabalDependency
|
||||
where
|
||||
fromCabal :: D.Dependency -> (String, DependencyVersion)
|
||||
fromCabal d = (depPkgName d, dependencyVersionFromCabal $ depVerRange d)
|
||||
fromCabal d = (depPkgName d, dependencyVersionFromCabal $ D.depVerRange d)
|
||||
|
||||
dependencyVersionFromCabal :: D.VersionRange -> DependencyVersion
|
||||
dependencyVersionFromCabal versionRange
|
||||
|
Loading…
Reference in New Issue
Block a user