From a5ec10a2f0047d63080737c25fef4f71faea0405 Mon Sep 17 00:00:00 2001 From: Joshua Simmons Date: Fri, 20 Nov 2015 01:08:23 -0700 Subject: [PATCH] Revert "do a minimal change to get this type error fixed" This reverts commit 6d212a0ad1b3051894edb680901587ec169b348e. --- src/Stack/PackageIndex.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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)