git.iko.soy/rowtype-yoga/purescript-fetch-core
on main help sign in
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 <sobierajewicz.cyril@gmail.com>

commit9a8b781b0df7293b7c209009d0b1743b53cd824f authorJordanMartinez <jordanalex.martinez@gmail.com> dateFri 11 Dec 2020, 14:22 (6 years ago) parenta609c4e
3 files changed+21−19
.github/workflows/ci.yml+2 bower.json+9−9 src/Web/Fetch/Request.purs+10−10
.github/workflows/ci.yml+2
@@ -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+9−9
@@ -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+10−10
@@ -22,17 +22,17 @@ import Data.HTTP.Method (Method(..))
2222import Data.Maybe (Maybe(..))
2323import Data.Newtype (un)
2424import Data.Nullable (Nullable, toNullable)
25−import Data.Symbol (class IsSymbol, SProxy(..))
25+import Data.Symbol (class IsSymbol)
2626import Data.Tuple (Tuple)
2727import Effect (Effect)
2828import Effect.Uncurried (EffectFn2, runEffectFn2)
2929import Foreign.Object (Object)
3030import Prim.Row as Row
31−import Prim.RowList (kind RowList)
31+import Prim.RowList (RowList)
3232import Prim.RowList as RowList
3333import Record (merge)
3434import Record.Builder as Record
35−import Type.Data.RowList (RLProxy(..))
35+import Type.Proxy (Proxy(..))
3636import Type.Row.Homogeneous (class Homogeneous)
3737import Web.Fetch.Headers (Headers)
3838import 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
134134instance 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
145145instance convertOptionsNil :: ConvertOptions RowList.Nil r r where
146146 convertOptions _ = identity
147147
148148class ConvertOption (field :: Symbol) from to | field -> to where
149− convertOption :: SProxy field -> from -> to
149+ convertOption :: forall sproxy. sproxy field -> from -> to
150150
151151instance convertMethod :: ConvertOption "method" Method Method where
152152 convertOption _ = identity
@@ -188,4 +188,4 @@ instance convertReferrerPolicy :: ConvertOption "referrerPolicy" ReferrerPolicy
188188 convertOption _ = identity
189189
190190instance convertIntegrity :: ConvertOption "integrity" Integrity Integrity where
191− convertOption _ = identity
191+ convertOption _ = identity