Permalink
Browse files

Updating turbinado.cabal; catching some stragglers from the last checkin

  • Loading branch information...
1 parent 1e33cd0 commit e3c988fb6d21ca919ab09d05d1e7a874f42cc51a @alsonkemp committed Dec 27, 2008
Showing with 34 additions and 19 deletions.
  1. +10 −13 Turbinado/Environment/CodeStore.hs
  2. +2 −2 Turbinado/Server/Handlers/RequestHandler.hs
  3. +0 −2 Turbinado/View.hs
  4. +22 −2 turbinado.cabal
@@ -81,9 +81,9 @@ checkReloadCode ct cmap cstat cl = do
(False, _) -> do debugM $ " CodeStore : checkReloadCode : Code missing"
return $ insert cl CodeLoadMissing cmap
(True, False) -> do debugM $ " CodeStore : checkReloadCode : No reload neeeded"
- return cmap
+ return cmap
(True, True) -> do debugM $ " CodeStore : checkReloadCode : Need reload"
- loadCode ct cmap cl
+ loadCode ct cmap cl
-- The beast
@@ -123,7 +123,7 @@ makeCode ct cmap cl args fp = do
CTLayout -> _loadView ct cmap cl fp
CTView -> _loadView ct cmap cl fp
CTComponentView -> _loadView ct cmap cl fp
- CTController -> _loadController ct cmap cl fp
+ CTController -> _loadController ct cmap cl fp
CTComponentController -> _loadController ct cmap cl fp
_loadView :: (HasEnvironment m) => CodeType -> CodeMap -> CodeLocation -> FilePath -> m CodeMap
@@ -156,7 +156,7 @@ _loadController ct cmap cl fp = do
CTController -> return (insert cl (CodeLoadController f m t) cmap)
CTComponentController -> return (insert cl (CodeLoadComponentController f m t) cmap)
_ -> error $ "_loadController: passed an invalid CodeType (" ++ (show ct) ++ ")"
-
+
-------------------------------------------------------------------------------------------------
-- Utility functions
@@ -197,22 +197,19 @@ needReloadCode fp fd = do
return $ (True, mt > fd)
False-> return (False, True)
-snd' :: (a, b, c) -> b
-snd' (a,b,c) = b
-
getDir :: CodeType -> FilePath
getDir ct = case ct of
- CTLayout -> layoutDir
- CTController -> controllerDir
- CTView -> viewDir
+ CTLayout -> layoutDir
+ CTController -> controllerDir
+ CTView -> viewDir
CTComponentController -> componentControllerDir
CTComponentView -> componentViewDir
getStub :: CodeType -> FilePath
getStub ct = case ct of
- CTLayout -> layoutStub
- CTController -> controllerStub
- CTView -> viewStub
+ CTLayout -> layoutStub
+ CTController -> controllerStub
+ CTView -> viewStub
CTComponentController -> controllerStub
CTComponentView -> viewStub
@@ -53,7 +53,7 @@ requestHandler = do
sequence_ $ preFilters ++
customPreFilters ++
[ retrieveAndRunController
- , retrieveAndRunLayout
+ , retrieveAndRunLayout
]
debugM $ " requestHandler : running post filters"
sequence_ (customPostFilters ++ postFilters)
@@ -72,7 +72,7 @@ retrieveAndRunController =
retrieveAndRunLayout :: Controller ()
retrieveAndRunLayout =
- do e <- get
+ do e <- getEnvironment
case (isResponseComplete e) of
True -> return ()
False -> do l <- getLayout
View
@@ -1,6 +1,4 @@
module Turbinado.View (
- getEnvironment,
- setEnvironment,
evalView,
defaultContentType,
-- limited export from Turbinado.View.Monad
View
@@ -8,15 +8,35 @@ Author: Alson Kemp
Maintainer: Alson Kemp (alson@alsonkemp.com)
Homepage: http://www.turbinado.org
Build-Type: Simple
+Cabal-Version: >= 1.2
Executable trhaml
Main-is: Turbinado/View/HAML/trhaml.hs
- Build-Depends: base, parsec
+ Build-Depends: base < 4.0,
+ parsec
ghc-options: -O
Executable turbinado
Main-is: Turbinado/Server.hs
- Build-Depends: base, bytestring, containers, directory, filepath, harp, HDBC, HDBC-postgresql, hslogger, hsx, HTTP, mtl, network, old-locale, old-time, parsec, plugins, pretty, regex-compat, time
+ Build-Depends: base <4.0,
+ containers,
+ directory,
+ filepath,
+ harp == 0.4,
+ HDBC,
+ HDBC-postgresql,
+ hslogger,
+ hsx == 0.4.5,
+ HTTP < 4000,
+ mtl,
+ network,
+ old-locale,
+ old-time,
+ parsec,
+ plugins,
+ pretty,
+ regex-compat,
+ time
ghc-options: -F -pgmFtrhsx -O
Extensions: MultiParamTypeClasses,
FunctionalDependencies,

0 comments on commit e3c988f

Please sign in to comment.