diff options
Diffstat (limited to 'src/Hakyll/Core/Resource.hs')
| -rw-r--r-- | src/Hakyll/Core/Resource.hs | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/Hakyll/Core/Resource.hs b/src/Hakyll/Core/Resource.hs deleted file mode 100644 index 0a43fc2..0000000 --- a/src/Hakyll/Core/Resource.hs +++ /dev/null @@ -1,51 +0,0 @@ --------------------------------------------------------------------------------- --- | Module exporting the simple 'Resource' type -module Hakyll.Core.Resource - ( -- * Constructing and deconstructing resources - Resource - , resource - , unResource - - -- * Conversions to and from identifiers - , fromIdentifier - , toIdentifier - - -- * TODO: Move me - , Metadata - ) where - - --------------------------------------------------------------------------------- -import Data.Map (Map) - - --------------------------------------------------------------------------------- -import Hakyll.Core.Identifier - - --------------------------------------------------------------------------------- --- | A resource -newtype Resource = Resource {unResource :: FilePath} - deriving (Eq, Show, Ord) - - --------------------------------------------------------------------------------- --- | Smart constructor to ensure we have @/@ as path separator -resource :: FilePath -> Resource -resource = fromIdentifier . parseIdentifier - - --------------------------------------------------------------------------------- --- | Find the resource for an identifier -fromIdentifier :: Identifier a -> Resource -fromIdentifier = Resource . toFilePath - - --------------------------------------------------------------------------------- --- | Convert a resource to an identifier -toIdentifier :: Resource -> Identifier a -toIdentifier = parseIdentifier . unResource - - --------------------------------------------------------------------------------- -type Metadata = Map String String |
