From 0cd7716dae87d50e79883152edf735132ae4798e Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sat, 25 Dec 2010 20:18:36 +0100 Subject: Add writable class --- src/Hakyll/Core/Writable.hs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/Hakyll/Core/Writable.hs (limited to 'src') diff --git a/src/Hakyll/Core/Writable.hs b/src/Hakyll/Core/Writable.hs new file mode 100644 index 0000000..d6c3683 --- /dev/null +++ b/src/Hakyll/Core/Writable.hs @@ -0,0 +1,15 @@ +-- | Describes writable items; items that can be saved to the disk +-- +{-# LANGUAGE FlexibleInstances #-} +module Hakyll.Core.Writable + ( Writable (..) + ) where + +-- | Describes an item that can be saved to the disk +-- +class Writable a where + -- | Save an item to the given filepath + write :: FilePath -> a -> IO () + +instance Writable [Char] where + write = writeFile -- cgit v1.2.3