on master help sign in
Add writable class
commit0cd7716dae87d50e79883152edf735132ae4798e authorJasper Van der Jeugt <jaspervdj@gmail.com> dateSat 25 Dec 2010, 20:18 (16 years ago) parent6b6a78e
1 file changed+15
src/Hakyll/Core/Writable.hs+15
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