1-- | Describes writable items; items that can be saved to the disk
3{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
4module Hakyll.Core.Writable
8import Data.Word (Word8)
10import qualified Data.ByteString as SB
11import qualified Data.ByteString.Lazy as LB
12import Text.Blaze.Html (Html)
13import Text.Blaze.Html.Renderer.String (renderHtml)
15import Hakyll.Core.Identifier
17-- | Describes an item that can be saved to the disk
20 -- | Save an item to the given filepath
21 write :: FilePath -> a -> IO ()
23instance Writable () where
26instance Writable [Char] where
29instance Writable SB.ByteString where
30 write p = SB.writeFile p
32instance Writable LB.ByteString where
33 write p = LB.writeFile p
35instance Writable [Word8] where
36 write p = write p . SB.pack
38instance Writable Html where
39 write p html = write p $ renderHtml html
41instance Writable (Identifier a) where
42 write p = write p . show
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list