Skip to content

Commit bc8fcaa

Browse files
authored
Update to v0.15.0 (#53)
* Update to v0.15.0 * Update package set to release version * Update bower deps
1 parent 131d7fb commit bc8fcaa

File tree

6 files changed

+81
-43
lines changed

6 files changed

+81
-43
lines changed

bower.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@
2323
"test"
2424
],
2525
"dependencies": {
26-
"purescript-prelude": "^5.0.0",
27-
"purescript-tuples": "^6.0.0",
28-
"purescript-unsafe-coerce": "^5.0.0",
29-
"purescript-partial": "^3.0.0",
30-
"purescript-maybe": "^5.0.0",
31-
"purescript-lists": "^6.0.0",
32-
"purescript-record": "^3.0.0",
33-
"purescript-enums": "^5.0.0"
26+
"purescript-prelude": "^6.0.0",
27+
"purescript-tuples": "^7.0.0",
28+
"purescript-unsafe-coerce": "^6.0.0",
29+
"purescript-partial": "^4.0.0",
30+
"purescript-maybe": "^6.0.0",
31+
"purescript-lists": "^7.0.0",
32+
"purescript-record": "^4.0.0",
33+
"purescript-enums": "^6.0.0"
3434
},
3535
"devDependencies": {
36-
"purescript-console": "^5.0.0",
37-
"purescript-assert": "^5.0.0",
38-
"purescript-either": "^5.0.0"
36+
"purescript-console": "^6.0.0",
37+
"purescript-assert": "^6.0.0",
38+
"purescript-either": "^6.0.0"
3939
}
4040
}

packages.dhall

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
let upstream =
2+
https://github.com/purescript/package-sets/releases/download/psc-0.15.0-20220429/packages.dhall
3+
sha256:03c682bff56fc8f9d8c495ffcc6f524cbd3c89fe04778f965265c08757de8c9d
4+
5+
in upstream

spago.dhall

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{-
2+
Welcome to a Spago project!
3+
You can edit this file as you like.
4+
5+
Need help? See the following resources:
6+
- Spago documentation: https://github.com/purescript/spago
7+
- Dhall language tour: https://docs.dhall-lang.org/tutorials/Language-Tour.html
8+
9+
When creating a new Spago project, you can use
10+
`spago init --no-comments` or `spago init -C`
11+
to generate this file without the comments in this block.
12+
-}
13+
{ name = "variant"
14+
, dependencies =
15+
[ "assert"
16+
, "console"
17+
, "control"
18+
, "effect"
19+
, "either"
20+
, "enums"
21+
, "foldable-traversable"
22+
, "lists"
23+
, "maybe"
24+
, "partial"
25+
, "prelude"
26+
, "record"
27+
, "tuples"
28+
, "type-equality"
29+
, "unsafe-coerce"
30+
]
31+
, packages = ./packages.dhall
32+
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
33+
}

src/Data/Functor/Variant.purs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ instance functorVariantF ∷ Functor (VariantF r) where
7575

7676
class FoldableVFRL :: RL.RowList (Type -> Type) -> Row (Type -> Type) -> Constraint
7777
class FoldableVFRL rl row | rl -> row where
78-
foldrVFRL :: forall proxy a b. proxy rl -> (a -> b -> b) -> b -> VariantF row a -> b
79-
foldlVFRL :: forall proxy a b. proxy rl -> (b -> a -> b) -> b -> VariantF row a -> b
80-
foldMapVFRL :: forall proxy a m. Monoid m => proxy rl -> (a -> m) -> VariantF row a -> m
78+
foldrVFRL :: forall a b. Proxy rl -> (a -> b -> b) -> b -> VariantF row a -> b
79+
foldlVFRL :: forall a b. Proxy rl -> (b -> a -> b) -> b -> VariantF row a -> b
80+
foldMapVFRL :: forall a m. Monoid m => Proxy rl -> (a -> m) -> VariantF row a -> m
8181

8282
instance foldableNil :: FoldableVFRL RL.Nil () where
8383
foldrVFRL _ _ _ = case_
@@ -99,7 +99,7 @@ instance foldableCons ::
9999

