@@ -3413,6 +3413,19 @@ exportUnusedTests = testGroup "export unused actions"
3413
3413
, " module A (pattern Foo) where"
3414
3414
, " pattern Foo a <- (a, _)"
3415
3415
]
3416
+ , testSession " unused pattern synonym symbol" $ template
3417
+ [ " {-# OPTIONS_GHC -Wunused-top-binds #-}"
3418
+ , " {-# LANGUAGE PatternSynonyms #-}"
3419
+ , " module A () where"
3420
+ , " pattern x :+ y = (x, y)"
3421
+ ]
3422
+ (R 3 0 3 12 )
3423
+ " Export ‘:+’"
3424
+ [ " {-# OPTIONS_GHC -Wunused-top-binds #-}"
3425
+ , " {-# LANGUAGE PatternSynonyms #-}"
3426
+ , " module A (pattern (:+)) where"
3427
+ , " pattern x :+ y = (x, y)"
3428
+ ]
3416
3429
, testSession " unused data type" $ template
3417
3430
[ " {-# OPTIONS_GHC -Wunused-top-binds #-}"
3418
3431
, " module A () where"
@@ -3459,6 +3472,19 @@ exportUnusedTests = testGroup "export unused actions"
3459
3472
, " module A (Foo) where"
3460
3473
, " type family Foo p"
3461
3474
]
3475
+ , testSession " unused type family symbol" $ template
3476
+ [ " {-# OPTIONS_GHC -Wunused-top-binds #-}"
3477
+ , " {-# LANGUAGE TypeFamilies #-}"
3478
+ , " module A () where"
3479
+ , " type family p &&& q"
3480
+ ]
3481
+ (R 3 0 3 10 )
3482
+ " Export ‘&&&’"
3483
+ [ " {-# OPTIONS_GHC -Wunused-top-binds #-}"
3484
+ , " {-# LANGUAGE TypeFamilies #-}"
3485
+ , " module A (type (&&&)) where"
3486
+ , " type family p &&& q"
3487
+ ]
3462
3488
, testSession " unused typeclass" $ template
3463
3489
[ " {-# OPTIONS_GHC -Wunused-top-binds #-}"
3464
3490
, " module A () where"
@@ -3470,6 +3496,17 @@ exportUnusedTests = testGroup "export unused actions"
3470
3496
, " module A (Foo(..)) where"
3471
3497
, " class Foo a"
3472
3498
]
3499
+ , testSession " unused typeclass symbol" $ template
3500
+ [ " {-# OPTIONS_GHC -Wunused-top-binds #-}"
3501
+ , " module A () where"
3502
+ , " class p &&& q"
3503
+ ]
3504
+ (R 2 0 2 10 )
3505
+ " Export ‘&&&’"
3506
+ [ " {-# OPTIONS_GHC -Wunused-top-binds #-}"
3507
+ , " module A (type (&&&)(..)) where"
3508
+ , " class p &&& q"
3509
+ ]
3473
3510
, testSession " infix" $ template
3474
3511
[ " {-# OPTIONS_GHC -Wunused-top-binds #-}"
3475
3512
, " module A () where"
0 commit comments