miso 1.8.5.0 → 1.8.6.0
raw patch · 41 files changed
+107/−99 lines, 41 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- README.md +6/−1
- jsstring-src/Miso/String.hs +2/−2
- miso.cabal +9/−9
- src/Miso.hs +4/−4
- src/Miso/Concurrent.hs +2/−2
- src/Miso/Delegate.hs +2/−2
- src/Miso/Dev.hs +2/−2
- src/Miso/Diff.hs +2/−2
- src/Miso/Effect.hs +2/−2
- src/Miso/Effect/DOM.hs +2/−2
- src/Miso/Effect/Storage.hs +2/−2
- src/Miso/Event.hs +2/−2
- src/Miso/Event/Decoder.hs +2/−2
- src/Miso/Event/Types.hs +2/−2
- src/Miso/FFI.hs +2/−2
- src/Miso/FFI/History.hs +2/−2
- src/Miso/FFI/SSE.hs +2/−2
- src/Miso/FFI/Storage.hs +2/−2
- src/Miso/FFI/WebSocket.hs +2/−2
- src/Miso/Html.hs +2/−2
- src/Miso/Html/Element.hs +2/−2
- src/Miso/Html/Event.hs +2/−2
- src/Miso/Html/Property.hs +2/−2
- src/Miso/Mathml.hs +2/−2
- src/Miso/Mathml/Element.hs +2/−2
- src/Miso/Router.hs +2/−2
- src/Miso/Subscription.hs +2/−2
- src/Miso/Subscription/History.hs +2/−2
- src/Miso/Subscription/Keyboard.hs +2/−2
- src/Miso/Subscription/Mouse.hs +2/−2
- src/Miso/Subscription/SSE.hs +2/−2
- src/Miso/Subscription/WebSocket.hs +2/−2
- src/Miso/Subscription/Window.hs +2/−2
- src/Miso/Svg.hs +2/−2
- src/Miso/Svg/Attribute.hs +2/−2
- src/Miso/Svg/Element.hs +2/−2
- src/Miso/Svg/Event.hs +2/−2
- src/Miso/Types.hs +2/−2
- src/Miso/Util.hs +2/−2
- src/Miso/WebSocket.hs +2/−2
- text-src/Miso/String.hs +14/−11
README.md view
@@ -4,7 +4,7 @@ <a href="https://haskell-miso.org"> <img width=10% src="https://em-content.zobj.net/thumbs/240/apple/325/steaming-bowl_1f35c.png"> </a>-<p align="center">A <i>tasty</i> <a href="https://www.haskell.org/"><strong>Haskell</strong></a> front-end framework</p>+<p align="center">A <i>tasty</i> <a href="https://www.haskell.org/"><strong>Haskell</strong></a> front-end web framework</p> </p> <p align="center">@@ -38,6 +38,7 @@ - [Begin](#begin) - [Nix](#nix) - [Architecture](#architecture)+ - [Under the hood](#under-the-hood) - [Examples](#examples) - [TodoMVC](#todomvc) - [Flatris](#flatris)@@ -177,6 +178,10 @@ ### Architecture For constructing client and server applications, we recommend using one `cabal` file with two executable sections, where the `buildable` attribute set is contingent on the compiler. An example of this layout is [here](https://github.com/dmjio/miso/blob/master/examples/haskell-miso.org/haskell-miso.cabal#L16-L60). For more info on how to use `stack` with a `client`/`server` setup, see this [link](https://docs.haskellstack.org/en/stable/ghcjs/#project-with-both-client-and-server). For more information on how to use `nix` with a `client`/`server` setup, see the [nix scripts](https://github.com/dmjio/miso/blob/master/examples/haskell-miso.org/default.nix) for [https://haskell-miso.org](https://haskell-miso.org).++## Under the hood++For details of the internals and general overview of how `miso` works, see the [Internals](docs/Internals.md). ## Examples
jsstring-src/Miso/String.hs view
@@ -8,9 +8,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.String--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
miso.cabal view
@@ -1,17 +1,17 @@+cabal-version: 2.2 name: miso-version: 1.8.5.0+version: 1.8.6.0 category: Web, Miso, Data Structures-license: BSD3+license: BSD-3-Clause license-file: LICENSE-author: David M. Johnson <djohnson.m@gmail.com>-maintainer: David M. Johnson <djohnson.m@gmail.com>+author: David M. Johnson <code@dmj.io>+maintainer: David M. Johnson <code@dmj.io> homepage: http://github.com/dmjio/miso-copyright: Copyright (c) 2017-2020 David M. Johnson+copyright: Copyright (c) 2016-2025 David M. Johnson bug-reports: https://github.com/dmjio/miso/issues build-type: Simple extra-source-files: README.md-cabal-version: 1.22-synopsis: A tasty Haskell front-end framework+synopsis: A tasty Haskell front-end web framework description: Miso is a small, production-ready, "isomorphic" Haskell front-end framework featuring a virtual-dom, recursive diffing / patching algorithm, event delegation, event batching, SVG, Server-sent events, Websockets, type-safe servant-style routing and an extensible Subscription-based subsystem. Inspired by Elm, Redux and Bobril. Miso is pure by default, but side effects (like XHR) can be introduced into the system via the Effect data type. Miso makes heavy use of the GHCJS FFI and therefore has minimal dependencies. @@ -46,6 +46,8 @@ Always set MisoString = JSString executable tests+ default-language:+ Haskell2010 main-is: Main.hs if !(impl(ghcjs) || arch(javascript)) || !flag(tests)@@ -75,8 +77,6 @@ unordered-containers, transformers, vector- default-language:- Haskell2010 library default-language:
src/Miso.hs view
@@ -13,9 +13,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------@@ -180,11 +180,11 @@ :: Sink action -> (action -> model -> Effect action model) -> Acc model -> action -> Acc model-foldEffects sink update = \(Acc model as) action ->+foldEffects snk update = \(Acc model as) action -> case update action model of Effect newModel effs -> Acc newModel newAs where newAs = as >> do- forM_ effs $ \eff -> forkJSM (eff sink)+ forM_ effs $ \eff -> forkJSM (eff snk) data Acc model = Acc !model !(JSM ())
src/Miso/Concurrent.hs view
@@ -2,9 +2,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Concurrent--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Delegate.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Delegate--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Dev.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Dev--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Diff.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Diff--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Effect.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Effect--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable --
src/Miso/Effect/DOM.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Effect.DOM--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Effect/Storage.hs view
@@ -5,9 +5,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Effect.Storage--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable --
src/Miso/Event.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Event--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Event/Decoder.hs view
@@ -3,9 +3,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Event.Decoder--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Event/Types.hs view
@@ -4,9 +4,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Event.Types--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/FFI.hs view
@@ -5,9 +5,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.FFI--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/FFI/History.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.FFI.History--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/FFI/SSE.hs view
@@ -5,9 +5,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.FFI.SSE--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/FFI/Storage.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.FFI.Storage--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/FFI/WebSocket.hs view
@@ -5,9 +5,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.FFI.WebSocket--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Html.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Html--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable --
src/Miso/Html/Element.hs view
@@ -2,9 +2,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Html.Element--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Html/Event.hs view
@@ -11,9 +11,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Html.Event--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable --
src/Miso/Html/Property.hs view
@@ -3,9 +3,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Html.Property--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable --
src/Miso/Mathml.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Mathml--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable --
src/Miso/Mathml/Element.hs view
@@ -3,9 +3,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Mathml.Element--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Router.hs view
@@ -16,9 +16,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Router--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Subscription.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Subscription--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Subscription/History.hs view
@@ -6,9 +6,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Subscription.History--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Subscription/Keyboard.hs view
@@ -5,9 +5,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Subscription.Keyboard--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Subscription/Mouse.hs view
@@ -3,9 +3,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Subscription.Mouse--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Subscription/SSE.hs view
@@ -4,9 +4,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Subscription.SSE--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Subscription/WebSocket.hs view
@@ -8,9 +8,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Subscription.WebSocket--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Subscription/Window.hs view
@@ -3,9 +3,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Subscription.Window--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Svg.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Svg--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable --
src/Miso/Svg/Attribute.hs view
@@ -3,9 +3,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Svg.Attribute--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable --
src/Miso/Svg/Element.hs view
@@ -3,9 +3,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Svg.Element--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Svg/Event.hs view
@@ -6,9 +6,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Svg.Events--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Types.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Types--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/Util.hs view
@@ -1,9 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.Util--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
src/Miso/WebSocket.hs view
@@ -8,9 +8,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.WebSocket--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------
text-src/Miso/String.hs view
@@ -5,9 +5,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Miso.String--- Copyright : (C) 2016-2018 David M. Johnson+-- Copyright : (C) 2016-2025 David M. Johnson -- License : BSD3-style (see the file LICENSE)--- Maintainer : David M. Johnson <djohnson.m@gmail.com>+-- Maintainer : David M. Johnson <code@dmj.io> -- Stability : experimental -- Portability : non-portable ----------------------------------------------------------------------------@@ -16,23 +16,26 @@ , FromMisoString (..) , fromMisoString , MisoString- , module Data.Monoid- , module Data.Text+ , module S , ms ) where import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL-import Data.Monoid+import Data.Monoid as S import Data.JSString import Data.JSString.Text-import Data.Text+#if MIN_VERSION_text(2,1,2)+import Data.Text as S hiding (show)+#else+import Data.Text as S+#endif import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data.Text.Lazy as LT import qualified Data.Text.Lazy.Encoding as LT import Text.Read(readEither)-+import Prelude as P -- | String type swappable based on compiler type MisoString = Text@@ -70,13 +73,13 @@ instance ToMisoString BL.ByteString where toMisoString = toMisoString . LT.decodeUtf8 instance ToMisoString Float where- toMisoString = T.pack . show+ toMisoString = T.pack . P.show instance ToMisoString Double where- toMisoString = T.pack . show+ toMisoString = T.pack . P.show instance ToMisoString Int where- toMisoString = T.pack . show+ toMisoString = T.pack . P.show instance ToMisoString Word where- toMisoString = T.pack . show+ toMisoString = T.pack . P.show instance FromMisoString MisoString where fromMisoStringEither = Right