on master help sign in
Add writable class
0cd7716Jasper Van der Jeugt
src/Hakyll/Core/Writable.hsnew file+15
@@ -0,0 +1,15 @@
1+-- | Describes writable items; items that can be saved to the disk
2+--
3+{-# LANGUAGE FlexibleInstances #-}
4+module Hakyll.Core.Writable
5+ ( Writable (..)
6+ ) where
7+
8+-- | Describes an item that can be saved to the disk
9+--
10+class Writable a where
11+ -- | Save an item to the given filepath
12+ write :: FilePath -> a -> IO ()
13+
14+instance Writable [Char] where
15+ write = writeFile