git.iko.soy/typeable/servant-reflex
on master help sign in
Fix warnings.
d31c06bLuigy Leon
exec/Example.hs+1−1
@@ -19,7 +19,7 @@ import Servant.API
19import API
19import API
20import Data.Proxy
20import Data.Proxy
21import Text.Read (readMaybe)
21import Text.Read (readMaybe)
22−import Reflex.Dom
22+import Reflex.Dom hiding (run)
23------------------------------------------------------------------------------
23------------------------------------------------------------------------------
24import Servant.Reflex
24import Servant.Reflex
25import Servant.Reflex.Multi
25import Servant.Reflex.Multi
testdriver/test/Servant/ReflexSpec.hs+6−7
@@ -1,12 +1,11 @@
1−{-# language OverloadedStrings #-}
1+{-# LANGUAGE OverloadedStrings #-}
2+{-# LANGUAGE ScopedTypeVariables #-}
2
3
3module Servant.ReflexSpec where
4module Servant.ReflexSpec where
4
5
5import Control.Concurrent (threadDelay)
6import Control.Concurrent (threadDelay)
6import Control.Monad.IO.Class (liftIO)
7import Control.Monad.IO.Class (liftIO)
7−import Data.Monoid ((<>))
8import qualified Data.Text as T
8import qualified Data.Text as T
9−import Data.Foldable
10import Test.WebDriver.Commands.Wait
9import Test.WebDriver.Commands.Wait
11import Test.Hspec.WebDriver
10import Test.Hspec.WebDriver
12
11
@@ -48,9 +47,9 @@ spec = do
48 it "can get an int or unit from the API" $ runWD $ do
47 it "can get an int or unit from the API" $ runWD $ do
49 let outEl = ByCSS "div.unit-int-response p"
48 let outEl = ByCSS "div.unit-int-response p"
50 clickingShouldCause (ByCSS "div.int-button > button") outEl 0.1
49 clickingShouldCause (ByCSS "div.int-button > button") outEl 0.1
51− (\i o -> o `hasInfixText` "Just \"100\"")
50+ (\_ o -> o `hasInfixText` "Just \"100\"")
52 clickingShouldCause (ByCSS "div.unit-button > button") outEl 0.1
51 clickingShouldCause (ByCSS "div.unit-button > button") outEl 0.1
53− (\i o -> o `hasInfixText` "Just \"[[]]\"")
52+ (\_ o -> o `hasInfixText` "Just \"[[]]\"")
54
53
55 let setupGreeting = do
54 let setupGreeting = do
56 iName <- findElem $ ByCSS ".name-input input"
55 iName <- findElem $ ByCSS ".name-input input"
@@ -61,14 +60,14 @@ spec = do
61 return (iName, iGreetings, bGusto, goBtn, greetingRes)
60 return (iName, iGreetings, bGusto, goBtn, greetingRes)
62
61
63 it "handle query params" $ runWD $ do
62 it "handle query params" $ runWD $ do
64− (iName, iGreetings, bGusto, goBtn, greetingRes) <- setupGreeting
63+ (iName, iGreetings, _bGusto, goBtn, greetingRes) <- setupGreeting
65 sendKeys "Haskell" iName
64 sendKeys "Haskell" iName
66 sendKeys "Hello Hi" iGreetings
65 sendKeys "Hello Hi" iGreetings
67 click goBtn
66 click goBtn
68 greetingRes `shouldHaveText` "Hello, and Hi, Haskell"
67 greetingRes `shouldHaveText` "Hello, and Hi, Haskell"
69
68
70 it "handles queryflag" $ runWD $ do
69 it "handles queryflag" $ runWD $ do
71− (iName, iGreetings, bGusto, goBtn, greetingRes) <- setupGreeting
70+ (_iName, _iGreetings, bGusto, goBtn, greetingRes) <- setupGreeting
72 click bGusto
71 click bGusto
73 click goBtn
72 click goBtn
74 greetingRes `shouldHaveText` "HELLO, AND HI, HASKELL"
73 greetingRes `shouldHaveText` "HELLO, AND HI, HASKELL"