diff --git a/Text/Shakespeare.hs b/Text/Shakespeare.hs
--- a/Text/Shakespeare.hs
+++ b/Text/Shakespeare.hs
@@ -16,7 +16,10 @@
     , shakespeareFileReload
     -- * low-level
     , shakespeareFromString
+    , shakespeareUsedIdentifiers
     , RenderUrl
+    , VarType
+    , Deref
 
 #ifdef TEST_EXPORT
     , preFilter
@@ -287,11 +290,16 @@
                 | EUrlParam (url, [(TS.Text, TS.Text)])
                 | EMixin (Shakespeare url)
 
+-- | Determine which identifiers are used by the given template, useful for
+-- creating systems like yesod devel.
+shakespeareUsedIdentifiers :: ShakespeareSettings -> String -> [(Deref, VarType)]
+shakespeareUsedIdentifiers settings = concatMap getVars . contentFromString settings
+
 shakespeareFileReload :: ShakespeareSettings -> FilePath -> Q Exp
 shakespeareFileReload rs fp = do
     str <- readFileQ fp
     s <- qRunIO $ preFilter rs str
-    let b = concatMap getVars $ contentFromString rs s
+    let b = shakespeareUsedIdentifiers rs s
     c <- mapM vtToExp b
     rt <- [|shakespeareRuntime|]
     wrap' <- [|\x -> $(return $ wrap rs) . x|]
diff --git a/Text/Shakespeare/Base.hs b/Text/Shakespeare/Base.hs
--- a/Text/Shakespeare/Base.hs
+++ b/Text/Shakespeare/Base.hs
@@ -37,7 +37,7 @@
 import Control.Monad (when)
 
 newtype Ident = Ident String
-    deriving (Show, Eq, Read, Data, Typeable)
+    deriving (Show, Eq, Read, Data, Typeable, Ord)
 
 type Scope = [(Ident, Exp)]
 
@@ -49,7 +49,7 @@
            | DerefBranch Deref Deref
            | DerefList [Deref]
            | DerefTuple [Deref]
-    deriving (Show, Eq, Read, Data, Typeable)
+    deriving (Show, Eq, Read, Data, Typeable, Ord)
 
 instance Lift Ident where
     lift (Ident s) = [|Ident|] `appE` lift s
diff --git a/shakespeare.cabal b/shakespeare.cabal
--- a/shakespeare.cabal
+++ b/shakespeare.cabal
@@ -1,5 +1,5 @@
 name:            shakespeare
-version:         1.0.1.4
+version:         1.0.2
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
@@ -41,18 +41,21 @@
   default: False
 
 test-suite test
-    hs-source-dirs: test
-    main-is: ../test.hs
+    hs-source-dirs: ., test
+    main-is: test.hs
     other-modules:  ShakespeareBaseTest
 
+    cpp-options: -DTEST_EXPORT
+
     type: exitcode-stdio-1.0
 
     ghc-options:   -Wall
-    build-depends: shakespeare
-                 , base             >= 4       && < 5
+    build-depends: base             >= 4       && < 5
                  , parsec           >= 2       && < 4
                  , hspec            >= 1.3
                  , text             >= 0.7     && < 0.12
+                 , process
+                 , template-haskell
 
 
 source-repository head
