-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathExercise.hs
More file actions
68 lines (56 loc) · 988 Bytes
/
Exercise.hs
File metadata and controls
68 lines (56 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{-# LANGUAGE CPP #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE OverloadedStrings #-}
module Ex11.Exercise where
import Control.Monad.Fix (MonadFix)
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Map as Map
import Reflex
import Reflex.Dom.Core
#ifndef ghcjs_HOST_OS
import Util.Run
#endif
import Ex11.Common
import Ex11.Run
stockWidget ::
MonadWidget t m =>
Dynamic t Stock ->
Dynamic t Text ->
m (Event t Text)
stockWidget dStock dSelected =
pure never
grid ::
MonadWidget t m =>
m a ->
m a
grid =
error "TODO"
mkStock ::
( Reflex t
, MonadHold t m
, MonadFix m
) =>
Int ->
Product ->
Event t Text ->
m (Dynamic t Stock)
mkStock =
error "TODO"
ex11 ::
( MonadWidget t m
) =>
Inputs t ->
m (Event t Text)
ex11 (Inputs dCarrot dCelery dCucumber dSelected) = mdo
let
eVend =
never
pure eVend
#ifndef ghcjs_HOST_OS
go ::
IO ()
go =
run $
host grid stockWidget mkStock ex11
#endif