git.iko.soy/typeable/file-embed
on master help sign in
Cleanup compiler warnings
commitc080388ebd9c1dc2e02388bb5f3465f8a2c5d98c authorgliptak <gliptak@users.sourceforge.net> dateSat 19 May 2012, 11:58 (14 years ago) parent7a1f673
1 file changed+6−4
Data/FileEmbed.hs+6−4
Data/FileEmbed.hs+6−4
@@ -14,8 +14,7 @@ module Data.FileEmbed
1414 ) where
1515
1616import Language.Haskell.TH.Syntax
17− ( runQ
18− , Exp (AppE, ListE, LitE, TupE)
17+ ( Exp (AppE, ListE, LitE, TupE)
1918#if MIN_VERSION_template_haskell(2,5,0)
2019 , Lit (StringL, StringPrimL, IntegerL)
2120#else
@@ -105,7 +104,10 @@ fileList' realTop top = do
105104liftPair2 :: Monad m => (a, m b) -> m (a, b)
106105liftPair2 (a, b) = b >>= \b' -> return (a, b')
107106
107+magic :: [Char]
108108magic = concat ["fe", "MS"]
109+
110+sizeLen :: Int
109111sizeLen = 20
110112
111113getInner :: B.ByteString -> B.ByteString
@@ -147,7 +149,7 @@ inject toInj orig =
147149 size = case reads $ B8.unpack sizeBS of
148150 (i, _):_ -> i
149151 [] -> error $ "Data.FileEmbed (inject): Your dummy space has been corrupted. Size is: " ++ show sizeBS
150− (dummy, after) = B.splitAt size rest'
152+ (_dummy, after) = B.splitAt size rest'
151153
152154injectFile :: B.ByteString
153155 -> FilePath -- ^ template file
@@ -157,4 +159,4 @@ injectFile inj srcFP dstFP = do
157159 src <- B.readFile srcFP
158160 case inject inj src of
159161 Nothing -> error "Insufficient dummy space"
160− Just dst -> B.writeFile dstFP dst
162+ Just dst -> B.writeFile dstFP dst