Skip to content

Commit 1028762

Browse files
committed
Use Lamdera Wire aliases so AST gen tests match
1 parent f54d308 commit 1028762

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

elm.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
],
1111
"elm-version": "0.19.0 <= v < 0.20.0",
1212
"dependencies": {
13-
"elm/bytes": "1.0.0 <= v < 2.0.0",
13+
"elm/bytes": "1.0.8 <= v < 2.0.0",
1414
"elm/core": "1.0.0 <= v < 2.0.0",
1515
"lamdera/codecs": "1.0.0 <= v < 2.0.0"
1616
},
1717
"test-dependencies": {
18-
"elm-explorations/test": "2.0.0 <= v < 3.0.0",
19-
"elm-community/random-extra": "3.2.0 <= v < 4.0.0"
18+
"elm-community/random-extra": "3.2.0 <= v < 4.0.0",
19+
"elm-explorations/test": "2.0.0 <= v < 3.0.0"
2020
}
2121
}

src/SeqDict.elm

+3-4
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ module SeqDict exposing
4949

5050
import Array exposing (Array)
5151
import Bitwise
52-
import Bytes.Decode exposing (Decoder)
53-
import Bytes.Encode exposing (Encoder)
52+
import Bytes.Decode
5453
import FNV
5554
import JsArray2 exposing (JsArray2)
5655
import Lamdera.Wire3
@@ -1004,13 +1003,13 @@ listFind predicate list =
10041003

10051004
{-| The Lamdera compiler relies on this function, it is not intended to be used directly. Vendor this function in your own codebase if you want to use it, as the encoding can change without notice.
10061005
-}
1007-
encodeDict : (key -> Encoder) -> (value -> Encoder) -> SeqDict key value -> Encoder
1006+
encodeDict : (key -> Lamdera.Wire3.Encoder) -> (value -> Lamdera.Wire3.Encoder) -> SeqDict key value -> Lamdera.Wire3.Encoder
10081007
encodeDict encKey encValue d =
10091008
Lamdera.Wire3.encodeList (Lamdera.Wire3.encodePair encKey encValue) (toList d)
10101009

10111010

10121011
{-| The Lamdera compiler relies on this function, it is not intended to be used directly. Vendor this function in your own codebase if you want to use it, as the encoding can change without notice.
10131012
-}
1014-
decodeDict : Decoder k -> Decoder value -> Decoder (SeqDict k value)
1013+
decodeDict : Lamdera.Wire3.Decoder k -> Lamdera.Wire3.Decoder value -> Lamdera.Wire3.Decoder (SeqDict k value)
10151014
decodeDict decKey decValue =
10161015
Lamdera.Wire3.decodeList (Lamdera.Wire3.decodePair decKey decValue) |> Bytes.Decode.map fromList

src/SeqSet.elm

+3-4
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ module SeqSet exposing
4747
4848
-}
4949

50-
import Bytes.Decode exposing (Decoder)
51-
import Bytes.Encode exposing (Encoder)
50+
import Bytes.Decode
5251
import Lamdera.Wire3
5352
import SeqDict as Dict exposing (SeqDict)
5453

@@ -187,14 +186,14 @@ partition p (SeqSet_elm_builtin dict) =
187186

188187
{-| The Lamdera compiler relies on this function, it is not intended to be used directly. Vendor this function in your own codebase if you want to use it, as the encoding can change without notice.
189188
-}
190-
encodeSet : (value -> Encoder) -> SeqSet value -> Encoder
189+
encodeSet : (value -> Lamdera.Wire3.Encoder) -> SeqSet value -> Lamdera.Wire3.Encoder
191190
encodeSet encVal s =
192191
Lamdera.Wire3.encodeList encVal (toList s)
193192

194193

195194
{-| The Lamdera compiler relies on this function, it is not intended to be used directly. Vendor this function in your own codebase if you want to use it, as the encoding can change without notice.
196195
-}
197-
decodeSet : Decoder k -> Decoder (SeqSet k)
196+
decodeSet : Lamdera.Wire3.Decoder k -> Lamdera.Wire3.Decoder (SeqSet k)
198197
decodeSet decVal =
199198
Lamdera.Wire3.decodeList decVal |> Bytes.Decode.map fromList
200199

0 commit comments

Comments
 (0)