100100
class TraversableVFRL :: RL.RowList (Type -> Type) -> Row (Type -> Type) -> Constraint
101101
class FoldableVFRL rl row <= TraversableVFRL rl row | rl -> row where
102-
traverseVFRL :: forall proxy f a b. Applicative f => proxy rl -> (a -> f b) -> VariantF row a -> f (VariantF row b)
102+
traverseVFRL :: forall f a b. Applicative f => Proxy rl -> (a -> f b) -> VariantF row a -> f (VariantF row b)
103103

104104
instance traversableNil :: TraversableVFRL RL.Nil () where
105105
traverseVFRL _ _ = case_
@@ -134,11 +134,11 @@ instance traversableVariantF ::
134134
-- | maybeAtFoo = inj (Proxy :: Proxy "foo") (Just 42)
135135
-- | ```
136136
inj
137-
proxy sym f a r1 r2
137+
sym f a r1 r2
138138
. R.Cons sym f r1 r2
139139
IsSymbol sym
140140
Functor f
141-
proxy sym
141+
Proxy sym
142142
f a
143143
VariantF r2 a
144144
inj p value = coerceV $ VariantFRep { type: reflectSymbol p, value, map: Mapper map }
@@ -153,11 +153,11 @@ inj p value = coerceV $ VariantFRep { type: reflectSymbol p, value, map: Mapper
153153
-- | _ -> 0
154154
-- | ```
155155
prj
156-
proxy sym f a r1 r2 g
156+
sym f a r1 r2 g
157157
. R.Cons sym f r1 r2
158158
Alternative g
159159
IsSymbol sym
160-
proxy sym
160+
Proxy sym
161161
VariantF r2 a
162162
g (f a)
163163
prj p = on p pure (const empty)
@@ -166,10 +166,10 @@ prj p = on p pure (const empty)
166166
-- | The failure branch receives the provided variant, but with the label
167167
-- | removed.
168168
on
169-
proxy sym f a b r1 r2
169+
sym f a b r1 r2
170170
. R.Cons sym f r1 r2
171171
IsSymbol sym
172-
proxy sym
172+
Proxy sym
173173
(f a b)
174174
(VariantF r1 a b)
175175
VariantF r2 a
@@ -455,11 +455,11 @@ contract v =
455455
coerceR = unsafeCoerce
456456

457457
type UnvariantF' r a x =
458-
proxy s f o
458+
s f o
459459
. IsSymbol s
460460
R.Cons s f o r
461461
Functor f
462-
proxy s
462+
Proxy s
463463
f a
464464
x
465465

@@ -484,12 +484,12 @@ unvariantF v = case (unsafeCoerce v ∷ VariantFRep UnknownF Unit) of
484484
o.value
485485
where
486486
coerce
487-
proxy x
487+
x
488488
. UnvariantF' r a x
489-
{ reflectSymbol proxy "" String }
489+
{ reflectSymbol Proxy "" String }
490490
{}
491491
{ map Mapper UnknownF }
492-
proxy ""
492+
Proxy ""
493493
UnknownF Unit
494494
x
495495
coerce = unsafeCoerce

src/Data/Variant.purs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ foreign import data Variant ∷ Row Type → Type
5050
-- | intAtFoo = inj (Proxy :: Proxy "foo") 42
5151
-- | ```
5252
inj
53-
proxy sym a r1 r2
53+
sym a r1 r2
5454
. R.Cons sym a r1 r2
5555
IsSymbol sym
56-
proxy sym
56+
Proxy sym
5757
a
5858
Variant r2
5959
inj p value = coerceV $ VariantRep { type: reflectSymbol p, value }
@@ -68,11 +68,11 @@ inj p value = coerceV $ VariantRep { type: reflectSymbol p, value }
6868
-- | Nothing -> 0
6969
-- | ```
7070
prj
71-
proxy sym a r1 r2 f
71+
sym a r1 r2 f
7272
. R.Cons sym a r1 r2
7373
IsSymbol sym
7474
Alternative f
75-
proxy sym
75+
Proxy sym
7676
Variant r2
7777
f a
7878
prj p = on p pure (const empty)
@@ -81,10 +81,10 @@ prj p = on p pure (const empty)
8181
-- | The failure branch receives the provided variant, but with the label
8282
-- | removed.
8383
on
84-
proxy sym a b r1 r2
84+
sym a b r1 r2
8585
. R.Cons sym a r1 r2
8686
IsSymbol sym
87-
proxy sym
87+
Proxy sym
8888
(a b)
8989
(Variant r1 b)
9090
Variant r2
@@ -337,10 +337,10 @@ contract v =
337337
coerceR = unsafeCoerce
338338

