33{-# LANGUAGE DataKinds #-}
44{-# LANGUAGE DuplicateRecordFields #-}
55{-# LANGUAGE GADTs #-}
6- {-# LANGUAGE ImplicitParams #-}
76{-# LANGUAGE LambdaCase #-}
8- {-# LANGUAGE MultiWayIf #-}
97{-# LANGUAGE NamedFieldPuns #-}
108{-# LANGUAGE OverloadedStrings #-}
119{-# LANGUAGE PatternSynonyms #-}
@@ -2388,11 +2386,9 @@ addTypeAnnotationsToLiteralsTest = testGroup "add type annotations to literals t
23882386 , " "
23892387 , " f = 1"
23902388 ])
2391- #if MIN_VERSION_ghc(9,4,0)
2392- [ (DiagnosticSeverity_Warning , (3 , 4 ), " Defaulting the type variable" ) ]
2393- #else
2394- [ (DiagnosticSeverity_Warning , (3 , 4 ), " Defaulting the following constraint" ) ]
2395- #endif
2389+ (if ghcVersion >= GHC94
2390+ then [ (DiagnosticSeverity_Warning , (3 , 4 ), " Defaulting the type variable" ) ]
2391+ else [ (DiagnosticSeverity_Warning , (3 , 4 ), " Defaulting the following constraint" ) ])
23962392 " Add type annotation ‘Integer’ to ‘1’"
23972393 (T. unlines [ " {-# OPTIONS_GHC -Wtype-defaults #-}"
23982394 , " module A (f) where"
@@ -2409,11 +2405,9 @@ addTypeAnnotationsToLiteralsTest = testGroup "add type annotations to literals t
24092405 , " let x = 3"
24102406 , " in x"
24112407 ])
2412- #if MIN_VERSION_ghc(9,4,0)
2413- [ (DiagnosticSeverity_Warning , (4 , 12 ), " Defaulting the type variable" ) ]
2414- #else
2415- [ (DiagnosticSeverity_Warning , (4 , 12 ), " Defaulting the following constraint" ) ]
2416- #endif
2408+ (if ghcVersion >= GHC94
2409+ then [ (DiagnosticSeverity_Warning , (4 , 12 ), " Defaulting the type variable" ) ]
2410+ else [ (DiagnosticSeverity_Warning , (4 , 12 ), " Defaulting the following constraint" ) ])
24172411 " Add type annotation ‘Integer’ to ‘3’"
24182412 (T. unlines [ " {-# OPTIONS_GHC -Wtype-defaults #-}"
24192413 , " module A where"
@@ -2431,11 +2425,9 @@ addTypeAnnotationsToLiteralsTest = testGroup "add type annotations to literals t
24312425 , " let x = let y = 5 in y"
24322426 , " in x"
24332427 ])
2434- #if MIN_VERSION_ghc(9,4,0)
2435- [ (DiagnosticSeverity_Warning , (4 , 20 ), " Defaulting the type variable" ) ]
2436- #else
2437- [ (DiagnosticSeverity_Warning , (4 , 20 ), " Defaulting the following constraint" ) ]
2438- #endif
2428+ (if ghcVersion >= GHC94
2429+ then [ (DiagnosticSeverity_Warning , (4 , 20 ), " Defaulting the type variable" ) ]
2430+ else [ (DiagnosticSeverity_Warning , (4 , 20 ), " Defaulting the following constraint" ) ])
24392431 " Add type annotation ‘Integer’ to ‘5’"
24402432 (T. unlines [ " {-# OPTIONS_GHC -Wtype-defaults #-}"
24412433 , " module A where"
@@ -2454,15 +2446,15 @@ addTypeAnnotationsToLiteralsTest = testGroup "add type annotations to literals t
24542446 , " "
24552447 , " f = seq \" debug\" traceShow \" debug\" "
24562448 ])
2457- #if MIN_VERSION_ghc(9,4,0)
2458- [ ( DiagnosticSeverity_Warning , ( 6 , 8 ), " Defaulting the type variable " )
2459- , (DiagnosticSeverity_Warning , (6 , 16 ), " Defaulting the type variable" )
2460- ]
2461- #else
2462- [ ( DiagnosticSeverity_Warning , ( 6 , 8 ), " Defaulting the following constraint " )
2463- , (DiagnosticSeverity_Warning , (6 , 16 ), " Defaulting the following constraint" )
2464- ]
2465- #endif
2449+ ( if ghcVersion >= GHC94
2450+ then
2451+ [ (DiagnosticSeverity_Warning , (6 , 8 ), " Defaulting the type variable" )
2452+ , ( DiagnosticSeverity_Warning , ( 6 , 16 ), " Defaulting the type variable " )
2453+ ]
2454+ else
2455+ [ (DiagnosticSeverity_Warning , (6 , 8 ), " Defaulting the following constraint" )
2456+ , ( DiagnosticSeverity_Warning , ( 6 , 16 ), " Defaulting the following constraint " )
2457+ ])
24662458 (" Add type annotation ‘" <> listOfChar <> " ’ to ‘\" debug\" ’" )
24672459 (T. unlines [ " {-# OPTIONS_GHC -Wtype-defaults #-}"
24682460 , " {-# LANGUAGE OverloadedStrings #-}"
@@ -2482,11 +2474,9 @@ addTypeAnnotationsToLiteralsTest = testGroup "add type annotations to literals t
24822474 , " "
24832475 , " f a = traceShow \" debug\" a"
24842476 ])
2485- #if MIN_VERSION_ghc(9,4,0)
2486- [ (DiagnosticSeverity_Warning , (6 , 6 ), " Defaulting the type variable" ) ]
2487- #else
2488- [ (DiagnosticSeverity_Warning , (6 , 6 ), " Defaulting the following constraint" ) ]
2489- #endif
2477+ (if ghcVersion >= GHC94
2478+ then [ (DiagnosticSeverity_Warning , (6 , 6 ), " Defaulting the type variable" ) ]
2479+ else [ (DiagnosticSeverity_Warning , (6 , 6 ), " Defaulting the following constraint" ) ])
24902480 (" Add type annotation ‘" <> listOfChar <> " ’ to ‘\" debug\" ’" )
24912481 (T. unlines [ " {-# OPTIONS_GHC -Wtype-defaults #-}"
24922482 , " {-# LANGUAGE OverloadedStrings #-}"
@@ -2506,11 +2496,9 @@ addTypeAnnotationsToLiteralsTest = testGroup "add type annotations to literals t
25062496 , " "
25072497 , " f = seq (\" debug\" :: [Char]) (seq (\" debug\" :: [Char]) (traceShow \" debug\" ))"
25082498 ])
2509- #if MIN_VERSION_ghc(9,4,0)
2510- [ (DiagnosticSeverity_Warning , (6 , 54 ), " Defaulting the type variable" ) ]
2511- #else
2512- [ (DiagnosticSeverity_Warning , (6 , 54 ), " Defaulting the following constraint" ) ]
2513- #endif
2499+ (if ghcVersion >= GHC94
2500+ then [ (DiagnosticSeverity_Warning , (6 , 54 ), " Defaulting the type variable" ) ]
2501+ else [ (DiagnosticSeverity_Warning , (6 , 54 ), " Defaulting the following constraint" ) ])
25142502 (" Add type annotation ‘" <> listOfChar <> " ’ to ‘\" debug\" ’" )
25152503 (T. unlines [ " {-# OPTIONS_GHC -Wtype-defaults #-}"
25162504 , " {-# LANGUAGE OverloadedStrings #-}"
0 commit comments