Skip to content

Commit

Permalink
Remove the Snap.Extension.Loader.Static module, model doesn't quite f…
Browse files Browse the repository at this point in the history
…it anymore. May reintroduce it again in the future.
  • Loading branch information
gregorycollins committed Dec 19, 2010
1 parent fa9b9ad commit 33616e4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 36 deletions.
1 change: 0 additions & 1 deletion snap.cabal
Expand Up @@ -47,7 +47,6 @@ Library
Snap.Extension.Heist,
Snap.Extension.Heist.Impl,
Snap.Extension.Loader.Hint,
Snap.Extension.Loader.Static,
Snap.Extension.Server.Hint,
Snap.Extension.Server,
Snap.Extension,
Expand Down
11 changes: 9 additions & 2 deletions src/Snap/Extension/Loader/Hint.hs
Expand Up @@ -31,7 +31,7 @@ import System.Environment (getArgs)

------------------------------------------------------------------------------
import Snap.Types
import qualified Snap.Extension.Loader.Static as Static
import Snap.Extension (runInitializerHint)
import Snap.Extension.Loader.Hint.Helper

------------------------------------------------------------------------------
Expand Down Expand Up @@ -65,7 +65,7 @@ loadSnapTH initializer action = do
modules = catMaybes [initMod, actMod]
opts = getHintOpts args

let static = Static.loadSnapTH initializer action
let static = typecheck initializer action

-- The let in this block causes the static expression to be
-- pattern-matched, providing an extra check that the types were
Expand All @@ -74,6 +74,13 @@ loadSnapTH initializer action = do
in hintSnap opts modules initBase actBase |]


-- Used to typecheck the initializer & action splices.
typecheck :: Name -> Name -> Q Exp
typecheck initializer action = do
let [initE, actE] = map varE [initializer, action]
[| return (runInitializerHint $initE $actE) |]


------------------------------------------------------------------------------
-- | Convert the command-line arguments passed in to options for the
-- hint interpreter. This is somewhat brittle code, based on a few
Expand Down
33 changes: 0 additions & 33 deletions src/Snap/Extension/Loader/Static.hs

This file was deleted.

0 comments on commit 33616e4

Please sign in to comment.