diff --git a/src/Stack/PackageIndex.hs b/src/Stack/PackageIndex.hs index 383e29d30e..02bc8caad3 100644 --- a/src/Stack/PackageIndex.hs +++ b/src/Stack/PackageIndex.hs @@ -50,7 +50,6 @@ import qualified Data.Map.Strict as Map import Data.Monoid import Data.Text (Text) import qualified Data.Text as T -import qualified Data.Text.Encoding as T import Data.Traversable (forM) @@ -145,14 +144,13 @@ populateCache menv index = do where (y, z) = S.break (== Word8._slash) x - -- TODO: handling of unicode in this seems iffy, need to look into it more parseNameVersion t1 = do (p', t3) <- breakSlash $ S.map (\c -> if c == Word8._backslash then Word8._slash else c) $ S8.pack t1 - p <- parsePackageName $ T.decodeUtf8 p' + p <- parsePackageName p' (v', t5) <- breakSlash t3 - v <- parseVersion $ T.decodeUtf8 v' + v <- parseVersion v' let (t6, suffix) = S.break (== Word8._period) t5 if t6 == p' then return (PackageIdentifier p v, suffix)