This commit is contained in:
Michael Snoyman 2012-02-01 13:07:52 +02:00
commit c691a0143b
12 changed files with 3 additions and 13 deletions

View File

@ -14,7 +14,7 @@ data Token = VarToken String | LitToken String | EmptyToken
codegenDir :: FilePath -> FilePath -> Q Exp
codegenDir dir fp = do
s' <- qRunIO $ L.readFile $ (dir ++ "/" ++ fp ++ ".cg")
let s = init $ LT.unpack $ LT.decodeUtf8 s'
let s = LT.unpack $ LT.decodeUtf8 s'
case parse (many parseToken) s s of
Left e -> error $ show e
Right tokens' -> do

View File

@ -36,7 +36,7 @@ data Backend = Sqlite | Postgresql | Mysql | MongoDB | Tiny
deriving (Eq, Read, Show, Enum, Bounded)
puts :: String -> IO ()
puts s = putStr s >> hFlush stdout
puts s = putStr (init s) >> hFlush stdout
backends :: [Backend]
backends = [minBound .. maxBound]
@ -201,4 +201,4 @@ scaffold = do
$(runIO (S.readFile "scaffold/config/robots.txt.cg") >>= \bs -> do
[|S.pack $(return $ LitE $ StringL $ S.unpack bs)|])
puts $(codegenDir "input" "done")
putStr $(codegenDir "input" "done")

View File

@ -1,2 +1 @@
:set -i.:config:dist/build/autogen

View File

@ -61,4 +61,3 @@ getApplicationDev =
loader = loadConfig (configSettings Development)
{ csParseExtra = parseExtra
}

View File

@ -23,4 +23,3 @@ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -12,4 +12,3 @@ import Database.Persist.Quasi
-- http://www.yesodweb.com/book/persistent/
share [mkPersist ~mkPersistSettings~, mkMigrate "migrateAll"]
$(persistFileWith lowerCaseSettings "config/models")

View File

@ -68,4 +68,3 @@ parseExtra :: DefaultEnv -> Object -> Parser Extra
parseExtra _ o = Extra
<$> o .: "copyright"
<*> o .:? "analytics"

View File

@ -19,4 +19,3 @@ staticSite =
-- Warning: any files added to your static directory during run-time can't be
-- accessed this way. You'll have to use their FilePath or URL to access them.
$(staticFiles Settings.staticDir)

View File

@ -3,4 +3,3 @@ $maybe msg <- mmsg
^{widget}
<footer>
#{extraCopyright $ appExtra $ settings master}

View File

@ -1,4 +1,3 @@
body {
font-family: sans-serif;
}

View File

@ -1,2 +1 @@
document.getElementById("#{h2id}").innerHTML = "<i>Added from JavaScript.</i>";

View File

@ -4,4 +4,3 @@ h1 {
h2##{h2id} {
color: #990
}