forked from snapframework/snap
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d75768
commit 424e356
Showing
16 changed files
with
260 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
{-# LANGUAGE TemplateHaskell #-} | ||
|
||
{- | ||
This module defines our application's state type and an alias for its handler | ||
monad. | ||
-} | ||
|
||
------------------------------------------------------------------------------ | ||
-- | This module defines our application's state type and an alias for its | ||
-- handler monad. | ||
-- | ||
module Application where | ||
|
||
------------------------------------------------------------------------------ | ||
import Data.Lens.Template | ||
import Data.Time.Clock | ||
|
||
import Snap.Snaplet | ||
import Snap.Snaplet.Heist | ||
|
||
------------------------------------------------------------------------------ | ||
data App = App | ||
{ _heist :: Snaplet (Heist App) | ||
, _startTime :: UTCTime | ||
} | ||
|
||
type AppHandler = Handler App App | ||
|
||
makeLens ''App | ||
|
||
instance HasHeist App where | ||
heistLens = subSnaplet heist | ||
|
||
|
||
------------------------------------------------------------------------------ | ||
type AppHandler = Handler App App | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.