@@ -20,6 +20,15 @@
2020-- @posts/foo.html@. In this case, the identifier is the name of the source
2121-- file of the page.
2222--
23+-- An `Identifier` carries the type of the value it identifies. This basically
24+-- means that an @Identifier (Page String)@ refers to a page.
25+--
26+-- It is a phantom type parameter, meaning you can safely change this if you
27+-- know what you are doing. You can change the type using the 'castIdentifier'
28+-- function.
29+--
30+-- If the @a@ type is not known, Hakyll traditionally uses @Identifier ()@.
31+--
2332{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-}
2433module Hakyll.Core.Identifier
2534 ( Identifier (..)
@@ -41,12 +50,6 @@ import Data.Typeable (Typeable)
4150
4251-- | An identifier used to uniquely identify a value
4352--
44−-- The @a@ is used to denote the type that the identifier points to. It is a
45−-- phantom type parameter, meaning you can safely change this if you know what
46−-- you are doing.
47−--
48−-- If the @a@ type is not known, Hakyll traditionally uses @Identifier ()@.
49−--
5053data Identifier a = Identifier
5154 { identifierGroup :: Maybe String
5255 , identifierPath :: String