File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ app [main] {
44}
55
66import pf.Stdout
7+ import pf.Task exposing [Task ]
78import unicode.CodePoint
89
910word = " 世界"
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ app [main] {
44}
55
66import pf.Stdout
7- import pf.Task
7+ import pf.Task exposing [ Task ]
88import unicode.CodePoint exposing [Utf8ParseErr ]
99
1010## Get the number of code points for a given Str
Original file line number Diff line number Diff line change @@ -30,14 +30,11 @@ split = \str ->
3030 # I'm not sure if we should return an error here or just crash.
3131 # A Roc Str should be be valid utf8 and so in theory it should not be possible
3232 # for split to have invalid utf8 in it. To be discussed.
33- str
34- |> Str . toUtf8
35- |> CodePoint . parseUtf8
36- |> Result . map \codePoints ->
33+ codePoints = str |> Str . toUtf8 |> CodePoint . parseUtf8 ?
3734
38- breakPoints = codePoints |> List . map InternalGBP . fromCP
35+ breakPoints = codePoints |> List . map InternalGBP . fromCP
3936
40- splitHelp Next codePoints breakPoints [BR GB1 ] |> toListStr
37+ Ok ( splitHelp Next codePoints breakPoints [BR GB1 ] |> toListStr)
4138
4239# Used internally to filter out the break/nobreak tokens and separate CPs into a List Str
4340toListStr : Tokens -> List Str
You can’t perform that action at this time.
0 commit comments