339339
type Unvariant' r x =
340-
proxy s t o
340+
s t o
341341
. IsSymbol s
342342
R.Cons s t o r
343-
proxy s
343+
Proxy s
344344
t
345345
x
346346

@@ -360,11 +360,11 @@ unvariant v = case (unsafeCoerce v ∷ VariantRep Unit) of
360360
coerce f { reflectSymbol: const o.type } {} Proxy o.value
361361
where
362362
coerce
363-
proxy x
363+
x
364364
. Unvariant' r x
365-
{ reflectSymbol proxy "" String }
365+
{ reflectSymbol Proxy "" String }
366366
{}
367-
proxy ""
367+
Proxy ""
368368
Unit
369369
x
370370
coerce = unsafeCoerce
@@ -375,7 +375,7 @@ revariant (Unvariant f) = f inj
375375

376376
class VariantEqs :: RL.RowList Type -> Constraint
377377
class VariantEqs rl where
378-
variantEqs forall proxy. proxy rl L.List (VariantCase VariantCase Boolean)
378+
variantEqs Proxy rl L.List (VariantCase VariantCase Boolean)
379379

380380
instance eqVariantNilVariantEqs RL.Nil where
381381
variantEqs _ = L.Nil
@@ -399,7 +399,7 @@ instance eqVariant ∷ (RL.RowToList r rl, VariantTags rl, VariantEqs rl) ⇒ Eq
399399

400400
class VariantBounded :: RL.RowList Type -> Constraint
401401
class VariantBounded rl where
402-
variantBounded forall proxy. proxy rl L.List (BoundedDict VariantCase)
402+
variantBounded Proxy rl L.List (BoundedDict VariantCase)
403403

404404
instance boundedVariantNilVariantBounded RL.Nil where
405405
variantBounded _ = L.Nil
@@ -435,7 +435,7 @@ instance boundedVariant ∷ (RL.RowToList r rl, VariantTags rl, VariantEqs rl, V
435435

436436
class VariantBoundedEnums :: RL.RowList Type -> Constraint
437437
class VariantBounded rl VariantBoundedEnums rl where
438-
variantBoundedEnums forall proxy. proxy rl L.List (BoundedEnumDict VariantCase)
438+
variantBoundedEnums Proxy rl L.List (BoundedEnumDict VariantCase)
439439

440440
instance enumVariantNilVariantBoundedEnums RL.Nil where
441441
variantBoundedEnums _ = L.Nil
@@ -507,7 +507,7 @@ instance boundedEnumVariant ∷ (RL.RowToList r rl, VariantTags rl, VariantEqs r
507507

508508
class VariantOrds :: RL.RowList Type -> Constraint
509509
class VariantOrds rl where
510-
variantOrds forall proxy. proxy rl L.List (VariantCase VariantCase Ordering)
510+
variantOrds Proxy rl L.List (VariantCase VariantCase Ordering)
511511

512512
instance ordVariantNilVariantOrds RL.Nil where
513513
variantOrds _ = L.Nil
@@ -531,7 +531,7 @@ instance ordVariant ∷ (RL.RowToList r rl, VariantTags rl, VariantEqs rl, Varia
531531

532532
class VariantShows :: RL.RowList Type -> Constraint
533533
class VariantShows rl where
534-
variantShows forall proxy. proxy rl L.List (VariantCase String)
534+
variantShows Proxy rl L.List (VariantCase String)
535535

536536
instance showVariantNilVariantShows RL.Nil where
537537
variantShows _ = L.Nil

src/Data/Variant/Internal.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ foreign import data VariantFCase ∷ Type → Type
138138

139139
class VariantTags :: forall k. RL.RowList k -> Constraint
140140
class VariantTags rl where
141-
variantTags forall proxy. proxy rl L.List String
141+
variantTags Proxy rl L.List String
142142

143143
instance variantTagsNilVariantTags RL.Nil where
144144
variantTags _ = L.Nil

0 commit comments

Comments
 (0)