Skip to content

Commit

Permalink
Remove dependency on utf8-string
Browse files Browse the repository at this point in the history
Conflicts:

	snap.cabal
	src/Snap/Snaplet/HeistNoClass.hs
	test/snap-testsuite.cabal
  • Loading branch information
mightybyte committed Oct 3, 2012
1 parent 23c9558 commit a60d33e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion snap.cabal
Expand Up @@ -167,7 +167,6 @@ Library
time >= 1.1 && < 1.5,
transformers >= 0.2 && < 0.4,
unordered-containers >= 0.1.4 && < 0.3,
utf8-string >= 0.3 && < 0.4,
vector >= 0.7.1 && < 0.11,
vector-algorithms >= 0.4 && < 0.6,
xmlhtml >= 0.1 && < 0.3
Expand Down
7 changes: 4 additions & 3 deletions src/Snap/Snaplet/HeistNoClass.hs
Expand Up @@ -48,12 +48,12 @@ import Control.Monad.Reader
import Control.Monad.State
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.UTF8 as U
import Data.Maybe
import Data.Monoid
import Data.Lens.Lazy
import Data.Text (Text)
import qualified Data.Text as T
import Data.Text.Encoding
import System.FilePath.Posix
import Text.Templating.Heist
import Text.Templating.Heist.Splices.Cache
Expand Down Expand Up @@ -296,7 +296,8 @@ addTemplatesAt urlPrefix templateDir = do
ts <- liftIO $ loadTemplates templateDir mempty
>>= either error return
rootUrl <- getSnapletRootURL
let fullPrefix = U.toString rootUrl </> U.toString urlPrefix
let fullPrefix = (T.unpack $ decodeUtf8 rootUrl) </>
(T.unpack $ decodeUtf8 urlPrefix)
printInfo $ T.pack $ unwords
[ "...adding"
, (show $ length $ templateNames ts)
Expand All @@ -306,7 +307,7 @@ addTemplatesAt urlPrefix templateDir = do
, fullPrefix ++ "/"
]
addPostInitHook $ return . changeTS
(`mappend` addTemplatePathPrefix (U.fromString fullPrefix) ts)
(`mappend` addTemplatePathPrefix (encodeUtf8 $ T.pack fullPrefix) ts)


------------------------------------------------------------------------------
Expand Down
3 changes: 0 additions & 3 deletions test/snap-testsuite.cabal
Expand Up @@ -34,7 +34,6 @@ Executable snap-testsuite
text >= 0.11 && < 0.12,
transformers >= 0.2,
unix >= 2.2.0.0 && < 2.7,
utf8-string >= 0.3 && < 0.4,
template-haskell

extensions:
Expand Down Expand Up @@ -90,7 +89,6 @@ Executable app
text >= 0.11 && < 0.12,
transformers >= 0.2,
unordered-containers >= 0.1.4,
utf8-string >= 0.3 && < 0.4,
template-haskell
--FIXME

Expand Down Expand Up @@ -138,7 +136,6 @@ Executable nesttest
snap-server >= 0.9 && < 0.10,
text >= 0.11 && < 0.12,
transformers >= 0.2,
utf8-string >= 0.3 && < 0.4,
template-haskell

extensions:
Expand Down

0 comments on commit a60d33e

Please sign in to comment.