Skip to content

Commit 9a8b781

Browse files
Update to v0.14.0-rc3 (#2)
* Update Bower dependencies to master * Update to v0.14.0-rc3 purescript * Fix RowList and deprecated syntax for row kinds * Replace monomorphic proxies by Type.Proxy.Proxy and polymorphic variables Co-authored-by: Cyril Sobierajewicz <[email protected]>
1 parent a609c4e commit 9a8b781

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
- uses: actions/checkout@v2
1414

1515
- uses: purescript-contrib/setup-purescript@main
16+
with:
17+
purescript: "0.14.0-rc3"
1618

1719
- uses: actions/setup-node@v1
1820
with:

bower.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
"package.json"
1616
],
1717
"dependencies": {
18-
"purescript-prelude": "^4.0.0",
19-
"purescript-effect": "^2.0.0",
20-
"purescript-http-methods": "^4.0.0",
21-
"purescript-typelevel-prelude": "^5.0.0",
22-
"purescript-web-file": "^2.3.0",
23-
"purescript-record": "^2.0.0",
24-
"purescript-foreign-object": "^2.0.0",
25-
"purescript-web-promise": "https://github.com/purescript-web/purescript-web-promise.git#^1.0.0",
26-
"purescript-web-streams": "https://github.com/purescript-web/purescript-web-streams.git#^1.0.0"
18+
"purescript-prelude": "master",
19+
"purescript-effect": "master",
20+
"purescript-http-methods": "main",
21+
"purescript-typelevel-prelude": "master",
22+
"purescript-web-file": "master",
23+
"purescript-record": "master",
24+
"purescript-foreign-object": "master",
25+
"purescript-web-promise": "https://github.com/purescript-web/purescript-web-promise.git#master",
26+
"purescript-web-streams": "https://github.com/purescript-web/purescript-web-streams.git#master"
2727
}
2828
}

src/Web/Fetch/Request.purs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ import Data.HTTP.Method (Method(..))
2222
import Data.Maybe (Maybe(..))
2323
import Data.Newtype (un)
2424
import Data.Nullable (Nullable, toNullable)
25-
import Data.Symbol (class IsSymbol, SProxy(..))
25+
import Data.Symbol (class IsSymbol)
2626
import Data.Tuple (Tuple)
2727
import Effect (Effect)
2828
import Effect.Uncurried (EffectFn2, runEffectFn2)
2929
import Foreign.Object (Object)
3030
import Prim.Row as Row
31-
import Prim.RowList (kind RowList)
31+
import Prim.RowList (RowList)
3232
import Prim.RowList as RowList
3333
import Record (merge)
3434
import Record.Builder as Record
35-
import Type.Data.RowList (RLProxy(..))
35+
import Type.Proxy (Proxy(..))
3636
import Type.Row.Homogeneous (class Homogeneous)
3737
import Web.Fetch.Headers (Headers)
3838
import Web.Fetch.Headers as Headers
@@ -126,10 +126,10 @@ instance buildRequestOptionsRecord
126126
, Row.Nub r'' RequestOptions
127127
)
128128
=> BuildRequestOptions { | r } where
129-
buildRequestOptions r = merge (Record.build (convertOptions (RLProxy :: _ rl)) r) defaultOptions
129+
buildRequestOptions r = merge (Record.build (convertOptions (Proxy :: _ rl)) r) defaultOptions
130130

131-
class ConvertOptions (rl :: RowList) (input :: # Type) (output :: # Type) | rl input -> output where
132-
convertOptions :: RLProxy rl -> Record.Builder { | input } { | output }
131+
class ConvertOptions (rl :: RowList Type) (input :: Row Type) (output :: Row Type) | rl input -> output where
132+
convertOptions :: forall rlproxy. rlproxy rl -> Record.Builder { | input } { | output }
133133

134134
instance convertOptionsCons ::
135135
( ConvertOptions rest input' output
@@ -139,14 +139,14 @@ instance convertOptionsCons ::
139139
, IsSymbol field
140140
) => ConvertOptions (RowList.Cons field from rest) input output where
141141
convertOptions _ =
142-
convertOptions (RLProxy :: _ rest)
143-
<<< Record.modify (SProxy :: _ field) (convertOption (SProxy :: _ field))
142+
convertOptions (Proxy :: _ rest)
143+
<<< Record.modify (Proxy :: _ field) (convertOption (Proxy :: _ field))
144144

145145
instance convertOptionsNil :: ConvertOptions RowList.Nil r r where
146146
convertOptions _ = identity
147147

148148
class ConvertOption (field :: Symbol) from to | field -> to where
149-
convertOption :: SProxy field -> from -> to
149+
convertOption :: forall sproxy. sproxy field -> from -> to
150150

151151
instance convertMethod :: ConvertOption "method" Method Method where
152152
convertOption _ = identity
@@ -188,4 +188,4 @@ instance convertReferrerPolicy :: ConvertOption "referrerPolicy" ReferrerPolicy
188188
convertOption _ = identity
189189

190190
instance convertIntegrity :: ConvertOption "integrity" Integrity Integrity where
191-
convertOption _ = identity
191+
convertOption _ = identity

0 commit comments

Comments
 (0)