Skip to content

Commit 89c4d30

Browse files
Update to v0.15.0 (#72)
* Update to CI to use 'unstable' purescript * Update pulp to 16.0.0-0 and psa to 0.8.2 * Update Bower dependencies to master * Replaced polymorphic proxies with monomorphic `Proxy` * Added changelog entry
1 parent 83ddcdb commit 89c4d30

File tree

10 files changed

+30
-42
lines changed

10 files changed

+30
-42
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: "unstable"
1618

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

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Notable changes to this project are documented in this file. The format is based
55
## [Unreleased]
66

77
Breaking changes:
8+
- Update project and deps to PureScript v0.15.0 (#72 by @JordanMartinez)
9+
- Replaced polymorphic proxies with monomorphic `Proxy` (#72 by @JordanMartinez)
810

911
New features:
1012

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"package.json"
1717
],
1818
"dependencies": {
19-
"purescript-prelude": "^5.0.0",
20-
"purescript-type-equality": "^4.0.0"
19+
"purescript-prelude": "master",
20+
"purescript-type-equality": "master"
2121
}
2222
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"build": "pulp build -- --censor-lib --strict"
66
},
77
"devDependencies": {
8-
"pulp": "^15.0.0",
9-
"purescript-psa": "^0.8.0",
8+
"pulp": "16.0.0-0",
9+
"purescript-psa": "^0.8.2",
1010
"rimraf": "^3.0.2"
1111
}
1212
}

