Skip to content

Commit d5d3dfd

Browse files
committed
Polykinded Type.Equality.TypeEquals
1 parent 1e4047b commit d5d3dfd

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
],
1818
"dependencies": {
1919
"purescript-prelude": "master",
20-
"purescript-type-equality": "master"
20+
"purescript-type-equality": "leibniz"
2121
}
2222
}

src/Type/RowList.purs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import Prim.RowList (RowList, Cons, Nil, class RowToList)
1313
import Type.Equality (class TypeEquals)
1414
import Type.Data.Symbol as Symbol
1515
import Type.Data.Boolean as Boolean
16-
import Type.Data.RowList (RLProxy)
1716
import Type.Data.RowList (RLProxy(..)) as RLProxy
1817

1918
-- | Convert a RowList to a row of types.
@@ -51,7 +50,7 @@ class RowListSet :: forall k. Symbol -> k -> RowList k -> RowList k -> Constrain
5150
class RowListSet label typ input output | label typ input -> output
5251

5352
instance rowListSetImpl
54-
:: ( TypeEquals (Symbol.SProxy label) (Symbol.SProxy label')
53+
:: ( TypeEquals label label'
5554
, TypeEquals typ typ'
5655
, RowListRemove label input lacking )
5756
=> RowListSet label typ input (Cons label' typ' lacking)
@@ -64,9 +63,9 @@ instance rowListNubNil
6463
:: RowListNub Nil Nil
6564

6665
instance rowListNubCons
67-
:: ( TypeEquals (Symbol.SProxy label) (Symbol.SProxy label')
66+
:: ( TypeEquals label label'
6867
, TypeEquals head head'
69-
, TypeEquals (RLProxy nubbed) (RLProxy nubbed')
68+
, TypeEquals nubbed nubbed'
7069
, RowListRemove label tail removed
7170
, RowListNub removed nubbed )
7271
=> RowListNub (Cons label head tail) (Cons label' head' nubbed')
@@ -76,10 +75,10 @@ class RowListAppend :: forall k. RowList k -> RowList k -> RowList k -> Constrai
7675
class RowListAppend lhs rhs out | lhs rhs -> out
7776

7877
instance rowListAppendNil
79-
:: TypeEquals (RLProxy rhs) (RLProxy out)
78+
:: TypeEquals rhs out
8079
=> RowListAppend Nil rhs out
8180

8281
instance rowListAppendCons
8382
:: ( RowListAppend tail rhs out'
84-
, TypeEquals (RLProxy (Cons label head out')) (RLProxy out) )
83+
, TypeEquals (Cons label head out') out )
8584
=> RowListAppend (Cons label head tail) rhs out

0 commit comments

Comments
 (0)