Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix benchmarks.

Added missing PRAGMAS and updated code to latest Yesod class.
  • Loading branch information...
commit 9cddaab1880a0ec281aead94657d4451799375d9 1 parent ca0c216
Lorenzo Bolla lbolla authored
Showing with 5 additions and 8 deletions.
  1. +3 −4 bigtable/yesod.hs
  2. +2 −4 pong/yesod.hs
7 bigtable/yesod.hs
View
@@ -1,4 +1,4 @@
-{-# LANGUAGE OverloadedStrings, QuasiQuotes, TypeFamilies, CPP #-}
+{-# LANGUAGE OverloadedStrings, QuasiQuotes, TypeFamilies, CPP, TemplateHaskell, MultiParamTypeClasses #-}
import Yesod.Dispatch
import Yesod.Core
import Yesod.Content
@@ -18,9 +18,8 @@ mkYesod "Pong"
#endif
/bigtable.html PongR GET
|]
-instance Yesod Pong where
- approot _ = ""
- encryptKey _ = return Nothing
+instance Yesod Pong
+
getPongR = return $ RepHtml $ ContentBuilder table Nothing
main = toWaiAppPlain Pong >>= run 3000
6 pong/yesod.hs
View
@@ -6,13 +6,11 @@ import Data.ByteString (ByteString)
import Network.Wai.Handler.Warp (run)
data Pong = Pong
-mkYesod "Pong" [$parseRoutes|
+mkYesod "Pong" [parseRoutes|
/ PongR GET
|]
-instance Yesod Pong where
- approot _ = ""
- encryptKey _ = return Nothing
+instance Yesod Pong
getPongR = return $ RepPlain $ toContent ("PONG" :: ByteString)
Please sign in to comment.
Something went wrong with that request. Please try again.