1{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving #-}
2{-# LANGUAGE TemplateHaskell #-}
3{-# LANGUAGE OverloadedStrings #-}
4module TestApp (testApp) where
7import Data.ByteString.Lazy.Char8 (pack)
8import Database.Persist.Sqlite
10import Control.Monad (when)
20 putStrLn "testApp called, this should happen only once per reload"
21 -- Swap between the following two lines as necessary to generate errors
22 exi <- doesFileExist db
24 when exi $ removeFile db
25 withSqlitePool db 10 $ \pool -> do
26 flip runSqlPool pool $ runMigration $ migrate $ Dummy ""
28 if pathInfo req == "/favicon.ico"
29 then return $ Response status301 [("Location", "http://docs.yesodweb.com/favicon.ico")]
30 $ ResponseLBS $ pack ""
33 x <- flip runSqlPool pool $ do
35 count ([] :: [Filter Dummy])
36 return $ Response status200
37 [("Content-Type", "text/html; charset=utf-8")]
40 $(hamletFileDebug "hamlet/testapp.hamlet")
41 putStrLn "handler completed, this should only happen at the beginning of a reload"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list