This repository was archived by the owner on Apr 14, 2020. It is now read-only.
File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1240,13 +1240,13 @@ fn test_operators() {
1240
1240
#[ test]
1241
1241
fn parse_instance_class ( ) {
1242
1242
let mut parser = Parser :: new (
1243
- r"class Eq a where_bindings
1243
+ r"class Eq a where
1244
1244
(==) :: a -> a -> Bool
1245
1245
(/=) x y = not (x == y)
1246
1246
(/=) :: a -> a -> Bool
1247
1247
1248
1248
1249
- instance Eq a => Eq [a] where_bindings
1249
+ instance Eq a => Eq [a] where
1250
1250
(==) xs ys = undefined" . chars ( ) ) ;
1251
1251
let module = parser. module ( ) ;
1252
1252
@@ -1262,7 +1262,7 @@ instance Eq a => Eq [a] where_bindings
1262
1262
#[ test]
1263
1263
fn parse_super_class ( ) {
1264
1264
let mut parser = Parser :: new (
1265
- r"class Eq a => Ord a where_bindings
1265
+ r"class Eq a => Ord a where
1266
1266
(<) :: a -> a -> Bool
1267
1267
1268
1268
" . chars ( ) ) ;
@@ -1403,20 +1403,20 @@ fn where_bindings() {
1403
1403
r"
1404
1404
test = case a of
1405
1405
x:y:xs -> z
1406
- where_bindings
1406
+ where
1407
1407
z = x + y
1408
1408
x:xs -> x
1409
1409
[] -> z
1410
- where_bindings z = 0
1411
- where_bindings
1410
+ where z = 0
1411
+ where
1412
1412
a = []
1413
1413
" . chars ( ) ) ;
1414
1414
let bind = parser. binding ( ) ;
1415
1415
match bind. matches {
1416
1416
Match :: Simple ( ref e) => {
1417
1417
match e. expr {
1418
1418
Case ( _, ref alts) => {
1419
- let w = alts[ 0 ] . where_bindings . as_ref ( ) . expect ( "Expected where_bindings " ) ;
1419
+ let w = alts[ 0 ] . where_bindings . as_ref ( ) . expect ( "Expected where " ) ;
1420
1420
assert_eq ! ( w[ 0 ] . name, intern( "z" ) ) ;
1421
1421
assert_eq ! ( w[ 0 ] . matches, Match :: Simple ( op_apply( identifier( "x" ) , intern( "+" ) , identifier( "y" ) ) ) ) ;
1422
1422
let w2 = alts[ 2 ] . where_bindings . as_ref ( ) . expect ( "Expected where_bindings" ) ;
You can’t perform that action at this time.
0 commit comments