src/Type/Data/Boolean.purs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module Type.Data.Boolean
2-
( BProxy(..)
3-
, module Prim.Boolean
2+
( module Prim.Boolean
43
, class IsBoolean
54
, reflectBoolean
65
, reifyBoolean
@@ -17,21 +16,16 @@ module Type.Data.Boolean
1716
import Prim.Boolean (True, False)
1817
import Type.Proxy (Proxy(..))
1918

20-
-- | Value proxy for `Boolean` types
21-
-- | **Deprecated:** Use `Type.Proxy` instead
22-
data BProxy :: Boolean -> Type
23-
data BProxy bool = BProxy
24-
2519
-- | Class for reflecting a type level `Boolean` at the value level
2620
class IsBoolean :: Boolean -> Constraint
2721
class IsBoolean bool where
28-
reflectBoolean :: forall proxy. proxy bool -> Boolean
22+
reflectBoolean :: Proxy bool -> Boolean
2923

3024
instance isBooleanTrue :: IsBoolean True where reflectBoolean _ = true
3125
instance isBooleanFalse :: IsBoolean False where reflectBoolean _ = false
3226

3327
-- | Use a value level `Boolean` as a type-level `Boolean`
34-
reifyBoolean :: forall r. Boolean -> (forall proxy o. IsBoolean o => proxy o -> r) -> r
28+
reifyBoolean :: forall r. Boolean -> (forall o. IsBoolean o => Proxy o -> r) -> r
3529
reifyBoolean true f = f (Proxy :: Proxy True)
3630
reifyBoolean false f = f (Proxy :: Proxy False)
3731

@@ -41,7 +35,7 @@ class And lhs rhs out | lhs rhs -> out
4135
instance andTrue :: And True rhs rhs
4236
instance andFalse :: And False rhs False
4337

44-
and :: forall proxy l r o. And l r o => proxy l -> proxy r -> Proxy o
38+
and :: forall l r o. And l r o => Proxy l -> Proxy r -> Proxy o
4539
and _ _ = Proxy
4640

4741
-- | Or two `Boolean` types together
@@ -50,7 +44,7 @@ class Or lhs rhs output | lhs rhs -> output
5044
instance orTrue :: Or True rhs True
5145
instance orFalse :: Or False rhs rhs
5246

53-
or :: forall proxy l r o. Or l r o => proxy l -> proxy r -> Proxy o
47+
or :: forall l r o. Or l r o => Proxy l -> Proxy r -> Proxy o
5448
or _ _ = Proxy
5549

5650
-- | Not a `Boolean`
@@ -59,7 +53,7 @@ class Not bool output | bool -> output
5953
instance notTrue :: Not True False
6054
instance notFalse :: Not False True
6155

62-
not :: forall proxy i o. Not i o => proxy i -> Proxy o
56+
not :: forall i o. Not i o => Proxy i -> Proxy o
6357
not _ = Proxy
6458

6559
-- | If - dispatch based on a boolean
@@ -68,5 +62,5 @@ class If bool onTrue onFalse output | bool onTrue onFalse -> output
6862
instance ifTrue :: If True onTrue onFalse onTrue
6963
instance ifFalse :: If False onTrue onFalse onFalse
7064

71-
if_ :: forall proxy b t e o. If b t e o => proxy b -> Proxy t -> Proxy e -> Proxy o
65+
if_ :: forall b t e o. If b t e o => Proxy b -> Proxy t -> Proxy e -> Proxy o
7266
if_ _ _ _ = Proxy

src/Type/Data/Ordering.purs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module Type.Data.Ordering
22
( module PO
3-
, OProxy(..)
43
, class IsOrdering
54
, reflectOrdering
65
, reifyOrdering
@@ -17,22 +16,17 @@ import Data.Ordering (Ordering(..))
1716
import Type.Data.Boolean (True, False)
1817
import Type.Proxy (Proxy(..))
1918

20-
-- | Value proxy for `Ordering` types
21-
-- | **Deprecated:** Use `Type.Proxy` instead
22-
data OProxy :: PO.Ordering -> Type
23-
data OProxy ordering = OProxy
24-
2519
-- | Class for reflecting a type level `Ordering` at the value level
2620
class IsOrdering :: PO.Ordering -> Constraint
2721
class IsOrdering ordering where
28-
reflectOrdering :: forall proxy. proxy ordering -> Ordering
22+
reflectOrdering :: Proxy ordering -> Ordering
2923

3024
instance isOrderingLT :: IsOrdering PO.LT where reflectOrdering _ = LT
3125
instance isOrderingEQ :: IsOrdering PO.EQ where reflectOrdering _ = EQ
3226
instance isOrderingGT :: IsOrdering PO.GT where reflectOrdering _ = GT
3327

3428
-- | Use a value level `Ordering` as a type-level `Ordering`
35-
reifyOrdering :: forall r. Ordering -> (forall proxy o. IsOrdering o => proxy o -> r) -> r
29+
reifyOrdering :: forall r. Ordering -> (forall o. IsOrdering o => Proxy o -> r) -> r
3630
reifyOrdering LT f = f (Proxy :: Proxy PO.LT)
3731
reifyOrdering EQ f = f (Proxy :: Proxy PO.EQ)
3832
reifyOrdering GT f = f (Proxy :: Proxy PO.GT)
@@ -45,7 +39,7 @@ instance appendOrderingLT :: Append PO.LT rhs PO.LT
4539
instance appendOrderingEQ :: Append PO.EQ rhs rhs
4640
instance appendOrderingGT :: Append PO.GT rhs PO.GT
4741

48-
append :: forall proxy l r o. Append l r o => proxy l -> proxy r -> Proxy o
42+
append :: forall l r o. Append l r o => Proxy l -> Proxy r -> Proxy o
4943
append _ _ = Proxy
5044

5145
-- | Invert an `Ordering`
@@ -55,7 +49,7 @@ instance invertOrderingLT :: Invert PO.LT PO.GT
5549
instance invertOrderingEQ :: Invert PO.EQ PO.EQ
5650
instance invertOrderingGT :: Invert PO.GT PO.LT
5751

58-
invert :: forall proxy i o. Invert i o => proxy i -> Proxy o
52+
invert :: forall i o. Invert i o => Proxy i -> Proxy o
5953
invert _ = Proxy
6054

6155
class Equals :: PO.Ordering -> PO.Ordering -> Boolean -> Constraint
@@ -71,5 +65,5 @@ instance equalsLTGT :: Equals PO.LT PO.GT False
7165
instance equalsGTLT :: Equals PO.GT PO.LT False
7266
instance equalsGTEQ :: Equals PO.GT PO.EQ False
7367

74-
equals :: forall proxy l r o. Equals l r o => proxy l -> proxy r -> Proxy o
68+
equals :: forall l r o. Equals l r o => Proxy l -> Proxy r -> Proxy o
7569
equals _ _ = Proxy

src/Type/Data/Symbol.purs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ module Type.Data.Symbol
99
) where
1010

1111
import Prim.Symbol (class Append, class Compare, class Cons)
12-
import Data.Symbol (SProxy(..), class IsSymbol, reflectSymbol, reifySymbol)
12+
import Data.Symbol (class IsSymbol, reflectSymbol, reifySymbol)
1313
import Type.Data.Ordering (EQ)
1414
import Type.Data.Ordering (class Equals) as Ordering
1515
import Type.Proxy (Proxy(..))
1616

17-
compare :: forall proxy l r o. Compare l r o => proxy l -> proxy r -> Proxy o
17+
compare :: forall l r o. Compare l r o => Proxy l -> Proxy r -> Proxy o
1818
compare _ _ = Proxy
1919

20-
append :: forall proxy l r o. Append l r o => proxy l -> proxy r -> Proxy o
20+
append :: forall l r o. Append l r o => Proxy l -> Proxy r -> Proxy o
2121
append _ _ = Proxy
2222

23-
uncons :: forall proxy h t s. Cons h t s => proxy s -> {head :: Proxy h, tail :: Proxy t}
23+
uncons :: forall h t s. Cons h t s => Proxy s -> {head :: Proxy h, tail :: Proxy t}
2424
uncons _ = {head : Proxy, tail : Proxy}
2525

2626
class Equals :: Symbol -> Symbol -> Boolean -> Constraint
@@ -31,5 +31,5 @@ instance equalsSymbol
3131
Ordering.Equals EQ ord out)
3232
=> Equals lhs rhs out
3333

34-
equals :: forall proxy l r o. Equals l r o => proxy l -> proxy r -> Proxy o
34+
equals :: forall l r o. Equals l r o => Proxy l -> Proxy r -> Proxy o
3535
equals _ _ = Proxy

src/Type/Prelude.purs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ module Type.Prelude
88
, module Type.RowList
99
) where
1010

