diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-14 01:06:28 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-14 01:06:28 +0100 |
commit | d84b462a711ce95593ff05a7581e722562c3835a (patch) | |
tree | 41e5af455fea925b2680b29718b24ba2876e803a /Handler/Common | |
download | bar-d84b462a711ce95593ff05a7581e722562c3835a.tar bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.gz bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.bz2 bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.xz bar-d84b462a711ce95593ff05a7581e722562c3835a.zip |
Implement old bar.hs
Diffstat (limited to 'Handler/Common')
-rw-r--r-- | Handler/Common/Types.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Handler/Common/Types.hs b/Handler/Common/Types.hs new file mode 100644 index 0000000..ca7cb8d --- /dev/null +++ b/Handler/Common/Types.hs | |||
@@ -0,0 +1,23 @@ | |||
1 | {-# LANGUAGE FunctionalDependencies #-} | ||
2 | |||
3 | module Handler.Common.Types where | ||
4 | |||
5 | import Import | ||
6 | |||
7 | import Control.Lens | ||
8 | |||
9 | data InventoryState = InventoryState | ||
10 | { stock :: [Entity Item] | ||
11 | , formState :: Maybe FormState | ||
12 | } | ||
13 | |||
14 | data FormState = InsertForm | ||
15 | { fsInsertForm :: Widget | ||
16 | , fsInsertEncoding :: Enctype | ||
17 | } | ||
18 | | UpdateForm | ||
19 | { fsUpdateItem :: ItemId | ||
20 | , fsUpdateForm :: Widget | ||
21 | , fsUpdateEncoding :: Enctype | ||
22 | } | ||
23 | makeLensesWith abbreviatedFields ''FormState | ||