@@ -1,18 +1,13 @@
1-- | Describes writable items; items that can be saved to the disk
1-- | Describes writable items; items that can be saved to the disk
3−{-# LANGUAGE FlexibleInstances, GeneralizedNewtypeDeriving,
3+{-# LANGUAGE FlexibleInstances #-}
4− DeriveDataTypeable #-}
5module Hakyll.Core.Writable
4module Hakyll.Core.Writable
6 ( Writable (..)
5 ( Writable (..)
10−import System.Directory (copyFile)
11import Data.Word (Word8)
8import Data.Word (Word8)
13import qualified Data.ByteString as SB
10import qualified Data.ByteString as SB
14−import Data.Binary (Binary)
15−import Data.Typeable (Typeable)
17-- | Describes an item that can be saved to the disk
12-- | Describes an item that can be saved to the disk
@@ -25,11 +20,3 @@ instance Writable [Char] where
26instance Writable [Word8] where
21instance Writable [Word8] where
27 write p = SB.writeFile p . SB.pack
22 write p = SB.writeFile p . SB.pack
29−-- | Newtype construct around 'FilePath' which will copy the file directly
31−newtype CopyFile = CopyFile {unCopyFile :: FilePath}
32− deriving (Show, Eq, Ord, Binary, Typeable)
34−instance Writable CopyFile where
35− write dst (CopyFile src) = copyFile src dst