11-
import Type.Data.Boolean (True, False, BProxy(..), class IsBoolean, reflectBoolean, reifyBoolean)
12-
import Type.Data.Ordering (Ordering, LT, EQ, GT, OProxy(..), class IsOrdering, reflectOrdering, reifyOrdering)
11+
import Type.Data.Boolean (True, False, class IsBoolean, reflectBoolean, reifyBoolean)
12+
import Type.Data.Ordering (Ordering, LT, EQ, GT, class IsOrdering, reflectOrdering, reifyOrdering)
1313
import Type.Proxy (Proxy(..))
14-
import Type.Data.Symbol (SProxy(..), class IsSymbol, reflectSymbol, reifySymbol, class Compare, compare, class Append, append)
14+
import Type.Data.Symbol (class IsSymbol, reflectSymbol, reifySymbol, class Compare, compare, class Append, append)
1515
import Type.Equality (class TypeEquals, from, to)
16-
import Type.Row (class Union, class Lacks, RProxy(..))
17-
import Type.RowList (class RowToList, class ListToRow, RLProxy(..))
16+
import Type.Row (class Union, class Lacks)
17+
import Type.RowList (class RowToList, class ListToRow)

src/Type/Row.purs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
module Type.Row
22
( module Prim.Row
3-
, module RProxy
43
, RowApply
54
, type (+)
65
) where
76

87
import Prim.Row (class Lacks, class Nub, class Cons, class Union)
9-
import Type.Data.Row (RProxy(..)) as RProxy
108

119
-- | Type application for rows.
1210
type RowApply :: forall k. (Row k -> Row k) -> Row k -> Row k

src/Type/RowList.purs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module Type.RowList
22
( module Prim.RowList
3-
, module RLProxy
43
, class ListToRow
54
, class RowListRemove
65
, class RowListSet
@@ -13,7 +12,6 @@ import Prim.RowList (RowList, Cons, Nil, class RowToList)
1312
import Type.Equality (class TypeEquals)
1413
import Type.Data.Symbol as Symbol
1514
import Type.Data.Boolean as Boolean
16-
import Type.Data.RowList (RLProxy(..)) as RLProxy
1715

1816
-- | Convert a RowList to a row of types.
1917
-- | The inverse of this operation is `RowToList`.

0 commit comments

Comments
 (0)