reflex-dom-core 0.8.0.0 → 0.8.1.0
raw patch · 4 files changed
+35/−5 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Reflex.Dom.Location: manageHistoryExposingExternalUpdates :: (MonadFix m, MonadJSM m, TriggerEvent t m, MonadHold t m, PerformEvent t m, MonadJSM (Performable m)) => Event t () -> Event t HistoryCommand -> m (Dynamic t HistoryItem, Event t HistoryItem)
+ Reflex.Dom.Location: popHistoryState :: (PerformEvent t m, MonadJSM (Performable m)) => Event t () -> m ()
- Reflex.Dom.Old: elConfig_attributes :: forall attrs_a3nag attrs_a3nbl. Lens (ElConfig attrs_a3nag) (ElConfig attrs_a3nbl) attrs_a3nag attrs_a3nbl
+ Reflex.Dom.Old: elConfig_attributes :: forall attrs_a3nkY attrs_a3nm3. Lens (ElConfig attrs_a3nkY) (ElConfig attrs_a3nm3) attrs_a3nkY attrs_a3nm3
- Reflex.Dom.Old: elConfig_namespace :: forall attrs_a3nag. Lens' (ElConfig attrs_a3nag) (Maybe Text)
+ Reflex.Dom.Old: elConfig_namespace :: forall attrs_a3nkY. Lens' (ElConfig attrs_a3nkY) (Maybe Text)
- Reflex.Dom.WebSocket: webSocketConfig_close :: forall t_a3bBv a_a3bBw. Lens' (WebSocketConfig t_a3bBv a_a3bBw) (Event t_a3bBv (Word, Text))
+ Reflex.Dom.WebSocket: webSocketConfig_close :: forall t_a3bMd a_a3bMe. Lens' (WebSocketConfig t_a3bMd a_a3bMe) (Event t_a3bMd (Word, Text))
- Reflex.Dom.WebSocket: webSocketConfig_protocols :: forall t_a3bBv a_a3bBw. Lens' (WebSocketConfig t_a3bBv a_a3bBw) [Text]
+ Reflex.Dom.WebSocket: webSocketConfig_protocols :: forall t_a3bMd a_a3bMe. Lens' (WebSocketConfig t_a3bMd a_a3bMe) [Text]
- Reflex.Dom.WebSocket: webSocketConfig_reconnect :: forall t_a3bBv a_a3bBw. Lens' (WebSocketConfig t_a3bBv a_a3bBw) Bool
+ Reflex.Dom.WebSocket: webSocketConfig_reconnect :: forall t_a3bMd a_a3bMe. Lens' (WebSocketConfig t_a3bMd a_a3bMe) Bool
- Reflex.Dom.WebSocket: webSocketConfig_send :: forall t_a3bBv a_a3bBw. Lens' (WebSocketConfig t_a3bBv a_a3bBw) (Event t_a3bBv [a_a3bBw])
+ Reflex.Dom.WebSocket: webSocketConfig_send :: forall t_a3bMd a_a3bMe. Lens' (WebSocketConfig t_a3bMd a_a3bMe) (Event t_a3bMd [a_a3bMe])
- Reflex.Dom.WebSocket: webSocket_close :: forall t_a3bBs a_a3bBt. Lens' (RawWebSocket t_a3bBs a_a3bBt) (Event t_a3bBs (Bool, Word, Text))
+ Reflex.Dom.WebSocket: webSocket_close :: forall t_a3bMa a_a3bMb. Lens' (RawWebSocket t_a3bMa a_a3bMb) (Event t_a3bMa (Bool, Word, Text))
- Reflex.Dom.WebSocket: webSocket_error :: forall t_a3bBs a_a3bBt. Lens' (RawWebSocket t_a3bBs a_a3bBt) (Event t_a3bBs ())
+ Reflex.Dom.WebSocket: webSocket_error :: forall t_a3bMa a_a3bMb. Lens' (RawWebSocket t_a3bMa a_a3bMb) (Event t_a3bMa ())
- Reflex.Dom.WebSocket: webSocket_open :: forall t_a3bBs a_a3bBt. Lens' (RawWebSocket t_a3bBs a_a3bBt) (Event t_a3bBs ())
+ Reflex.Dom.WebSocket: webSocket_open :: forall t_a3bMa a_a3bMb. Lens' (RawWebSocket t_a3bMa a_a3bMb) (Event t_a3bMa ())
- Reflex.Dom.WebSocket: webSocket_recv :: forall t_a3bBs a_a3bBt. Lens' (RawWebSocket t_a3bBs a_a3bBt) (Event t_a3bBs a_a3bBt)
+ Reflex.Dom.WebSocket: webSocket_recv :: forall t_a3bMa a_a3bMb. Lens' (RawWebSocket t_a3bMa a_a3bMb) (Event t_a3bMa a_a3bMb)
- Reflex.Dom.Widget.Input: checkboxConfig_attributes :: forall t_a3tnV. Lens' (CheckboxConfig t_a3tnV) (Dynamic t_a3tnV (Map Text Text))
+ Reflex.Dom.Widget.Input: checkboxConfig_attributes :: forall t_a3tyD. Lens' (CheckboxConfig t_a3tyD) (Dynamic t_a3tyD (Map Text Text))
- Reflex.Dom.Widget.Input: checkboxConfig_setValue :: forall t_a3tnV. Lens' (CheckboxConfig t_a3tnV) (Event t_a3tnV Bool)
+ Reflex.Dom.Widget.Input: checkboxConfig_setValue :: forall t_a3tyD. Lens' (CheckboxConfig t_a3tyD) (Event t_a3tyD Bool)
- Reflex.Dom.Widget.Input: checkbox_change :: forall t_a3tnU. Lens' (Checkbox t_a3tnU) (Event t_a3tnU Bool)
+ Reflex.Dom.Widget.Input: checkbox_change :: forall t_a3tyC. Lens' (Checkbox t_a3tyC) (Event t_a3tyC Bool)
- Reflex.Dom.Widget.Input: checkbox_value :: forall t_a3tnU. Lens' (Checkbox t_a3tnU) (Dynamic t_a3tnU Bool)
+ Reflex.Dom.Widget.Input: checkbox_value :: forall t_a3tyC. Lens' (Checkbox t_a3tyC) (Dynamic t_a3tyC Bool)
- Reflex.Dom.Widget.Input: dropdownConfig_attributes :: forall t_a3tnK k_a3tnL. Lens' (DropdownConfig t_a3tnK k_a3tnL) (Dynamic t_a3tnK (Map Text Text))
+ Reflex.Dom.Widget.Input: dropdownConfig_attributes :: forall t_a3tys k_a3tyt. Lens' (DropdownConfig t_a3tys k_a3tyt) (Dynamic t_a3tys (Map Text Text))
- Reflex.Dom.Widget.Input: dropdownConfig_setValue :: forall t_a3tnK k_a3tnL k_a3uR4. Lens (DropdownConfig t_a3tnK k_a3tnL) (DropdownConfig t_a3tnK k_a3uR4) (Event t_a3tnK k_a3tnL) (Event t_a3tnK k_a3uR4)
+ Reflex.Dom.Widget.Input: dropdownConfig_setValue :: forall t_a3tys k_a3tyt k_a3v1M. Lens (DropdownConfig t_a3tys k_a3tyt) (DropdownConfig t_a3tys k_a3v1M) (Event t_a3tys k_a3tyt) (Event t_a3tys k_a3v1M)
- Reflex.Dom.Widget.Input: dropdown_change :: forall t_a3tnM k_a3tnN. Lens' (Dropdown t_a3tnM k_a3tnN) (Event t_a3tnM k_a3tnN)
+ Reflex.Dom.Widget.Input: dropdown_change :: forall t_a3tyu k_a3tyv. Lens' (Dropdown t_a3tyu k_a3tyv) (Event t_a3tyu k_a3tyv)
- Reflex.Dom.Widget.Input: dropdown_value :: forall t_a3tnM k_a3tnN. Lens' (Dropdown t_a3tnM k_a3tnN) (Dynamic t_a3tnM k_a3tnN)
+ Reflex.Dom.Widget.Input: dropdown_value :: forall t_a3tyu k_a3tyv. Lens' (Dropdown t_a3tyu k_a3tyv) (Dynamic t_a3tyu k_a3tyv)
- Reflex.Dom.Widget.Input: fileInputConfig_attributes :: forall t_a3tnO t_a3uQL. Iso (FileInputConfig t_a3tnO) (FileInputConfig t_a3uQL) (Dynamic t_a3tnO (Map Text Text)) (Dynamic t_a3uQL (Map Text Text))
+ Reflex.Dom.Widget.Input: fileInputConfig_attributes :: forall t_a3tyw t_a3v1t. Iso (FileInputConfig t_a3tyw) (FileInputConfig t_a3v1t) (Dynamic t_a3tyw (Map Text Text)) (Dynamic t_a3v1t (Map Text Text))
- Reflex.Dom.Widget.Input: fileInput_element :: forall d_a3tnP t_a3tnQ d_a3uQR. Lens (FileInput d_a3tnP t_a3tnQ) (FileInput d_a3uQR t_a3tnQ) (RawInputElement d_a3tnP) (RawInputElement d_a3uQR)
+ Reflex.Dom.Widget.Input: fileInput_element :: forall d_a3tyx t_a3tyy d_a3v1z. Lens (FileInput d_a3tyx t_a3tyy) (FileInput d_a3v1z t_a3tyy) (RawInputElement d_a3tyx) (RawInputElement d_a3v1z)
- Reflex.Dom.Widget.Input: fileInput_value :: forall d_a3tnP t_a3tnQ t_a3uQS. Lens (FileInput d_a3tnP t_a3tnQ) (FileInput d_a3tnP t_a3uQS) (Dynamic t_a3tnQ [File]) (Dynamic t_a3uQS [File])
+ Reflex.Dom.Widget.Input: fileInput_value :: forall d_a3tyx t_a3tyy t_a3v1A. Lens (FileInput d_a3tyx t_a3tyy) (FileInput d_a3tyx t_a3v1A) (Dynamic t_a3tyy [File]) (Dynamic t_a3v1A [File])
- Reflex.Dom.Widget.Input: rangeInputConfig_attributes :: forall t_a3tnZ. Lens' (RangeInputConfig t_a3tnZ) (Dynamic t_a3tnZ (Map Text Text))
+ Reflex.Dom.Widget.Input: rangeInputConfig_attributes :: forall t_a3tyH. Lens' (RangeInputConfig t_a3tyH) (Dynamic t_a3tyH (Map Text Text))
- Reflex.Dom.Widget.Input: rangeInputConfig_initialValue :: forall t_a3tnZ. Lens' (RangeInputConfig t_a3tnZ) Float
+ Reflex.Dom.Widget.Input: rangeInputConfig_initialValue :: forall t_a3tyH. Lens' (RangeInputConfig t_a3tyH) Float
- Reflex.Dom.Widget.Input: rangeInputConfig_setValue :: forall t_a3tnZ. Lens' (RangeInputConfig t_a3tnZ) (Event t_a3tnZ Float)
+ Reflex.Dom.Widget.Input: rangeInputConfig_setValue :: forall t_a3tyH. Lens' (RangeInputConfig t_a3tyH) (Event t_a3tyH Float)
- Reflex.Dom.Widget.Input: rangeInput_element :: forall t_a3tnY. Lens' (RangeInput t_a3tnY) HTMLInputElement
+ Reflex.Dom.Widget.Input: rangeInput_element :: forall t_a3tyG. Lens' (RangeInput t_a3tyG) HTMLInputElement
- Reflex.Dom.Widget.Input: rangeInput_hasFocus :: forall t_a3tnY. Lens' (RangeInput t_a3tnY) (Dynamic t_a3tnY Bool)
+ Reflex.Dom.Widget.Input: rangeInput_hasFocus :: forall t_a3tyG. Lens' (RangeInput t_a3tyG) (Dynamic t_a3tyG Bool)
- Reflex.Dom.Widget.Input: rangeInput_input :: forall t_a3tnY. Lens' (RangeInput t_a3tnY) (Event t_a3tnY Float)
+ Reflex.Dom.Widget.Input: rangeInput_input :: forall t_a3tyG. Lens' (RangeInput t_a3tyG) (Event t_a3tyG Float)
- Reflex.Dom.Widget.Input: rangeInput_mouseup :: forall t_a3tnY. Lens' (RangeInput t_a3tnY) (Event t_a3tnY (Int, Int))
+ Reflex.Dom.Widget.Input: rangeInput_mouseup :: forall t_a3tyG. Lens' (RangeInput t_a3tyG) (Event t_a3tyG (Int, Int))
- Reflex.Dom.Widget.Input: rangeInput_value :: forall t_a3tnY. Lens' (RangeInput t_a3tnY) (Dynamic t_a3tnY Float)
+ Reflex.Dom.Widget.Input: rangeInput_value :: forall t_a3tyG. Lens' (RangeInput t_a3tyG) (Dynamic t_a3tyG Float)
- Reflex.Dom.Widget.Input: textAreaConfig_attributes :: forall t_a3tnX. Lens' (TextAreaConfig t_a3tnX) (Dynamic t_a3tnX (Map Text Text))
+ Reflex.Dom.Widget.Input: textAreaConfig_attributes :: forall t_a3tyF. Lens' (TextAreaConfig t_a3tyF) (Dynamic t_a3tyF (Map Text Text))
- Reflex.Dom.Widget.Input: textAreaConfig_initialValue :: forall t_a3tnX. Lens' (TextAreaConfig t_a3tnX) Text
+ Reflex.Dom.Widget.Input: textAreaConfig_initialValue :: forall t_a3tyF. Lens' (TextAreaConfig t_a3tyF) Text
- Reflex.Dom.Widget.Input: textAreaConfig_setValue :: forall t_a3tnX. Lens' (TextAreaConfig t_a3tnX) (Event t_a3tnX Text)
+ Reflex.Dom.Widget.Input: textAreaConfig_setValue :: forall t_a3tyF. Lens' (TextAreaConfig t_a3tyF) (Event t_a3tyF Text)
- Reflex.Dom.Widget.Input: textArea_element :: forall t_a3tnW. Lens' (TextArea t_a3tnW) HTMLTextAreaElement
+ Reflex.Dom.Widget.Input: textArea_element :: forall t_a3tyE. Lens' (TextArea t_a3tyE) HTMLTextAreaElement
- Reflex.Dom.Widget.Input: textArea_hasFocus :: forall t_a3tnW. Lens' (TextArea t_a3tnW) (Dynamic t_a3tnW Bool)
+ Reflex.Dom.Widget.Input: textArea_hasFocus :: forall t_a3tyE. Lens' (TextArea t_a3tyE) (Dynamic t_a3tyE Bool)
- Reflex.Dom.Widget.Input: textArea_input :: forall t_a3tnW. Lens' (TextArea t_a3tnW) (Event t_a3tnW Text)
+ Reflex.Dom.Widget.Input: textArea_input :: forall t_a3tyE. Lens' (TextArea t_a3tyE) (Event t_a3tyE Text)
- Reflex.Dom.Widget.Input: textArea_keypress :: forall t_a3tnW. Lens' (TextArea t_a3tnW) (Event t_a3tnW Word)
+ Reflex.Dom.Widget.Input: textArea_keypress :: forall t_a3tyE. Lens' (TextArea t_a3tyE) (Event t_a3tyE Word)
- Reflex.Dom.Widget.Input: textArea_value :: forall t_a3tnW. Lens' (TextArea t_a3tnW) (Dynamic t_a3tnW Text)
+ Reflex.Dom.Widget.Input: textArea_value :: forall t_a3tyE. Lens' (TextArea t_a3tyE) (Dynamic t_a3tyE Text)
- Reflex.Dom.Widget.Input: textInputConfig_attributes :: forall t_a3to0. Lens' (TextInputConfig t_a3to0) (Dynamic t_a3to0 (Map Text Text))
+ Reflex.Dom.Widget.Input: textInputConfig_attributes :: forall t_a3tyI. Lens' (TextInputConfig t_a3tyI) (Dynamic t_a3tyI (Map Text Text))
- Reflex.Dom.Widget.Input: textInputConfig_initialValue :: forall t_a3to0. Lens' (TextInputConfig t_a3to0) Text
+ Reflex.Dom.Widget.Input: textInputConfig_initialValue :: forall t_a3tyI. Lens' (TextInputConfig t_a3tyI) Text
- Reflex.Dom.Widget.Input: textInputConfig_inputType :: forall t_a3to0. Lens' (TextInputConfig t_a3to0) Text
+ Reflex.Dom.Widget.Input: textInputConfig_inputType :: forall t_a3tyI. Lens' (TextInputConfig t_a3tyI) Text
- Reflex.Dom.Widget.Input: textInputConfig_setValue :: forall t_a3to0. Lens' (TextInputConfig t_a3to0) (Event t_a3to0 Text)
+ Reflex.Dom.Widget.Input: textInputConfig_setValue :: forall t_a3tyI. Lens' (TextInputConfig t_a3tyI) (Event t_a3tyI Text)
- Reflex.Dom.Widget.Input: textInput_builderElement :: forall t_a3to1. Lens' (TextInput t_a3to1) (InputElement EventResult GhcjsDomSpace t_a3to1)
+ Reflex.Dom.Widget.Input: textInput_builderElement :: forall t_a3tyJ. Lens' (TextInput t_a3tyJ) (InputElement EventResult GhcjsDomSpace t_a3tyJ)
- Reflex.Dom.Widget.Input: textInput_hasFocus :: forall t_a3to1. Lens' (TextInput t_a3to1) (Dynamic t_a3to1 Bool)
+ Reflex.Dom.Widget.Input: textInput_hasFocus :: forall t_a3tyJ. Lens' (TextInput t_a3tyJ) (Dynamic t_a3tyJ Bool)
- Reflex.Dom.Widget.Input: textInput_input :: forall t_a3to1. Lens' (TextInput t_a3to1) (Event t_a3to1 Text)
+ Reflex.Dom.Widget.Input: textInput_input :: forall t_a3tyJ. Lens' (TextInput t_a3tyJ) (Event t_a3tyJ Text)
- Reflex.Dom.Widget.Input: textInput_keydown :: forall t_a3to1. Lens' (TextInput t_a3to1) (Event t_a3to1 Word)
+ Reflex.Dom.Widget.Input: textInput_keydown :: forall t_a3tyJ. Lens' (TextInput t_a3tyJ) (Event t_a3tyJ Word)
- Reflex.Dom.Widget.Input: textInput_keypress :: forall t_a3to1. Lens' (TextInput t_a3to1) (Event t_a3to1 Word)
+ Reflex.Dom.Widget.Input: textInput_keypress :: forall t_a3tyJ. Lens' (TextInput t_a3tyJ) (Event t_a3tyJ Word)
- Reflex.Dom.Widget.Input: textInput_keyup :: forall t_a3to1. Lens' (TextInput t_a3to1) (Event t_a3to1 Word)
+ Reflex.Dom.Widget.Input: textInput_keyup :: forall t_a3tyJ. Lens' (TextInput t_a3tyJ) (Event t_a3tyJ Word)
- Reflex.Dom.Widget.Input: textInput_value :: forall t_a3to1. Lens' (TextInput t_a3to1) (Dynamic t_a3to1 Text)
+ Reflex.Dom.Widget.Input: textInput_value :: forall t_a3tyJ. Lens' (TextInput t_a3tyJ) (Dynamic t_a3tyJ Text)
- Reflex.Dom.Xhr: xhrRequestConfig_headers :: forall a_a3Q7B. Lens' (XhrRequestConfig a_a3Q7B) (Map Text Text)
+ Reflex.Dom.Xhr: xhrRequestConfig_headers :: forall a_a3Qij. Lens' (XhrRequestConfig a_a3Qij) (Map Text Text)
- Reflex.Dom.Xhr: xhrRequestConfig_password :: forall a_a3Q7B. Lens' (XhrRequestConfig a_a3Q7B) (Maybe Text)
+ Reflex.Dom.Xhr: xhrRequestConfig_password :: forall a_a3Qij. Lens' (XhrRequestConfig a_a3Qij) (Maybe Text)
- Reflex.Dom.Xhr: xhrRequestConfig_responseHeaders :: forall a_a3Q7B. Lens' (XhrRequestConfig a_a3Q7B) XhrResponseHeaders
+ Reflex.Dom.Xhr: xhrRequestConfig_responseHeaders :: forall a_a3Qij. Lens' (XhrRequestConfig a_a3Qij) XhrResponseHeaders
- Reflex.Dom.Xhr: xhrRequestConfig_responseType :: forall a_a3Q7B. Lens' (XhrRequestConfig a_a3Q7B) (Maybe XhrResponseType)
+ Reflex.Dom.Xhr: xhrRequestConfig_responseType :: forall a_a3Qij. Lens' (XhrRequestConfig a_a3Qij) (Maybe XhrResponseType)
- Reflex.Dom.Xhr: xhrRequestConfig_sendData :: forall a_a3Q7B a_a3Ruy. Lens (XhrRequestConfig a_a3Q7B) (XhrRequestConfig a_a3Ruy) a_a3Q7B a_a3Ruy
+ Reflex.Dom.Xhr: xhrRequestConfig_sendData :: forall a_a3Qij a_a3RFg. Lens (XhrRequestConfig a_a3Qij) (XhrRequestConfig a_a3RFg) a_a3Qij a_a3RFg
- Reflex.Dom.Xhr: xhrRequestConfig_user :: forall a_a3Q7B. Lens' (XhrRequestConfig a_a3Q7B) (Maybe Text)
+ Reflex.Dom.Xhr: xhrRequestConfig_user :: forall a_a3Qij. Lens' (XhrRequestConfig a_a3Qij) (Maybe Text)
- Reflex.Dom.Xhr: xhrRequestConfig_withCredentials :: forall a_a3Q7B. Lens' (XhrRequestConfig a_a3Q7B) Bool
+ Reflex.Dom.Xhr: xhrRequestConfig_withCredentials :: forall a_a3Qij. Lens' (XhrRequestConfig a_a3Qij) Bool
- Reflex.Dom.Xhr: xhrRequest_config :: forall a_a3Q7C a_a3Ruh. Lens (XhrRequest a_a3Q7C) (XhrRequest a_a3Ruh) (XhrRequestConfig a_a3Q7C) (XhrRequestConfig a_a3Ruh)
+ Reflex.Dom.Xhr: xhrRequest_config :: forall a_a3Qik a_a3REZ. Lens (XhrRequest a_a3Qik) (XhrRequest a_a3REZ) (XhrRequestConfig a_a3Qik) (XhrRequestConfig a_a3REZ)
- Reflex.Dom.Xhr: xhrRequest_method :: forall a_a3Q7C. Lens' (XhrRequest a_a3Q7C) Text
+ Reflex.Dom.Xhr: xhrRequest_method :: forall a_a3Qik. Lens' (XhrRequest a_a3Qik) Text
- Reflex.Dom.Xhr: xhrRequest_url :: forall a_a3Q7C. Lens' (XhrRequest a_a3Q7C) Text
+ Reflex.Dom.Xhr: xhrRequest_url :: forall a_a3Qik. Lens' (XhrRequest a_a3Qik) Text
Files
- ChangeLog.md +8/−0
- reflex-dom-core.cabal +2/−2
- src/Reflex/Dom/Builder/Class/Events.hs +2/−1
- src/Reflex/Dom/Location.hs +23/−2
ChangeLog.md view
@@ -1,5 +1,13 @@ # Revision history for reflex-dom-core +## 0.8.1.0++* Add functions for managing history (popHistoryState and manageHistoryExposingExternalUpdates)++## 0.8.0.0-r1++* Loosen lens version bounds+ ## 0.8.0.0 * Support reflex 0.9
reflex-dom-core.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.24 Name: reflex-dom-core-Version: 0.8.0.0+Version: 0.8.1.0 Synopsis: Functional Reactive Web Apps with Reflex Description: Web applications without callbacks or side-effects.@@ -88,7 +88,7 @@ jsaddle >= 0.9.0.0 && < 0.10, -- keycode-0.2 has a bug on firefox keycode >= 0.2.1 && < 0.3,- lens >= 4.7 && < 5.1,+ lens >= 4.7 && < 5.3, monad-control >= 1.0.1 && < 1.1, mtl >= 2.1 && < 2.3, primitive >= 0.5 && < 0.8,
src/Reflex/Dom/Builder/Class/Events.hs view
@@ -11,8 +11,9 @@ #ifdef USE_TEMPLATE_HASKELL import Data.GADT.Compare.TH #else+import Data.Type.Equality ((:~:)(..)) import Data.GADT.Compare- (GOrdering(..), (:~:)(..), GEq(..), GCompare(..))+ (GOrdering(..), GEq(..), GCompare(..)) #endif import Data.Text (Text)
src/Reflex/Dom/Location.hs view
@@ -13,10 +13,12 @@ , getLocationUrl , manageHistory , manageHistory'+ , manageHistoryExposingExternalUpdates , HistoryCommand (..) , HistoryStateUpdate (..) , HistoryItem (..) , getLocationUri+ , popHistoryState ) where import Reflex@@ -170,7 +172,15 @@ -- ^ Don't do anything until this event has fired -> Event t HistoryCommand -> m (Dynamic t HistoryItem)-manageHistory' switchover runCmd = do+manageHistory' switchover runCmd = fst <$> manageHistoryExposingExternalUpdates switchover runCmd++manageHistoryExposingExternalUpdates+ :: (MonadFix m, MonadJSM m, TriggerEvent t m, MonadHold t m, PerformEvent t m, MonadJSM (Performable m))+ => Event t ()+ -- ^ Don't do anything until this event has fired+ -> Event t HistoryCommand+ -> m (Dynamic t HistoryItem, Event t HistoryItem)+manageHistoryExposingExternalUpdates switchover runCmd = do window <- DOM.currentWindowUnchecked location <- Window.getLocation window history <- Window.getHistory window@@ -196,5 +206,16 @@ itemSetInternal <- performEvent $ ffor itemSetInternal' $ \cmd -> liftJSM $ do runHistoryCommand history cmd getCurrentHistoryItem- holdDyn item0 $ leftmost [itemSetInternal, itemSetExternal]+ currentHistoryItem <- holdDyn item0 $ leftmost [itemSetInternal, itemSetExternal]+ pure (currentHistoryItem, itemSetExternal) --TODO: Handle title setting better++popHistoryState+ :: (PerformEvent t m, MonadJSM (Performable m))+ => Event t ()+ -> m ()+popHistoryState evt =+ performEvent_ $ ffor evt $ \_ -> do+ window <- DOM.currentWindowUnchecked+ history <- Window.getHistory window+ History.back history