File tree Expand file tree Collapse file tree 6 files changed +9
-16
lines changed
miso-widgets/src/Functora/Miso
pub/functora/src/prelude/Functora Expand file tree Collapse file tree 6 files changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import qualified Functora.Miso.Widgets.Field as Field
13
13
import qualified Functora.Miso.Widgets.Grid as Grid
14
14
import qualified Material.Button as Button
15
15
import qualified Material.Dialog as Dialog
16
- import qualified Miso.String as MS
17
16
18
17
fav :: Model -> [View Action ]
19
18
fav st =
@@ -114,8 +113,8 @@ fav st =
114
113
115
114
makeFavName :: Model -> Unicode
116
115
makeFavName =
117
- MS. toUpper
118
- . MS. strip
116
+ toUpper
117
+ . strip
119
118
. (^. # modelFavName . # fieldInput . # uniqueValue)
120
119
121
120
favItems :: Model -> [View Action ]
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import Network.Wai.Application.Static
9
9
import qualified Network.Wai.Handler.Warp as Warp
10
10
import qualified Network.WebSockets as Ws
11
11
import qualified Data.ByteString.Lazy as BL
12
- import qualified Miso.String as MS
13
12
#endif
14
13
15
14
#ifdef wasi_HOST_OS
@@ -84,7 +83,7 @@ runApp app = do
84
83
staticApp (defaultWebAppSettings " static" ) req
85
84
(" site.webmanifest" : _) ->
86
85
staticApp (defaultWebAppSettings " static" ) req
87
- (file : _) | (MS. isSuffixOf " .js" file) && (file /= " jsaddle.js" ) ->
86
+ (file : _) | (isSuffixOf " .js" file) && (file /= " jsaddle.js" ) ->
88
87
staticApp (defaultWebAppSettings " static" ) req
89
88
_ ->
90
89
JS. jsaddleAppWithJs (JS. jsaddleJs False <> js) req
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ fun = \case
31
31
spec :: Spec
32
32
spec = do
33
33
prop " Identity/JSON" $ \ txt -> do
34
- let wrap :: Identity MisoString = Identity txt
34
+ let wrap :: Identity Unicode = Identity txt
35
35
let txtJson = A. encode txt
36
36
let wrapJson = A. encode wrap
37
37
wrap ^. # runIdentity `shouldBe` txt
Original file line number Diff line number Diff line change 17
17
import qualified Data.ByteString.Lazy as BL
18
18
import Functora.Miso.Prelude
19
19
import qualified Language.Javascript.JSaddle as JS
20
- import qualified Miso.String as MS
21
20
import qualified Text.URI as URI
22
21
import qualified Prelude
23
22
import qualified Prelude ((!!) )
@@ -123,15 +122,11 @@ selectStorage key after =
123
122
124
123
selectBarcode :: (Maybe Unicode -> JSM () ) -> JSM ()
125
124
selectBarcode after =
126
- genericPromise " selectBarcode" Nothing
127
- $ after
128
- . fmap MS. strip
125
+ genericPromise " selectBarcode" Nothing $ after . fmap strip
129
126
130
127
selectClipboard :: (Maybe Unicode -> JSM () ) -> JSM ()
131
128
selectClipboard after =
132
- genericPromise " selectClipboard" Nothing
133
- $ after
134
- . fmap MS. strip
129
+ genericPromise " selectClipboard" Nothing $ after . fmap strip
135
130
136
131
genericPromise ::
137
132
Unicode ->
Original file line number Diff line number Diff line change @@ -870,7 +870,7 @@ genericFieldViewer args widget =
870
870
allowCopy =
871
871
opts ^. # fieldOptsAllowCopy
872
872
allowTrunc =
873
- maybe False (MS. length input > ) $ opts ^. # fieldOptsTruncateLimit
873
+ maybe False (length input > ) $ opts ^. # fieldOptsTruncateLimit
874
874
stateTrunc =
875
875
fromMaybe Closed $ opts ^. # fieldOptsTruncateState
876
876
extraWidgets =
@@ -939,7 +939,7 @@ truncateFieldInput ::
939
939
Unicode
940
940
truncateFieldInput True Closed limit full =
941
941
let half = fromMaybe defTruncateLimit limit `div` 2
942
- in MS. take half full
942
+ in take half full
943
943
<> " ..."
944
944
<> MS. takeEnd half full
945
945
truncateFieldInput _ _ _ full =
Original file line number Diff line number Diff line change @@ -231,7 +231,6 @@ import Data.Sequences as X hiding
231
231
sortOn ,
232
232
splitAt ,
233
233
subsequences ,
234
- take ,
235
234
takeWhile ,
236
235
uncons ,
237
236
)
@@ -306,6 +305,7 @@ import Universum as X hiding
306
305
state ,
307
306
swap ,
308
307
tails ,
308
+ take ,
309
309
throwM ,
310
310
toStrict ,
311
311
try ,
You can’t perform that action at this time.
0 commit comments