git.iko.soy/rowtype-yoga/purescript-lunapark
on main help sign in
...
commitcb5ea72967e2f1a80ed21ea1935075118c6ddfdc authorMaxim Zimaliev <zimaliev@gmail.com> dateWed 18 Apr 2018, 21:34 (8 years ago) parentea22a90
1 file changed+194−107
src/Lunapark/API.purs+194−107
src/Lunapark/API.purs+194−107
@@ -5,36 +5,30 @@ import Prelude
55import Control.Monad.Aff (Aff)
66import Control.Monad.Aff.Class (class MonadAff, liftAff)
77import Control.Monad.Eff.Ref as Ref
8−import Control.Monad.Error.Class (class MonadThrow, class MonadError, throwError)
9−import Control.Monad.Reader.Class (class MonadAsk, ask)
10−import Control.Monad.State.Class (class MonadState)
8+import Control.Monad.Error.Class (class MonadThrow)
119import Control.Monad.Rec.Class (class MonadRec)
12−import Control.Monad.Free (Free, foldFree)
13−import Data.Time.Duration (Milliseconds(..))
1410import Data.Argonaut as J
1511import Data.Bifunctor (lmap)
16−import Data.Either (Either(..), either)
12+import Data.Either (Either)
1713import Data.List (List(..), (:))
18−import Data.Maybe (Maybe(..))
1914import Data.Map as Map
20−import Data.Newtype (class Newtype, un, wrap)
21−import Data.Traversable as T
15+import Data.Maybe (Maybe(..))
2216import Data.Symbol (SProxy(..))
23−import Data.StrMap as SM
24−import Lunapark.Affjax as LA
17+import Data.Time.Duration (Milliseconds(..))
18+import Data.Traversable as T
19+import Lunapark.Endpoint as LP
2520import Lunapark.Error as LE
2621import Lunapark.Types as LT
27−import Lunapark.Endpoint as LP
22+import Network.HTTP.Affjax (AJAX)
2823import Node.Buffer as B
2924import Node.FS.Aff as FS
30−import Network.HTTP.Affjax (AJAX)
31−import Unsafe.Coerce (unsafeCoerce)
3225import Run as R
33−import Run.Except (EXCEPT, runExcept, throw)
26+import Run.Except (EXCEPT)
3427import Run.Except as RE
35−import Debug.Trace as DT
3628import Unsafe.Coerce (unsafeCoerce)
3729
30+import Debug.Trace as DT
31+
3832type LunaparkEffects e =
3933 ( ajax ∷ AJAX
4034 , ref ∷ Ref.REF
@@ -51,30 +45,28 @@ type LunaparkEffects e =
5145-- | findElement ...
5246-- | ```
5347init
54− ∷ ∀ e m a
48+ ∷ ∀ e m r a
5549 . MonadAff (LunaparkEffects e) m
5650 ⇒ MonadRec m
51+ ⇒ MonadThrow LE.Error m
5752 ⇒ String
5853 → LT.CapabilitiesRequest
59− → m (Lunapark e a → m (Either LE.Error a))
54+ → m (Either LE.Error (Lunapark e r a → BaseRun r e a))
6055init uri caps = do
61− sessObj ← liftAff $ LP.post uri (LP.Session : Nil) $ LT.encodeCapabilitiesRequest caps
62− case lmap LE.unknownError <<< LT.decodeCreateSessionResponse =<< sessObj of
63− Left e → pure \_ → pure $ Left e
64− Right a → pure \actions → liftAff $ interpret uri a actions
65−
66−interpret ∷ ∀ a e. String → LT.CreateSessionResponse → Lunapark e a → Aff (LunaparkEffects e) (Either LE.Error a)
67−interpret uri {session, capabilities} actions = do
68− id
69− --expandEffectRows
70− $ R.runBaseAff'
71− $ runExcept
72− $ runLunapark uri session capabilities
73− $ un Lunapark actions
74−-- where
75− -- This is definitely safe, because more effects is not less effects
76−-- expandEffectRows ∷ ∀ m r0 r1 r. Union r0 r1 r ⇒ m r0 ~> m r
77−-- expandEffectRows = unsafeCoerce
56+ res ← liftAff $ LP.post uri (LP.Session : Nil) $ LT.encodeCapabilitiesRequest caps
57+ pure do
58+ sessObj ← res
59+ sessionResponse ← lmap LE.unknownError $ LT.decodeCreateSessionResponse sessObj
60+ pure $ interpret uri sessionResponse
61+
62+interpret
63+ ∷ ∀ e r
64+ . String
65+ → LT.CreateSessionResponse
66+ → Lunapark e r
67+ ~> BaseRun r e
68+interpret uri {session, capabilities} =
69+ runLunapark uri session capabilities
7870
7971data LunaparkF a
8072 = Quit a
@@ -110,13 +102,31 @@ data LunaparkF a
110102 | GetAlertText (String → a)
111103 | SendAlertText String a
112104 | Screenshot String a
113− | ElementScreenshot LT.Element String a
105+ | GetActiveElement (LT.Element → a)
114106 | FindElement LT.Locator (LT.Element → a)
115107 | FindElements LT.Locator (Array LT.Element → a)
116− | FindElementInElement LT.Element LT.Locator (LT.Element → a)
117− | FindElementsInElement LT.Element LT.Locator (Array LT.Element → a)
108+ | OnElement LT.Element (ElementF a)
109+
110+data ElementF a
111+ = ChildElement LT.Locator (LT.Element → a)
112+ | ChildElements LT.Locator (Array LT.Element → a)
113+ | IsSelected (Boolean → a)
114+ | GetAttribute String (String → a)
115+ | GetProperty String (J.Json → a)
116+ | GetCss String (String → a)
117+ | GetText (String → a)
118+ | GetTagName (String → a)
119+ | GetRectangle (LT.Rectangle → a)
120+ | IsEnabled (Boolean → a)
121+ | ClickEl a
122+ | ClearEl a
123+ | SendKeys String a
124+ | ScreenshotEl String a
125+ | IsVisible (Boolean → a)
126+ | Submit a
118127
119128derive instance functorLunaparkF ∷ Functor LunaparkF
129+derive instance elementF ∷ Functor ElementF
120130
121131type BaseRun r e = R.Run
122132 ( except ∷ EXCEPT LE.Error
@@ -124,138 +134,168 @@ type BaseRun r e = R.Run
124134 , eff ∷ R.EFF (LunaparkEffects e)
125135 | r)
126136
127−type RunLunapark e = BaseRun (lunapark ∷ LUNAPARK) e
128−
129−newtype Lunapark e a = Lunapark (RunLunapark e a)
137+type Lunapark e r = BaseRun (lunapark ∷ LUNAPARK|r) e
130138
131139_lunapark = SProxy ∷ SProxy "lunapark"
132140type LUNAPARK = R.FProxy LunaparkF
133141
134−liftLunapark ∷ ∀ a e. LunaparkF a → Lunapark e a
135−liftLunapark = Lunapark <<< R.lift _lunapark
136−
137−derive instance newtypeLunapark ∷ Newtype (Lunapark e a) _
138−derive newtype instance functorLunapark ∷ Functor (Lunapark e)
139−derive newtype instance applyLunapark ∷ Apply (Lunapark e)
140−derive newtype instance applicativeLunapark ∷ Applicative (Lunapark e)
141−derive newtype instance bindLunapark ∷ Bind (Lunapark e)
142−derive newtype instance monadLunapark ∷ Monad (Lunapark e)
142+liftLunapark ∷ ∀ a r e. LunaparkF a → Lunapark e r a
143+liftLunapark = R.lift _lunapark
143144
144−quit ∷ ∀ e. Lunapark e Unit
145+quit ∷ ∀ e r. Lunapark e r Unit
145146quit = liftLunapark $ Quit unit
146147
147−status ∷ ∀ e. Lunapark e LT.ServerStatus
148+status ∷ ∀ e r. Lunapark e r LT.ServerStatus
148149status = liftLunapark $ Status id
149150
150−setTimeouts ∷ ∀ e. LT.Timeouts → Lunapark e Unit
151+setTimeouts ∷ ∀ e r. LT.Timeouts → Lunapark e r Unit
151152setTimeouts ts = liftLunapark $ SetTimeouts ts unit
152153
153−getTimeouts ∷ ∀ e. Lunapark e LT.Timeouts
154+getTimeouts ∷ ∀ e r. Lunapark e r LT.Timeouts
154155getTimeouts = liftLunapark $ GetTimeouts id
155156
156−go ∷ ∀ e. String → Lunapark e Unit
157+go ∷ ∀ e r. String → Lunapark e r Unit
157158go uri = liftLunapark $ GoTo uri unit
158159
159−getUrl ∷ ∀ e. Lunapark e String
160+getUrl ∷ ∀ e r. Lunapark e r String
160161getUrl = liftLunapark $ GetUrl id
161162
162−forward ∷ ∀ e. Lunapark e Unit
163+forward ∷ ∀ e r. Lunapark e r Unit
163164forward = liftLunapark $ Forward unit
164165
165−back ∷ ∀ e. Lunapark e Unit
166+back ∷ ∀ e r. Lunapark e r Unit
166167back = liftLunapark $ Back unit
167168
168−refresh ∷ ∀ e. Lunapark e Unit
169+refresh ∷ ∀ e r. Lunapark e r Unit
169170refresh = liftLunapark $ Refresh unit
170171
171−getTitle ∷ ∀ e. Lunapark e String
172+getTitle ∷ ∀ e r. Lunapark e r String
172173getTitle = liftLunapark $ GetTitle id
173174
174−getWindowHandle ∷ ∀ e. Lunapark e LT.WindowHandle
175+getWindowHandle ∷ ∀ e r. Lunapark e r LT.WindowHandle
175176getWindowHandle = liftLunapark $ GetWindowHandle id
176177
177−getWindowHandles ∷ ∀ e. Lunapark e (Array LT.WindowHandle)
178+getWindowHandles ∷ ∀ e r. Lunapark e r (Array LT.WindowHandle)
178179getWindowHandles = liftLunapark $ GetWindowHandles id
179180
180−closeWindow ∷ ∀ e. Lunapark e Unit
181+closeWindow ∷ ∀ e r. Lunapark e r Unit
181182closeWindow = liftLunapark $ CloseWindow unit
182183
183−switchToWindow ∷ ∀ e. LT.WindowHandle → Lunapark e Unit
184+switchToWindow ∷ ∀ e r. LT.WindowHandle → Lunapark e r Unit
184185switchToWindow w = liftLunapark $ SwitchToWindow w unit
185186
186−switchToFrame ∷ ∀ e. LT.FrameId → Lunapark e Unit
187+switchToFrame ∷ ∀ e r. LT.FrameId → Lunapark e r Unit
187188switchToFrame f = liftLunapark $ SwitchToFrame f unit
188189
189−switchToParentFrame ∷ ∀ e. Lunapark e Unit
190+switchToParentFrame ∷ ∀ e r. Lunapark e r Unit
190191switchToParentFrame = liftLunapark $ SwitchToParentFrame unit
191192
192−getWindowRectangle ∷ ∀ e. Lunapark e LT.Rectangle
193+getWindowRectangle ∷ ∀ e r. Lunapark e r LT.Rectangle
193194getWindowRectangle = liftLunapark $ GetWindowRectangle id
194195
195−setWindowRectangle ∷ ∀ e. LT.Rectangle → Lunapark e Unit
196+setWindowRectangle ∷ ∀ e r. LT.Rectangle → Lunapark e r Unit
196197setWindowRectangle r = liftLunapark $ SetWindowRectangle r unit
197198
198−maximizeWindow ∷ ∀ e. Lunapark e Unit
199+maximizeWindow ∷ ∀ e r. Lunapark e r Unit
199200maximizeWindow = liftLunapark $ MaximizeWindow unit
200201
201−minimizeWindow ∷ ∀ e. Lunapark e Unit
202+minimizeWindow ∷ ∀ e r. Lunapark e r Unit
202203minimizeWindow = liftLunapark $ MinimizeWindow unit
203204
204−fullscreenWindow ∷ ∀ e. Lunapark e Unit
205+fullscreenWindow ∷ ∀ e r. Lunapark e r Unit
205206fullscreenWindow = liftLunapark $ FullscreenWindow unit
206207
207−executeScript ∷ ∀ e. LT.Script → Lunapark e J.Json
208+executeScript ∷ ∀ e r. LT.Script → Lunapark e r J.Json
208209executeScript script = liftLunapark $ ExecuteScript script id
209210
210−executeScriptAsync ∷ ∀ e. LT.Script → Lunapark e J.Json
211+executeScriptAsync ∷ ∀ e r. LT.Script → Lunapark e r J.Json
211212executeScriptAsync script = liftLunapark $ ExecuteScriptAsync script id
212213
213−getAllCookies ∷ ∀ e. Lunapark e (Array LT.Cookie)
214+getAllCookies ∷ ∀ e r. Lunapark e r (Array LT.Cookie)
214215getAllCookies = liftLunapark $ GetAllCookies id
215216
216−getCookie ∷ ∀ e. String → Lunapark e LT.Cookie
217+getCookie ∷ ∀ e r. String → Lunapark e r LT.Cookie
217218getCookie name = liftLunapark $ GetCookie name id
218219
219−addCookie ∷ ∀ e. LT.Cookie → Lunapark e Unit
220+addCookie ∷ ∀ e r. LT.Cookie → Lunapark e r Unit
220221addCookie cookie = liftLunapark $ AddCookie cookie unit
221222
222−deleteCookie ∷ ∀ e. String → Lunapark e Unit
223+deleteCookie ∷ ∀ e r. String → Lunapark e r Unit
223224deleteCookie name = liftLunapark $ DeleteCookie name unit
224225
225−deleteAllCookies ∷ ∀ e. Lunapark e Unit
226+deleteAllCookies ∷ ∀ e r. Lunapark e r Unit
226227deleteAllCookies = liftLunapark $ DeleteAllCookies unit
227228
228−dismissAlert ∷ ∀ e. Lunapark e Unit
229+dismissAlert ∷ ∀ e r. Lunapark e r Unit
229230dismissAlert = liftLunapark $ DismissAlert unit
230231
231−acceptAlert ∷ ∀ e. Lunapark e Unit
232+acceptAlert ∷ ∀ e r. Lunapark e r Unit
232233acceptAlert = liftLunapark $ AcceptAlert unit
233234
234−getAlertText ∷ ∀ e. Lunapark e String
235+getAlertText ∷ ∀ e r. Lunapark e r String
235236getAlertText = liftLunapark $ GetAlertText id
236237
237−sendAlertText ∷ ∀ e. String → Lunapark e Unit
238+sendAlertText ∷ ∀ e r. String → Lunapark e r Unit
238239sendAlertText txt = liftLunapark $ SendAlertText txt unit
239240
240−screenshot ∷ ∀ e. String → Lunapark e Unit
241+screenshot ∷ ∀ e r. String → Lunapark e r Unit
241242screenshot fp = liftLunapark $ Screenshot fp unit
242243
243−elementScreenshot ∷ ∀ e. LT.Element → String → Lunapark e Unit
244−elementScreenshot el fp = liftLunapark $ ElementScreenshot el fp unit
244+elementScreenshot ∷ ∀ e r. LT.Element → String → Lunapark e r Unit
245+elementScreenshot el fp = liftLunapark $ OnElement el $ ScreenshotEl fp unit
245246
246−findElement ∷ ∀ e. LT.Locator → Lunapark e LT.Element
247+findElement ∷ ∀ e r. LT.Locator → Lunapark e r LT.Element
247248findElement l = liftLunapark $ FindElement l id
248249
249−findElements ∷ ∀ e. LT.Locator → Lunapark e (Array LT.Element)
250+findElements ∷ ∀ e r. LT.Locator → Lunapark e r (Array LT.Element)
250251findElements l = liftLunapark $ FindElements l id
251252
252−findElementInElement ∷ ∀ e. LT.Element → LT.Locator → Lunapark e LT.Element
253−findElementInElement el l = liftLunapark $ FindElementInElement el l id
253+childElement ∷ ∀ e r. LT.Element → LT.Locator → Lunapark e r LT.Element
254+childElement el l = liftLunapark $ OnElement el $ ChildElement l id
255+
256+childElements ∷ ∀ e r. LT.Element → LT.Locator → Lunapark e r (Array LT.Element)
257+childElements el l = liftLunapark $ OnElement el $ ChildElements l id
258+
259+isSelected ∷ ∀ e r. LT.Element → Lunapark e r Boolean
260+isSelected el = liftLunapark $ OnElement el $ IsSelected id
254261
255−findElementsInElement ∷ ∀ e. LT.Element → LT.Locator → Lunapark e (Array LT.Element)
256−findElementsInElement el l = liftLunapark $ FindElementsInElement el l id
262+getAttribute ∷ ∀ e r. LT.Element → String → Lunapark e r String
263+getAttribute el name = liftLunapark $ OnElement el $ GetAttribute name id
257264
258−runLunapark ∷ ∀ e. String → LT.SessionId → Array LT.Capability → RunLunapark e ~> BaseRun () e
265+getProperty ∷ ∀ e r. LT.Element → String → Lunapark e r J.Json
266+getProperty el name = liftLunapark $ OnElement el $ GetProperty name id
267+
268+getCss ∷ ∀ e r. LT.Element → String → Lunapark e r String
269+getCss el name = liftLunapark $ OnElement el $ GetCss name id
270+
271+getText ∷ ∀ e r. LT.Element → Lunapark e r String
272+getText el = liftLunapark $ OnElement el $ GetText id
273+
274+getTagName ∷ ∀ e r. LT.Element → Lunapark e r String
275+getTagName el = liftLunapark $ OnElement el $ GetTagName id
276+
277+getRectangle ∷ ∀ e r. LT.Element → Lunapark e r LT.Rectangle
278+getRectangle el = liftLunapark $ OnElement el $ GetRectangle id
279+
280+isEnabled ∷ ∀ e r. LT.Element → Lunapark e r Boolean
281+isEnabled el = liftLunapark $ OnElement el $ IsEnabled id
282+
283+clickElement ∷ ∀ e r. LT.Element → Lunapark e r Unit
284+clickElement el = liftLunapark $ OnElement el $ ClickEl unit
285+
286+clearElement ∷ ∀ e r. LT.Element → Lunapark e r Unit
287+clearElement el = liftLunapark $ OnElement el $ ClearEl unit
288+
289+sendKeysElement ∷ ∀ e r. LT.Element → String → Lunapark e r Unit
290+sendKeysElement el txt = liftLunapark $ OnElement el $ SendKeys txt unit
291+
292+isVisible ∷ ∀ e r. LT.Element → Lunapark e r Boolean
293+isVisible el = liftLunapark $ OnElement el $ IsVisible id
294+
295+submitElement ∷ ∀ e r. LT.Element → Lunapark e r Unit
296+submitElement el = liftLunapark $ OnElement el $ Submit unit
297+
298+runLunapark ∷ ∀ e r. String → LT.SessionId → Array LT.Capability → Lunapark e r ~> BaseRun r e
259299runLunapark uri session capabilities a = do
260300 timeoutsRef ←
261301 R.liftEff $ Ref.newRef
@@ -281,7 +321,7 @@ type HandleLunaparkInput =
281321 , capabilities ∷ Array LT.Capability
282322 }
283323
284−handleLunapark ∷ ∀ e. HandleLunaparkInput → LunaparkF ~> BaseRun () e
324+handleLunapark ∷ ∀ e r. HandleLunaparkInput → LunaparkF ~> BaseRun r e
285325handleLunapark inp = case _ of
286326 Quit next → do
287327 _ ← delete $ inSession : Nil
@@ -429,24 +469,71 @@ handleLunapark inp = case _ of
429469 buffer ← R.liftEff $ B.fromString screenshotPack.content screenshotPack.encoding
430470 R.liftAff $ FS.writeFile fp buffer
431471 pure next
432− ElementScreenshot el fp next → do
433− res ← get (inSession : LP.InElement el : LP.Screenshot : Nil)
434− screenshotPack ← throwLeft $ LT.decodeScreenshot res
435− buffer ← R.liftEff $ B.fromString screenshotPack.content screenshotPack.encoding
436− R.liftAff $ FS.writeFile fp buffer
437− pure next
438472 FindElement loc cont → do
439473 res ← post (inSession : LP.Element : Nil) (LT.encodeLocator loc)
440474 map cont $ throwLeft $ LT.decodeElement res
441475 FindElements loc cont → do
442476 res ← post (inSession : LP.Elements : Nil) (LT.encodeLocator loc)
443477 map cont $ throwLeft $ T.traverse LT.decodeElement =<< J.decodeJson res
444− FindElementInElement el loc cont → do
445− res ← post (inSession : LP.InElement el : LP.Element : Nil) (LT.encodeLocator loc)
478+ GetActiveElement cont → do
479+ res ← get (inSession : LP.Element : LP.Active : Nil)
446480 map cont $ throwLeft $ LT.decodeElement res
447− FindElementsInElement el loc cont → do
448− res ← post (inSession : LP.InElement el : LP.Elements : Nil) (LT.encodeLocator loc)
449− map cont $ throwLeft $ T.traverse LT.decodeElement =<< J.decodeJson res
481+ OnElement el elF →
482+ let inElement = LP.InElement el
483+ in case elF of
484+ ChildElement loc cont → do
485+ res ← post (inSession : inElement : LP.Element : Nil) (LT.encodeLocator loc)
486+ map cont $ throwLeft $ LT.decodeElement res
487+ ChildElements loc cont → do
488+ res ← post (inSession : inElement : LP.Elements : Nil) (LT.encodeLocator loc)
489+ map cont $ throwLeft $ T.traverse LT.decodeElement =<< J.decodeJson res
490+ ScreenshotEl fp next → do
491+ res ← get (inSession : inElement : LP.Screenshot : Nil)
492+ screenshotPack ← throwLeft $ LT.decodeScreenshot res
493+ buffer ← R.liftEff $ B.fromString screenshotPack.content screenshotPack.encoding
494+ R.liftAff $ FS.writeFile fp buffer
495+ pure next
496+ IsSelected cont → do
497+ res ← get (inSession : inElement : LP.Selected : Nil)
498+ map cont $ throwLeft $ J.decodeJson res
499+ GetAttribute attr cont → do
500+ res ← get (inSession : inElement : LP.Attribute attr : Nil)
501+ map cont $ throwLeft $ J.decodeJson res
502+ GetProperty prop cont → do
503+ map cont $ get (inSession : inElement : LP.Property prop : Nil)
504+-- either RE.throw (pure <<< cont) res
505+-- map cont $ RE.rethrow res
506+ GetCss css cont → do
507+ res ← get (inSession : inElement : LP.CssValue css : Nil)
508+ map cont $ throwLeft $ J.decodeJson res
509+ GetText cont → do
510+ res ← get (inSession : inElement : LP.Text : Nil)
511+ map cont $ throwLeft $ J.decodeJson res
512+ GetTagName cont → do
513+ res ← get (inSession : inElement : LP.Name : Nil)
514+ map cont $ throwLeft $ J.decodeJson res
515+ GetRectangle cont → do
516+ res ← get (inSession : inElement : LP.Rect : Nil)
517+ map cont $ throwLeft $ LT.decodeRectangle res
518+ IsEnabled cont → do
519+ res ← get (inSession : inElement : LP.Enabled : Nil)
520+ map cont $ throwLeft $ J.decodeJson res
521+ ClickEl next → do
522+ _ ← post_ (inSession : inElement : LP.Click : Nil)
523+ pure next
524+ ClearEl next → do
525+ _ ← post_ (inSession : inElement : LP.Clear : Nil)
526+ pure next
527+ SendKeys txt next → do
528+ _ ← post (inSession : inElement : LP.Value : Nil) (LT.encodeSendKeysRequest txt)
529+ pure next
530+ IsVisible cont → do
531+ res ← get (inSession : inElement : LP.Displayed : Nil)
532+ map cont $ throwLeft $ J.decodeJson res
533+ Submit next → do
534+ _ ← post_ (inSession : inElement : LP.Submit : Nil)
535+ pure next
536+
450537
451538 where
452539 delete a = liftAndRethrow $ LP.delete inp.uri a
@@ -454,7 +541,7 @@ handleLunapark inp = case _ of
454541 get a = liftAndRethrow $ LP.get inp.uri a
455542 post_ a = liftAndRethrow $ LP.post_ inp.uri a
456543
457− withFallback ∷ ∀ a. String → { w3c ∷ BaseRun () e a, jsonWire ∷ BaseRun () e a } → BaseRun () e a
544+ withFallback ∷ ∀ a. String → { w3c ∷ BaseRun r e a, jsonWire ∷ BaseRun r e a } → BaseRun r e a
458545 withFallback key { w3c: try, jsonWire: fallback } = do
459546 mp ← R.liftEff $ Ref.readRef inp.requestMapRef
460547 case DT.spy $ Map.lookup key mp of
@@ -475,12 +562,12 @@ handleLunapark inp = case _ of
475562 inSession ∷ LP.EndpointPart
476563 inSession = LP.InSession inp.session
477564
478− liftAndRethrow ∷ ∀ e ω. Aff (LunaparkEffects e) (Either LE.Error ω) → BaseRun () e ω
565+ liftAndRethrow ∷ ∀ e ω. Aff (LunaparkEffects e) (Either LE.Error ω) → BaseRun r e ω
479566 liftAndRethrow a = do
480567 res ← R.liftAff a
481568 RE.rethrow res
482569
483− throwLeft ∷ ∀ ω. Either String ω → BaseRun () e ω
570+ throwLeft ∷ ∀ ω. Either String ω → BaseRun r e ω
484571 throwLeft = RE.rethrow <<< lmap LE.unknownError
485572
486573-- Safe, since we actually want handler and result have same rows not, remove except