diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 063845e..2e4c7a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,8 @@ jobs: - uses: actions/checkout@v2 - uses: purescript-contrib/setup-purescript@main + with: + purescript: "0.14.0-rc3" - uses: actions/setup-node@v1 with: diff --git a/bower.json b/bower.json index e98dd21..5ac6856 100644 --- a/bower.json +++ b/bower.json @@ -15,14 +15,14 @@ "package.json" ], "dependencies": { - "purescript-prelude": "^4.0.0", - "purescript-effect": "^2.0.0", - "purescript-http-methods": "^4.0.0", - "purescript-typelevel-prelude": "^5.0.0", - "purescript-web-file": "^2.3.0", - "purescript-record": "^2.0.0", - "purescript-foreign-object": "^2.0.0", - "purescript-web-promise": "https://github.com/purescript-web/purescript-web-promise.git#^1.0.0", - "purescript-web-streams": "https://github.com/purescript-web/purescript-web-streams.git#^1.0.0" + "purescript-prelude": "master", + "purescript-effect": "master", + "purescript-http-methods": "main", + "purescript-typelevel-prelude": "master", + "purescript-web-file": "master", + "purescript-record": "master", + "purescript-foreign-object": "master", + "purescript-web-promise": "https://github.com/purescript-web/purescript-web-promise.git#master", + "purescript-web-streams": "https://github.com/purescript-web/purescript-web-streams.git#master" } } diff --git a/src/Web/Fetch/Request.purs b/src/Web/Fetch/Request.purs index db198dc..35ff325 100644 --- a/src/Web/Fetch/Request.purs +++ b/src/Web/Fetch/Request.purs @@ -22,17 +22,17 @@ import Data.HTTP.Method (Method(..)) import Data.Maybe (Maybe(..)) import Data.Newtype (un) import Data.Nullable (Nullable, toNullable) -import Data.Symbol (class IsSymbol, SProxy(..)) +import Data.Symbol (class IsSymbol) import Data.Tuple (Tuple) import Effect (Effect) import Effect.Uncurried (EffectFn2, runEffectFn2) import Foreign.Object (Object) import Prim.Row as Row -import Prim.RowList (kind RowList) +import Prim.RowList (RowList) import Prim.RowList as RowList import Record (merge) import Record.Builder as Record -import Type.Data.RowList (RLProxy(..)) +import Type.Proxy (Proxy(..)) import Type.Row.Homogeneous (class Homogeneous) import Web.Fetch.Headers (Headers) import Web.Fetch.Headers as Headers @@ -126,10 +126,10 @@ instance buildRequestOptionsRecord , Row.Nub r'' RequestOptions ) => BuildRequestOptions { | r } where - buildRequestOptions r = merge (Record.build (convertOptions (RLProxy :: _ rl)) r) defaultOptions + buildRequestOptions r = merge (Record.build (convertOptions (Proxy :: _ rl)) r) defaultOptions -class ConvertOptions (rl :: RowList) (input :: # Type) (output :: # Type) | rl input -> output where - convertOptions :: RLProxy rl -> Record.Builder { | input } { | output } +class ConvertOptions (rl :: RowList Type) (input :: Row Type) (output :: Row Type) | rl input -> output where + convertOptions :: forall rlproxy. rlproxy rl -> Record.Builder { | input } { | output } instance convertOptionsCons :: ( ConvertOptions rest input' output @@ -139,14 +139,14 @@ instance convertOptionsCons :: , IsSymbol field ) => ConvertOptions (RowList.Cons field from rest) input output where convertOptions _ = - convertOptions (RLProxy :: _ rest) - <<< Record.modify (SProxy :: _ field) (convertOption (SProxy :: _ field)) + convertOptions (Proxy :: _ rest) + <<< Record.modify (Proxy :: _ field) (convertOption (Proxy :: _ field)) instance convertOptionsNil :: ConvertOptions RowList.Nil r r where convertOptions _ = identity class ConvertOption (field :: Symbol) from to | field -> to where - convertOption :: SProxy field -> from -> to + convertOption :: forall sproxy. sproxy field -> from -> to instance convertMethod :: ConvertOption "method" Method Method where convertOption _ = identity @@ -188,4 +188,4 @@ instance convertReferrerPolicy :: ConvertOption "referrerPolicy" ReferrerPolicy convertOption _ = identity instance convertIntegrity :: ConvertOption "integrity" Integrity Integrity where - convertOption _ = identity \ No newline at end of file + convertOption _ = identity