diff options
Diffstat (limited to 'testsuite/tests')
846 files changed, 1736 insertions, 1213 deletions
diff --git a/testsuite/tests/annotations/should_fail/T10826.hs b/testsuite/tests/annotations/should_fail/T10826.hs index cddf33ca6f..1c80713da4 100644 --- a/testsuite/tests/annotations/should_fail/T10826.hs +++ b/testsuite/tests/annotations/should_fail/T10826.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Test (hook) where diff --git a/testsuite/tests/annotations/should_fail/T10826.stderr b/testsuite/tests/annotations/should_fail/T10826.stderr index 465715ad3e..15ba942e81 100644 --- a/testsuite/tests/annotations/should_fail/T10826.stderr +++ b/testsuite/tests/annotations/should_fail/T10826.stderr @@ -1,6 +1,6 @@ -T10826.hs:6:1: error: - Annotations are not compatible with Safe Haskell. - See https://gitlab.haskell.org/ghc/ghc/issues/10826 - In the annotation: - {-# ANN hook (unsafePerformIO (putStrLn "Woops.")) #-} +T10826.hs:7:1: error: + • Annotations are not compatible with Safe Haskell. + See https://gitlab.haskell.org/ghc/ghc/issues/10826 + • In the annotation: + {-# ANN hook (unsafePerformIO (putStrLn "Woops.")) #-} diff --git a/testsuite/tests/backpack/should_compile/T13140.bkp b/testsuite/tests/backpack/should_compile/T13140.bkp index aa04b98c1e..0125a6400b 100644 --- a/testsuite/tests/backpack/should_compile/T13140.bkp +++ b/testsuite/tests/backpack/should_compile/T13140.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RoleAnnotations #-} unit p where signature A where diff --git a/testsuite/tests/backpack/should_compile/bkp32.bkp b/testsuite/tests/backpack/should_compile/bkp32.bkp index 92f37a5a05..c90a323d59 100644 --- a/testsuite/tests/backpack/should_compile/bkp32.bkp +++ b/testsuite/tests/backpack/should_compile/bkp32.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE ScopedTypeVariables #-} unit prelude-sig where diff --git a/testsuite/tests/backpack/should_compile/bkp37.bkp b/testsuite/tests/backpack/should_compile/bkp37.bkp index 7f116dc93d..9bd70ff6ec 100644 --- a/testsuite/tests/backpack/should_compile/bkp37.bkp +++ b/testsuite/tests/backpack/should_compile/bkp37.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleInstances #-} unit p where signature A where diff --git a/testsuite/tests/backpack/should_compile/bkp38.bkp b/testsuite/tests/backpack/should_compile/bkp38.bkp index 952367512c..41ea93cf24 100644 --- a/testsuite/tests/backpack/should_compile/bkp38.bkp +++ b/testsuite/tests/backpack/should_compile/bkp38.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RoleAnnotations #-} unit p where diff --git a/testsuite/tests/backpack/should_compile/bkp39.bkp b/testsuite/tests/backpack/should_compile/bkp39.bkp index a6216edc24..4af903856f 100644 --- a/testsuite/tests/backpack/should_compile/bkp39.bkp +++ b/testsuite/tests/backpack/should_compile/bkp39.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ConstraintKinds #-} unit p where signature A where diff --git a/testsuite/tests/backpack/should_compile/bkp40.bkp b/testsuite/tests/backpack/should_compile/bkp40.bkp index 3f97456686..d149d75877 100644 --- a/testsuite/tests/backpack/should_compile/bkp40.bkp +++ b/testsuite/tests/backpack/should_compile/bkp40.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/backpack/should_compile/bkp48.bkp b/testsuite/tests/backpack/should_compile/bkp48.bkp index d48d0359d2..75c8bb6e2f 100644 --- a/testsuite/tests/backpack/should_compile/bkp48.bkp +++ b/testsuite/tests/backpack/should_compile/bkp48.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} unit p where signature A where diff --git a/testsuite/tests/backpack/should_fail/bkpfail17.bkp b/testsuite/tests/backpack/should_fail/bkpfail17.bkp index 847bdfaf58..5729d8c662 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail17.bkp +++ b/testsuite/tests/backpack/should_fail/bkpfail17.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE NoImplicitPrelude #-} unit p where signature ShouldFail where diff --git a/testsuite/tests/backpack/should_fail/bkpfail17.stderr b/testsuite/tests/backpack/should_fail/bkpfail17.stderr index 81e47ec524..2777b503ed 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail17.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail17.stderr @@ -2,8 +2,8 @@ [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, nothing ) [2 of 2] Processing q Instantiating q - [1 of 1] Including p[ShouldFail=base-4.13.0.0:Prelude] - Instantiating p[ShouldFail=base-4.13.0.0:Prelude] + [1 of 1] Including p[ShouldFail=base-4.16.0.0:Prelude] + Instantiating p[ShouldFail=base-4.16.0.0:Prelude] [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, bkpfail17.out/p/p-2W6J7O3LvroH97zGxbPEGF/ShouldFail.o ) <no location info>: error: diff --git a/testsuite/tests/backpack/should_fail/bkpfail23.bkp b/testsuite/tests/backpack/should_fail/bkpfail23.bkp index a7e52cef4f..831ce42c72 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail23.bkp +++ b/testsuite/tests/backpack/should_fail/bkpfail23.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs, RoleAnnotations #-} unit p where signature H where diff --git a/testsuite/tests/backpack/should_fail/bkpfail23.stderr b/testsuite/tests/backpack/should_fail/bkpfail23.stderr index 6a2eb8ce1e..a8144dbde5 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail23.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail23.stderr @@ -10,7 +10,7 @@ Instantiating p[H=h:H] [1 of 2] Compiling H[sig] ( p/H.hsig, bkpfail23.out/p/p-6KeuBvYi0jvLWqVbkSAZMq/H.o ) -bkpfail23.bkp:14:9: error: +bkpfail23.bkp:15:9: error: • Type constructor ‘F’ has conflicting definitions in the module and its hsig file Main module: type F :: * -> * diff --git a/testsuite/tests/backpack/should_fail/bkpfail25.bkp b/testsuite/tests/backpack/should_fail/bkpfail25.bkp index 322a70a93e..234e9bd137 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail25.bkp +++ b/testsuite/tests/backpack/should_fail/bkpfail25.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeSynonymInstances #-} unit p where signature H where diff --git a/testsuite/tests/backpack/should_fail/bkpfail25.stderr b/testsuite/tests/backpack/should_fail/bkpfail25.stderr index cedcd30399..08cb0711fe 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail25.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail25.stderr @@ -2,7 +2,7 @@ [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) [2 of 2] Compiling M ( p/M.hs, nothing ) -bkpfail25.bkp:7:18: warning: [-Wmissing-methods (in -Wdefault)] +bkpfail25.bkp:8:18: warning: [-Wmissing-methods (in -Wdefault)] • No explicit implementation for ‘fmap’ • In the instance declaration for ‘Functor T’ @@ -15,7 +15,7 @@ bkpfail25.bkp:7:18: warning: [-Wmissing-methods (in -Wdefault)] Instantiating p[H=q:H] [1 of 2] Compiling H[sig] ( p/H.hsig, bkpfail25.out/p/p-D5Mg3foBSCrDbQDKH4WGSG/H.o ) -bkpfail25.bkp:12:9: error: +bkpfail25.bkp:13:9: error: • Type constructor ‘T’ has conflicting definitions in the module and its hsig file Main module: type T :: * -> * diff --git a/testsuite/tests/backpack/should_fail/bkpfail26.bkp b/testsuite/tests/backpack/should_fail/bkpfail26.bkp index 5ea5b6bada..13592b682f 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail26.bkp +++ b/testsuite/tests/backpack/should_fail/bkpfail26.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeSynonymInstances #-} unit p where signature H where diff --git a/testsuite/tests/backpack/should_fail/bkpfail26.stderr b/testsuite/tests/backpack/should_fail/bkpfail26.stderr index 09410cedfe..f697f47212 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail26.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail26.stderr @@ -10,7 +10,7 @@ Instantiating p[H=q:H] [1 of 2] Compiling H[sig] ( p/H.hsig, bkpfail26.out/p/p-D5Mg3foBSCrDbQDKH4WGSG/H.o ) -bkpfail26.bkp:15:9: error: +bkpfail26.bkp:16:9: error: • Type constructor ‘T’ has conflicting definitions in the module and its hsig file Main module: type T :: * -> * diff --git a/testsuite/tests/backpack/should_fail/bkpfail28.bkp b/testsuite/tests/backpack/should_fail/bkpfail28.bkp index aa3f1a489b..5c3ba454f7 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail28.bkp +++ b/testsuite/tests/backpack/should_fail/bkpfail28.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleInstances #-} -- This doesn't work: GHC MUST pick the wrong one! -- {-# LANGUAGE IncoherentInstances #-} diff --git a/testsuite/tests/backpack/should_fail/bkpfail28.stderr b/testsuite/tests/backpack/should_fail/bkpfail28.stderr index 4850e19240..ef8d72cfe3 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail28.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail28.stderr @@ -6,22 +6,22 @@ [1 of 4] Compiling A[sig] ( r/A.hsig, nothing ) [2 of 4] Compiling R ( r/R.hs, nothing ) -bkpfail28.bkp:18:13: error: +bkpfail28.bkp:19:13: error: • Overlapping instances for Show (K a) arising from a use of ‘show’ Matching instances: instance [safe] Show a => Show (K a) - -- Defined at bkpfail28.bkp:11:18 + -- Defined at bkpfail28.bkp:12:18 instance [safe] Read a => Show (K a) - -- Defined at bkpfail28.bkp:11:18 + -- Defined at bkpfail28.bkp:12:18 • In the expression: show In an equation for ‘f’: f = show -bkpfail28.bkp:20:13: error: +bkpfail28.bkp:21:13: error: • Overlapping instances for Show (K a) arising from a use of ‘show’ Matching instances: instance [safe] Show a => Show (K a) - -- Defined at bkpfail28.bkp:11:18 + -- Defined at bkpfail28.bkp:12:18 instance [safe] Read a => Show (K a) - -- Defined at bkpfail28.bkp:11:18 + -- Defined at bkpfail28.bkp:12:18 • In the expression: show In an equation for ‘g’: g = show diff --git a/testsuite/tests/backpack/should_fail/bkpfail42.bkp b/testsuite/tests/backpack/should_fail/bkpfail42.bkp index 8face3f3be..dd305e8344 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail42.bkp +++ b/testsuite/tests/backpack/should_fail/bkpfail42.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} unit p where signature A where diff --git a/testsuite/tests/backpack/should_fail/bkpfail42.stderr b/testsuite/tests/backpack/should_fail/bkpfail42.stderr index aa6857e9a1..0dfef9355f 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail42.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail42.stderr @@ -3,7 +3,7 @@ [2 of 2] Processing q [1 of 2] Compiling A[sig] ( q/A.hsig, nothing ) -bkpfail42.bkp:9:9: error: +bkpfail42.bkp:10:9: error: • Type constructor ‘F’ has conflicting definitions in the module and its hsig file Main module: type F :: * -> * diff --git a/testsuite/tests/backpack/should_fail/bkpfail45.bkp b/testsuite/tests/backpack/should_fail/bkpfail45.bkp index f60d45fd6a..2222442bb3 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail45.bkp +++ b/testsuite/tests/backpack/should_fail/bkpfail45.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RoleAnnotations, FlexibleContexts #-} unit p where signature A where diff --git a/testsuite/tests/backpack/should_fail/bkpfail45.stderr b/testsuite/tests/backpack/should_fail/bkpfail45.stderr index f28f18316b..e2b4236aab 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail45.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail45.stderr @@ -10,7 +10,7 @@ Instantiating p[A=a:A] [1 of 2] Compiling A[sig] ( p/A.hsig, bkpfail45.out/p/p-KvF5Y9pEVY39j64PHPNj9i/A.o ) -bkpfail45.bkp:13:9: error: +bkpfail45.bkp:14:9: error: • Type constructor ‘T’ has conflicting definitions in the module and its hsig file Main module: type role T phantom diff --git a/testsuite/tests/backpack/should_fail/bkpfail46.bkp b/testsuite/tests/backpack/should_fail/bkpfail46.bkp index 0fc8b676a8..7c59223d73 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail46.bkp +++ b/testsuite/tests/backpack/should_fail/bkpfail46.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ConstraintKinds #-} unit p where signature A where diff --git a/testsuite/tests/backpack/should_fail/bkpfail46.stderr b/testsuite/tests/backpack/should_fail/bkpfail46.stderr index 908866f67c..5ab1a5fddb 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail46.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail46.stderr @@ -10,7 +10,7 @@ Instantiating p[A=q:A] [1 of 2] Compiling A[sig] ( p/A.hsig, bkpfail46.out/p/p-HVmFlcYSefiK5n1aDP1v7x/A.o ) -bkpfail46.bkp:15:9: error: +bkpfail46.bkp:16:9: error: • Type constructor ‘K’ has conflicting definitions in the module and its hsig file Main module: type K :: * -> Constraint diff --git a/testsuite/tests/backpack/should_fail/bkpfail47.bkp b/testsuite/tests/backpack/should_fail/bkpfail47.bkp index b8d4ae66d8..6d531769ab 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail47.bkp +++ b/testsuite/tests/backpack/should_fail/bkpfail47.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RoleAnnotations #-} unit p where signature A where diff --git a/testsuite/tests/backpack/should_fail/bkpfail47.stderr b/testsuite/tests/backpack/should_fail/bkpfail47.stderr index d7f7c174d6..86453f28ea 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail47.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail47.stderr @@ -5,7 +5,7 @@ [3 of 3] Processing r [1 of 3] Compiling A[sig] ( r/A.hsig, nothing ) -bkpfail47.bkp:9:9: error: +bkpfail47.bkp:10:9: error: • Type constructor ‘T’ has conflicting definitions in the module and its hsig file Main module: type role T representational nominal diff --git a/testsuite/tests/backpack/should_run/bkprun05.bkp b/testsuite/tests/backpack/should_run/bkprun05.bkp index 6db2daa963..1413574f36 100644 --- a/testsuite/tests/backpack/should_run/bkprun05.bkp +++ b/testsuite/tests/backpack/should_run/bkprun05.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RoleAnnotations #-} unit app where signature Map where diff --git a/testsuite/tests/backpack/should_run/bkprun06.bkp b/testsuite/tests/backpack/should_run/bkprun06.bkp index 121c59236b..3c2e91ce41 100644 --- a/testsuite/tests/backpack/should_run/bkprun06.bkp +++ b/testsuite/tests/backpack/should_run/bkprun06.bkp @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RoleAnnotations #-} unit sigs where signature Map where diff --git a/testsuite/tests/codeGen/should_run/cas_int.hs b/testsuite/tests/codeGen/should_run/cas_int.hs index fc830c4d8a..f3c0bd0137 100644 --- a/testsuite/tests/codeGen/should_run/cas_int.hs +++ b/testsuite/tests/codeGen/should_run/cas_int.hs @@ -1,5 +1,6 @@ -{-# LANGUAGE CPP, MagicHash, BlockArguments, UnboxedTuples #-} -{-# LANGUAGE CPP, MagicHash, BlockArguments, ScopedTypeVariables #-} +{-# LANGUAGE Haskell2010 #-} +{-# LANGUAGE NondecreasingIndentation #-} +{-# LANGUAGE CPP, MagicHash, BlockArguments, UnboxedTuples, ScopedTypeVariables #-} -- Test the atomic exchange primop. diff --git a/testsuite/tests/deSugar/should_compile/T2431.hs b/testsuite/tests/deSugar/should_compile/T2431.hs index 57c0a1f312..9c6ecf1ed3 100644 --- a/testsuite/tests/deSugar/should_compile/T2431.hs +++ b/testsuite/tests/deSugar/should_compile/T2431.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeOperators, GADTs, EmptyCase #-} module T2431 where diff --git a/testsuite/tests/deSugar/should_run/T18151.hs b/testsuite/tests/deSugar/should_run/T18151.hs index b17c8a9ff0..59279d44be 100644 --- a/testsuite/tests/deSugar/should_run/T18151.hs +++ b/testsuite/tests/deSugar/should_run/T18151.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- According to the Report this should reduce to (). However, in #18151 it was -- reported that GHC bottoms. x :: () diff --git a/testsuite/tests/dependent/should_compile/Dep2.hs b/testsuite/tests/dependent/should_compile/Dep2.hs index 34be3cffc6..adaf5c3f99 100644 --- a/testsuite/tests/dependent/should_compile/Dep2.hs +++ b/testsuite/tests/dependent/should_compile/Dep2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds, GADTs #-} module Dep2 where diff --git a/testsuite/tests/dependent/should_compile/DkNameRes.hs b/testsuite/tests/dependent/should_compile/DkNameRes.hs index 4110b33882..f871c9cf89 100644 --- a/testsuite/tests/dependent/should_compile/DkNameRes.hs +++ b/testsuite/tests/dependent/should_compile/DkNameRes.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, DataKinds, PolyKinds #-} module DkNameRes where diff --git a/testsuite/tests/dependent/should_compile/KindEqualities2.hs b/testsuite/tests/dependent/should_compile/KindEqualities2.hs index d24502bc71..c798524434 100644 --- a/testsuite/tests/dependent/should_compile/KindEqualities2.hs +++ b/testsuite/tests/dependent/should_compile/KindEqualities2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, GADTs, PolyKinds, TypeFamilies, ExplicitForAll, TemplateHaskell, UndecidableInstances, ScopedTypeVariables #-} diff --git a/testsuite/tests/dependent/should_compile/RaeBlogPost.hs b/testsuite/tests/dependent/should_compile/RaeBlogPost.hs index b048a49e44..d0961dd384 100644 --- a/testsuite/tests/dependent/should_compile/RaeBlogPost.hs +++ b/testsuite/tests/dependent/should_compile/RaeBlogPost.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, PolyKinds, GADTs, TypeOperators, TypeFamilies #-} {-# OPTIONS_GHC -fwarn-unticked-promoted-constructors #-} diff --git a/testsuite/tests/dependent/should_compile/RaeJobTalk.hs b/testsuite/tests/dependent/should_compile/RaeJobTalk.hs index 90a72c2a9a..21d68c2a2b 100644 --- a/testsuite/tests/dependent/should_compile/RaeJobTalk.hs +++ b/testsuite/tests/dependent/should_compile/RaeJobTalk.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {- Copyright (c) 2016 Richard Eisenberg -} diff --git a/testsuite/tests/dependent/should_compile/T11711.hs b/testsuite/tests/dependent/should_compile/T11711.hs index 814b2a4a68..bcbb7cec83 100644 --- a/testsuite/tests/dependent/should_compile/T11711.hs +++ b/testsuite/tests/dependent/should_compile/T11711.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} diff --git a/testsuite/tests/dependent/should_compile/T12442.hs b/testsuite/tests/dependent/should_compile/T12442.hs index b4bcdb9d62..fa0096b4e4 100644 --- a/testsuite/tests/dependent/should_compile/T12442.hs +++ b/testsuite/tests/dependent/should_compile/T12442.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- Based on https://github.com/idris-lang/Idris-dev/blob/v0.9.10/libs/effects/Effects.idr {-# LANGUAGE DataKinds, PolyKinds, ScopedTypeVariables, TypeOperators, diff --git a/testsuite/tests/dependent/should_compile/T14066a.hs b/testsuite/tests/dependent/should_compile/T14066a.hs index 1d6b72491e..23574a2029 100644 --- a/testsuite/tests/dependent/should_compile/T14066a.hs +++ b/testsuite/tests/dependent/should_compile/T14066a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, DataKinds, PolyKinds, ExplicitForAll, GADTs, UndecidableInstances, RankNTypes, ScopedTypeVariables #-} diff --git a/testsuite/tests/dependent/should_compile/T14066a.stderr b/testsuite/tests/dependent/should_compile/T14066a.stderr index e3ee00fcea..889d51b1cf 100644 --- a/testsuite/tests/dependent/should_compile/T14066a.stderr +++ b/testsuite/tests/dependent/should_compile/T14066a.stderr @@ -1,5 +1,5 @@ -T14066a.hs:13:3: warning: +T14066a.hs:14:3: warning: Type family instance equation is overlapped: forall {c} {d} {x :: c} {y :: d}. - Bar x y = Bool -- Defined at T14066a.hs:13:3 + Bar x y = Bool -- Defined at T14066a.hs:14:3 diff --git a/testsuite/tests/dependent/should_compile/T14556.hs b/testsuite/tests/dependent/should_compile/T14556.hs index 133a9e6a44..dd51b05726 100644 --- a/testsuite/tests/dependent/should_compile/T14556.hs +++ b/testsuite/tests/dependent/should_compile/T14556.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language UndecidableInstances, DataKinds, TypeOperators, PolyKinds, TypeFamilies, GADTs, LambdaCase, ScopedTypeVariables #-} diff --git a/testsuite/tests/dependent/should_compile/T14749.hs b/testsuite/tests/dependent/should_compile/T14749.hs index bf3d5c488a..5e9bfb0ea4 100644 --- a/testsuite/tests/dependent/should_compile/T14749.hs +++ b/testsuite/tests/dependent/should_compile/T14749.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs, TypeOperators, DataKinds, TypeFamilies, PolyKinds, TypeFamilyDependencies #-} module T14749 where diff --git a/testsuite/tests/dependent/should_compile/T16326_Compile1.hs b/testsuite/tests/dependent/should_compile/T16326_Compile1.hs index 138ab486ca..857716d489 100644 --- a/testsuite/tests/dependent/should_compile/T16326_Compile1.hs +++ b/testsuite/tests/dependent/should_compile/T16326_Compile1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} diff --git a/testsuite/tests/dependent/should_compile/TypeLevelVec.hs b/testsuite/tests/dependent/should_compile/TypeLevelVec.hs index 0e2f0c7744..9f67efa644 100644 --- a/testsuite/tests/dependent/should_compile/TypeLevelVec.hs +++ b/testsuite/tests/dependent/should_compile/TypeLevelVec.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, PolyKinds, UnicodeSyntax, GADTs, NoImplicitPrelude, TypeOperators, TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unticked-promoted-constructors #-} diff --git a/testsuite/tests/dependent/should_compile/dynamic-paper.hs b/testsuite/tests/dependent/should_compile/dynamic-paper.hs index 6fae39f5a1..eaba011625 100644 --- a/testsuite/tests/dependent/should_compile/dynamic-paper.hs +++ b/testsuite/tests/dependent/should_compile/dynamic-paper.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {- This is the code extracted from "A reflection on types", by Simon PJ, Stephanie Weirich, Richard Eisenberg, and Dimitrios Vytiniotis, 2016. -} diff --git a/testsuite/tests/dependent/should_compile/mkGADTVars.hs b/testsuite/tests/dependent/should_compile/mkGADTVars.hs index 13ac0248bf..13a647b9ce 100644 --- a/testsuite/tests/dependent/should_compile/mkGADTVars.hs +++ b/testsuite/tests/dependent/should_compile/mkGADTVars.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs, PolyKinds, RankNTypes #-} module GADTVars where diff --git a/testsuite/tests/dependent/should_fail/T13601.hs b/testsuite/tests/dependent/should_fail/T13601.hs index a8fa34d4a0..7667201add 100644 --- a/testsuite/tests/dependent/should_fail/T13601.hs +++ b/testsuite/tests/dependent/should_fail/T13601.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, DataKinds, PolyKinds #-} import GHC.Exts diff --git a/testsuite/tests/dependent/should_fail/T13601.stderr b/testsuite/tests/dependent/should_fail/T13601.stderr index bc2877c3e6..269dd00b20 100644 --- a/testsuite/tests/dependent/should_fail/T13601.stderr +++ b/testsuite/tests/dependent/should_fail/T13601.stderr @@ -1,5 +1,5 @@ -T13601.hs:18:16: error: +T13601.hs:19:16: error: • Expected a type, but ‘Logic a’ has kind ‘TYPE (Rep rep)’ • In the first argument of ‘Boolean’, namely ‘(Logic a)’ In the class declaration for ‘Eq’ diff --git a/testsuite/tests/dependent/should_fail/T13780c.hs b/testsuite/tests/dependent/should_fail/T13780c.hs index 78e09f5ef1..c26f9ddbe9 100644 --- a/testsuite/tests/dependent/should_fail/T13780c.hs +++ b/testsuite/tests/dependent/should_fail/T13780c.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds, PolyKinds #-} diff --git a/testsuite/tests/dependent/should_fail/T13780c.stderr b/testsuite/tests/dependent/should_fail/T13780c.stderr index 9a196f4bd7..2cdb59ad1e 100644 --- a/testsuite/tests/dependent/should_fail/T13780c.stderr +++ b/testsuite/tests/dependent/should_fail/T13780c.stderr @@ -1,13 +1,13 @@ [1 of 2] Compiling T13780b ( T13780b.hs, T13780b.o ) [2 of 2] Compiling T13780c ( T13780c.hs, T13780c.o ) -T13780c.hs:11:16: error: +T13780c.hs:12:16: error: • Data constructor ‘SFalse’ cannot be used here (it comes from a data family instance) • In the third argument of ‘ElimBool’, namely ‘SFalse’ In the type family declaration for ‘ElimBool’ -T13780c.hs:12:16: error: +T13780c.hs:13:16: error: • Data constructor ‘STrue’ cannot be used here (it comes from a data family instance) • In the third argument of ‘ElimBool’, namely ‘STrue’ diff --git a/testsuite/tests/dependent/should_fail/T15215.hs b/testsuite/tests/dependent/should_fail/T15215.hs index e4968a1654..98b5e841b8 100644 --- a/testsuite/tests/dependent/should_fail/T15215.hs +++ b/testsuite/tests/dependent/should_fail/T15215.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeInType #-} diff --git a/testsuite/tests/dependent/should_fail/T15215.stderr b/testsuite/tests/dependent/should_fail/T15215.stderr index be2d7c75e7..d852dedc6d 100644 --- a/testsuite/tests/dependent/should_fail/T15215.stderr +++ b/testsuite/tests/dependent/should_fail/T15215.stderr @@ -1,11 +1,11 @@ -T15215.hs:9:3: error: +T15215.hs:10:3: error: • Non type-variable argument in the constraint: Show (Maybe a) (Use FlexibleContexts to permit this) • In the definition of data constructor ‘MkA’ In the data type declaration for ‘A’ -T15215.hs:16:14: error: +T15215.hs:17:14: error: • Data constructor ‘MkB’ cannot be used here (it has an unpromotable context ‘Show a’) • In the first argument of ‘SA’, namely ‘MkB’ diff --git a/testsuite/tests/dependent/should_fail/T15380.hs b/testsuite/tests/dependent/should_fail/T15380.hs index 32ea8ec724..a0e8abc819 100644 --- a/testsuite/tests/dependent/should_fail/T15380.hs +++ b/testsuite/tests/dependent/should_fail/T15380.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeOperators #-} diff --git a/testsuite/tests/dependent/should_fail/T15380.stderr b/testsuite/tests/dependent/should_fail/T15380.stderr index 9b30078c64..405d572c73 100644 --- a/testsuite/tests/dependent/should_fail/T15380.stderr +++ b/testsuite/tests/dependent/should_fail/T15380.stderr @@ -1,5 +1,5 @@ -T15380.hs:16:16: error: +T15380.hs:17:16: error: • Expecting one more argument to ‘To (M x)’ Expected a type, but ‘To (M x)’ has kind ‘Rep (M x) -> M x’ • In the type ‘To (M x)’ diff --git a/testsuite/tests/dependent/should_fail/T16326_Fail7.hs b/testsuite/tests/dependent/should_fail/T16326_Fail7.hs index 9c3801faf0..a7999ca069 100644 --- a/testsuite/tests/dependent/should_fail/T16326_Fail7.hs +++ b/testsuite/tests/dependent/should_fail/T16326_Fail7.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds #-} module T16326_Fail7 where diff --git a/testsuite/tests/dependent/should_fail/T16326_Fail7.stderr b/testsuite/tests/dependent/should_fail/T16326_Fail7.stderr index 13fc416995..c5aba0b06d 100644 --- a/testsuite/tests/dependent/should_fail/T16326_Fail7.stderr +++ b/testsuite/tests/dependent/should_fail/T16326_Fail7.stderr @@ -1,5 +1,5 @@ -T16326_Fail7.hs:8:13: error: +T16326_Fail7.hs:9:13: error: Illegal symbol ‘forall’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type> diff --git a/testsuite/tests/deriving/should_compile/T12144_2.hs b/testsuite/tests/deriving/should_compile/T12144_2.hs index dc9f64e90e..d3e5f771db 100644 --- a/testsuite/tests/deriving/should_compile/T12144_2.hs +++ b/testsuite/tests/deriving/should_compile/T12144_2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveAnyClass #-} module T12144_2 where diff --git a/testsuite/tests/deriving/should_compile/T14578.hs b/testsuite/tests/deriving/should_compile/T14578.hs index d0700ea9b0..231796cda9 100644 --- a/testsuite/tests/deriving/should_compile/T14578.hs +++ b/testsuite/tests/deriving/should_compile/T14578.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module T14578 where diff --git a/testsuite/tests/deriving/should_compile/T14579.hs b/testsuite/tests/deriving/should_compile/T14579.hs index 518dffe214..9addb5bc53 100644 --- a/testsuite/tests/deriving/should_compile/T14579.hs +++ b/testsuite/tests/deriving/should_compile/T14579.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} diff --git a/testsuite/tests/deriving/should_compile/T14933.hs b/testsuite/tests/deriving/should_compile/T14933.hs index de8562d189..5ab808365f 100644 --- a/testsuite/tests/deriving/should_compile/T14933.hs +++ b/testsuite/tests/deriving/should_compile/T14933.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE TypeFamilies #-} diff --git a/testsuite/tests/deriving/should_compile/T17339.hs b/testsuite/tests/deriving/should_compile/T17339.hs index 4312d2ffc4..a46e4c793d 100644 --- a/testsuite/tests/deriving/should_compile/T17339.hs +++ b/testsuite/tests/deriving/should_compile/T17339.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE MultiParamTypeClasses #-} diff --git a/testsuite/tests/deriving/should_compile/deriving-1935.hs b/testsuite/tests/deriving/should_compile/deriving-1935.hs index d33b21af13..af62a747d4 100644 --- a/testsuite/tests/deriving/should_compile/deriving-1935.hs +++ b/testsuite/tests/deriving/should_compile/deriving-1935.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -XDeriveDataTypeable #-} -- #1935 diff --git a/testsuite/tests/deriving/should_compile/deriving-1935.stderr b/testsuite/tests/deriving/should_compile/deriving-1935.stderr index 091990bcd9..3864e8e2f0 100644 --- a/testsuite/tests/deriving/should_compile/deriving-1935.stderr +++ b/testsuite/tests/deriving/should_compile/deriving-1935.stderr @@ -1,15 +1,15 @@ -deriving-1935.hs:17:11: warning: [-Wmissing-methods (in -Wdefault)] +deriving-1935.hs:18:11: warning: [-Wmissing-methods (in -Wdefault)] • No explicit implementation for either ‘==’ or ‘/=’ • In the instance declaration for ‘Eq (T a)’ -deriving-1935.hs:20:11: warning: [-Wmissing-methods (in -Wdefault)] +deriving-1935.hs:21:11: warning: [-Wmissing-methods (in -Wdefault)] • No explicit implementation for either ‘==’ or ‘/=’ • In the instance declaration for ‘Eq (S a)’ -deriving-1935.hs:21:11: warning: [-Wmissing-methods (in -Wdefault)] +deriving-1935.hs:22:11: warning: [-Wmissing-methods (in -Wdefault)] • No explicit implementation for either ‘compare’ or ‘<=’ • In the instance declaration for ‘Ord (S a)’ diff --git a/testsuite/tests/deriving/should_compile/drv-empty-data.hs b/testsuite/tests/deriving/should_compile/drv-empty-data.hs index 383ce8f9f7..0383b29dbb 100644 --- a/testsuite/tests/deriving/should_compile/drv-empty-data.hs +++ b/testsuite/tests/deriving/should_compile/drv-empty-data.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE DeriveTraversable, DeriveGeneric, EmptyCase, DeriveDataTypeable, StandaloneDeriving, DeriveLift #-} diff --git a/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.hs b/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.hs index 712f14a3b5..52e845798a 100644 --- a/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.hs +++ b/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts, DatatypeContexts #-} diff --git a/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr b/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr index ceae10cabd..e8dc7162c2 100644 --- a/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr +++ b/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr @@ -1,3 +1,3 @@ -drv-foldable-traversable1.hs:3:32: - Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. +drv-foldable-traversable1.hs:4:32: warning: + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/deriving/should_compile/drv-functor1.hs b/testsuite/tests/deriving/should_compile/drv-functor1.hs index 040d531341..2a09ab0b0e 100644 --- a/testsuite/tests/deriving/should_compile/drv-functor1.hs +++ b/testsuite/tests/deriving/should_compile/drv-functor1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RankNTypes #-} diff --git a/testsuite/tests/deriving/should_compile/drv-functor1.stderr b/testsuite/tests/deriving/should_compile/drv-functor1.stderr index a531dc56ef..5592b7d141 100644 --- a/testsuite/tests/deriving/should_compile/drv-functor1.stderr +++ b/testsuite/tests/deriving/should_compile/drv-functor1.stderr @@ -1,3 +1,3 @@ -drv-functor1.hs:5:14: - Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. +drv-functor1.hs:6:14: warning: + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/deriving/should_fail/T10598_fail2.hs b/testsuite/tests/deriving/should_fail/T10598_fail2.hs index ba77fe0fbf..7bffcf0c64 100644 --- a/testsuite/tests/deriving/should_fail/T10598_fail2.hs +++ b/testsuite/tests/deriving/should_fail/T10598_fail2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DerivingStrategies #-} module T10598_fail2 where diff --git a/testsuite/tests/deriving/should_fail/T10598_fail2.stderr b/testsuite/tests/deriving/should_fail/T10598_fail2.stderr index 5ddd81dd1e..227be95c02 100644 --- a/testsuite/tests/deriving/should_fail/T10598_fail2.stderr +++ b/testsuite/tests/deriving/should_fail/T10598_fail2.stderr @@ -1,11 +1,11 @@ -T10598_fail2.hs:4:37: error: +T10598_fail2.hs:5:37: error: • Can't make a derived instance of ‘Eq A’ with the anyclass strategy: Try enabling DeriveAnyClass • In the data declaration for ‘A’ -T10598_fail2.hs:5:37: error: +T10598_fail2.hs:6:37: error: • Can't make a derived instance of ‘Eq B’ with the newtype strategy: Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension diff --git a/testsuite/tests/deriving/should_fail/T10598_fail3.hs b/testsuite/tests/deriving/should_fail/T10598_fail3.hs index 23f9ad987f..11e3e67e76 100644 --- a/testsuite/tests/deriving/should_fail/T10598_fail3.hs +++ b/testsuite/tests/deriving/should_fail/T10598_fail3.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE Safe #-} diff --git a/testsuite/tests/deriving/should_fail/T10598_fail3.stderr b/testsuite/tests/deriving/should_fail/T10598_fail3.stderr index c3f4e123b7..1ebc9c9c93 100644 --- a/testsuite/tests/deriving/should_fail/T10598_fail3.stderr +++ b/testsuite/tests/deriving/should_fail/T10598_fail3.stderr @@ -1,4 +1,4 @@ -T10598_fail3.hs:8:36: error: +T10598_fail3.hs:9:36: error: • Generic instances can only be derived in Safe Haskell using the stock strategy. • In the instance declaration for ‘Generic T’ diff --git a/testsuite/tests/deriving/should_fail/T10598_fail6.hs b/testsuite/tests/deriving/should_fail/T10598_fail6.hs index 673bfcc971..8ed5cdd262 100644 --- a/testsuite/tests/deriving/should_fail/T10598_fail6.hs +++ b/testsuite/tests/deriving/should_fail/T10598_fail6.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module T10598_fail6 where diff --git a/testsuite/tests/deriving/should_fail/T10598_fail6.stderr b/testsuite/tests/deriving/should_fail/T10598_fail6.stderr index a80e5bab56..0de1fe50bf 100644 --- a/testsuite/tests/deriving/should_fail/T10598_fail6.stderr +++ b/testsuite/tests/deriving/should_fail/T10598_fail6.stderr @@ -1,5 +1,5 @@ -T10598_fail6.hs:5:41: error: +T10598_fail6.hs:6:41: error: • Can't make a derived instance of ‘Functor F’ (even with cunning GeneralizedNewtypeDeriving): You need DeriveFunctor to derive an instance for this class diff --git a/testsuite/tests/deriving/should_fail/T10684.hs b/testsuite/tests/deriving/should_fail/T10684.hs index fdda0c7e46..ae532a15bf 100644 --- a/testsuite/tests/deriving/should_fail/T10684.hs +++ b/testsuite/tests/deriving/should_fail/T10684.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module A where import GHC.Generics data A = A deriving (Show, Generic) diff --git a/testsuite/tests/deriving/should_fail/T10684.stderr b/testsuite/tests/deriving/should_fail/T10684.stderr index 6cdbac2301..0724f8ec84 100644 --- a/testsuite/tests/deriving/should_fail/T10684.stderr +++ b/testsuite/tests/deriving/should_fail/T10684.stderr @@ -1,5 +1,5 @@ -T10684.hs:3:28: error: +T10684.hs:4:28: error: • Can't make a derived instance of ‘Generic A’: You need DeriveGeneric to derive an instance for this class • In the data declaration for ‘A’ diff --git a/testsuite/tests/deriving/should_fail/T1133A.hs b/testsuite/tests/deriving/should_fail/T1133A.hs index 2c8421aaf1..743772dd14 100644 --- a/testsuite/tests/deriving/should_fail/T1133A.hs +++ b/testsuite/tests/deriving/should_fail/T1133A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T1133A where diff --git a/testsuite/tests/deriving/should_fail/T1133A.stderr b/testsuite/tests/deriving/should_fail/T1133A.stderr index 23b93409da..1c8f686f2a 100644 --- a/testsuite/tests/deriving/should_fail/T1133A.stderr +++ b/testsuite/tests/deriving/should_fail/T1133A.stderr @@ -1,7 +1,7 @@ -T1133A.hs:6:28: - Can't make a derived instance of ‘Enum X’: - ‘X’ must be an enumeration type - (an enumeration consists of one or more nullary, non-GADT constructors) - Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension - In the newtype declaration for ‘X’ +T1133A.hs:7:28: error: + • Can't make a derived instance of ‘Enum X’: + ‘X’ must be an enumeration type + (an enumeration consists of one or more nullary, non-GADT constructors) + Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension + • In the newtype declaration for ‘X’ diff --git a/testsuite/tests/deriving/should_fail/T12801.hs b/testsuite/tests/deriving/should_fail/T12801.hs index 22bbdf0aae..6bb773a22d 100644 --- a/testsuite/tests/deriving/should_fail/T12801.hs +++ b/testsuite/tests/deriving/should_fail/T12801.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} data Container = Container [Wibble Int] deriving (Eq, Show) diff --git a/testsuite/tests/deriving/should_fail/T12801.stderr b/testsuite/tests/deriving/should_fail/T12801.stderr index 7bc63df715..cd3193aabe 100644 --- a/testsuite/tests/deriving/should_fail/T12801.stderr +++ b/testsuite/tests/deriving/should_fail/T12801.stderr @@ -1,5 +1,5 @@ -T12801.hs:8:17: error: +T12801.hs:9:17: error: • Can't make a derived instance of ‘Functor Wibble’: You need DeriveFunctor to derive an instance for this class • In the data declaration for ‘Wibble’ diff --git a/testsuite/tests/deriving/should_fail/T16181.hs b/testsuite/tests/deriving/should_fail/T16181.hs index 29692dd1a1..b54991c153 100644 --- a/testsuite/tests/deriving/should_fail/T16181.hs +++ b/testsuite/tests/deriving/should_fail/T16181.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DerivingVia #-} {-# LANGUAGE KindSignatures #-} module T16181 where diff --git a/testsuite/tests/deriving/should_fail/T16181.stderr b/testsuite/tests/deriving/should_fail/T16181.stderr index cbac319a2c..ed08f53bb2 100644 --- a/testsuite/tests/deriving/should_fail/T16181.stderr +++ b/testsuite/tests/deriving/should_fail/T16181.stderr @@ -1,19 +1,19 @@ -T16181.hs:13:13: error: +T16181.hs:14:13: error: • Cannot eta-reduce to an instance of form instance (...) => Show1 (FlipConst a) • In the newtype declaration for ‘FlipConst’ -T16181.hs:13:20: error: +T16181.hs:14:20: error: • Cannot eta-reduce to an instance of form instance (...) => Eq1 (FlipConst a) • In the newtype declaration for ‘FlipConst’ -T16181.hs:18:14: error: +T16181.hs:19:14: error: • Cannot eta-reduce to an instance of form instance (...) => MonadTrans (Q x) • In the newtype declaration for ‘Q’ -T16181.hs:25:12: error: +T16181.hs:26:12: error: • Cannot eta-reduce to an instance of form instance (...) => C T • In the data declaration for ‘T’ diff --git a/testsuite/tests/deriving/should_fail/T1830_1.hs b/testsuite/tests/deriving/should_fail/T1830_1.hs index e3c2889c1c..a3ddece390 100644 --- a/testsuite/tests/deriving/should_fail/T1830_1.hs +++ b/testsuite/tests/deriving/should_fail/T1830_1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T1830_1 where import Language.Haskell.TH.Syntax (Lift) diff --git a/testsuite/tests/deriving/should_fail/T1830_1.stderr b/testsuite/tests/deriving/should_fail/T1830_1.stderr index c869b0cd16..f4e5417710 100644 --- a/testsuite/tests/deriving/should_fail/T1830_1.stderr +++ b/testsuite/tests/deriving/should_fail/T1830_1.stderr @@ -1,5 +1,5 @@ -T1830_1.hs:5:29: error: - Can't make a derived instance of ‘Lift (Foo a)’: - You need DeriveLift to derive an instance for this class - In the data declaration for ‘Foo’ +T1830_1.hs:6:29: error: + • Can't make a derived instance of ‘Lift (Foo a)’: + You need DeriveLift to derive an instance for this class + • In the data declaration for ‘Foo’ diff --git a/testsuite/tests/deriving/should_fail/T3833.hs b/testsuite/tests/deriving/should_fail/T3833.hs index d1196c4112..eecb9e789e 100644 --- a/testsuite/tests/deriving/should_fail/T3833.hs +++ b/testsuite/tests/deriving/should_fail/T3833.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE StandaloneDeriving #-} -- {-# LANGUAGE GeneralizedNewtypeDeriving #-} diff --git a/testsuite/tests/deriving/should_fail/T3833.stderr b/testsuite/tests/deriving/should_fail/T3833.stderr index bf9a59cb8a..001fdc4c64 100644 --- a/testsuite/tests/deriving/should_fail/T3833.stderr +++ b/testsuite/tests/deriving/should_fail/T3833.stderr @@ -1,6 +1,6 @@ -T3833.hs:9:1: error: - Can't make a derived instance of ‘Monoid (DecodeMap e)’: - ‘Monoid’ is not a stock derivable class (Eq, Show, etc.) - Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension - In the stand-alone deriving instance for ‘Monoid (DecodeMap e)’ +T3833.hs:10:1: error: + • Can't make a derived instance of ‘Monoid (DecodeMap e)’: + ‘Monoid’ is not a stock derivable class (Eq, Show, etc.) + Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension + • In the stand-alone deriving instance for ‘Monoid (DecodeMap e)’ diff --git a/testsuite/tests/deriving/should_fail/T3834.hs b/testsuite/tests/deriving/should_fail/T3834.hs index 614170198e..fa6df580e8 100644 --- a/testsuite/tests/deriving/should_fail/T3834.hs +++ b/testsuite/tests/deriving/should_fail/T3834.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE StandaloneDeriving #-} diff --git a/testsuite/tests/deriving/should_fail/T3834.stderr b/testsuite/tests/deriving/should_fail/T3834.stderr index 9d2223e1f8..23a605f614 100644 --- a/testsuite/tests/deriving/should_fail/T3834.stderr +++ b/testsuite/tests/deriving/should_fail/T3834.stderr @@ -1,6 +1,6 @@ -T3834.hs:8:1: error: - Can't make a derived instance of ‘C T’: - ‘C’ is not a stock derivable class (Eq, Show, etc.) - Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension - In the stand-alone deriving instance for ‘C T’ +T3834.hs:9:1: error: + • Can't make a derived instance of ‘C T’: + ‘C’ is not a stock derivable class (Eq, Show, etc.) + Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension + • In the stand-alone deriving instance for ‘C T’ diff --git a/testsuite/tests/deriving/should_fail/T5287.hs b/testsuite/tests/deriving/should_fail/T5287.hs index 6495b62be9..3af467c2cf 100644 --- a/testsuite/tests/deriving/should_fail/T5287.hs +++ b/testsuite/tests/deriving/should_fail/T5287.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses, UndecidableInstances #-} module Bug where class A a oops diff --git a/testsuite/tests/deriving/should_fail/T5287.stderr b/testsuite/tests/deriving/should_fail/T5287.stderr index 20ad31dec3..479f1f84b5 100644 --- a/testsuite/tests/deriving/should_fail/T5287.stderr +++ b/testsuite/tests/deriving/should_fail/T5287.stderr @@ -1,10 +1,10 @@ -T5287.hs:6:10: error: +T5287.hs:7:10: error: • Could not deduce (A a oops0) from the context: A a oops bound by an instance declaration: forall a oops. A a oops => Read (D a) - at T5287.hs:6:10-31 + at T5287.hs:7:10-31 The type variable ‘oops0’ is ambiguous • In the ambiguity check for an instance declaration To defer the ambiguity check to use sites, enable AllowAmbiguousTypes diff --git a/testsuite/tests/deriving/should_fail/T7401_fail.hs b/testsuite/tests/deriving/should_fail/T7401_fail.hs index 730223f179..29ae0ae6db 100644 --- a/testsuite/tests/deriving/should_fail/T7401_fail.hs +++ b/testsuite/tests/deriving/should_fail/T7401_fail.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T7401_fail where data D deriving Eq diff --git a/testsuite/tests/deriving/should_fail/T7401_fail.stderr b/testsuite/tests/deriving/should_fail/T7401_fail.stderr index feb841f962..7f26d3b9e4 100644 --- a/testsuite/tests/deriving/should_fail/T7401_fail.stderr +++ b/testsuite/tests/deriving/should_fail/T7401_fail.stderr @@ -1,5 +1,5 @@ -T7401_fail.hs:3:17: error: +T7401_fail.hs:4:17: error: • Can't make a derived instance of ‘Eq D’: ‘D’ must have at least one data constructor Use EmptyDataDeriving to enable deriving for empty data types diff --git a/testsuite/tests/deriving/should_fail/T8851.hs b/testsuite/tests/deriving/should_fail/T8851.hs index 8b5c0e579d..9015d2be35 100644 --- a/testsuite/tests/deriving/should_fail/T8851.hs +++ b/testsuite/tests/deriving/should_fail/T8851.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GeneralizedNewtypeDeriving, ConstrainedClassMethods #-} module T8851 where diff --git a/testsuite/tests/deriving/should_fail/T8851.stderr b/testsuite/tests/deriving/should_fail/T8851.stderr index dd4a614785..c4bfff3559 100644 --- a/testsuite/tests/deriving/should_fail/T8851.stderr +++ b/testsuite/tests/deriving/should_fail/T8851.stderr @@ -1,11 +1,11 @@ -T8851.hs:24:12: error: - Couldn't match type ‘Parser’ with ‘MyParser’ - arising from the coercion of the method ‘notFollowedBy’ - from type ‘forall a. - (Monad Parser, Show a) => - Parser a -> Parser ()’ - to type ‘forall a. - (Monad MyParser, Show a) => - MyParser a -> MyParser ()’ - When deriving the instance for (Parsing MyParser) +T8851.hs:25:12: error: + • Couldn't match type ‘Parser’ with ‘MyParser’ + arising from the coercion of the method ‘notFollowedBy’ + from type ‘forall a. + (Monad Parser, Show a) => + Parser a -> Parser ()’ + to type ‘forall a. + (Monad MyParser, Show a) => + MyParser a -> MyParser ()’ + • When deriving the instance for (Parsing MyParser) diff --git a/testsuite/tests/deriving/should_fail/T9600.hs b/testsuite/tests/deriving/should_fail/T9600.hs index a6663ce8c8..0547e9dbee 100644 --- a/testsuite/tests/deriving/should_fail/T9600.hs +++ b/testsuite/tests/deriving/should_fail/T9600.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} import Control.Applicative newtype Foo a = Foo (a -> a) deriving Applicative diff --git a/testsuite/tests/deriving/should_fail/T9600.stderr b/testsuite/tests/deriving/should_fail/T9600.stderr index 5c03f2efc2..734e3af997 100644 --- a/testsuite/tests/deriving/should_fail/T9600.stderr +++ b/testsuite/tests/deriving/should_fail/T9600.stderr @@ -1,6 +1,6 @@ -T9600.hs:3:39: error: - Can't make a derived instance of ‘Applicative Foo’: - ‘Applicative’ is not a stock derivable class (Eq, Show, etc.) - Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension - In the newtype declaration for ‘Foo’ +T9600.hs:4:39: error: + • Can't make a derived instance of ‘Applicative Foo’: + ‘Applicative’ is not a stock derivable class (Eq, Show, etc.) + Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension + • In the newtype declaration for ‘Foo’ diff --git a/testsuite/tests/deriving/should_fail/deriving-via-fail.hs b/testsuite/tests/deriving/should_fail/deriving-via-fail.hs index 0cb521de78..95c462a6ea 100644 --- a/testsuite/tests/deriving/should_fail/deriving-via-fail.hs +++ b/testsuite/tests/deriving/should_fail/deriving-via-fail.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DerivingVia #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} diff --git a/testsuite/tests/deriving/should_fail/deriving-via-fail.stderr b/testsuite/tests/deriving/should_fail/deriving-via-fail.stderr index 5179f53c03..ea07442a82 100644 --- a/testsuite/tests/deriving/should_fail/deriving-via-fail.stderr +++ b/testsuite/tests/deriving/should_fail/deriving-via-fail.stderr @@ -1,28 +1,28 @@ -deriving-via-fail.hs:9:34: error: +deriving-via-fail.hs:10:34: error: • Couldn't match representation of type ‘a’ with that of ‘b’ arising from the coercion of the method ‘showsPrec’ from type ‘Int -> Identity b -> ShowS’ to type ‘Int -> Foo1 a -> ShowS’ ‘a’ is a rigid type variable bound by the deriving clause for ‘Show (Foo1 a)’ - at deriving-via-fail.hs:9:34-37 + at deriving-via-fail.hs:10:34-37 ‘b’ is a rigid type variable bound by the deriving clause for ‘Show (Foo1 a)’ - at deriving-via-fail.hs:9:34-37 + at deriving-via-fail.hs:10:34-37 • When deriving the instance for (Show (Foo1 a)) -deriving-via-fail.hs:12:12: error: +deriving-via-fail.hs:13:12: error: • Cannot derive instance via ‘fooo’ Class ‘Category’ expects an argument of kind ‘* -> * -> *’, but ‘fooo’ has kind ‘*’ • In the newtype declaration for ‘Foo2’ -deriving-via-fail.hs:15:20: error: +deriving-via-fail.hs:16:20: error: • Couldn't match representation of type ‘a’ with that of ‘Foo3’ arising from the coercion of the method ‘==’ from type ‘a -> a -> Bool’ to type ‘Foo3 -> Foo3 -> Bool’ ‘a’ is a rigid type variable bound by the deriving clause for ‘Eq Foo3’ - at deriving-via-fail.hs:15:20-21 + at deriving-via-fail.hs:16:20-21 • When deriving the instance for (Eq Foo3) diff --git a/testsuite/tests/deriving/should_fail/deriving-via-fail4.hs b/testsuite/tests/deriving/should_fail/deriving-via-fail4.hs index 2e16abfa20..e58ffca658 100644 --- a/testsuite/tests/deriving/should_fail/deriving-via-fail4.hs +++ b/testsuite/tests/deriving/should_fail/deriving-via-fail4.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DerivingVia #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} diff --git a/testsuite/tests/deriving/should_fail/deriving-via-fail4.stderr b/testsuite/tests/deriving/should_fail/deriving-via-fail4.stderr index 9c4ee15209..9c1b305fbf 100644 --- a/testsuite/tests/deriving/should_fail/deriving-via-fail4.stderr +++ b/testsuite/tests/deriving/should_fail/deriving-via-fail4.stderr @@ -1,18 +1,18 @@ -deriving-via-fail4.hs:14:12: error: +deriving-via-fail4.hs:15:12: error: • Couldn't match representation of type ‘Int’ with that of ‘Char’ arising from the coercion of the method ‘==’ from type ‘Char -> Char -> Bool’ to type ‘F1 -> F1 -> Bool’ • When deriving the instance for (Eq F1) -deriving-via-fail4.hs:17:13: error: +deriving-via-fail4.hs:18:13: error: • Couldn't match representation of type ‘a’ with that of ‘a1’ arising from the coercion of the method ‘c’ from type ‘a -> a -> Bool’ to type ‘a -> F2 a1 -> Bool’ ‘a’ is a rigid type variable bound by the deriving clause for ‘C a (F2 a1)’ - at deriving-via-fail4.hs:17:13-15 + at deriving-via-fail4.hs:18:13-15 ‘a1’ is a rigid type variable bound by the deriving clause for ‘C a (F2 a1)’ - at deriving-via-fail4.hs:17:13-15 + at deriving-via-fail4.hs:18:13-15 • When deriving the instance for (C a (F2 a1)) diff --git a/testsuite/tests/deriving/should_fail/drvfail-functor1.hs b/testsuite/tests/deriving/should_fail/drvfail-functor1.hs index 94ebd925b8..aef52421e0 100644 --- a/testsuite/tests/deriving/should_fail/drvfail-functor1.hs +++ b/testsuite/tests/deriving/should_fail/drvfail-functor1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldFail where -- Derive Functor without a DeriveFunctor language pragma diff --git a/testsuite/tests/deriving/should_fail/drvfail-functor1.stderr b/testsuite/tests/deriving/should_fail/drvfail-functor1.stderr index bff4d27a49..07ce81f4ab 100644 --- a/testsuite/tests/deriving/should_fail/drvfail-functor1.stderr +++ b/testsuite/tests/deriving/should_fail/drvfail-functor1.stderr @@ -1,5 +1,5 @@ -drvfail-functor1.hs:6:14: - Can't make a derived instance of ‘Functor List’: - You need DeriveFunctor to derive an instance for this class - In the data declaration for ‘List’ +drvfail-functor1.hs:7:14: error: + • Can't make a derived instance of ‘Functor List’: + You need DeriveFunctor to derive an instance for this class + • In the data declaration for ‘List’ diff --git a/testsuite/tests/deriving/should_fail/drvfail-functor2.hs b/testsuite/tests/deriving/should_fail/drvfail-functor2.hs index 77e17cf381..be5413f773 100644 --- a/testsuite/tests/deriving/should_fail/drvfail-functor2.hs +++ b/testsuite/tests/deriving/should_fail/drvfail-functor2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveFunctor, DatatypeContexts #-} module ShouldFail where diff --git a/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr b/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr index e0aa34656c..1c3a0238a4 100644 --- a/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr +++ b/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr @@ -1,31 +1,31 @@ -drvfail-functor2.hs:1:29: Warning: +drvfail-functor2.hs:2:29: warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. -drvfail-functor2.hs:7:14: - Can't make a derived instance of ‘Functor InFunctionArgument’: - Constructor ‘InFunctionArgument’ must not use the type variable in a function argument - In the newtype declaration for ‘InFunctionArgument’ +drvfail-functor2.hs:8:14: error: + • Can't make a derived instance of ‘Functor InFunctionArgument’: + Constructor ‘InFunctionArgument’ must not use the type variable in a function argument + • In the newtype declaration for ‘InFunctionArgument’ -drvfail-functor2.hs:10:14: - Can't make a derived instance of ‘Functor OnSecondArg’: - Constructor ‘OnSecondArg’ must use the type variable only as the last argument of a data type - In the newtype declaration for ‘OnSecondArg’ +drvfail-functor2.hs:11:14: error: + • Can't make a derived instance of ‘Functor OnSecondArg’: + Constructor ‘OnSecondArg’ must use the type variable only as the last argument of a data type + • In the newtype declaration for ‘OnSecondArg’ -drvfail-functor2.hs:15:14: - Cannot derive well-kinded instance of form ‘Functor (NoArguments ...)’ - Class ‘Functor’ expects an argument of kind ‘* -> *’ - In the newtype declaration for ‘NoArguments’ +drvfail-functor2.hs:16:14: error: + • Cannot derive well-kinded instance of form ‘Functor (NoArguments ...)’ + Class ‘Functor’ expects an argument of kind ‘* -> *’ + • In the newtype declaration for ‘NoArguments’ -drvfail-functor2.hs:20:14: - Can't make a derived instance of ‘Functor StupidConstraint’: - Data type ‘StupidConstraint’ must not have a class context: Eq a - In the data declaration for ‘StupidConstraint’ +drvfail-functor2.hs:21:14: error: + • Can't make a derived instance of ‘Functor StupidConstraint’: + Data type ‘StupidConstraint’ must not have a class context: Eq a + • In the data declaration for ‘StupidConstraint’ -drvfail-functor2.hs:26:14: - No instance for (Functor NoFunctor) - arising from the first field of ‘UseNoFunctor’ (type ‘NoFunctor a’) - Possible fix: - use a standalone 'deriving instance' declaration, - so you can specify the instance context yourself - When deriving the instance for (Functor UseNoFunctor) +drvfail-functor2.hs:27:14: error: + • No instance for (Functor NoFunctor) + arising from the first field of ‘UseNoFunctor’ (type ‘NoFunctor a’) + Possible fix: + use a standalone 'deriving instance' declaration, + so you can specify the instance context yourself + • When deriving the instance for (Functor UseNoFunctor) diff --git a/testsuite/tests/deriving/should_fail/drvfail008.hs b/testsuite/tests/deriving/should_fail/drvfail008.hs index af8628b4d5..1636bd1353 100644 --- a/testsuite/tests/deriving/should_fail/drvfail008.hs +++ b/testsuite/tests/deriving/should_fail/drvfail008.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- Should fail without GeneralizedNewtypeDeriving -- Succeeds with GeneralizedNewtypeDeriving diff --git a/testsuite/tests/deriving/should_fail/drvfail008.stderr b/testsuite/tests/deriving/should_fail/drvfail008.stderr index dcd43eca62..e942f087e7 100644 --- a/testsuite/tests/deriving/should_fail/drvfail008.stderr +++ b/testsuite/tests/deriving/should_fail/drvfail008.stderr @@ -1,5 +1,5 @@ -drvfail008.hs:10:43: error: +drvfail008.hs:11:43: error: • Can't make a derived instance of ‘Monad M’: ‘Monad’ is not a stock derivable class (Eq, Show, etc.) Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension diff --git a/testsuite/tests/deriving/should_fail/drvfail015.hs b/testsuite/tests/deriving/should_fail/drvfail015.hs index 32d6134d34..8f1235c0b8 100644 --- a/testsuite/tests/deriving/should_fail/drvfail015.hs +++ b/testsuite/tests/deriving/should_fail/drvfail015.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -XStandaloneDeriving #-} module ShouldFail where diff --git a/testsuite/tests/deriving/should_fail/drvfail015.stderr b/testsuite/tests/deriving/should_fail/drvfail015.stderr index c38ff00456..b731032fc3 100644 --- a/testsuite/tests/deriving/should_fail/drvfail015.stderr +++ b/testsuite/tests/deriving/should_fail/drvfail015.stderr @@ -1,13 +1,13 @@ -drvfail015.hs:10:19: - Illegal instance declaration for ‘Eq T’ - (All instance types must be of the form (T t1 ... tn) - where T is not a synonym. - Use TypeSynonymInstances if you want to disable this.) - In the stand-alone deriving instance for ‘Eq T’ +drvfail015.hs:11:19: error: + • Illegal instance declaration for ‘Eq T’ + (All instance types must be of the form (T t1 ... tn) + where T is not a synonym. + Use TypeSynonymInstances if you want to disable this.) + • In the stand-alone deriving instance for ‘Eq T’ -drvfail015.hs:13:1: - Can't make a derived instance of ‘Eq Handle’: - The data constructors of ‘Handle’ are not all in scope - so you cannot derive an instance for it - In the stand-alone deriving instance for ‘Eq Handle’ +drvfail015.hs:14:1: error: + • Can't make a derived instance of ‘Eq Handle’: + The data constructors of ‘Handle’ are not all in scope + so you cannot derive an instance for it + • In the stand-alone deriving instance for ‘Eq Handle’ diff --git a/testsuite/tests/determinism/determ015/A.hs b/testsuite/tests/determinism/determ015/A.hs index 14b29170b1..403c489c75 100644 --- a/testsuite/tests/determinism/determ015/A.hs +++ b/testsuite/tests/determinism/determ015/A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE TypeOperators #-} diff --git a/testsuite/tests/ffi/should_fail/T3066.hs b/testsuite/tests/ffi/should_fail/T3066.hs index 2d71946843..17f2914ea1 100644 --- a/testsuite/tests/ffi/should_fail/T3066.hs +++ b/testsuite/tests/ffi/should_fail/T3066.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ForeignFunctionInterface, RankNTypes #-} module Foo where diff --git a/testsuite/tests/ffi/should_fail/T3066.stderr b/testsuite/tests/ffi/should_fail/T3066.stderr index 3b6c3f9b47..280905136a 100644 --- a/testsuite/tests/ffi/should_fail/T3066.stderr +++ b/testsuite/tests/ffi/should_fail/T3066.stderr @@ -1,6 +1,6 @@ -T3066.hs:6:1: - Unacceptable argument type in foreign declaration: - ‘forall u. Ptr ()’ is not a data type - When checking declaration: - foreign import ccall safe bla :: (forall u. X u) -> IO () +T3066.hs:7:1: error: + • Unacceptable argument type in foreign declaration: + ‘forall u. Ptr ()’ is not a data type + • When checking declaration: + foreign import ccall safe bla :: (forall u. X u) -> IO () diff --git a/testsuite/tests/gadt/T1999a.hs b/testsuite/tests/gadt/T1999a.hs index 494812ca29..fcfca35ab2 100644 --- a/testsuite/tests/gadt/T1999a.hs +++ b/testsuite/tests/gadt/T1999a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} -- #1999 diff --git a/testsuite/tests/gadt/T3163.hs b/testsuite/tests/gadt/T3163.hs index 985ef9b110..1ff1eb6bf6 100644 --- a/testsuite/tests/gadt/T3163.hs +++ b/testsuite/tests/gadt/T3163.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs, RankNTypes, ImpredicativeTypes #-} -- Test #3163 diff --git a/testsuite/tests/gadt/T3163.stderr b/testsuite/tests/gadt/T3163.stderr index 2ee6095e1b..c9b09f1fa0 100644 --- a/testsuite/tests/gadt/T3163.stderr +++ b/testsuite/tests/gadt/T3163.stderr @@ -1,5 +1,5 @@ -T3163.hs:8:5: error: +T3163.hs:9:5: error: • Illegal polymorphic type: forall s. s • In the definition of data constructor ‘Unreached’ In the data type declaration for ‘Taker’ diff --git a/testsuite/tests/gadt/gadtSyntaxFail001.hs b/testsuite/tests/gadt/gadtSyntaxFail001.hs index 8fd8bfdf5b..0b82696654 100644 --- a/testsuite/tests/gadt/gadtSyntaxFail001.hs +++ b/testsuite/tests/gadt/gadtSyntaxFail001.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTSyntax #-} diff --git a/testsuite/tests/gadt/gadtSyntaxFail001.stderr b/testsuite/tests/gadt/gadtSyntaxFail001.stderr index 9e3c0d4ffc..aad7b63e54 100644 --- a/testsuite/tests/gadt/gadtSyntaxFail001.stderr +++ b/testsuite/tests/gadt/gadtSyntaxFail001.stderr @@ -1,5 +1,5 @@ -gadtSyntaxFail001.hs:8:5: error: +gadtSyntaxFail001.hs:9:5: error: • Data constructor ‘C2’ has existential type variables, a context, or a specialised result type C2 :: forall a. a -> Char -> Foo a Int (Enable ExistentialQuantification or GADTs to allow this) diff --git a/testsuite/tests/gadt/gadtSyntaxFail002.hs b/testsuite/tests/gadt/gadtSyntaxFail002.hs index cb33d6795e..2f16c936d1 100644 --- a/testsuite/tests/gadt/gadtSyntaxFail002.hs +++ b/testsuite/tests/gadt/gadtSyntaxFail002.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTSyntax #-} diff --git a/testsuite/tests/gadt/gadtSyntaxFail002.stderr b/testsuite/tests/gadt/gadtSyntaxFail002.stderr index 7b0251c7e1..f144b2e247 100644 --- a/testsuite/tests/gadt/gadtSyntaxFail002.stderr +++ b/testsuite/tests/gadt/gadtSyntaxFail002.stderr @@ -1,5 +1,5 @@ -gadtSyntaxFail002.hs:8:5: error: +gadtSyntaxFail002.hs:9:5: error: • Data constructor ‘C2’ has existential type variables, a context, or a specialised result type C2 :: forall a. a -> Char -> Foo a a (Enable ExistentialQuantification or GADTs to allow this) diff --git a/testsuite/tests/gadt/gadtSyntaxFail003.hs b/testsuite/tests/gadt/gadtSyntaxFail003.hs index 10c67200fc..71c1bf33ac 100644 --- a/testsuite/tests/gadt/gadtSyntaxFail003.hs +++ b/testsuite/tests/gadt/gadtSyntaxFail003.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTSyntax #-} diff --git a/testsuite/tests/gadt/gadtSyntaxFail003.stderr b/testsuite/tests/gadt/gadtSyntaxFail003.stderr index 903624499a..f5255aa4a2 100644 --- a/testsuite/tests/gadt/gadtSyntaxFail003.stderr +++ b/testsuite/tests/gadt/gadtSyntaxFail003.stderr @@ -1,5 +1,5 @@ -gadtSyntaxFail003.hs:7:5: error: +gadtSyntaxFail003.hs:8:5: error: • Data constructor ‘C1’ has existential type variables, a context, or a specialised result type C1 :: forall a c b. a -> Int -> c -> Foo b a (Enable ExistentialQuantification or GADTs to allow this) diff --git a/testsuite/tests/generics/GenShouldFail0.hs b/testsuite/tests/generics/GenShouldFail0.hs index cc1ef6ff42..1e90a94fc4 100644 --- a/testsuite/tests/generics/GenShouldFail0.hs +++ b/testsuite/tests/generics/GenShouldFail0.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE StandaloneDeriving #-} module ShouldFail0 where diff --git a/testsuite/tests/generics/GenShouldFail0.stderr b/testsuite/tests/generics/GenShouldFail0.stderr index 270c872f56..90fe1bf305 100644 --- a/testsuite/tests/generics/GenShouldFail0.stderr +++ b/testsuite/tests/generics/GenShouldFail0.stderr @@ -1,5 +1,5 @@ -GenShouldFail0.hs:9:1: - Can't make a derived instance of ‘Generic X’: - You need DeriveGeneric to derive an instance for this class - In the stand-alone deriving instance for ‘Generic X’ +GenShouldFail0.hs:10:1: error: + • Can't make a derived instance of ‘Generic X’: + You need DeriveGeneric to derive an instance for this class + • In the stand-alone deriving instance for ‘Generic X’ diff --git a/testsuite/tests/generics/GenShouldFail1_0.hs b/testsuite/tests/generics/GenShouldFail1_0.hs index 15f059d65d..180ac2f1a4 100644 --- a/testsuite/tests/generics/GenShouldFail1_0.hs +++ b/testsuite/tests/generics/GenShouldFail1_0.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE StandaloneDeriving #-} module ShouldFail1_0 where diff --git a/testsuite/tests/generics/GenShouldFail1_0.stderr b/testsuite/tests/generics/GenShouldFail1_0.stderr index e75404f8bb..26dfa8e405 100644 --- a/testsuite/tests/generics/GenShouldFail1_0.stderr +++ b/testsuite/tests/generics/GenShouldFail1_0.stderr @@ -1,5 +1,5 @@ -GenShouldFail1_0.hs:9:1: - Can't make a derived instance of ‘Generic1 X’: - You need DeriveGeneric to derive an instance for this class - In the stand-alone deriving instance for ‘Generic1 X’ +GenShouldFail1_0.hs:10:1: error: + • Can't make a derived instance of ‘Generic1 X’: + You need DeriveGeneric to derive an instance for this class + • In the stand-alone deriving instance for ‘Generic1 X’ diff --git a/testsuite/tests/generics/T10604/T10604_bad_variable_occurrence.hs b/testsuite/tests/generics/T10604/T10604_bad_variable_occurrence.hs index 53ad879702..3ae3bbc565 100644 --- a/testsuite/tests/generics/T10604/T10604_bad_variable_occurrence.hs +++ b/testsuite/tests/generics/T10604/T10604_bad_variable_occurrence.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE PolyKinds #-} module T10604_bad_variable_occurrence where diff --git a/testsuite/tests/generics/T10604/T10604_bad_variable_occurrence.stderr b/testsuite/tests/generics/T10604/T10604_bad_variable_occurrence.stderr index 26c6a5562a..a8ac7c7471 100644 --- a/testsuite/tests/generics/T10604/T10604_bad_variable_occurrence.stderr +++ b/testsuite/tests/generics/T10604/T10604_bad_variable_occurrence.stderr @@ -1,5 +1,5 @@ -T10604_bad_variable_occurrence.hs:8:12: error: +T10604_bad_variable_occurrence.hs:9:12: error: • Can't make a derived instance of ‘Generic1 Fix’: Constructor ‘In’ applies a type to an argument involving the last parameter but the applied type is not of kind * -> * diff --git a/testsuite/tests/generics/T10604/T10604_no_PolyKinds.hs b/testsuite/tests/generics/T10604/T10604_no_PolyKinds.hs index bdb98cab69..50e7251717 100644 --- a/testsuite/tests/generics/T10604/T10604_no_PolyKinds.hs +++ b/testsuite/tests/generics/T10604/T10604_no_PolyKinds.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE KindSignatures #-} module T10604_no_PolyKinds where diff --git a/testsuite/tests/generics/T10604/T10604_no_PolyKinds.stderr b/testsuite/tests/generics/T10604/T10604_no_PolyKinds.stderr index 69bc591d01..ca87502a90 100644 --- a/testsuite/tests/generics/T10604/T10604_no_PolyKinds.stderr +++ b/testsuite/tests/generics/T10604/T10604_no_PolyKinds.stderr @@ -1,5 +1,5 @@ -T10604_no_PolyKinds.hs:7:35: error: +T10604_no_PolyKinds.hs:8:35: error: • Cannot derive well-kinded instance of form ‘Generic1 (F ...)’ (Perhaps you intended to use PolyKinds) Class ‘Generic1’ expects an argument of kind ‘* -> *’ diff --git a/testsuite/tests/generics/T5462No1.hs b/testsuite/tests/generics/T5462No1.hs index fc24f63431..f1200208f8 100644 --- a/testsuite/tests/generics/T5462No1.hs +++ b/testsuite/tests/generics/T5462No1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveGeneric #-} diff --git a/testsuite/tests/generics/T5462No1.stderr b/testsuite/tests/generics/T5462No1.stderr index c82f1b86ee..0b718d648e 100644 --- a/testsuite/tests/generics/T5462No1.stderr +++ b/testsuite/tests/generics/T5462No1.stderr @@ -1,20 +1,20 @@ [1 of 2] Compiling GFunctor ( GFunctor/GFunctor.hs, out_T5462No1/GFunctor.o ) [2 of 2] Compiling T5462No1 ( T5462No1.hs, out_T5462No1/T5462No1.o ) -T5462No1.hs:24:42: error: - Can't make a derived instance of ‘GFunctor F’: - ‘GFunctor’ is not a stock derivable class (Eq, Show, etc.) - Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension - In the newtype declaration for ‘F’ - -T5462No1.hs:26:23: error: - Can't make a derived instance of ‘C1 G’: - ‘C1’ is not a stock derivable class (Eq, Show, etc.) - Try enabling DeriveAnyClass - In the data declaration for ‘G’ +T5462No1.hs:25:42: error: + • Can't make a derived instance of ‘GFunctor F’: + ‘GFunctor’ is not a stock derivable class (Eq, Show, etc.) + Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension + • In the newtype declaration for ‘F’ T5462No1.hs:27:23: error: - Can't make a derived instance of ‘C2 H’: - ‘C2’ is not a stock derivable class (Eq, Show, etc.) - Try enabling DeriveAnyClass - In the data declaration for ‘H’ + • Can't make a derived instance of ‘C1 G’: + ‘C1’ is not a stock derivable class (Eq, Show, etc.) + Try enabling DeriveAnyClass + • In the data declaration for ‘G’ + +T5462No1.hs:28:23: error: + • Can't make a derived instance of ‘C2 H’: + ‘C2’ is not a stock derivable class (Eq, Show, etc.) + Try enabling DeriveAnyClass + • In the data declaration for ‘H’ diff --git a/testsuite/tests/ghc-api/T7478/T7478.hs b/testsuite/tests/ghc-api/T7478/T7478.hs index 786a859644..ce33e50dae 100644 --- a/testsuite/tests/ghc-api/T7478/T7478.hs +++ b/testsuite/tests/ghc-api/T7478/T7478.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE Haskell2010 #-} +{-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE NamedFieldPuns #-} module Main (main) where diff --git a/testsuite/tests/ghc-api/downsweep/OldModLocation.hs b/testsuite/tests/ghc-api/downsweep/OldModLocation.hs index 9e03f925b6..153509f29e 100644 --- a/testsuite/tests/ghc-api/downsweep/OldModLocation.hs +++ b/testsuite/tests/ghc-api/downsweep/OldModLocation.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE Haskell2010 #-} +{-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE ViewPatterns #-} import GHC diff --git a/testsuite/tests/ghci/T18071/T18071.hs b/testsuite/tests/ghci/T18071/T18071.hs index 1b0d53c337..aa1387cf69 100644 --- a/testsuite/tests/ghci/T18071/T18071.hs +++ b/testsuite/tests/ghci/T18071/T18071.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE QuantifiedConstraints #-} diff --git a/testsuite/tests/ghci/T18071/T18071.stdout b/testsuite/tests/ghci/T18071/T18071.stdout index 815aa1e245..20411b0310 100644 --- a/testsuite/tests/ghci/T18071/T18071.stdout +++ b/testsuite/tests/ghci/T18071/T18071.stdout @@ -1 +1 @@ -instance [safe] MyShowProxy U -- Defined at T18071.hs:16:10 +instance [safe] MyShowProxy U -- Defined at T18071.hs:17:10 diff --git a/testsuite/tests/ghci/T18262/T18262.hs b/testsuite/tests/ghci/T18262/T18262.hs index 1734de0179..ce4bfe632f 100644 --- a/testsuite/tests/ghci/T18262/T18262.hs +++ b/testsuite/tests/ghci/T18262/T18262.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, FlexibleInstances, DataKinds, UndecidableInstances #-} import GHC.TypeLits diff --git a/testsuite/tests/ghci/T18262/T18262.stdout b/testsuite/tests/ghci/T18262/T18262.stdout index 76d7e8a596..13868ead5a 100644 --- a/testsuite/tests/ghci/T18262/T18262.stdout +++ b/testsuite/tests/ghci/T18262/T18262.stdout @@ -1 +1 @@ -instance [safe] Err 'B -- Defined at T18262.hs:10:10 +instance [safe] Err 'B -- Defined at T18262.hs:11:10 diff --git a/testsuite/tests/ghci/prog006/Boot1.hs b/testsuite/tests/ghci/prog006/Boot1.hs index 0625737342..7711a5a4bf 100644 --- a/testsuite/tests/ghci/prog006/Boot1.hs +++ b/testsuite/tests/ghci/prog006/Boot1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Boot where import A diff --git a/testsuite/tests/ghci/prog006/Boot2.hs b/testsuite/tests/ghci/prog006/Boot2.hs index 5e7297e448..cc1b36062a 100644 --- a/testsuite/tests/ghci/prog006/Boot2.hs +++ b/testsuite/tests/ghci/prog006/Boot2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ExistentialQuantification #-} module Boot where diff --git a/testsuite/tests/ghci/prog006/prog006.stderr b/testsuite/tests/ghci/prog006/prog006.stderr index aedba9717f..8b23e548ed 100644 --- a/testsuite/tests/ghci/prog006/prog006.stderr +++ b/testsuite/tests/ghci/prog006/prog006.stderr @@ -1,5 +1,5 @@ -Boot.hs:5:13: error: +Boot.hs:6:13: error: • Data constructor ‘D’ has existential type variables, a context, or a specialised result type D :: forall n. Class n => n -> Data (Enable ExistentialQuantification or GADTs to allow this) diff --git a/testsuite/tests/ghci/scripts/T12447.script b/testsuite/tests/ghci/scripts/T12447.script index 3bdd3f4b73..826dec0b63 100644 --- a/testsuite/tests/ghci/scripts/T12447.script +++ b/testsuite/tests/ghci/scripts/T12447.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 :set -XRankNTypes -XConstraintKinds -XTypeApplications import Data.Typeable diff --git a/testsuite/tests/ghci/scripts/T12550.script b/testsuite/tests/ghci/scripts/T12550.script index 2834aeb7d9..53c0e37641 100644 --- a/testsuite/tests/ghci/scripts/T12550.script +++ b/testsuite/tests/ghci/scripts/T12550.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 :set -fprint-explicit-foralls -XKindSignatures -XExplicitNamespaces -XUnicodeSyntax :set -Wno-star-is-type import Data.Kind (type Type) diff --git a/testsuite/tests/ghci/scripts/T13202a.script b/testsuite/tests/ghci/scripts/T13202a.script index 107d332a64..1f1a9908c9 100644 --- a/testsuite/tests/ghci/scripts/T13202a.script +++ b/testsuite/tests/ghci/scripts/T13202a.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 import GHC.Records :set -XTypeApplications -XDataKinds let foo = getField @"name" diff --git a/testsuite/tests/ghci/scripts/T13202a.stderr b/testsuite/tests/ghci/scripts/T13202a.stderr index 8b1851f175..0402e7df7d 100644 --- a/testsuite/tests/ghci/scripts/T13202a.stderr +++ b/testsuite/tests/ghci/scripts/T13202a.stderr @@ -1,5 +1,5 @@ -<interactive>:3:5: error: +<interactive>:4:5: error: • Non type-variable argument in the constraint: HasField "name" r a (Use FlexibleContexts to permit this) • When checking the inferred type diff --git a/testsuite/tests/ghci/scripts/T13420.hs b/testsuite/tests/ghci/scripts/T13420.hs index 6b84e65cb2..5b911d8d4b 100644 --- a/testsuite/tests/ghci/scripts/T13420.hs +++ b/testsuite/tests/ghci/scripts/T13420.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T13420 where diff --git a/testsuite/tests/ghci/scripts/T13420.stdout b/testsuite/tests/ghci/scripts/T13420.stdout index 030b902677..9e8d7a6b7f 100644 --- a/testsuite/tests/ghci/scripts/T13420.stdout +++ b/testsuite/tests/ghci/scripts/T13420.stdout @@ -3,4 +3,4 @@ type family F a where F [Int] = Bool F [a] = Double F (a b) = Char - -- Defined at T13420.hs:4:1 + -- Defined at T13420.hs:5:1 diff --git a/testsuite/tests/ghci/scripts/T14969.script b/testsuite/tests/ghci/scripts/T14969.script index ab6af53c6b..476f5bfc65 100644 --- a/testsuite/tests/ghci/scripts/T14969.script +++ b/testsuite/tests/ghci/scripts/T14969.script @@ -1 +1,2 @@ +:set -XHaskell2010 3 _ 4 diff --git a/testsuite/tests/ghci/scripts/T14969.stderr b/testsuite/tests/ghci/scripts/T14969.stderr index 13da943a3c..ee9b5d2de8 100644 --- a/testsuite/tests/ghci/scripts/T14969.stderr +++ b/testsuite/tests/ghci/scripts/T14969.stderr @@ -1,5 +1,5 @@ -<interactive>:1:1: error: +<interactive>:2:1: error: • Non type-variable argument in the constraint: Num (t2 -> t1 -> t3) (Use FlexibleContexts to permit this) diff --git a/testsuite/tests/ghci/scripts/T15546.script b/testsuite/tests/ghci/scripts/T15546.script index 76bcda783e..0a06c5c633 100644 --- a/testsuite/tests/ghci/scripts/T15546.script +++ b/testsuite/tests/ghci/scripts/T15546.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 :set -XTypeFamilies type family E a b where E a a = (); E a b = Bool :info E diff --git a/testsuite/tests/ghci/scripts/T15546.stdout b/testsuite/tests/ghci/scripts/T15546.stdout index d14b442bb8..47ed331dfa 100644 --- a/testsuite/tests/ghci/scripts/T15546.stdout +++ b/testsuite/tests/ghci/scripts/T15546.stdout @@ -2,10 +2,10 @@ type E :: * -> * -> * type family E a b where E a a = () E a b = Bool - -- Defined at <interactive>:2:1 + -- Defined at <interactive>:3:1 type E :: * -> * -> * type family E a b where {- #0 -} E a a = () {- #1 -} E a b = Bool -- incompatible with: #0 - -- Defined at <interactive>:2:1 + -- Defined at <interactive>:3:1 diff --git a/testsuite/tests/ghci/scripts/T18501.script b/testsuite/tests/ghci/scripts/T18501.script index 64975cbc46..947cf936b3 100644 --- a/testsuite/tests/ghci/scripts/T18501.script +++ b/testsuite/tests/ghci/scripts/T18501.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 :set -XAllowAmbiguousTypes class Foo a where foo :: String :t foo diff --git a/testsuite/tests/ghci/scripts/T19279.stdout b/testsuite/tests/ghci/scripts/T19279.stdout index fe7fbbf9f8..37e056e1aa 100644 --- a/testsuite/tests/ghci/scripts/T19279.stdout +++ b/testsuite/tests/ghci/scripts/T19279.stdout @@ -1,3 +1,3 @@ -T :: * -> * +T :: k -> k = T -T :: * -> * +T :: k -> k diff --git a/testsuite/tests/ghci/scripts/T4087.hs b/testsuite/tests/ghci/scripts/T4087.hs index b992a9bb20..8186494508 100644 --- a/testsuite/tests/ghci/scripts/T4087.hs +++ b/testsuite/tests/ghci/scripts/T4087.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} module T4087 where diff --git a/testsuite/tests/ghci/scripts/T4087.stdout b/testsuite/tests/ghci/scripts/T4087.stdout index 8dafaa881d..6b0bbb51a5 100644 --- a/testsuite/tests/ghci/scripts/T4087.stdout +++ b/testsuite/tests/ghci/scripts/T4087.stdout @@ -2,4 +2,4 @@ type role Equal nominal nominal type Equal :: * -> * -> * data Equal a b where Equal :: Equal a a - -- Defined at T4087.hs:5:1 + -- Defined at T4087.hs:6:1 diff --git a/testsuite/tests/ghci/scripts/T4175.hs b/testsuite/tests/ghci/scripts/T4175.hs index ef34a4891d..7ecd8e9485 100644 --- a/testsuite/tests/ghci/scripts/T4175.hs +++ b/testsuite/tests/ghci/scripts/T4175.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ConstraintKinds #-} module T4175 where diff --git a/testsuite/tests/ghci/scripts/T4175.stdout b/testsuite/tests/ghci/scripts/T4175.stdout index 52d8a688c7..9f93304ca9 100644 --- a/testsuite/tests/ghci/scripts/T4175.stdout +++ b/testsuite/tests/ghci/scripts/T4175.stdout @@ -1,31 +1,31 @@ type A :: * -> * -> * type family A a b - -- Defined at T4175.hs:7:1 -type instance A (Maybe a) a = a -- Defined at T4175.hs:9:15 -type instance A Int Int = () -- Defined at T4175.hs:8:15 -type instance A (B a) b = () -- Defined at T4175.hs:10:15 + -- Defined at T4175.hs:8:1 +type instance A (Maybe a) a = a -- Defined at T4175.hs:10:15 +type instance A Int Int = () -- Defined at T4175.hs:9:15 +type instance A (B a) b = () -- Defined at T4175.hs:11:15 type B :: * -> * data family B a - -- Defined at T4175.hs:12:1 -instance [safe] G B -- Defined at T4175.hs:34:10 -type instance A (B a) b = () -- Defined at T4175.hs:10:15 -data instance B () = MkB -- Defined at T4175.hs:13:15 + -- Defined at T4175.hs:13:1 +instance [safe] G B -- Defined at T4175.hs:35:10 +type instance A (B a) b = () -- Defined at T4175.hs:11:15 +data instance B () = MkB -- Defined at T4175.hs:14:15 type C :: * -> Constraint class C a where type D :: * -> * -> * type family D a b - -- Defined at T4175.hs:16:5 -type instance D () () = Bool -- Defined at T4175.hs:22:10 -type instance D Int () = String -- Defined at T4175.hs:19:10 + -- Defined at T4175.hs:17:5 +type instance D () () = Bool -- Defined at T4175.hs:23:10 +type instance D Int () = String -- Defined at T4175.hs:20:10 type E :: * -> * type family E a where E () = Bool E Int = String - -- Defined at T4175.hs:24:1 + -- Defined at T4175.hs:25:1 type () :: * data () = () -- Defined in ‘GHC.Tuple’ -instance [safe] C () -- Defined at T4175.hs:21:10 +instance [safe] C () -- Defined at T4175.hs:22:10 instance Eq () -- Defined in ‘GHC.Classes’ instance Monoid () -- Defined in ‘GHC.Base’ instance Ord () -- Defined in ‘GHC.Classes’ @@ -34,9 +34,9 @@ instance Enum () -- Defined in ‘GHC.Enum’ instance Show () -- Defined in ‘GHC.Show’ instance Read () -- Defined in ‘GHC.Read’ instance Bounded () -- Defined in ‘GHC.Enum’ -type instance D () () = Bool -- Defined at T4175.hs:22:10 -type instance D Int () = String -- Defined at T4175.hs:19:10 -data instance B () = MkB -- Defined at T4175.hs:13:15 +type instance D () () = Bool -- Defined at T4175.hs:23:10 +type instance D Int () = String -- Defined at T4175.hs:20:10 +data instance B () = MkB -- Defined at T4175.hs:14:15 type Maybe :: * -> * data Maybe a = Nothing | Just a -- Defined in ‘GHC.Maybe’ @@ -53,11 +53,11 @@ instance MonadFail Maybe -- Defined in ‘Control.Monad.Fail’ instance Read a => Read (Maybe a) -- Defined in ‘GHC.Read’ instance Foldable Maybe -- Defined in ‘Data.Foldable’ instance Traversable Maybe -- Defined in ‘Data.Traversable’ -type instance A (Maybe a) a = a -- Defined at T4175.hs:9:15 +type instance A (Maybe a) a = a -- Defined at T4175.hs:10:15 type Int :: * data Int = GHC.Types.I# GHC.Prim.Int# -- Defined in ‘GHC.Types’ -instance [safe] C Int -- Defined at T4175.hs:18:10 +instance [safe] C Int -- Defined at T4175.hs:19:10 instance Eq Int -- Defined in ‘GHC.Classes’ instance Ord Int -- Defined in ‘GHC.Classes’ instance Enum Int -- Defined in ‘GHC.Enum’ @@ -67,9 +67,9 @@ instance Show Int -- Defined in ‘GHC.Show’ instance Read Int -- Defined in ‘GHC.Read’ instance Bounded Int -- Defined in ‘GHC.Enum’ instance Integral Int -- Defined in ‘GHC.Real’ -type instance D Int () = String -- Defined at T4175.hs:19:10 -type instance A Int Int = () -- Defined at T4175.hs:8:15 +type instance D Int () = String -- Defined at T4175.hs:20:10 +type instance A Int Int = () -- Defined at T4175.hs:9:15 type Z :: * -> Constraint class Z a - -- Defined at T4175.hs:28:1 -instance [safe] F (Z a) -- Defined at T4175.hs:31:10 + -- Defined at T4175.hs:29:1 +instance [safe] F (Z a) -- Defined at T4175.hs:32:10 diff --git a/testsuite/tests/ghci/scripts/T5417.hs b/testsuite/tests/ghci/scripts/T5417.hs index e86c076637..bf5e87a80d 100644 --- a/testsuite/tests/ghci/scripts/T5417.hs +++ b/testsuite/tests/ghci/scripts/T5417.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T5417 where import qualified T5417a as C diff --git a/testsuite/tests/ghci/scripts/T5417.script b/testsuite/tests/ghci/scripts/T5417.script index d163d7df04..c27a6f6c6c 100644 --- a/testsuite/tests/ghci/scripts/T5417.script +++ b/testsuite/tests/ghci/scripts/T5417.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 :l T5417 :browse :info C.F diff --git a/testsuite/tests/ghci/scripts/T5417.stdout b/testsuite/tests/ghci/scripts/T5417.stdout index 163a9236de..5227ac6651 100644 --- a/testsuite/tests/ghci/scripts/T5417.stdout +++ b/testsuite/tests/ghci/scripts/T5417.stdout @@ -12,4 +12,4 @@ class C.C1 a where type C.F :: * -> * data family C.F a -- Defined at T5417a.hs:7:5 -data instance C.F (B1 a) = B2 a -- Defined at T5417.hs:8:10 +data instance C.F (B1 a) = B2 a -- Defined at T5417.hs:9:10 diff --git a/testsuite/tests/ghci/scripts/T5820.hs b/testsuite/tests/ghci/scripts/T5820.hs index 99d36e5fc2..de6598f805 100644 --- a/testsuite/tests/ghci/scripts/T5820.hs +++ b/testsuite/tests/ghci/scripts/T5820.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T5820 where data Foo = Foo instance Eq Foo diff --git a/testsuite/tests/ghci/scripts/T5820.stderr b/testsuite/tests/ghci/scripts/T5820.stderr index 3f46fdbc47..370aa6d95c 100644 --- a/testsuite/tests/ghci/scripts/T5820.stderr +++ b/testsuite/tests/ghci/scripts/T5820.stderr @@ -1,5 +1,5 @@ -T5820.hs:3:10: warning: [-Wmissing-methods (in -Wdefault)] +T5820.hs:4:10: warning: [-Wmissing-methods (in -Wdefault)] • No explicit implementation for either ‘==’ or ‘/=’ • In the instance declaration for ‘Eq Foo’ diff --git a/testsuite/tests/ghci/scripts/T5820.stdout b/testsuite/tests/ghci/scripts/T5820.stdout index faa5f6fc76..4940da3f2d 100644 --- a/testsuite/tests/ghci/scripts/T5820.stdout +++ b/testsuite/tests/ghci/scripts/T5820.stdout @@ -1,8 +1,8 @@ type Foo :: * data Foo = Foo - -- Defined at T5820.hs:2:1 -instance [safe] Eq Foo -- Defined at T5820.hs:3:10 + -- Defined at T5820.hs:3:1 +instance [safe] Eq Foo -- Defined at T5820.hs:4:10 type Foo :: * data Foo = Foo - -- Defined at T5820.hs:2:1 -instance [safe] Eq Foo -- Defined at T5820.hs:3:10 + -- Defined at T5820.hs:3:1 +instance [safe] Eq Foo -- Defined at T5820.hs:4:10 diff --git a/testsuite/tests/ghci/scripts/T7939.hs b/testsuite/tests/ghci/scripts/T7939.hs index 04a1f1a623..493c6538d1 100644 --- a/testsuite/tests/ghci/scripts/T7939.hs +++ b/testsuite/tests/ghci/scripts/T7939.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, PolyKinds, DataKinds, TypeOperators #-} module T7939 where import Data.Kind (Type) diff --git a/testsuite/tests/ghci/scripts/T7939.stdout b/testsuite/tests/ghci/scripts/T7939.stdout index 93739d04dc..0d9e4d363c 100644 --- a/testsuite/tests/ghci/scripts/T7939.stdout +++ b/testsuite/tests/ghci/scripts/T7939.stdout @@ -2,32 +2,32 @@ type Foo :: forall {k}. k -> Constraint class Foo a where type Bar :: forall {k}. k -> * -> * type family Bar a b - -- Defined at T7939.hs:6:4 + -- Defined at T7939.hs:7:4 Bar :: k -> * -> * type F :: * -> * type family F a - -- Defined at T7939.hs:8:1 -type instance F Int = Bool -- Defined at T7939.hs:9:15 + -- Defined at T7939.hs:9:1 +type instance F Int = Bool -- Defined at T7939.hs:10:15 F :: * -> * type G :: * -> * type family G a where G Int = Bool - -- Defined at T7939.hs:11:1 + -- Defined at T7939.hs:12:1 G :: * -> * type H :: Bool -> Bool type family H a where H 'False = 'True - -- Defined at T7939.hs:14:1 + -- Defined at T7939.hs:15:1 H :: Bool -> Bool type J :: forall {k}. [k] -> Bool type family J a where J '[] = 'False forall k (h :: k) (t :: [k]). J (h : t) = 'True - -- Defined at T7939.hs:17:1 + -- Defined at T7939.hs:18:1 J :: [k] -> Bool type K :: forall {a}. [a] -> Maybe a type family K a1 where K '[] = 'Nothing forall a (h :: a) (t :: [a]). K (h : t) = 'Just h - -- Defined at T7939.hs:21:1 + -- Defined at T7939.hs:22:1 K :: [a] -> Maybe a diff --git a/testsuite/tests/ghci/scripts/T9293.hs b/testsuite/tests/ghci/scripts/T9293.hs index f7329c97e5..3a5d3d8986 100644 --- a/testsuite/tests/ghci/scripts/T9293.hs +++ b/testsuite/tests/ghci/scripts/T9293.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Test where data T a where C :: T Int diff --git a/testsuite/tests/ghci/scripts/T9293.script b/testsuite/tests/ghci/scripts/T9293.script index c2fbf46cd7..c4719e26e4 100644 --- a/testsuite/tests/ghci/scripts/T9293.script +++ b/testsuite/tests/ghci/scripts/T9293.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 :set putStrLn "Should fail, GADTs is not enabled" diff --git a/testsuite/tests/ghci/scripts/T9293.stderr b/testsuite/tests/ghci/scripts/T9293.stderr index 4a72589688..8f46cee2d1 100644 --- a/testsuite/tests/ghci/scripts/T9293.stderr +++ b/testsuite/tests/ghci/scripts/T9293.stderr @@ -1,17 +1,17 @@ -<interactive>:4:1: error: +<interactive>:5:1: error: • Illegal generalised algebraic data declaration for ‘T’ (Enable the GADTs extension to allow this) • In the data declaration for ‘T’ -ghci057.hs:3:3: error: +ghci057.hs:4:3: error: • Data constructor ‘C’ has existential type variables, a context, or a specialised result type C :: T Int (Enable ExistentialQuantification or GADTs to allow this) • In the definition of data constructor ‘C’ In the data type declaration for ‘T’ -ghci057.hs:3:3: error: +ghci057.hs:4:3: error: • Data constructor ‘C’ has existential type variables, a context, or a specialised result type C :: T Int (Enable ExistentialQuantification or GADTs to allow this) diff --git a/testsuite/tests/ghci/scripts/T9293.stdout b/testsuite/tests/ghci/scripts/T9293.stdout index 78c1ec819d..15c36fb34e 100644 --- a/testsuite/tests/ghci/scripts/T9293.stdout +++ b/testsuite/tests/ghci/scripts/T9293.stdout @@ -1,8 +1,6 @@ options currently set: none. base language is: Haskell2010 with the following modifiers: - -XNoDatatypeContexts - -XNondecreasingIndentation GHCi-specific dynamic flag settings: other dynamic, non-language, flag settings: -fno-diagnostics-show-caret @@ -20,11 +18,9 @@ Should fail, GADTs is not enabled options currently set: none. base language is: Haskell2010 with the following modifiers: - -XNoDatatypeContexts -XGADTSyntax -XGADTs -XMonoLocalBinds - -XNondecreasingIndentation GHCi-specific dynamic flag settings: other dynamic, non-language, flag settings: -fno-diagnostics-show-caret @@ -42,10 +38,8 @@ Should work, GADTs is in force from :set options currently set: none. base language is: Haskell2010 with the following modifiers: - -XNoDatatypeContexts -XGADTSyntax -XMonoLocalBinds - -XNondecreasingIndentation GHCi-specific dynamic flag settings: other dynamic, non-language, flag settings: -fno-diagnostics-show-caret @@ -62,13 +56,11 @@ warning settings: Should fail, GADTs is now disabled base language is: Haskell2010 with the following modifiers: - -XNoDatatypeContexts -XExtendedDefaultRules -XGADTSyntax -XGADTs -XMonoLocalBinds -XNoMonomorphismRestriction - -XNondecreasingIndentation GHCi-specific dynamic flag settings: other dynamic, non-language, flag settings: -fno-diagnostics-show-caret diff --git a/testsuite/tests/ghci/scripts/ghci019.hs b/testsuite/tests/ghci/scripts/ghci019.hs index 14cf726c86..94d5664f68 100644 --- a/testsuite/tests/ghci/scripts/ghci019.hs +++ b/testsuite/tests/ghci/scripts/ghci019.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- #1581 -- Even though Eq is not in scope unqualified, we want to -- see the Eq instance of Foo when we say :i Foo diff --git a/testsuite/tests/ghci/scripts/ghci019.stderr b/testsuite/tests/ghci/scripts/ghci019.stderr index 0d3378ec8e..51d5a0123f 100644 --- a/testsuite/tests/ghci/scripts/ghci019.stderr +++ b/testsuite/tests/ghci/scripts/ghci019.stderr @@ -1,5 +1,5 @@ -ghci019.hs:9:10: warning: [-Wmissing-methods (in -Wdefault)] +ghci019.hs:10:10: warning: [-Wmissing-methods (in -Wdefault)] • No explicit implementation for either ‘Prelude.==’ or ‘Prelude./=’ • In the instance declaration for ‘Prelude.Eq Foo’ diff --git a/testsuite/tests/ghci/scripts/ghci019.stdout b/testsuite/tests/ghci/scripts/ghci019.stdout index 0a9fefb77b..ddcbafebb9 100644 --- a/testsuite/tests/ghci/scripts/ghci019.stdout +++ b/testsuite/tests/ghci/scripts/ghci019.stdout @@ -1,4 +1,4 @@ type Foo :: * data Foo = Foo - -- Defined at ghci019.hs:8:1 -instance [safe] Prelude.Eq Foo -- Defined at ghci019.hs:9:10 + -- Defined at ghci019.hs:9:1 +instance [safe] Prelude.Eq Foo -- Defined at ghci019.hs:10:10 diff --git a/testsuite/tests/ghci/scripts/ghci024.stdout b/testsuite/tests/ghci/scripts/ghci024.stdout index bd8ee9361e..7cf36ac041 100644 --- a/testsuite/tests/ghci/scripts/ghci024.stdout +++ b/testsuite/tests/ghci/scripts/ghci024.stdout @@ -1,9 +1,7 @@ ~~~~~~~~~~ Testing :set options currently set: none. -base language is: Haskell2010 +base language is: GHC2021 with the following modifiers: - -XNoDatatypeContexts - -XNondecreasingIndentation GHCi-specific dynamic flag settings: other dynamic, non-language, flag settings: -fno-diagnostics-show-caret @@ -19,7 +17,7 @@ warning settings: -Wcompat-unqualified-imports ~~~~~~~~~~ Testing :set -a options currently set: none. -base language is: Haskell2010 +base language is: GHC2021 all active language options: GHCi-specific dynamic flag settings: -fno-print-explicit-foralls @@ -27,16 +25,12 @@ other dynamic, non-language, flag settings: warning settings: -Wno-implicit-prelude ~~~~~~~~~~ Testing :show languages -base language is: Haskell2010 +base language is: GHC2021 with the following modifiers: - -XNoDatatypeContexts - -XNondecreasingIndentation ~~~~~~~~~~ Testing :show languages, with -XMagicHash -base language is: Haskell2010 +base language is: GHC2021 with the following modifiers: - -XNoDatatypeContexts -XMagicHash - -XNondecreasingIndentation ~~~~~~~~~~ Testing :show packages active package flags: none ~~~~~~~~~~ Testing :show packages, including the ghc package diff --git a/testsuite/tests/ghci/scripts/ghci025.hs b/testsuite/tests/ghci/scripts/ghci025.hs index b556509aa6..abb6b3d490 100644 --- a/testsuite/tests/ghci/scripts/ghci025.hs +++ b/testsuite/tests/ghci/scripts/ghci025.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, MultiParamTypeClasses #-} {-# LANGUAGE AllowAmbiguousTypes #-} -- c3 is ambiguous! diff --git a/testsuite/tests/ghci/scripts/ghci057.hs b/testsuite/tests/ghci/scripts/ghci057.hs index 2a6b836d80..23bad888bc 100644 --- a/testsuite/tests/ghci/scripts/ghci057.hs +++ b/testsuite/tests/ghci/scripts/ghci057.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Test where data T a where C :: T Int diff --git a/testsuite/tests/ghci/scripts/ghci057.script b/testsuite/tests/ghci/scripts/ghci057.script index 547fce52d7..db77b80cb1 100644 --- a/testsuite/tests/ghci/scripts/ghci057.script +++ b/testsuite/tests/ghci/scripts/ghci057.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 :set putStrLn "Should fail, GADTs is not enabled" diff --git a/testsuite/tests/ghci/scripts/ghci057.stderr b/testsuite/tests/ghci/scripts/ghci057.stderr index 4a72589688..8f46cee2d1 100644 --- a/testsuite/tests/ghci/scripts/ghci057.stderr +++ b/testsuite/tests/ghci/scripts/ghci057.stderr @@ -1,17 +1,17 @@ -<interactive>:4:1: error: +<interactive>:5:1: error: • Illegal generalised algebraic data declaration for ‘T’ (Enable the GADTs extension to allow this) • In the data declaration for ‘T’ -ghci057.hs:3:3: error: +ghci057.hs:4:3: error: • Data constructor ‘C’ has existential type variables, a context, or a specialised result type C :: T Int (Enable ExistentialQuantification or GADTs to allow this) • In the definition of data constructor ‘C’ In the data type declaration for ‘T’ -ghci057.hs:3:3: error: +ghci057.hs:4:3: error: • Data constructor ‘C’ has existential type variables, a context, or a specialised result type C :: T Int (Enable ExistentialQuantification or GADTs to allow this) diff --git a/testsuite/tests/ghci/scripts/ghci057.stdout b/testsuite/tests/ghci/scripts/ghci057.stdout index 78c1ec819d..15c36fb34e 100644 --- a/testsuite/tests/ghci/scripts/ghci057.stdout +++ b/testsuite/tests/ghci/scripts/ghci057.stdout @@ -1,8 +1,6 @@ options currently set: none. base language is: Haskell2010 with the following modifiers: - -XNoDatatypeContexts - -XNondecreasingIndentation GHCi-specific dynamic flag settings: other dynamic, non-language, flag settings: -fno-diagnostics-show-caret @@ -20,11 +18,9 @@ Should fail, GADTs is not enabled options currently set: none. base language is: Haskell2010 with the following modifiers: - -XNoDatatypeContexts -XGADTSyntax -XGADTs -XMonoLocalBinds - -XNondecreasingIndentation GHCi-specific dynamic flag settings: other dynamic, non-language, flag settings: -fno-diagnostics-show-caret @@ -42,10 +38,8 @@ Should work, GADTs is in force from :set options currently set: none. base language is: Haskell2010 with the following modifiers: - -XNoDatatypeContexts -XGADTSyntax -XMonoLocalBinds - -XNondecreasingIndentation GHCi-specific dynamic flag settings: other dynamic, non-language, flag settings: -fno-diagnostics-show-caret @@ -62,13 +56,11 @@ warning settings: Should fail, GADTs is now disabled base language is: Haskell2010 with the following modifiers: - -XNoDatatypeContexts -XExtendedDefaultRules -XGADTSyntax -XGADTs -XMonoLocalBinds -XNoMonomorphismRestriction - -XNondecreasingIndentation GHCi-specific dynamic flag settings: other dynamic, non-language, flag settings: -fno-diagnostics-show-caret diff --git a/testsuite/tests/ghci/scripts/ghci064.hs b/testsuite/tests/ghci/scripts/ghci064.hs index 152836d270..c2c2e32b69 100644 --- a/testsuite/tests/ghci/scripts/ghci064.hs +++ b/testsuite/tests/ghci/scripts/ghci064.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleInstances, TypeFamilies #-} import Data.Kind (Type) diff --git a/testsuite/tests/ghci/scripts/ghci064.stdout b/testsuite/tests/ghci/scripts/ghci064.stdout index d527dde6c4..0fa911e351 100644 --- a/testsuite/tests/ghci/scripts/ghci064.stdout +++ b/testsuite/tests/ghci/scripts/ghci064.stdout @@ -25,12 +25,12 @@ instance Show w => Show [w] -- Defined in ‘GHC.Show’ instance Read w => Read [w] -- Defined in ‘GHC.Read’ instance GHC.Generics.Generic [w] -- Defined in ‘GHC.Generics’ instance [safe] MyShow w => MyShow [w] - -- Defined at ghci064.hs:7:10 + -- Defined at ghci064.hs:8:10 instance Monoid [T] -- Defined in ‘GHC.Base’ instance Semigroup [T] -- Defined in ‘GHC.Base’ instance GHC.Generics.Generic [T] -- Defined in ‘GHC.Generics’ -instance [safe] MyShow [T] -- Defined at ghci064.hs:7:10 -instance [safe] MyShow [T] -- Defined at ghci064.hs:15:10 +instance [safe] MyShow [T] -- Defined at ghci064.hs:8:10 +instance [safe] MyShow [T] -- Defined at ghci064.hs:16:10 instance Eq Bool -- Defined in ‘GHC.Classes’ instance Ord Bool -- Defined in ‘GHC.Classes’ instance Enum Bool -- Defined in ‘GHC.Enum’ diff --git a/testsuite/tests/ghci/scripts/ghci065.stdout b/testsuite/tests/ghci/scripts/ghci065.stdout index 4c6f40c72c..39b990b04c 100644 --- a/testsuite/tests/ghci/scripts/ghci065.stdout +++ b/testsuite/tests/ghci/scripts/ghci065.stdout @@ -26,7 +26,7 @@ func3 :: Int -> Int -> Int Here's multiple line comment for func3. PatSyn :: Int -- Pattern synonym defined at ghci065.hs:54:1 This is the haddock comment of a pattern synonym -TyCl :: * -> Constraint -- Class defined at ghci065.hs:57:1 +TyCl :: k -> Constraint -- Class defined at ghci065.hs:57:1 This is the haddock comment of a type class TyFam :: * -> * -- Type constructor defined at ghci065.hs:60:1 This is the haddock comment of a type family diff --git a/testsuite/tests/ghci/should_run/T10857a.stdout b/testsuite/tests/ghci/should_run/T10857a.stdout index a37151f062..51f30615f1 100644 --- a/testsuite/tests/ghci/should_run/T10857a.stdout +++ b/testsuite/tests/ghci/should_run/T10857a.stdout @@ -1,6 +1,4 @@ -base language is: Haskell2010 +base language is: GHC2021 with the following modifiers: - -XNoDatatypeContexts -XExtendedDefaultRules -XNoMonomorphismRestriction - -XNondecreasingIndentation diff --git a/testsuite/tests/ghci/should_run/T10857b.stdout b/testsuite/tests/ghci/should_run/T10857b.stdout index 2619fae00d..bcc6fdd383 100644 --- a/testsuite/tests/ghci/should_run/T10857b.stdout +++ b/testsuite/tests/ghci/should_run/T10857b.stdout @@ -1,4 +1,2 @@ -base language is: Haskell2010 +base language is: GHC2021 with the following modifiers: - -XNoDatatypeContexts - -XNondecreasingIndentation diff --git a/testsuite/tests/ghci/should_run/T12525.stdout b/testsuite/tests/ghci/should_run/T12525.stdout index a00ffea4e3..ef48679f94 100644 --- a/testsuite/tests/ghci/should_run/T12525.stdout +++ b/testsuite/tests/ghci/should_run/T12525.stdout @@ -1,4 +1,4 @@ x :: () = () y :: () = () -type Foo :: * -> Constraint +type Foo :: forall {k}. k -> Constraint class Foo a diff --git a/testsuite/tests/hiefile/should_compile/hie002.hs b/testsuite/tests/hiefile/should_compile/hie002.hs index 41146c7f70..157d0eb6c6 100644 --- a/testsuite/tests/hiefile/should_compile/hie002.hs +++ b/testsuite/tests/hiefile/should_compile/hie002.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -w #-} {-# OPTIONS -XMagicHash -XBangPatterns #-} module Grammar where diff --git a/testsuite/tests/indexed-types/should_compile/ClosedFam2.hs b/testsuite/tests/indexed-types/should_compile/ClosedFam2.hs index fb7d67b2f5..acd4720aab 100644 --- a/testsuite/tests/indexed-types/should_compile/ClosedFam2.hs +++ b/testsuite/tests/indexed-types/should_compile/ClosedFam2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module ClosedFam2 where diff --git a/testsuite/tests/indexed-types/should_compile/ClosedFam2.hs-boot b/testsuite/tests/indexed-types/should_compile/ClosedFam2.hs-boot index f13bf46d6e..976c97b4ff 100644 --- a/testsuite/tests/indexed-types/should_compile/ClosedFam2.hs-boot +++ b/testsuite/tests/indexed-types/should_compile/ClosedFam2.hs-boot @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module ClosedFam2 where diff --git a/testsuite/tests/indexed-types/should_compile/ClosedFam2a.hs b/testsuite/tests/indexed-types/should_compile/ClosedFam2a.hs index b259f6e8f8..0a9e21b117 100644 --- a/testsuite/tests/indexed-types/should_compile/ClosedFam2a.hs +++ b/testsuite/tests/indexed-types/should_compile/ClosedFam2a.hs @@ -1,2 +1,3 @@ +{-# LANGUAGE Haskell2010 #-} module ClosedFam2a where import {-# SOURCE #-} ClosedFam2 diff --git a/testsuite/tests/indexed-types/should_compile/IndTypesPerf.hs b/testsuite/tests/indexed-types/should_compile/IndTypesPerf.hs index 30c92c3a88..ed06a79189 100644 --- a/testsuite/tests/indexed-types/should_compile/IndTypesPerf.hs +++ b/testsuite/tests/indexed-types/should_compile/IndTypesPerf.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- This used lots of memory, and took a long time to compile, with GHC 6.12: -- http://www.haskell.org/pipermail/glasgow-haskell-users/2010-May/018835.html diff --git a/testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs b/testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs index a022c36a85..a7c16b7254 100644 --- a/testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs +++ b/testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE EmptyDataDecls, TypeFamilies, UndecidableInstances, ScopedTypeVariables, TypeOperators, FlexibleInstances, NoMonomorphismRestriction, diff --git a/testsuite/tests/indexed-types/should_compile/InstEqContext2.hs b/testsuite/tests/indexed-types/should_compile/InstEqContext2.hs index 0140d3e74e..ea356a44ad 100644 --- a/testsuite/tests/indexed-types/should_compile/InstEqContext2.hs +++ b/testsuite/tests/indexed-types/should_compile/InstEqContext2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies, EmptyDataDecls #-} diff --git a/testsuite/tests/indexed-types/should_compile/Roman1.hs b/testsuite/tests/indexed-types/should_compile/Roman1.hs index 46f26a8196..ef053c4902 100644 --- a/testsuite/tests/indexed-types/should_compile/Roman1.hs +++ b/testsuite/tests/indexed-types/should_compile/Roman1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, RankNTypes #-} -- This test made the type checker produce an diff --git a/testsuite/tests/indexed-types/should_compile/Simple14.hs b/testsuite/tests/indexed-types/should_compile/Simple14.hs index dba26194f1..bedf5bb3e7 100644 --- a/testsuite/tests/indexed-types/should_compile/Simple14.hs +++ b/testsuite/tests/indexed-types/should_compile/Simple14.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, RankNTypes, FlexibleContexts, ScopedTypeVariables #-} module Simple14 where diff --git a/testsuite/tests/indexed-types/should_compile/Simple14.stderr b/testsuite/tests/indexed-types/should_compile/Simple14.stderr index 6159b08898..7489ffce5a 100644 --- a/testsuite/tests/indexed-types/should_compile/Simple14.stderr +++ b/testsuite/tests/indexed-types/should_compile/Simple14.stderr @@ -1,5 +1,5 @@ -Simple14.hs:19:27: error: +Simple14.hs:20:27: error: • Couldn't match type ‘z0’ with ‘n’ Expected: EQ_ z0 z0 Actual: EQ_ m n @@ -7,15 +7,15 @@ Simple14.hs:19:27: error: inside the constraints: Maybe m ~ Maybe n bound by a type expected by the context: (Maybe m ~ Maybe n) => EQ_ z0 z0 - at Simple14.hs:19:26-41 + at Simple14.hs:20:26-41 ‘n’ is a rigid type variable bound by the type signature for: foo :: forall m n. EQ_ (Maybe m) (Maybe n) - at Simple14.hs:18:1-42 + at Simple14.hs:19:1-42 • In the second argument of ‘eqE’, namely ‘(eqI :: EQ_ m n)’ In the expression: x `eqE` (eqI :: EQ_ m n) In the first argument of ‘ntI’, namely ‘(\ x -> x `eqE` (eqI :: EQ_ m n))’ • Relevant bindings include - x :: EQ_ (Maybe m) (Maybe n) (bound at Simple14.hs:19:13) - foo :: EQ_ (Maybe m) (Maybe n) (bound at Simple14.hs:19:1) + x :: EQ_ (Maybe m) (Maybe n) (bound at Simple14.hs:20:13) + foo :: EQ_ (Maybe m) (Maybe n) (bound at Simple14.hs:20:1) diff --git a/testsuite/tests/indexed-types/should_compile/T11361.hs b/testsuite/tests/indexed-types/should_compile/T11361.hs index 89153d4d0b..7534734790 100644 --- a/testsuite/tests/indexed-types/should_compile/T11361.hs +++ b/testsuite/tests/indexed-types/should_compile/T11361.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} -- this is needed because |FamHelper a x| /< |Fam a x| diff --git a/testsuite/tests/indexed-types/should_compile/T14554.hs b/testsuite/tests/indexed-types/should_compile/T14554.hs index 6049b1934e..e101fbdc74 100644 --- a/testsuite/tests/indexed-types/should_compile/T14554.hs +++ b/testsuite/tests/indexed-types/should_compile/T14554.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language UndecidableInstances, DataKinds, TypeOperators, TypeFamilies, PolyKinds, GADTs, LambdaCase, ScopedTypeVariables #-} diff --git a/testsuite/tests/indexed-types/should_compile/T15122.hs b/testsuite/tests/indexed-types/should_compile/T15122.hs index c05bd3a8a0..49a3de642d 100644 --- a/testsuite/tests/indexed-types/should_compile/T15122.hs +++ b/testsuite/tests/indexed-types/should_compile/T15122.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} diff --git a/testsuite/tests/indexed-types/should_compile/T15352.hs b/testsuite/tests/indexed-types/should_compile/T15352.hs index d83512f085..25c4640809 100644 --- a/testsuite/tests/indexed-types/should_compile/T15352.hs +++ b/testsuite/tests/indexed-types/should_compile/T15352.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeInType #-} -- or PolyKinds {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} diff --git a/testsuite/tests/indexed-types/should_compile/T16110_Compile.hs b/testsuite/tests/indexed-types/should_compile/T16110_Compile.hs index f05a4513fb..ce73dba6a7 100644 --- a/testsuite/tests/indexed-types/should_compile/T16110_Compile.hs +++ b/testsuite/tests/indexed-types/should_compile/T16110_Compile.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} module T16110_Compile where diff --git a/testsuite/tests/indexed-types/should_compile/T16356_Compile1.hs b/testsuite/tests/indexed-types/should_compile/T16356_Compile1.hs index 74dee38ac4..6622d513d7 100644 --- a/testsuite/tests/indexed-types/should_compile/T16356_Compile1.hs +++ b/testsuite/tests/indexed-types/should_compile/T16356_Compile1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeApplications #-} diff --git a/testsuite/tests/indexed-types/should_compile/T17008b.hs b/testsuite/tests/indexed-types/should_compile/T17008b.hs index 25763684e4..7116c1d441 100644 --- a/testsuite/tests/indexed-types/should_compile/T17008b.hs +++ b/testsuite/tests/indexed-types/should_compile/T17008b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} diff --git a/testsuite/tests/indexed-types/should_compile/T4120.hs b/testsuite/tests/indexed-types/should_compile/T4120.hs index 180472232f..8e8e41f322 100644 --- a/testsuite/tests/indexed-types/should_compile/T4120.hs +++ b/testsuite/tests/indexed-types/should_compile/T4120.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, TypeFamilies #-} -- Unification yielding a coercion under a forall diff --git a/testsuite/tests/indexed-types/should_compile/T4484.hs b/testsuite/tests/indexed-types/should_compile/T4484.hs index 203f19a440..45add2ad42 100644 --- a/testsuite/tests/indexed-types/should_compile/T4484.hs +++ b/testsuite/tests/indexed-types/should_compile/T4484.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, EmptyDataDecls, GADTs #-} module T4484 where diff --git a/testsuite/tests/indexed-types/should_compile/T5591a.hs b/testsuite/tests/indexed-types/should_compile/T5591a.hs index 9c1a2c7e51..5d9243d832 100644 --- a/testsuite/tests/indexed-types/should_compile/T5591a.hs +++ b/testsuite/tests/indexed-types/should_compile/T5591a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs, TypeOperators, TypeFamilies, ScopedTypeVariables #-} module T5591a where diff --git a/testsuite/tests/indexed-types/should_compile/T8002.hs b/testsuite/tests/indexed-types/should_compile/T8002.hs index d90a502b05..7ca74e2ddf 100644 --- a/testsuite/tests/indexed-types/should_compile/T8002.hs +++ b/testsuite/tests/indexed-types/should_compile/T8002.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T8002 where diff --git a/testsuite/tests/indexed-types/should_compile/T8002a.hs b/testsuite/tests/indexed-types/should_compile/T8002a.hs index 98ac39e55f..59b4312d4e 100644 --- a/testsuite/tests/indexed-types/should_compile/T8002a.hs +++ b/testsuite/tests/indexed-types/should_compile/T8002a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TypeFamilies #-} diff --git a/testsuite/tests/indexed-types/should_compile/T8002b.hs b/testsuite/tests/indexed-types/should_compile/T8002b.hs index 073f930d59..8c965a44af 100644 --- a/testsuite/tests/indexed-types/should_compile/T8002b.hs +++ b/testsuite/tests/indexed-types/should_compile/T8002b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T8002b where diff --git a/testsuite/tests/indexed-types/should_compile/T8500.hs b/testsuite/tests/indexed-types/should_compile/T8500.hs index 5e8f09004f..abb3eba5bf 100644 --- a/testsuite/tests/indexed-types/should_compile/T8500.hs +++ b/testsuite/tests/indexed-types/should_compile/T8500.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T8500 where diff --git a/testsuite/tests/indexed-types/should_compile/T8500a.hs b/testsuite/tests/indexed-types/should_compile/T8500a.hs index f4f97b97a6..26dbbcbb12 100644 --- a/testsuite/tests/indexed-types/should_compile/T8500a.hs +++ b/testsuite/tests/indexed-types/should_compile/T8500a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T8500a where diff --git a/testsuite/tests/indexed-types/should_compile/T9840.hs b/testsuite/tests/indexed-types/should_compile/T9840.hs index 0dc96bb9c7..98df2a00a1 100644 --- a/testsuite/tests/indexed-types/should_compile/T9840.hs +++ b/testsuite/tests/indexed-types/should_compile/T9840.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T9840 where diff --git a/testsuite/tests/indexed-types/should_compile/T9840.hs-boot b/testsuite/tests/indexed-types/should_compile/T9840.hs-boot index b60a8db0ac..ff3001944c 100644 --- a/testsuite/tests/indexed-types/should_compile/T9840.hs-boot +++ b/testsuite/tests/indexed-types/should_compile/T9840.hs-boot @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T9840 where diff --git a/testsuite/tests/indexed-types/should_compile/T9840a.hs b/testsuite/tests/indexed-types/should_compile/T9840a.hs index dab6e044f5..8741a27579 100644 --- a/testsuite/tests/indexed-types/should_compile/T9840a.hs +++ b/testsuite/tests/indexed-types/should_compile/T9840a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T9840a where diff --git a/testsuite/tests/indexed-types/should_fail/ClosedFam3.hs b/testsuite/tests/indexed-types/should_fail/ClosedFam3.hs index 3dd140b615..5d0366446d 100644 --- a/testsuite/tests/indexed-types/should_fail/ClosedFam3.hs +++ b/testsuite/tests/indexed-types/should_fail/ClosedFam3.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module ClosedFam3 where diff --git a/testsuite/tests/indexed-types/should_fail/ClosedFam3.hs-boot b/testsuite/tests/indexed-types/should_fail/ClosedFam3.hs-boot index 5a10841ba4..7b72a0276a 100644 --- a/testsuite/tests/indexed-types/should_fail/ClosedFam3.hs-boot +++ b/testsuite/tests/indexed-types/should_fail/ClosedFam3.hs-boot @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, PolyKinds #-} module ClosedFam3 where diff --git a/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr b/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr index f0a5614560..28190937a4 100644 --- a/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr +++ b/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr @@ -1,5 +1,5 @@ -ClosedFam3.hs-boot:7:1: error: +ClosedFam3.hs-boot:8:1: error: Type constructor ‘Foo’ has conflicting definitions in the module and its hs-boot file Main module: type Foo :: * -> * @@ -10,7 +10,7 @@ ClosedFam3.hs-boot:7:1: error: type family Foo a where Foo Int = Bool -ClosedFam3.hs-boot:10:1: error: +ClosedFam3.hs-boot:11:1: error: Type constructor ‘Bar’ has conflicting definitions in the module and its hs-boot file Main module: type Bar :: * -> * @@ -22,7 +22,7 @@ ClosedFam3.hs-boot:10:1: error: Bar Int = Bool Bar Double = Char -ClosedFam3.hs-boot:14:1: error: +ClosedFam3.hs-boot:15:1: error: Type constructor ‘Baz’ has conflicting definitions in the module and its hs-boot file Main module: type Baz :: * -> * diff --git a/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4a.hs b/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4a.hs index f99e884161..336ee7c4b3 100644 --- a/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4a.hs +++ b/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE TypeFamilies #-} diff --git a/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4a.stderr b/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4a.stderr index 776ee19592..a0d7408210 100644 --- a/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4a.stderr +++ b/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4a.stderr @@ -1,11 +1,11 @@ -ExplicitForAllFams4a.hs:7:12: error: +ExplicitForAllFams4a.hs:8:12: error: • Type variable ‘b’ is bound by a forall, but not used in the family instance • In the equations for closed type family ‘H’ In the type family declaration for ‘H’ -ExplicitForAllFams4a.hs:8:10: error: +ExplicitForAllFams4a.hs:9:10: error: • Type variable ‘b’ is mentioned in the RHS, but not bound on the LHS of the family instance • In the equations for closed type family ‘H’ diff --git a/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.hs b/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.hs index c488f45a65..f8187e5878 100644 --- a/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.hs +++ b/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE TypeFamilies #-} diff --git a/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.stderr b/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.stderr index ca0e33c5ff..7d8bd872ed 100644 --- a/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.stderr +++ b/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.stderr @@ -1,82 +1,82 @@ -ExplicitForAllFams4b.hs:7:24: error: +ExplicitForAllFams4b.hs:8:24: error: • Type variable ‘b’ is bound by a forall, but not used in the family instance • In the type instance declaration for ‘J’ -ExplicitForAllFams4b.hs:7:27: error: +ExplicitForAllFams4b.hs:8:27: error: Conflicting family instance declarations: - J [a] = Float -- Defined at ExplicitForAllFams4b.hs:7:27 - J _ = Maybe b -- Defined at ExplicitForAllFams4b.hs:8:27 + J [a] = Float -- Defined at ExplicitForAllFams4b.hs:8:27 + J _ = Maybe b -- Defined at ExplicitForAllFams4b.hs:9:27 -ExplicitForAllFams4b.hs:8:22: error: +ExplicitForAllFams4b.hs:9:22: error: • Type variable ‘b’ is mentioned in the RHS, but not bound on the LHS of the family instance • In the type instance declaration for ‘J’ -ExplicitForAllFams4b.hs:11:24: error: +ExplicitForAllFams4b.hs:12:24: error: • Type variable ‘b’ is mentioned in the RHS, but not bound on the LHS of the family instance • In the data instance declaration for ‘K’ -ExplicitForAllFams4b.hs:11:27: error: +ExplicitForAllFams4b.hs:12:27: error: Conflicting family instance declarations: - K (a, Bool) -- Defined at ExplicitForAllFams4b.hs:11:27 - K _ -- Defined at ExplicitForAllFams4b.hs:12:27 + K (a, Bool) -- Defined at ExplicitForAllFams4b.hs:12:27 + K _ -- Defined at ExplicitForAllFams4b.hs:13:27 -ExplicitForAllFams4b.hs:12:22: error: +ExplicitForAllFams4b.hs:13:22: error: • Type variable ‘b’ is mentioned in the RHS, but not bound on the LHS of the family instance • In the data instance declaration for ‘K’ -ExplicitForAllFams4b.hs:15:27: error: +ExplicitForAllFams4b.hs:16:27: error: • Type variable ‘b’ is mentioned in the RHS, but not bound on the LHS of the family instance • In the newtype instance declaration for ‘L’ -ExplicitForAllFams4b.hs:15:30: error: +ExplicitForAllFams4b.hs:16:30: error: Conflicting family instance declarations: - L (a, Bool) -- Defined at ExplicitForAllFams4b.hs:15:30 - L _ -- Defined at ExplicitForAllFams4b.hs:16:30 + L (a, Bool) -- Defined at ExplicitForAllFams4b.hs:16:30 + L _ -- Defined at ExplicitForAllFams4b.hs:17:30 -ExplicitForAllFams4b.hs:16:25: error: +ExplicitForAllFams4b.hs:17:25: error: • Type variable ‘b’ is mentioned in the RHS, but not bound on the LHS of the family instance • In the newtype instance declaration for ‘L’ -ExplicitForAllFams4b.hs:23:3: error: +ExplicitForAllFams4b.hs:24:3: error: • Type indexes must match class instance head Expected: CT Int _ Actual: CT [a] (a, a) • In the type instance declaration for ‘CT’ In the instance declaration for ‘C Int’ -ExplicitForAllFams4b.hs:23:17: error: +ExplicitForAllFams4b.hs:24:17: error: • Type variable ‘b’ is bound by a forall, but not used in the family instance • In the type instance declaration for ‘CT’ In the instance declaration for ‘C Int’ -ExplicitForAllFams4b.hs:24:15: error: +ExplicitForAllFams4b.hs:25:15: error: • Type variable ‘b’ is mentioned in the RHS, but not bound on the LHS of the family instance • In the type instance declaration for ‘CT’ In the instance declaration for ‘C Int’ -ExplicitForAllFams4b.hs:26:3: error: +ExplicitForAllFams4b.hs:27:3: error: • Type indexes must match class instance head Expected: CD Int _ Actual: CD [a] (a, a) • In the data instance declaration for ‘CD’ In the instance declaration for ‘C Int’ -ExplicitForAllFams4b.hs:26:17: error: +ExplicitForAllFams4b.hs:27:17: error: • Type variable ‘b’ is mentioned in the RHS, but not bound on the LHS of the family instance • In the data instance declaration for ‘CD’ In the instance declaration for ‘C Int’ -ExplicitForAllFams4b.hs:27:15: error: +ExplicitForAllFams4b.hs:28:15: error: • Type variable ‘b’ is mentioned in the RHS, but not bound on the LHS of the family instance • In the data instance declaration for ‘CD’ diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail15.hs b/testsuite/tests/indexed-types/should_fail/SimpleFail15.hs index 586403937b..6cc10e0529 100644 --- a/testsuite/tests/indexed-types/should_fail/SimpleFail15.hs +++ b/testsuite/tests/indexed-types/should_fail/SimpleFail15.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module ShouldFail where diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr index 55d0358bfc..7119b9a8a9 100644 --- a/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr +++ b/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr @@ -1,5 +1,5 @@ -SimpleFail15.hs:5:8: error: +SimpleFail15.hs:6:8: error: • Illegal qualified type: (a ~ b) => t Perhaps you intended to use RankNTypes • In the type signature: foo :: (a, b) -> (a ~ b => t) -> (a, b) diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail4.hs b/testsuite/tests/indexed-types/should_fail/SimpleFail4.hs index 589372cd5e..0748856ea3 100644 --- a/testsuite/tests/indexed-types/should_fail/SimpleFail4.hs +++ b/testsuite/tests/indexed-types/should_fail/SimpleFail4.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, MultiParamTypeClasses #-} module ShouldFail where diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail4.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail4.stderr index d23b24d824..3d7947e625 100644 --- a/testsuite/tests/indexed-types/should_fail/SimpleFail4.stderr +++ b/testsuite/tests/indexed-types/should_fail/SimpleFail4.stderr @@ -1,5 +1,5 @@ -SimpleFail4.hs:10:3: error: +SimpleFail4.hs:11:3: error: • Illegal argument ‘Int’ in: ‘type S2 Int = ...’ The arguments to ‘S2’ must all be distinct type variables diff --git a/testsuite/tests/indexed-types/should_fail/T10899.hs b/testsuite/tests/indexed-types/should_fail/T10899.hs index cacac4a2f7..d3cd973d6b 100644 --- a/testsuite/tests/indexed-types/should_fail/T10899.hs +++ b/testsuite/tests/indexed-types/should_fail/T10899.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, RankNTypes #-} module T10899 where diff --git a/testsuite/tests/indexed-types/should_fail/T10899.stderr b/testsuite/tests/indexed-types/should_fail/T10899.stderr index 0dd92ef9bf..ef0bd1b3f4 100644 --- a/testsuite/tests/indexed-types/should_fail/T10899.stderr +++ b/testsuite/tests/indexed-types/should_fail/T10899.stderr @@ -1,5 +1,5 @@ -T10899.hs:7:3: error: +T10899.hs:8:3: error: • Illegal polymorphic type: forall (m :: * -> *). m a • In the default type instance declaration for ‘F’ In the class declaration for ‘C’ diff --git a/testsuite/tests/indexed-types/should_fail/T12867.hs b/testsuite/tests/indexed-types/should_fail/T12867.hs index e4a39ce56e..5b3120f51f 100644 --- a/testsuite/tests/indexed-types/should_fail/T12867.hs +++ b/testsuite/tests/indexed-types/should_fail/T12867.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} diff --git a/testsuite/tests/indexed-types/should_fail/T12867.stderr b/testsuite/tests/indexed-types/should_fail/T12867.stderr index 2115e43541..501da20907 100644 --- a/testsuite/tests/indexed-types/should_fail/T12867.stderr +++ b/testsuite/tests/indexed-types/should_fail/T12867.stderr @@ -1,11 +1,11 @@ -T12867.hs:7:21: error: +T12867.hs:8:21: error: • Expected kind ‘k0 -> *’, but ‘TestM’ has kind ‘*’ • In the first argument of ‘Eq’, namely ‘(TestM a)’ In the type ‘(Eq (TestM a))’ In the type declaration for ‘Test2’ -T12867.hs:9:1: error: +T12867.hs:10:1: error: • The associated type ‘TestM’ mentions none of the type or kind variables of the class ‘Test a’ • In the class declaration for ‘Test’ diff --git a/testsuite/tests/indexed-types/should_fail/T14246.hs b/testsuite/tests/indexed-types/should_fail/T14246.hs index 6ae8760c84..09840f6d9e 100644 --- a/testsuite/tests/indexed-types/should_fail/T14246.hs +++ b/testsuite/tests/indexed-types/should_fail/T14246.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, GADTs, TypeOperators, PolyKinds, DataKinds, TypeFamilies, AllowAmbiguousTypes, UndecidableInstances, TypeInType #-} module T14246 where diff --git a/testsuite/tests/indexed-types/should_fail/T14246.stderr b/testsuite/tests/indexed-types/should_fail/T14246.stderr index d6bfde7b5b..a41f73efa5 100644 --- a/testsuite/tests/indexed-types/should_fail/T14246.stderr +++ b/testsuite/tests/indexed-types/should_fail/T14246.stderr @@ -1,10 +1,10 @@ -T14246.hs:18:5: error: +T14246.hs:19:5: error: • Illegal polymorphic type: forall (t :: v). f t • In the equations for closed type family ‘KLN’ In the type family declaration for ‘KLN’ -T14246.hs:22:27: error: +T14246.hs:23:27: error: • Couldn't match kind: 'S (KLN (f t)) with: KLN f Expected kind ‘Vect (KLN f) L’, @@ -13,7 +13,7 @@ T14246.hs:22:27: error: ‘(Cons (Label (t :: v)) l)’ In the type family declaration for ‘Reveal’ -T14246.hs:22:67: error: +T14246.hs:23:67: error: • Couldn't match kind ‘*’ with ‘L’ Expected kind ‘Vect (KLN (f t)) L’, but ‘l’ has kind ‘Vect (KLN (f t)) (*)’ @@ -21,7 +21,7 @@ T14246.hs:22:67: error: In the type ‘Reveal (f t) l’ In the type family declaration for ‘Reveal’ -T14246.hs:23:24: error: +T14246.hs:24:24: error: • Couldn't match kind ‘'Z’ with ‘KLN a’ Expected kind ‘Vect (KLN a) L’, but ‘Nil’ has kind ‘Vect 'Z L’ • In the second argument of ‘Reveal’, namely ‘Nil’ diff --git a/testsuite/tests/indexed-types/should_fail/T14887.hs b/testsuite/tests/indexed-types/should_fail/T14887.hs index 63fbbd3943..e0ede01500 100644 --- a/testsuite/tests/indexed-types/should_fail/T14887.hs +++ b/testsuite/tests/indexed-types/should_fail/T14887.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeOperators #-} diff --git a/testsuite/tests/indexed-types/should_fail/T14887.stderr b/testsuite/tests/indexed-types/should_fail/T14887.stderr index 6b5c57977e..9e55af541f 100644 --- a/testsuite/tests/indexed-types/should_fail/T14887.stderr +++ b/testsuite/tests/indexed-types/should_fail/T14887.stderr @@ -1,5 +1,5 @@ -T14887.hs:13:1: error: +T14887.hs:14:1: error: • The kind of ‘Foo2’ is ill-scoped Inferred kind: Foo2 :: forall (a :: k). forall k -> (a :~: a) -> * NB: Specified variables (namely: (a :: k)) always come first diff --git a/testsuite/tests/indexed-types/should_fail/T16356_Fail3.hs b/testsuite/tests/indexed-types/should_fail/T16356_Fail3.hs index da59f5399d..709567daf8 100644 --- a/testsuite/tests/indexed-types/should_fail/T16356_Fail3.hs +++ b/testsuite/tests/indexed-types/should_fail/T16356_Fail3.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} module T16356_Fail3 where diff --git a/testsuite/tests/indexed-types/should_fail/T16356_Fail3.stderr b/testsuite/tests/indexed-types/should_fail/T16356_Fail3.stderr index e8b59175f4..7dcc5defea 100644 --- a/testsuite/tests/indexed-types/should_fail/T16356_Fail3.stderr +++ b/testsuite/tests/indexed-types/should_fail/T16356_Fail3.stderr @@ -1,5 +1,5 @@ -T16356_Fail3.hs:9:3: error: +T16356_Fail3.hs:10:3: error: • Cannot apply function of kind ‘* -> *’ to visible kind argument ‘Type’ • In the default type instance declaration for ‘T1’ diff --git a/testsuite/tests/indexed-types/should_fail/T18648.hs b/testsuite/tests/indexed-types/should_fail/T18648.hs index 92502b77c8..5833468188 100644 --- a/testsuite/tests/indexed-types/should_fail/T18648.hs +++ b/testsuite/tests/indexed-types/should_fail/T18648.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T18648 where diff --git a/testsuite/tests/indexed-types/should_fail/T18648.stderr b/testsuite/tests/indexed-types/should_fail/T18648.stderr index 0fbb014b50..2682a4e22d 100644 --- a/testsuite/tests/indexed-types/should_fail/T18648.stderr +++ b/testsuite/tests/indexed-types/should_fail/T18648.stderr @@ -1,12 +1,12 @@ -T18648.hs:6:4: error: +T18648.hs:7:4: error: • Illegal argument ‘f a’ in: ‘type Bar1 (f a) = ...’ The arguments to ‘Bar1’ must all be distinct type variables • In the default type instance declaration for ‘Bar1’ In the class declaration for ‘Foo1’ -T18648.hs:10:4: error: +T18648.hs:11:4: error: • Illegal argument ‘Bar2 a’ in: ‘type Bar2 (Bar2 a) = ...’ The arguments to ‘Bar2’ must all be distinct type variables diff --git a/testsuite/tests/indexed-types/should_fail/T1900.hs b/testsuite/tests/indexed-types/should_fail/T1900.hs index efcfbc1391..25f7bbb261 100644 --- a/testsuite/tests/indexed-types/should_fail/T1900.hs +++ b/testsuite/tests/indexed-types/should_fail/T1900.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, FlexibleContexts #-} module Class4 where diff --git a/testsuite/tests/indexed-types/should_fail/T1900.stderr b/testsuite/tests/indexed-types/should_fail/T1900.stderr index a9fb9051e8..bb4a160d49 100644 --- a/testsuite/tests/indexed-types/should_fail/T1900.stderr +++ b/testsuite/tests/indexed-types/should_fail/T1900.stderr @@ -1,5 +1,5 @@ -T1900.hs:7:3: error: +T1900.hs:8:3: error: • Couldn't match type: Depend s0 with: Depend s Expected: Depend s -> Depend s diff --git a/testsuite/tests/indexed-types/should_fail/T2664.hs b/testsuite/tests/indexed-types/should_fail/T2664.hs index bda1adfa42..5d63933716 100644 --- a/testsuite/tests/indexed-types/should_fail/T2664.hs +++ b/testsuite/tests/indexed-types/should_fail/T2664.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE EmptyDataDecls, TypeFamilies, TypeOperators, ScopedTypeVariables #-} module Overflow where import Control.Concurrent diff --git a/testsuite/tests/indexed-types/should_fail/T2664.stderr b/testsuite/tests/indexed-types/should_fail/T2664.stderr index deaffc82dd..155fe0e03b 100644 --- a/testsuite/tests/indexed-types/should_fail/T2664.stderr +++ b/testsuite/tests/indexed-types/should_fail/T2664.stderr @@ -1,22 +1,22 @@ -T2664.hs:31:52: error: +T2664.hs:32:52: error: • Could not deduce: b ~ a arising from a use of ‘newPChan’ from the context: ((a :*: b) ~ Dual c, c ~ Dual (a :*: b)) bound by the type signature for: newPChan :: forall c. ((a :*: b) ~ Dual c, c ~ Dual (a :*: b)) => IO (PChan (a :*: b), PChan c) - at T2664.hs:23:5-12 + at T2664.hs:24:5-12 ‘b’ is a rigid type variable bound by the instance declaration - at T2664.hs:22:10-52 + at T2664.hs:23:10-52 ‘a’ is a rigid type variable bound by the instance declaration - at T2664.hs:22:10-52 + at T2664.hs:23:10-52 • In the third argument of ‘pchoose’, namely ‘newPChan’ In the first argument of ‘E’, namely ‘(pchoose Right v newPChan)’ In the expression: E (pchoose Right v newPChan) (pchoose Left v newPChan) • Relevant bindings include - v :: MVar (Either (PChan a) (PChan b)) (bound at T2664.hs:24:9) - newPChan :: IO (PChan (a :*: b), PChan c) (bound at T2664.hs:23:5) + v :: MVar (Either (PChan a) (PChan b)) (bound at T2664.hs:25:9) + newPChan :: IO (PChan (a :*: b), PChan c) (bound at T2664.hs:24:5) diff --git a/testsuite/tests/indexed-types/should_fail/T2664a.hs b/testsuite/tests/indexed-types/should_fail/T2664a.hs index b7a3033723..0b0835db33 100644 --- a/testsuite/tests/indexed-types/should_fail/T2664a.hs +++ b/testsuite/tests/indexed-types/should_fail/T2664a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE EmptyDataDecls, TypeFamilies, TypeOperators, ScopedTypeVariables #-} module Overflow where import Control.Concurrent diff --git a/testsuite/tests/indexed-types/should_fail/T2888.hs b/testsuite/tests/indexed-types/should_fail/T2888.hs index 169eebb474..f5a33e8dc5 100644 --- a/testsuite/tests/indexed-types/should_fail/T2888.hs +++ b/testsuite/tests/indexed-types/should_fail/T2888.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} -- Test for no type indices diff --git a/testsuite/tests/indexed-types/should_fail/T2888.stderr b/testsuite/tests/indexed-types/should_fail/T2888.stderr index 3d2c221703..068eab1d3d 100644 --- a/testsuite/tests/indexed-types/should_fail/T2888.stderr +++ b/testsuite/tests/indexed-types/should_fail/T2888.stderr @@ -1,5 +1,5 @@ -T2888.hs:6:1: - The associated type ‘D’ - mentions none of the type or kind variables of the class ‘C w’ - In the class declaration for ‘C’ +T2888.hs:7:1: error: + • The associated type ‘D’ + mentions none of the type or kind variables of the class ‘C w’ + • In the class declaration for ‘C’ diff --git a/testsuite/tests/indexed-types/should_fail/T4174.hs b/testsuite/tests/indexed-types/should_fail/T4174.hs index a4f105ff86..93805d2d69 100644 --- a/testsuite/tests/indexed-types/should_fail/T4174.hs +++ b/testsuite/tests/indexed-types/should_fail/T4174.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, TypeOperators, EmptyDataDecls #-} module T4174 where diff --git a/testsuite/tests/indexed-types/should_fail/T4174.stderr b/testsuite/tests/indexed-types/should_fail/T4174.stderr index 396fab9469..14156deaf0 100644 --- a/testsuite/tests/indexed-types/should_fail/T4174.stderr +++ b/testsuite/tests/indexed-types/should_fail/T4174.stderr @@ -1,5 +1,5 @@ -T4174.hs:44:12: error: +T4174.hs:45:12: error: • Couldn't match type ‘a’ with ‘SmStep’ Expected: m (Field (Way (GHC6'8 minor) n t p) a b) Actual: m (Field (WayOf m) SmStep RtsSpinLock) @@ -8,9 +8,9 @@ T4174.hs:44:12: error: testcase :: forall (m :: * -> *) minor n t p a b. Monad m => m (Field (Way (GHC6'8 minor) n t p) a b) - at T4174.hs:43:1-63 + at T4174.hs:44:1-63 • In the expression: sync_large_objects In an equation for ‘testcase’: testcase = sync_large_objects • Relevant bindings include testcase :: m (Field (Way (GHC6'8 minor) n t p) a b) - (bound at T4174.hs:44:1) + (bound at T4174.hs:45:1) diff --git a/testsuite/tests/indexed-types/should_fail/T4246.hs b/testsuite/tests/indexed-types/should_fail/T4246.hs index ad280583ab..fb86a5d37b 100644 --- a/testsuite/tests/indexed-types/should_fail/T4246.hs +++ b/testsuite/tests/indexed-types/should_fail/T4246.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, FlexibleInstances #-} module T4246 where diff --git a/testsuite/tests/indexed-types/should_fail/T4246.stderr b/testsuite/tests/indexed-types/should_fail/T4246.stderr index b653f9a052..f2bf56b214 100644 --- a/testsuite/tests/indexed-types/should_fail/T4246.stderr +++ b/testsuite/tests/indexed-types/should_fail/T4246.stderr @@ -1,10 +1,10 @@ -T4246.hs:8:9: +T4246.hs:9:9: error: Conflicting family instance declarations: - F a = a -- Defined at T4246.hs:8:9 - F Int = Bool -- Defined at T4246.hs:11:9 + F a = a -- Defined at T4246.hs:9:9 + F Int = Bool -- Defined at T4246.hs:12:9 -T4246.hs:14:15: +T4246.hs:15:15: error: Conflicting family instance declarations: - G Int = Int -- Defined at T4246.hs:14:15 - G Int = Bool -- Defined at T4246.hs:15:15 + G Int = Int -- Defined at T4246.hs:15:15 + G Int = Bool -- Defined at T4246.hs:16:15 diff --git a/testsuite/tests/indexed-types/should_fail/T4485.hs b/testsuite/tests/indexed-types/should_fail/T4485.hs index 060e8571b5..c314018cc5 100644 --- a/testsuite/tests/indexed-types/should_fail/T4485.hs +++ b/testsuite/tests/indexed-types/should_fail/T4485.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- The behavior of type-inference and OverlappingInstances has changed -- between GHC 6.12 and GHC 7.0 such that the following code -- type-checks under 6.12, but not 7.0rc2. I assume this change has diff --git a/testsuite/tests/indexed-types/should_fail/T4485.stderr b/testsuite/tests/indexed-types/should_fail/T4485.stderr index bdf5218b42..a2b92b6361 100644 --- a/testsuite/tests/indexed-types/should_fail/T4485.stderr +++ b/testsuite/tests/indexed-types/should_fail/T4485.stderr @@ -1,15 +1,15 @@ -T4485.hs:50:15: error: +T4485.hs:51:15: error: • Overlapping instances for EmbedAsChild (IdentityT IO) (XMLGenT m0 (XML m0)) arising from a use of ‘asChild’ Matching instances: instance [overlapping] (EmbedAsChild m c, m1 ~ m) => EmbedAsChild m (XMLGenT m1 c) - -- Defined at T4485.hs:28:30 + -- Defined at T4485.hs:29:30 instance [overlapping] EmbedAsChild (IdentityT IO) (XMLGenT Identity ()) - -- Defined at T4485.hs:45:30 + -- Defined at T4485.hs:46:30 (The choice depends on the instantiation of ‘m0’ To pick the first instance above, use IncoherentInstances when compiling the other instance declarations) @@ -18,12 +18,12 @@ T4485.hs:50:15: error: In an equation for ‘asChild’: asChild b = asChild $ (genElement "foo") -T4485.hs:50:26: error: +T4485.hs:51:26: error: • Ambiguous type variable ‘m0’ arising from a use of ‘genElement’ prevents the constraint ‘(XMLGen m0)’ from being solved. Probable fix: use a type annotation to specify what ‘m0’ should be. These potential instance exist: - instance XMLGen (IdentityT m) -- Defined at T4485.hs:37:10 + instance XMLGen (IdentityT m) -- Defined at T4485.hs:38:10 • In the second argument of ‘($)’, namely ‘(genElement "foo")’ In the expression: asChild $ (genElement "foo") In an equation for ‘asChild’: diff --git a/testsuite/tests/indexed-types/should_fail/T5439.hs b/testsuite/tests/indexed-types/should_fail/T5439.hs index dfcd399b4f..d5be550de5 100644 --- a/testsuite/tests/indexed-types/should_fail/T5439.hs +++ b/testsuite/tests/indexed-types/should_fail/T5439.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE EmptyDataDecls #-} diff --git a/testsuite/tests/indexed-types/should_fail/T5439.stderr b/testsuite/tests/indexed-types/should_fail/T5439.stderr index c7f230654e..fb38d71112 100644 --- a/testsuite/tests/indexed-types/should_fail/T5439.stderr +++ b/testsuite/tests/indexed-types/should_fail/T5439.stderr @@ -1,5 +1,5 @@ -T5439.hs:82:33: error: +T5439.hs:83:33: error: • Couldn't match expected type: Attempt (HElemOf rs) with actual type: Attempt (HHead (HDrop n0 l0)) -> Attempt (HElemOf l0) @@ -13,15 +13,15 @@ T5439.hs:82:33: error: return $ c || not first • Relevant bindings include register :: Bool -> Peano n -> WaitOps (HDrop n rs) -> IO Bool - (bound at T5439.hs:64:9) + (bound at T5439.hs:65:9) ev :: f (Attempt (WaitOpResult (WaitOps rs))) - (bound at T5439.hs:61:22) - ops :: WaitOps rs (bound at T5439.hs:61:18) + (bound at T5439.hs:62:22) + ops :: WaitOps rs (bound at T5439.hs:62:18) registerWaitOp :: WaitOps rs -> f (Attempt (WaitOpResult (WaitOps rs))) -> IO Bool - (bound at T5439.hs:61:3) + (bound at T5439.hs:62:3) -T5439.hs:82:39: error: +T5439.hs:83:39: error: • Couldn't match expected type: Peano n0 with actual type: Attempt α0 • In the second argument of ‘($)’, namely diff --git a/testsuite/tests/indexed-types/should_fail/T9167.hs b/testsuite/tests/indexed-types/should_fail/T9167.hs index 2d2f555011..462959d22f 100644 --- a/testsuite/tests/indexed-types/should_fail/T9167.hs +++ b/testsuite/tests/indexed-types/should_fail/T9167.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T9167 where diff --git a/testsuite/tests/indexed-types/should_fail/T9167.stderr b/testsuite/tests/indexed-types/should_fail/T9167.stderr index 2c296793dc..8b08e4fddd 100644 --- a/testsuite/tests/indexed-types/should_fail/T9167.stderr +++ b/testsuite/tests/indexed-types/should_fail/T9167.stderr @@ -1,5 +1,5 @@ -T9167.hs:5:1: error: +T9167.hs:6:1: error: • The associated type ‘F b’ mentions none of the type or kind variables of the class ‘C a’ • In the class declaration for ‘C’ diff --git a/testsuite/tests/llvm/should_compile/T11649.hs b/testsuite/tests/llvm/should_compile/T11649.hs index 9d09c3a120..eb0c01bd90 100644 --- a/testsuite/tests/llvm/should_compile/T11649.hs +++ b/testsuite/tests/llvm/should_compile/T11649.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE NoImplicitPrelude #-} module Test where import GHC.Base diff --git a/testsuite/tests/llvm/should_compile/T5681.hs b/testsuite/tests/llvm/should_compile/T5681.hs index 1ce84b6ccb..d1c073a328 100644 --- a/testsuite/tests/llvm/should_compile/T5681.hs +++ b/testsuite/tests/llvm/should_compile/T5681.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MagicHash, UnboxedTuples #-} -- Test case for #5681 module Main where diff --git a/testsuite/tests/llvm/should_compile/T8131b.hs b/testsuite/tests/llvm/should_compile/T8131b.hs index b9bc1f6184..e57d6dcf77 100644 --- a/testsuite/tests/llvm/should_compile/T8131b.hs +++ b/testsuite/tests/llvm/should_compile/T8131b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MagicHash, UnboxedTuples #-} import GHC.Prim import GHC.IO diff --git a/testsuite/tests/module/mod103.hs b/testsuite/tests/module/mod103.hs index ccd6ddfd0d..7d713e8f79 100644 --- a/testsuite/tests/module/mod103.hs +++ b/testsuite/tests/module/mod103.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE Haskell2010 #-} +{-# LANGUAGE NondecreasingIndentation #-} -- !!! Layout rule extension (restricting empty do's). module Foo where diff --git a/testsuite/tests/module/mod182.hs b/testsuite/tests/module/mod182.hs index 379fb3849f..69290a9104 100644 --- a/testsuite/tests/module/mod182.hs +++ b/testsuite/tests/module/mod182.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- If 'ImportQualifiedPost' is not enabled 'qualified' can not appear in -- postpositive position. diff --git a/testsuite/tests/module/mod182.stderr b/testsuite/tests/module/mod182.stderr index 2909298220..51886000de 100644 --- a/testsuite/tests/module/mod182.stderr +++ b/testsuite/tests/module/mod182.stderr @@ -1,3 +1,4 @@ -mod182.hs:5:16: error: - Found ‘qualified’ in postpositive position. + +mod182.hs:6:16: error: + Found ‘qualified’ in postpositive position. To allow this, enable language extension 'ImportQualifiedPost' diff --git a/testsuite/tests/module/mod39.hs b/testsuite/tests/module/mod39.hs index 477e0a3854..660cd11469 100644 --- a/testsuite/tests/module/mod39.hs +++ b/testsuite/tests/module/mod39.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- !!! Class variable constraints on member funs module M where class C a where f :: Eq a => a diff --git a/testsuite/tests/module/mod39.stderr b/testsuite/tests/module/mod39.stderr index 95aaddbac5..d54a231152 100644 --- a/testsuite/tests/module/mod39.stderr +++ b/testsuite/tests/module/mod39.stderr @@ -1,5 +1,5 @@ -mod39.hs:3:17: error: +mod39.hs:4:17: error: • Constraint ‘Eq a’ in the type of ‘f’ constrains only the class type variables Enable ConstrainedClassMethods to allow it diff --git a/testsuite/tests/module/mod41.hs b/testsuite/tests/module/mod41.hs index a1ac924242..a290753a77 100644 --- a/testsuite/tests/module/mod41.hs +++ b/testsuite/tests/module/mod41.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- !!! Repeated variable in instance predicate module M where instance Eq a => Eq (Either a a) diff --git a/testsuite/tests/module/mod41.stderr b/testsuite/tests/module/mod41.stderr index 9962da3716..d1253821cd 100644 --- a/testsuite/tests/module/mod41.stderr +++ b/testsuite/tests/module/mod41.stderr @@ -1,8 +1,8 @@ -mod41.hs:3:18: - Illegal instance declaration for ‘Eq (Either a a)’ - (All instance types must be of the form (T a1 ... an) - where a1 ... an are *distinct type variables*, - and each type variable appears at most once in the instance head. - Use FlexibleInstances if you want to disable this.) - In the instance declaration for ‘Eq (Either a a)’ +mod41.hs:4:18: error: + • Illegal instance declaration for ‘Eq (Either a a)’ + (All instance types must be of the form (T a1 ... an) + where a1 ... an are *distinct type variables*, + and each type variable appears at most once in the instance head. + Use FlexibleInstances if you want to disable this.) + • In the instance declaration for ‘Eq (Either a a)’ diff --git a/testsuite/tests/module/mod42.hs b/testsuite/tests/module/mod42.hs index 9828d8b642..bcab1f9766 100644 --- a/testsuite/tests/module/mod42.hs +++ b/testsuite/tests/module/mod42.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- !!! Not "simple type" in instance module M where instance Eq a diff --git a/testsuite/tests/module/mod42.stderr b/testsuite/tests/module/mod42.stderr index 03e7f8cdce..45d649177a 100644 --- a/testsuite/tests/module/mod42.stderr +++ b/testsuite/tests/module/mod42.stderr @@ -1,8 +1,8 @@ -mod42.hs:3:10: - Illegal instance declaration for ‘Eq a’ - (All instance types must be of the form (T a1 ... an) - where a1 ... an are *distinct type variables*, - and each type variable appears at most once in the instance head. - Use FlexibleInstances if you want to disable this.) - In the instance declaration for ‘Eq a’ +mod42.hs:4:10: error: + • Illegal instance declaration for ‘Eq a’ + (All instance types must be of the form (T a1 ... an) + where a1 ... an are *distinct type variables*, + and each type variable appears at most once in the instance head. + Use FlexibleInstances if you want to disable this.) + • In the instance declaration for ‘Eq a’ diff --git a/testsuite/tests/module/mod43.hs b/testsuite/tests/module/mod43.hs index 085382f8b0..0017df031c 100644 --- a/testsuite/tests/module/mod43.hs +++ b/testsuite/tests/module/mod43.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- !!! Type synonym in instance module M where instance Eq String diff --git a/testsuite/tests/module/mod43.stderr b/testsuite/tests/module/mod43.stderr index d73c51e4a4..f63e09207b 100644 --- a/testsuite/tests/module/mod43.stderr +++ b/testsuite/tests/module/mod43.stderr @@ -1,7 +1,7 @@ -mod43.hs:3:10: - Illegal instance declaration for ‘Eq String’ - (All instance types must be of the form (T t1 ... tn) - where T is not a synonym. - Use TypeSynonymInstances if you want to disable this.) - In the instance declaration for ‘Eq String’ +mod43.hs:4:10: error: + • Illegal instance declaration for ‘Eq String’ + (All instance types must be of the form (T t1 ... tn) + where T is not a synonym. + Use TypeSynonymInstances if you want to disable this.) + • In the instance declaration for ‘Eq String’ diff --git a/testsuite/tests/module/mod45.hs b/testsuite/tests/module/mod45.hs index 03a1bc32ba..a49f7da619 100644 --- a/testsuite/tests/module/mod45.hs +++ b/testsuite/tests/module/mod45.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- !!! Type sigs in instance decl module M where data T = T Int diff --git a/testsuite/tests/module/mod45.stderr b/testsuite/tests/module/mod45.stderr index ac8f21b54c..8f62bad0e3 100644 --- a/testsuite/tests/module/mod45.stderr +++ b/testsuite/tests/module/mod45.stderr @@ -1,6 +1,6 @@ -mod45.hs:5:11: - Illegal type signature in instance declaration: - (==) :: T -> T -> Bool - (Use InstanceSigs to allow this) - In the instance declaration for ‘Eq T’ +mod45.hs:6:11: error: + • Illegal type signature in instance declaration: + (==) :: T -> T -> Bool + (Use InstanceSigs to allow this) + • In the instance declaration for ‘Eq T’ diff --git a/testsuite/tests/parser/should_compile/DumpParsedAst.hs b/testsuite/tests/parser/should_compile/DumpParsedAst.hs index f2bf433324..15b37b683c 100644 --- a/testsuite/tests/parser/should_compile/DumpParsedAst.hs +++ b/testsuite/tests/parser/should_compile/DumpParsedAst.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, PolyKinds, TypeOperators, TypeFamilies , TypeApplications, TypeInType #-} diff --git a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr index f19d67a1b2..640adcb50b 100644 --- a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr +++ b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr @@ -6,14 +6,14 @@ (VirtualBraces (1)) (Just - ({ DumpParsedAst.hs:4:8-20 } + ({ DumpParsedAst.hs:5:8-20 } {ModuleName: DumpParsedAst})) (Nothing) - [({ DumpParsedAst.hs:5:1-16 } + [({ DumpParsedAst.hs:6:1-16 } (ImportDecl (NoExtField) (NoSourceText) - ({ DumpParsedAst.hs:5:8-16 } + ({ DumpParsedAst.hs:6:8-16 } {ModuleName: Data.Kind}) (Nothing) (NotBoot) @@ -22,12 +22,12 @@ (False) (Nothing) (Nothing)))] - [({ DumpParsedAst.hs:7:1-30 } + [({ DumpParsedAst.hs:8:1-30 } (TyClD (NoExtField) (DataDecl (NoExtField) - ({ DumpParsedAst.hs:7:6-10 } + ({ DumpParsedAst.hs:8:6-10 } (Unqual {OccName: Peano})) (HsQTvs @@ -40,10 +40,10 @@ (Nothing) (Nothing) (Nothing) - [({ DumpParsedAst.hs:7:14-17 } + [({ DumpParsedAst.hs:8:14-17 } (ConDeclH98 (NoExtField) - ({ DumpParsedAst.hs:7:14-17 } + ({ DumpParsedAst.hs:8:14-17 } (Unqual {OccName: Zero})) ({ <no location info> } @@ -54,10 +54,10 @@ [] []) (Nothing))) - ,({ DumpParsedAst.hs:7:21-30 } + ,({ DumpParsedAst.hs:8:21-30 } (ConDeclH98 (NoExtField) - ({ DumpParsedAst.hs:7:21-24 } + ({ DumpParsedAst.hs:8:21-24 } (Unqual {OccName: Succ})) ({ <no location info> } @@ -69,17 +69,17 @@ [(HsScaled (HsLinearArrow (NormalSyntax)) - ({ DumpParsedAst.hs:7:26-30 } + ({ DumpParsedAst.hs:8:26-30 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:7:26-30 } + ({ DumpParsedAst.hs:8:26-30 } (Unqual {OccName: Peano})))))]) (Nothing)))] ({ <no location info> } []))))) - ,({ DumpParsedAst.hs:9:1-39 } + ,({ DumpParsedAst.hs:10:1-39 } (TyClD (NoExtField) (FamDecl @@ -88,154 +88,154 @@ (NoExtField) (ClosedTypeFamily (Just - [({ DumpParsedAst.hs:10:3-36 } + [({ DumpParsedAst.hs:11:3-36 } (FamEqn (NoExtField) - ({ DumpParsedAst.hs:10:3-8 } + ({ DumpParsedAst.hs:11:3-8 } (Unqual {OccName: Length})) (HsOuterImplicit (NoExtField)) [(HsValArg - ({ DumpParsedAst.hs:10:10-17 } + ({ DumpParsedAst.hs:11:10-17 } (HsParTy (NoExtField) - ({ DumpParsedAst.hs:10:11-16 } + ({ DumpParsedAst.hs:11:11-16 } (HsOpTy (NoExtField) - ({ DumpParsedAst.hs:10:11 } + ({ DumpParsedAst.hs:11:11 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:10:11 } + ({ DumpParsedAst.hs:11:11 } (Unqual {OccName: a})))) - ({ DumpParsedAst.hs:10:13 } + ({ DumpParsedAst.hs:11:13 } (Exact {Name: :})) - ({ DumpParsedAst.hs:10:15-16 } + ({ DumpParsedAst.hs:11:15-16 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:10:15-16 } + ({ DumpParsedAst.hs:11:15-16 } (Unqual {OccName: as})))))))))] (Prefix) - ({ DumpParsedAst.hs:10:21-36 } + ({ DumpParsedAst.hs:11:21-36 } (HsAppTy (NoExtField) - ({ DumpParsedAst.hs:10:21-24 } + ({ DumpParsedAst.hs:11:21-24 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:10:21-24 } + ({ DumpParsedAst.hs:11:21-24 } (Unqual {OccName: Succ})))) - ({ DumpParsedAst.hs:10:26-36 } + ({ DumpParsedAst.hs:11:26-36 } (HsParTy (NoExtField) - ({ DumpParsedAst.hs:10:27-35 } + ({ DumpParsedAst.hs:11:27-35 } (HsAppTy (NoExtField) - ({ DumpParsedAst.hs:10:27-32 } + ({ DumpParsedAst.hs:11:27-32 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:10:27-32 } + ({ DumpParsedAst.hs:11:27-32 } (Unqual {OccName: Length})))) - ({ DumpParsedAst.hs:10:34-35 } + ({ DumpParsedAst.hs:11:34-35 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:10:34-35 } + ({ DumpParsedAst.hs:11:34-35 } (Unqual {OccName: as})))))))))))) - ,({ DumpParsedAst.hs:11:3-24 } + ,({ DumpParsedAst.hs:12:3-24 } (FamEqn (NoExtField) - ({ DumpParsedAst.hs:11:3-8 } + ({ DumpParsedAst.hs:12:3-8 } (Unqual {OccName: Length})) (HsOuterImplicit (NoExtField)) [(HsValArg - ({ DumpParsedAst.hs:11:10-12 } + ({ DumpParsedAst.hs:12:10-12 } (HsExplicitListTy (NoExtField) (IsPromoted) [])))] (Prefix) - ({ DumpParsedAst.hs:11:21-24 } + ({ DumpParsedAst.hs:12:21-24 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:11:21-24 } + ({ DumpParsedAst.hs:12:21-24 } (Unqual {OccName: Zero}))))))])) - ({ DumpParsedAst.hs:9:13-18 } + ({ DumpParsedAst.hs:10:13-18 } (Unqual {OccName: Length})) (HsQTvs (NoExtField) - [({ DumpParsedAst.hs:9:21-29 } + [({ DumpParsedAst.hs:10:21-29 } (KindedTyVar (NoExtField) (()) - ({ DumpParsedAst.hs:9:21-22 } + ({ DumpParsedAst.hs:10:21-22 } (Unqual {OccName: as})) - ({ DumpParsedAst.hs:9:27-29 } + ({ DumpParsedAst.hs:10:27-29 } (HsListTy (NoExtField) - ({ DumpParsedAst.hs:9:28 } + ({ DumpParsedAst.hs:10:28 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:9:28 } + ({ DumpParsedAst.hs:10:28 } (Unqual {OccName: k}))))))))]) (Prefix) - ({ DumpParsedAst.hs:9:32-39 } + ({ DumpParsedAst.hs:10:32-39 } (KindSig (NoExtField) - ({ DumpParsedAst.hs:9:35-39 } + ({ DumpParsedAst.hs:10:35-39 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:9:35-39 } + ({ DumpParsedAst.hs:10:35-39 } (Unqual {OccName: Peano})))))) (Nothing))))) - ,({ DumpParsedAst.hs:14:1-29 } + ,({ DumpParsedAst.hs:15:1-29 } (TyClD (NoExtField) (DataDecl (NoExtField) - ({ DumpParsedAst.hs:14:6 } + ({ DumpParsedAst.hs:15:6 } (Unqual {OccName: T})) (HsQTvs (NoExtField) - [({ DumpParsedAst.hs:14:8 } + [({ DumpParsedAst.hs:15:8 } (UserTyVar (NoExtField) (()) - ({ DumpParsedAst.hs:14:8 } + ({ DumpParsedAst.hs:15:8 } (Unqual {OccName: f})))) - ,({ DumpParsedAst.hs:14:11-16 } + ,({ DumpParsedAst.hs:15:11-16 } (KindedTyVar (NoExtField) (()) - ({ DumpParsedAst.hs:14:11 } + ({ DumpParsedAst.hs:15:11 } (Unqual {OccName: a})) - ({ DumpParsedAst.hs:14:16 } + ({ DumpParsedAst.hs:15:16 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:14:16 } + ({ DumpParsedAst.hs:15:16 } (Unqual {OccName: k}))))))]) (Prefix) @@ -245,10 +245,10 @@ (Nothing) (Nothing) (Nothing) - [({ DumpParsedAst.hs:14:21-29 } + [({ DumpParsedAst.hs:15:21-29 } (ConDeclH98 (NoExtField) - ({ DumpParsedAst.hs:14:21-23 } + ({ DumpParsedAst.hs:15:21-23 } (Unqual {OccName: MkT})) ({ <no location info> } @@ -260,30 +260,30 @@ [(HsScaled (HsLinearArrow (NormalSyntax)) - ({ DumpParsedAst.hs:14:25-29 } + ({ DumpParsedAst.hs:15:25-29 } (HsParTy (NoExtField) - ({ DumpParsedAst.hs:14:26-28 } + ({ DumpParsedAst.hs:15:26-28 } (HsAppTy (NoExtField) - ({ DumpParsedAst.hs:14:26 } + ({ DumpParsedAst.hs:15:26 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:14:26 } + ({ DumpParsedAst.hs:15:26 } (Unqual {OccName: f})))) - ({ DumpParsedAst.hs:14:28 } + ({ DumpParsedAst.hs:15:28 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:14:28 } + ({ DumpParsedAst.hs:15:28 } (Unqual {OccName: a})))))))))]) (Nothing)))] ({ <no location info> } []))))) - ,({ DumpParsedAst.hs:16:1-48 } + ,({ DumpParsedAst.hs:17:1-48 } (TyClD (NoExtField) (FamDecl @@ -292,150 +292,150 @@ (NoExtField) (ClosedTypeFamily (Just - [({ DumpParsedAst.hs:17:3-30 } + [({ DumpParsedAst.hs:18:3-30 } (FamEqn (NoExtField) - ({ DumpParsedAst.hs:17:3-4 } + ({ DumpParsedAst.hs:18:3-4 } (Unqual {OccName: F1})) (HsOuterImplicit (NoExtField)) [(HsTypeArg - { DumpParsedAst.hs:17:6-11 } - ({ DumpParsedAst.hs:17:7-11 } + { DumpParsedAst.hs:18:6-11 } + ({ DumpParsedAst.hs:18:7-11 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:17:7-11 } + ({ DumpParsedAst.hs:18:7-11 } (Unqual {OccName: Peano}))))) ,(HsValArg - ({ DumpParsedAst.hs:17:13 } + ({ DumpParsedAst.hs:18:13 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:17:13 } + ({ DumpParsedAst.hs:18:13 } (Unqual {OccName: a}))))) ,(HsValArg - ({ DumpParsedAst.hs:17:15 } + ({ DumpParsedAst.hs:18:15 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:17:15 } + ({ DumpParsedAst.hs:18:15 } (Unqual {OccName: f})))))] (Prefix) - ({ DumpParsedAst.hs:17:19-30 } + ({ DumpParsedAst.hs:18:19-30 } (HsAppTy (NoExtField) - ({ DumpParsedAst.hs:17:19-28 } + ({ DumpParsedAst.hs:18:19-28 } (HsAppTy (NoExtField) - ({ DumpParsedAst.hs:17:19-26 } + ({ DumpParsedAst.hs:18:19-26 } (HsAppKindTy - { DumpParsedAst.hs:17:21-26 } - ({ DumpParsedAst.hs:17:19 } + { DumpParsedAst.hs:18:21-26 } + ({ DumpParsedAst.hs:18:19 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:17:19 } + ({ DumpParsedAst.hs:18:19 } (Unqual {OccName: T})))) - ({ DumpParsedAst.hs:17:22-26 } + ({ DumpParsedAst.hs:18:22-26 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:17:22-26 } + ({ DumpParsedAst.hs:18:22-26 } (Unqual {OccName: Peano})))))) - ({ DumpParsedAst.hs:17:28 } + ({ DumpParsedAst.hs:18:28 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:17:28 } + ({ DumpParsedAst.hs:18:28 } (Unqual {OccName: f})))))) - ({ DumpParsedAst.hs:17:30 } + ({ DumpParsedAst.hs:18:30 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:17:30 } + ({ DumpParsedAst.hs:18:30 } (Unqual {OccName: a}))))))))])) - ({ DumpParsedAst.hs:16:13-14 } + ({ DumpParsedAst.hs:17:13-14 } (Unqual {OccName: F1})) (HsQTvs (NoExtField) - [({ DumpParsedAst.hs:16:17-22 } + [({ DumpParsedAst.hs:17:17-22 } (KindedTyVar (NoExtField) (()) - ({ DumpParsedAst.hs:16:17 } + ({ DumpParsedAst.hs:17:17 } (Unqual {OccName: a})) - ({ DumpParsedAst.hs:16:22 } + ({ DumpParsedAst.hs:17:22 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:16:22 } + ({ DumpParsedAst.hs:17:22 } (Unqual {OccName: k})))))) - ,({ DumpParsedAst.hs:16:26-39 } + ,({ DumpParsedAst.hs:17:26-39 } (KindedTyVar (NoExtField) (()) - ({ DumpParsedAst.hs:16:26 } + ({ DumpParsedAst.hs:17:26 } (Unqual {OccName: f})) - ({ DumpParsedAst.hs:16:31-39 } + ({ DumpParsedAst.hs:17:31-39 } (HsFunTy (NoExtField) (HsUnrestrictedArrow (NormalSyntax)) - ({ DumpParsedAst.hs:16:31 } + ({ DumpParsedAst.hs:17:31 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:16:31 } + ({ DumpParsedAst.hs:17:31 } (Unqual {OccName: k})))) - ({ DumpParsedAst.hs:16:36-39 } + ({ DumpParsedAst.hs:17:36-39 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:16:36-39 } + ({ DumpParsedAst.hs:17:36-39 } (Unqual {OccName: Type}))))))))]) (Prefix) - ({ DumpParsedAst.hs:16:42-48 } + ({ DumpParsedAst.hs:17:42-48 } (KindSig (NoExtField) - ({ DumpParsedAst.hs:16:45-48 } + ({ DumpParsedAst.hs:17:45-48 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpParsedAst.hs:16:45-48 } + ({ DumpParsedAst.hs:17:45-48 } (Unqual {OccName: Type})))))) (Nothing))))) - ,({ DumpParsedAst.hs:19:1-23 } + ,({ DumpParsedAst.hs:20:1-23 } (ValD (NoExtField) (FunBind (NoExtField) - ({ DumpParsedAst.hs:19:1-4 } + ({ DumpParsedAst.hs:20:1-4 } (Unqual {OccName: main})) (MG (NoExtField) - ({ DumpParsedAst.hs:19:1-23 } - [({ DumpParsedAst.hs:19:1-23 } + ({ DumpParsedAst.hs:20:1-23 } + [({ DumpParsedAst.hs:20:1-23 } (Match (NoExtField) (FunRhs - ({ DumpParsedAst.hs:19:1-4 } + ({ DumpParsedAst.hs:20:1-4 } (Unqual {OccName: main})) (Prefix) @@ -443,20 +443,20 @@ [] (GRHSs (NoExtField) - [({ DumpParsedAst.hs:19:6-23 } + [({ DumpParsedAst.hs:20:6-23 } (GRHS (NoExtField) [] - ({ DumpParsedAst.hs:19:8-23 } + ({ DumpParsedAst.hs:20:8-23 } (HsApp (NoExtField) - ({ DumpParsedAst.hs:19:8-15 } + ({ DumpParsedAst.hs:20:8-15 } (HsVar (NoExtField) - ({ DumpParsedAst.hs:19:8-15 } + ({ DumpParsedAst.hs:20:8-15 } (Unqual {OccName: putStrLn})))) - ({ DumpParsedAst.hs:19:17-23 } + ({ DumpParsedAst.hs:20:17-23 } (HsLit (NoExtField) (HsString diff --git a/testsuite/tests/parser/should_compile/DumpRenamedAst.hs b/testsuite/tests/parser/should_compile/DumpRenamedAst.hs index d5be8627be..a0cb8a36b6 100644 --- a/testsuite/tests/parser/should_compile/DumpRenamedAst.hs +++ b/testsuite/tests/parser/should_compile/DumpRenamedAst.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, GADTs, PolyKinds, RankNTypes, TypeOperators, TypeFamilies, StarIsType, TypeApplications #-} diff --git a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr index 57d4f3fcf7..ec4c1dd9bd 100644 --- a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr +++ b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr @@ -10,39 +10,39 @@ [((,) (NonRecursive) {Bag(Located (HsBind Name)): - [({ DumpRenamedAst.hs:26:1-23 } + [({ DumpRenamedAst.hs:27:1-23 } (FunBind {NameSet: []} - ({ DumpRenamedAst.hs:26:1-4 } + ({ DumpRenamedAst.hs:27:1-4 } {Name: DumpRenamedAst.main}) (MG (NoExtField) - ({ DumpRenamedAst.hs:26:1-23 } - [({ DumpRenamedAst.hs:26:1-23 } + ({ DumpRenamedAst.hs:27:1-23 } + [({ DumpRenamedAst.hs:27:1-23 } (Match (NoExtField) (FunRhs - ({ DumpRenamedAst.hs:26:1-4 } + ({ DumpRenamedAst.hs:27:1-4 } {Name: DumpRenamedAst.main}) (Prefix) (NoSrcStrict)) [] (GRHSs (NoExtField) - [({ DumpRenamedAst.hs:26:6-23 } + [({ DumpRenamedAst.hs:27:6-23 } (GRHS (NoExtField) [] - ({ DumpRenamedAst.hs:26:8-23 } + ({ DumpRenamedAst.hs:27:8-23 } (HsApp (NoExtField) - ({ DumpRenamedAst.hs:26:8-15 } + ({ DumpRenamedAst.hs:27:8-15 } (HsVar (NoExtField) - ({ DumpRenamedAst.hs:26:8-15 } + ({ DumpRenamedAst.hs:27:8-15 } {Name: System.IO.putStrLn}))) - ({ DumpRenamedAst.hs:26:17-23 } + ({ DumpRenamedAst.hs:27:17-23 } (HsLit (NoExtField) (HsString @@ -58,13 +58,13 @@ [] [(TyClGroup (NoExtField) - [({ DumpRenamedAst.hs:9:1-30 } + [({ DumpRenamedAst.hs:10:1-30 } (DataDecl (DataDeclRn (True) {NameSet: [{Name: DumpRenamedAst.Peano}]}) - ({ DumpRenamedAst.hs:9:6-10 } + ({ DumpRenamedAst.hs:10:6-10 } {Name: DumpRenamedAst.Peano}) (HsQTvs [] @@ -76,10 +76,10 @@ (Nothing) (Nothing) (Nothing) - [({ DumpRenamedAst.hs:9:14-17 } + [({ DumpRenamedAst.hs:10:14-17 } (ConDeclH98 (NoExtField) - ({ DumpRenamedAst.hs:9:14-17 } + ({ DumpRenamedAst.hs:10:14-17 } {Name: DumpRenamedAst.Zero}) ({ <no location info> } (False)) @@ -89,10 +89,10 @@ [] []) (Nothing))) - ,({ DumpRenamedAst.hs:9:21-30 } + ,({ DumpRenamedAst.hs:10:21-30 } (ConDeclH98 (NoExtField) - ({ DumpRenamedAst.hs:9:21-24 } + ({ DumpRenamedAst.hs:10:21-24 } {Name: DumpRenamedAst.Succ}) ({ <no location info> } (False)) @@ -103,11 +103,11 @@ [(HsScaled (HsLinearArrow (NormalSyntax)) - ({ DumpRenamedAst.hs:9:26-30 } + ({ DumpRenamedAst.hs:10:26-30 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:9:26-30 } + ({ DumpRenamedAst.hs:10:26-30 } {Name: DumpRenamedAst.Peano}))))]) (Nothing)))] ({ <no location info> } @@ -117,118 +117,118 @@ []) ,(TyClGroup (NoExtField) - [({ DumpRenamedAst.hs:11:1-39 } + [({ DumpRenamedAst.hs:12:1-39 } (FamDecl (NoExtField) (FamilyDecl (NoExtField) (ClosedTypeFamily (Just - [({ DumpRenamedAst.hs:12:3-36 } + [({ DumpRenamedAst.hs:13:3-36 } (FamEqn (NoExtField) - ({ DumpRenamedAst.hs:12:3-8 } + ({ DumpRenamedAst.hs:13:3-8 } {Name: DumpRenamedAst.Length}) (HsOuterImplicit [{Name: a} ,{Name: as}]) [(HsValArg - ({ DumpRenamedAst.hs:12:10-17 } + ({ DumpRenamedAst.hs:13:10-17 } (HsParTy (NoExtField) - ({ DumpRenamedAst.hs:12:11-16 } + ({ DumpRenamedAst.hs:13:11-16 } (HsOpTy (NoExtField) - ({ DumpRenamedAst.hs:12:11 } + ({ DumpRenamedAst.hs:13:11 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:12:11 } + ({ DumpRenamedAst.hs:13:11 } {Name: a}))) - ({ DumpRenamedAst.hs:12:13 } + ({ DumpRenamedAst.hs:13:13 } {Name: :}) - ({ DumpRenamedAst.hs:12:15-16 } + ({ DumpRenamedAst.hs:13:15-16 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:12:15-16 } + ({ DumpRenamedAst.hs:13:15-16 } {Name: as}))))))))] (Prefix) - ({ DumpRenamedAst.hs:12:21-36 } + ({ DumpRenamedAst.hs:13:21-36 } (HsAppTy (NoExtField) - ({ DumpRenamedAst.hs:12:21-24 } + ({ DumpRenamedAst.hs:13:21-24 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:12:21-24 } + ({ DumpRenamedAst.hs:13:21-24 } {Name: DumpRenamedAst.Succ}))) - ({ DumpRenamedAst.hs:12:26-36 } + ({ DumpRenamedAst.hs:13:26-36 } (HsParTy (NoExtField) - ({ DumpRenamedAst.hs:12:27-35 } + ({ DumpRenamedAst.hs:13:27-35 } (HsAppTy (NoExtField) - ({ DumpRenamedAst.hs:12:27-32 } + ({ DumpRenamedAst.hs:13:27-32 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:12:27-32 } + ({ DumpRenamedAst.hs:13:27-32 } {Name: DumpRenamedAst.Length}))) - ({ DumpRenamedAst.hs:12:34-35 } + ({ DumpRenamedAst.hs:13:34-35 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:12:34-35 } + ({ DumpRenamedAst.hs:13:34-35 } {Name: as}))))))))))) - ,({ DumpRenamedAst.hs:13:3-24 } + ,({ DumpRenamedAst.hs:14:3-24 } (FamEqn (NoExtField) - ({ DumpRenamedAst.hs:13:3-8 } + ({ DumpRenamedAst.hs:14:3-8 } {Name: DumpRenamedAst.Length}) (HsOuterImplicit []) [(HsValArg - ({ DumpRenamedAst.hs:13:10-12 } + ({ DumpRenamedAst.hs:14:10-12 } (HsExplicitListTy (NoExtField) (IsPromoted) [])))] (Prefix) - ({ DumpRenamedAst.hs:13:21-24 } + ({ DumpRenamedAst.hs:14:21-24 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:13:21-24 } + ({ DumpRenamedAst.hs:14:21-24 } {Name: DumpRenamedAst.Zero})))))])) - ({ DumpRenamedAst.hs:11:13-18 } + ({ DumpRenamedAst.hs:12:13-18 } {Name: DumpRenamedAst.Length}) (HsQTvs [{Name: k}] - [({ DumpRenamedAst.hs:11:21-29 } + [({ DumpRenamedAst.hs:12:21-29 } (KindedTyVar (NoExtField) (()) - ({ DumpRenamedAst.hs:11:21-22 } + ({ DumpRenamedAst.hs:12:21-22 } {Name: as}) - ({ DumpRenamedAst.hs:11:27-29 } + ({ DumpRenamedAst.hs:12:27-29 } (HsListTy (NoExtField) - ({ DumpRenamedAst.hs:11:28 } + ({ DumpRenamedAst.hs:12:28 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:11:28 } + ({ DumpRenamedAst.hs:12:28 } {Name: k})))))))]) (Prefix) - ({ DumpRenamedAst.hs:11:32-39 } + ({ DumpRenamedAst.hs:12:32-39 } (KindSig (NoExtField) - ({ DumpRenamedAst.hs:11:35-39 } + ({ DumpRenamedAst.hs:12:35-39 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:11:35-39 } + ({ DumpRenamedAst.hs:12:35-39 } {Name: DumpRenamedAst.Peano}))))) (Nothing))))] [] @@ -236,92 +236,92 @@ []) ,(TyClGroup (NoExtField) - [({ DumpRenamedAst.hs:15:1-33 } + [({ DumpRenamedAst.hs:16:1-33 } (FamDecl (NoExtField) (FamilyDecl (NoExtField) (DataFamily) - ({ DumpRenamedAst.hs:15:13-15 } + ({ DumpRenamedAst.hs:16:13-15 } {Name: DumpRenamedAst.Nat}) (HsQTvs [{Name: k}] []) (Prefix) - ({ DumpRenamedAst.hs:15:17-33 } + ({ DumpRenamedAst.hs:16:17-33 } (KindSig (NoExtField) - ({ DumpRenamedAst.hs:15:20-33 } + ({ DumpRenamedAst.hs:16:20-33 } (HsFunTy (NoExtField) (HsUnrestrictedArrow (NormalSyntax)) - ({ DumpRenamedAst.hs:15:20 } + ({ DumpRenamedAst.hs:16:20 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:15:20 } + ({ DumpRenamedAst.hs:16:20 } {Name: k}))) - ({ DumpRenamedAst.hs:15:25-33 } + ({ DumpRenamedAst.hs:16:25-33 } (HsFunTy (NoExtField) (HsUnrestrictedArrow (NormalSyntax)) - ({ DumpRenamedAst.hs:15:25 } + ({ DumpRenamedAst.hs:16:25 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:15:25 } + ({ DumpRenamedAst.hs:16:25 } {Name: k}))) - ({ DumpRenamedAst.hs:15:30-33 } + ({ DumpRenamedAst.hs:16:30-33 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:15:30-33 } + ({ DumpRenamedAst.hs:16:30-33 } {Name: GHC.Types.Type}))))))))) (Nothing))))] [] [] - [({ DumpRenamedAst.hs:(18,1)-(19,45) } + [({ DumpRenamedAst.hs:(19,1)-(20,45) } (DataFamInstD (NoExtField) (DataFamInstDecl (FamEqn (NoExtField) - ({ DumpRenamedAst.hs:18:18-20 } + ({ DumpRenamedAst.hs:19:18-20 } {Name: DumpRenamedAst.Nat}) (HsOuterImplicit [{Name: a} ,{Name: k}]) [(HsValArg - ({ DumpRenamedAst.hs:18:22-37 } + ({ DumpRenamedAst.hs:19:22-37 } (HsParTy (NoExtField) - ({ DumpRenamedAst.hs:18:23-36 } + ({ DumpRenamedAst.hs:19:23-36 } (HsKindSig (NoExtField) - ({ DumpRenamedAst.hs:18:23 } + ({ DumpRenamedAst.hs:19:23 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:18:23 } + ({ DumpRenamedAst.hs:19:23 } {Name: a}))) - ({ DumpRenamedAst.hs:18:28-36 } + ({ DumpRenamedAst.hs:19:28-36 } (HsFunTy (NoExtField) (HsUnrestrictedArrow (NormalSyntax)) - ({ DumpRenamedAst.hs:18:28 } + ({ DumpRenamedAst.hs:19:28 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:18:28 } + ({ DumpRenamedAst.hs:19:28 } {Name: k}))) - ({ DumpRenamedAst.hs:18:33-36 } + ({ DumpRenamedAst.hs:19:33-36 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:18:33-36 } + ({ DumpRenamedAst.hs:19:33-36 } {Name: GHC.Types.Type}))))))))))] (Prefix) (HsDataDefn @@ -330,43 +330,43 @@ (Nothing) (Nothing) (Just - ({ DumpRenamedAst.hs:18:42-60 } + ({ DumpRenamedAst.hs:19:42-60 } (HsFunTy (NoExtField) (HsUnrestrictedArrow (NormalSyntax)) - ({ DumpRenamedAst.hs:18:42-52 } + ({ DumpRenamedAst.hs:19:42-52 } (HsParTy (NoExtField) - ({ DumpRenamedAst.hs:18:43-51 } + ({ DumpRenamedAst.hs:19:43-51 } (HsFunTy (NoExtField) (HsUnrestrictedArrow (NormalSyntax)) - ({ DumpRenamedAst.hs:18:43 } + ({ DumpRenamedAst.hs:19:43 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:18:43 } + ({ DumpRenamedAst.hs:19:43 } {Name: k}))) - ({ DumpRenamedAst.hs:18:48-51 } + ({ DumpRenamedAst.hs:19:48-51 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:18:48-51 } + ({ DumpRenamedAst.hs:19:48-51 } {Name: GHC.Types.Type}))))))) - ({ DumpRenamedAst.hs:18:57-60 } + ({ DumpRenamedAst.hs:19:57-60 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:18:57-60 } + ({ DumpRenamedAst.hs:19:57-60 } {Name: GHC.Types.Type})))))) - [({ DumpRenamedAst.hs:19:3-45 } + [({ DumpRenamedAst.hs:20:3-45 } (ConDeclGADT (NoExtField) - [({ DumpRenamedAst.hs:19:3-5 } + [({ DumpRenamedAst.hs:20:3-5 } {Name: DumpRenamedAst.Nat})] - ({ DumpRenamedAst.hs:19:10-45 } + ({ DumpRenamedAst.hs:20:10-45 } (HsOuterImplicit [{Name: f} ,{Name: g}])) @@ -375,112 +375,112 @@ [(HsScaled (HsUnrestrictedArrow (NormalSyntax)) - ({ DumpRenamedAst.hs:19:10-34 } + ({ DumpRenamedAst.hs:20:10-34 } (HsParTy (NoExtField) - ({ DumpRenamedAst.hs:19:11-33 } + ({ DumpRenamedAst.hs:20:11-33 } (HsForAllTy (NoExtField) (HsForAllInvis (NoExtField) - [({ DumpRenamedAst.hs:19:18-19 } + [({ DumpRenamedAst.hs:20:18-19 } (UserTyVar (NoExtField) (SpecifiedSpec) - ({ DumpRenamedAst.hs:19:18-19 } + ({ DumpRenamedAst.hs:20:18-19 } {Name: xx})))]) - ({ DumpRenamedAst.hs:19:22-33 } + ({ DumpRenamedAst.hs:20:22-33 } (HsFunTy (NoExtField) (HsUnrestrictedArrow (NormalSyntax)) - ({ DumpRenamedAst.hs:19:22-25 } + ({ DumpRenamedAst.hs:20:22-25 } (HsAppTy (NoExtField) - ({ DumpRenamedAst.hs:19:22 } + ({ DumpRenamedAst.hs:20:22 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:19:22 } + ({ DumpRenamedAst.hs:20:22 } {Name: f}))) - ({ DumpRenamedAst.hs:19:24-25 } + ({ DumpRenamedAst.hs:20:24-25 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:19:24-25 } + ({ DumpRenamedAst.hs:20:24-25 } {Name: xx}))))) - ({ DumpRenamedAst.hs:19:30-33 } + ({ DumpRenamedAst.hs:20:30-33 } (HsAppTy (NoExtField) - ({ DumpRenamedAst.hs:19:30 } + ({ DumpRenamedAst.hs:20:30 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:19:30 } + ({ DumpRenamedAst.hs:20:30 } {Name: g}))) - ({ DumpRenamedAst.hs:19:32-33 } + ({ DumpRenamedAst.hs:20:32-33 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:19:32-33 } + ({ DumpRenamedAst.hs:20:32-33 } {Name: xx}))))))))))))]) - ({ DumpRenamedAst.hs:19:39-45 } + ({ DumpRenamedAst.hs:20:39-45 } (HsAppTy (NoExtField) - ({ DumpRenamedAst.hs:19:39-43 } + ({ DumpRenamedAst.hs:20:39-43 } (HsAppTy (NoExtField) - ({ DumpRenamedAst.hs:19:39-41 } + ({ DumpRenamedAst.hs:20:39-41 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:19:39-41 } + ({ DumpRenamedAst.hs:20:39-41 } {Name: DumpRenamedAst.Nat}))) - ({ DumpRenamedAst.hs:19:43 } + ({ DumpRenamedAst.hs:20:43 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:19:43 } + ({ DumpRenamedAst.hs:20:43 } {Name: f}))))) - ({ DumpRenamedAst.hs:19:45 } + ({ DumpRenamedAst.hs:20:45 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:19:45 } + ({ DumpRenamedAst.hs:20:45 } {Name: g}))))) (Nothing)))] ({ <no location info> } []))))))]) ,(TyClGroup (NoExtField) - [({ DumpRenamedAst.hs:21:1-29 } + [({ DumpRenamedAst.hs:22:1-29 } (DataDecl (DataDeclRn (False) {NameSet: [{Name: a} ,{Name: f}]}) - ({ DumpRenamedAst.hs:21:6 } + ({ DumpRenamedAst.hs:22:6 } {Name: DumpRenamedAst.T}) (HsQTvs [{Name: k}] - [({ DumpRenamedAst.hs:21:8 } + [({ DumpRenamedAst.hs:22:8 } (UserTyVar (NoExtField) (()) - ({ DumpRenamedAst.hs:21:8 } + ({ DumpRenamedAst.hs:22:8 } {Name: f}))) - ,({ DumpRenamedAst.hs:21:11-16 } + ,({ DumpRenamedAst.hs:22:11-16 } (KindedTyVar (NoExtField) (()) - ({ DumpRenamedAst.hs:21:11 } + ({ DumpRenamedAst.hs:22:11 } {Name: a}) - ({ DumpRenamedAst.hs:21:16 } + ({ DumpRenamedAst.hs:22:16 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:21:16 } + ({ DumpRenamedAst.hs:22:16 } {Name: k})))))]) (Prefix) (HsDataDefn @@ -489,10 +489,10 @@ (Nothing) (Nothing) (Nothing) - [({ DumpRenamedAst.hs:21:21-29 } + [({ DumpRenamedAst.hs:22:21-29 } (ConDeclH98 (NoExtField) - ({ DumpRenamedAst.hs:21:21-23 } + ({ DumpRenamedAst.hs:22:21-23 } {Name: DumpRenamedAst.MkT}) ({ <no location info> } (False)) @@ -503,23 +503,23 @@ [(HsScaled (HsLinearArrow (NormalSyntax)) - ({ DumpRenamedAst.hs:21:25-29 } + ({ DumpRenamedAst.hs:22:25-29 } (HsParTy (NoExtField) - ({ DumpRenamedAst.hs:21:26-28 } + ({ DumpRenamedAst.hs:22:26-28 } (HsAppTy (NoExtField) - ({ DumpRenamedAst.hs:21:26 } + ({ DumpRenamedAst.hs:22:26 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:21:26 } + ({ DumpRenamedAst.hs:22:26 } {Name: f}))) - ({ DumpRenamedAst.hs:21:28 } + ({ DumpRenamedAst.hs:22:28 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:21:28 } + ({ DumpRenamedAst.hs:22:28 } {Name: a}))))))))]) (Nothing)))] ({ <no location info> } @@ -529,125 +529,125 @@ []) ,(TyClGroup (NoExtField) - [({ DumpRenamedAst.hs:23:1-48 } + [({ DumpRenamedAst.hs:24:1-48 } (FamDecl (NoExtField) (FamilyDecl (NoExtField) (ClosedTypeFamily (Just - [({ DumpRenamedAst.hs:24:3-30 } + [({ DumpRenamedAst.hs:25:3-30 } (FamEqn (NoExtField) - ({ DumpRenamedAst.hs:24:3-4 } + ({ DumpRenamedAst.hs:25:3-4 } {Name: DumpRenamedAst.F1}) (HsOuterImplicit [{Name: a} ,{Name: f}]) [(HsTypeArg - { DumpRenamedAst.hs:24:6-11 } - ({ DumpRenamedAst.hs:24:7-11 } + { DumpRenamedAst.hs:25:6-11 } + ({ DumpRenamedAst.hs:25:7-11 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:24:7-11 } + ({ DumpRenamedAst.hs:25:7-11 } {Name: DumpRenamedAst.Peano})))) ,(HsValArg - ({ DumpRenamedAst.hs:24:13 } + ({ DumpRenamedAst.hs:25:13 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:24:13 } + ({ DumpRenamedAst.hs:25:13 } {Name: a})))) ,(HsValArg - ({ DumpRenamedAst.hs:24:15 } + ({ DumpRenamedAst.hs:25:15 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:24:15 } + ({ DumpRenamedAst.hs:25:15 } {Name: f}))))] (Prefix) - ({ DumpRenamedAst.hs:24:19-30 } + ({ DumpRenamedAst.hs:25:19-30 } (HsAppTy (NoExtField) - ({ DumpRenamedAst.hs:24:19-28 } + ({ DumpRenamedAst.hs:25:19-28 } (HsAppTy (NoExtField) - ({ DumpRenamedAst.hs:24:19-26 } + ({ DumpRenamedAst.hs:25:19-26 } (HsAppKindTy - { DumpRenamedAst.hs:24:21-26 } - ({ DumpRenamedAst.hs:24:19 } + { DumpRenamedAst.hs:25:21-26 } + ({ DumpRenamedAst.hs:25:19 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:24:19 } + ({ DumpRenamedAst.hs:25:19 } {Name: DumpRenamedAst.T}))) - ({ DumpRenamedAst.hs:24:22-26 } + ({ DumpRenamedAst.hs:25:22-26 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:24:22-26 } + ({ DumpRenamedAst.hs:25:22-26 } {Name: DumpRenamedAst.Peano}))))) - ({ DumpRenamedAst.hs:24:28 } + ({ DumpRenamedAst.hs:25:28 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:24:28 } + ({ DumpRenamedAst.hs:25:28 } {Name: f}))))) - ({ DumpRenamedAst.hs:24:30 } + ({ DumpRenamedAst.hs:25:30 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:24:30 } + ({ DumpRenamedAst.hs:25:30 } {Name: a})))))))])) - ({ DumpRenamedAst.hs:23:13-14 } + ({ DumpRenamedAst.hs:24:13-14 } {Name: DumpRenamedAst.F1}) (HsQTvs [{Name: k}] - [({ DumpRenamedAst.hs:23:17-22 } + [({ DumpRenamedAst.hs:24:17-22 } (KindedTyVar (NoExtField) (()) - ({ DumpRenamedAst.hs:23:17 } + ({ DumpRenamedAst.hs:24:17 } {Name: a}) - ({ DumpRenamedAst.hs:23:22 } + ({ DumpRenamedAst.hs:24:22 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:23:22 } + ({ DumpRenamedAst.hs:24:22 } {Name: k}))))) - ,({ DumpRenamedAst.hs:23:26-39 } + ,({ DumpRenamedAst.hs:24:26-39 } (KindedTyVar (NoExtField) (()) - ({ DumpRenamedAst.hs:23:26 } + ({ DumpRenamedAst.hs:24:26 } {Name: f}) - ({ DumpRenamedAst.hs:23:31-39 } + ({ DumpRenamedAst.hs:24:31-39 } (HsFunTy (NoExtField) (HsUnrestrictedArrow (NormalSyntax)) - ({ DumpRenamedAst.hs:23:31 } + ({ DumpRenamedAst.hs:24:31 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:23:31 } + ({ DumpRenamedAst.hs:24:31 } {Name: k}))) - ({ DumpRenamedAst.hs:23:36-39 } + ({ DumpRenamedAst.hs:24:36-39 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:23:36-39 } + ({ DumpRenamedAst.hs:24:36-39 } {Name: GHC.Types.Type})))))))]) (Prefix) - ({ DumpRenamedAst.hs:23:42-48 } + ({ DumpRenamedAst.hs:24:42-48 } (KindSig (NoExtField) - ({ DumpRenamedAst.hs:23:45-48 } + ({ DumpRenamedAst.hs:24:45-48 } (HsTyVar (NoExtField) (NotPromoted) - ({ DumpRenamedAst.hs:23:45-48 } + ({ DumpRenamedAst.hs:24:45-48 } {Name: GHC.Types.Type}))))) (Nothing))))] [] @@ -661,11 +661,11 @@ [] [] []) - [({ DumpRenamedAst.hs:4:8-21 } + [({ DumpRenamedAst.hs:5:8-21 } (ImportDecl (NoExtField) (NoSourceText) - ({ DumpRenamedAst.hs:4:8-21 } + ({ DumpRenamedAst.hs:5:8-21 } {ModuleName: Prelude}) (Nothing) (NotBoot) @@ -674,11 +674,11 @@ (True) (Nothing) (Nothing))) - ,({ DumpRenamedAst.hs:5:1-16 } + ,({ DumpRenamedAst.hs:6:1-16 } (ImportDecl (NoExtField) (NoSourceText) - ({ DumpRenamedAst.hs:5:8-16 } + ({ DumpRenamedAst.hs:6:8-16 } {ModuleName: Data.Kind}) (Nothing) (NotBoot) @@ -687,11 +687,11 @@ (False) (Nothing) (Nothing))) - ,({ DumpRenamedAst.hs:7:1-23 } + ,({ DumpRenamedAst.hs:8:1-23 } (ImportDecl (NoExtField) (NoSourceText) - ({ DumpRenamedAst.hs:7:8-16 } + ({ DumpRenamedAst.hs:8:8-16 } {ModuleName: Data.Kind}) (Nothing) (NotBoot) @@ -702,13 +702,13 @@ (Just ((,) (False) - ({ DumpRenamedAst.hs:7:18-23 } - [({ DumpRenamedAst.hs:7:19-22 } + ({ DumpRenamedAst.hs:8:18-23 } + [({ DumpRenamedAst.hs:8:19-22 } (IEThingAbs (NoExtField) - ({ DumpRenamedAst.hs:7:19-22 } + ({ DumpRenamedAst.hs:8:19-22 } (IEName - ({ DumpRenamedAst.hs:7:19-22 } + ({ DumpRenamedAst.hs:8:19-22 } {Name: GHC.Types.Type})))))])))))] (Nothing) (Nothing))) diff --git a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.hs b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.hs index 82cf107e5d..202be3f110 100644 --- a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.hs +++ b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, PolyKinds, TypeOperators, TypeFamilies , TypeApplications #-} diff --git a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr index a9081bf7eb..45488ba165 100644 --- a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr +++ b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr @@ -691,7 +691,7 @@ (HsStringPrim (NoSourceText) "DumpTypecheckedAst"))))))))))) - ,({ DumpTypecheckedAst.hs:18:1-23 } + ,({ DumpTypecheckedAst.hs:19:1-23 } (AbsBinds (NoExtField) [] @@ -705,10 +705,10 @@ []))] [({abstract:TcEvBinds})] {Bag(Located (HsBind Var)): - [({ DumpTypecheckedAst.hs:18:1-23 } + [({ DumpTypecheckedAst.hs:19:1-23 } (FunBind (WpHole) - ({ DumpTypecheckedAst.hs:18:1-4 } + ({ DumpTypecheckedAst.hs:19:1-4 } {Var: main}) (MG (MatchGroupTc @@ -718,31 +718,31 @@ [(TyConApp ({abstract:TyCon}) [])])) - ({ DumpTypecheckedAst.hs:18:1-23 } - [({ DumpTypecheckedAst.hs:18:1-23 } + ({ DumpTypecheckedAst.hs:19:1-23 } + [({ DumpTypecheckedAst.hs:19:1-23 } (Match (NoExtField) (FunRhs - ({ DumpTypecheckedAst.hs:18:1-4 } + ({ DumpTypecheckedAst.hs:19:1-4 } {Name: main}) (Prefix) (NoSrcStrict)) [] (GRHSs (NoExtField) - [({ DumpTypecheckedAst.hs:18:6-23 } + [({ DumpTypecheckedAst.hs:19:6-23 } (GRHS (NoExtField) [] - ({ DumpTypecheckedAst.hs:18:8-23 } + ({ DumpTypecheckedAst.hs:19:8-23 } (HsApp (NoExtField) - ({ DumpTypecheckedAst.hs:18:8-15 } + ({ DumpTypecheckedAst.hs:19:8-15 } (HsVar (NoExtField) ({ <no location info> } {Var: putStrLn}))) - ({ DumpTypecheckedAst.hs:18:17-23 } + ({ DumpTypecheckedAst.hs:19:17-23 } (HsLit (NoExtField) (HsString diff --git a/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals1.hs b/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals1.hs index 6b7de0f712..a46bb6f706 100644 --- a/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals1.hs +++ b/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ParserNoBinaryLiterals1 where f :: Int -> () diff --git a/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals1.stderr b/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals1.stderr index 3b57330e59..d222e5d11c 100644 --- a/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals1.stderr +++ b/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals1.stderr @@ -1,5 +1,5 @@ -ParserNoBinaryLiterals1.hs:4:1: +ParserNoBinaryLiterals1.hs:5:1: error: Equations for ‘f’ have different numbers of arguments - ParserNoBinaryLiterals1.hs:4:1-10 ParserNoBinaryLiterals1.hs:5:1-10 + ParserNoBinaryLiterals1.hs:6:1-10 diff --git a/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals2.hs b/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals2.hs index e760bd888e..6c48c20746 100644 --- a/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals2.hs +++ b/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MagicHash #-} module ParserNoBinaryLiterals2 where diff --git a/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals2.stderr b/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals2.stderr index f592bc878b..d45f4b5502 100644 --- a/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals2.stderr +++ b/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals2.stderr @@ -1,5 +1,5 @@ -ParserNoBinaryLiterals2.hs:8:4: error: +ParserNoBinaryLiterals2.hs:9:4: error: • The constructor ‘W#’ should have 1 argument, but has been given 2 • In the pattern: W# 0 b0## In an equation for ‘f’: f (W# 0 b0##) = () diff --git a/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals3.hs b/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals3.hs index b6bc81b68a..8797358879 100644 --- a/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals3.hs +++ b/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals3.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MagicHash #-} module ParserNoBinaryLiterals3 where diff --git a/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals3.stderr b/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals3.stderr index fbe4bf574c..2d24a6dedf 100644 --- a/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals3.stderr +++ b/testsuite/tests/parser/should_fail/ParserNoBinaryLiterals3.stderr @@ -1,5 +1,5 @@ -ParserNoBinaryLiterals3.hs:8:4: error: +ParserNoBinaryLiterals3.hs:9:4: error: • The constructor ‘I#’ should have 1 argument, but has been given 2 • In the pattern: I# 0 b0# In an equation for ‘f’: f (I# 0 b0#) = () diff --git a/testsuite/tests/parser/should_fail/ParserNoForallUnicode.hs b/testsuite/tests/parser/should_fail/ParserNoForallUnicode.hs index e5591de2bf..883d3c841e 100644 --- a/testsuite/tests/parser/should_fail/ParserNoForallUnicode.hs +++ b/testsuite/tests/parser/should_fail/ParserNoForallUnicode.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UnicodeSyntax #-} module ParserNoForallUnicode where diff --git a/testsuite/tests/parser/should_fail/ParserNoForallUnicode.stderr b/testsuite/tests/parser/should_fail/ParserNoForallUnicode.stderr index 6ad0cbba11..81286aa49d 100644 --- a/testsuite/tests/parser/should_fail/ParserNoForallUnicode.stderr +++ b/testsuite/tests/parser/should_fail/ParserNoForallUnicode.stderr @@ -1,5 +1,5 @@ -ParserNoForallUnicode.hs:5:8: error: +ParserNoForallUnicode.hs:6:8: error: Illegal symbol ‘∀’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: ∀ <tvs>. <type> diff --git a/testsuite/tests/parser/should_fail/RecordDotSyntaxFail12.hs b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail12.hs index ba7f7effed..6d306b747c 100644 --- a/testsuite/tests/parser/should_fail/RecordDotSyntaxFail12.hs +++ b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail12.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE AllowAmbiguousTypes, FunctionalDependencies, ScopedTypeVariables, PolyKinds, TypeApplications, DataKinds #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedRecordDot, OverloadedRecordUpdate #-} diff --git a/testsuite/tests/parser/should_fail/RecordDotSyntaxFail12.stderr b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail12.stderr index 6ef0a51754..f1101379ce 100644 --- a/testsuite/tests/parser/should_fail/RecordDotSyntaxFail12.stderr +++ b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail12.stderr @@ -1,36 +1,36 @@ -RecordDotSyntaxFail12.hs:123:25: +RecordDotSyntaxFail12.hs:124:25: error: Illegal use of punning for field ‘quux’ Use NamedFieldPuns to permit this -RecordDotSyntaxFail12.hs:123:46: +RecordDotSyntaxFail12.hs:124:46: error: Illegal use of punning for field ‘baz’ Use NamedFieldPuns to permit this -RecordDotSyntaxFail12.hs:123:65: +RecordDotSyntaxFail12.hs:124:65: error: Illegal use of punning for field ‘bar’ Use NamedFieldPuns to permit this -RecordDotSyntaxFail12.hs:124:11: +RecordDotSyntaxFail12.hs:125:11: error: For this to work enable NamedFieldPuns. -RecordDotSyntaxFail12.hs:125:11: +RecordDotSyntaxFail12.hs:126:11: error: For this to work enable NamedFieldPuns. -RecordDotSyntaxFail12.hs:126:11: +RecordDotSyntaxFail12.hs:127:11: error: For this to work enable NamedFieldPuns. -RecordDotSyntaxFail12.hs:127:11: +RecordDotSyntaxFail12.hs:128:11: error: For this to work enable NamedFieldPuns. -RecordDotSyntaxFail12.hs:129:11: +RecordDotSyntaxFail12.hs:130:11: error: For this to work enable NamedFieldPuns. -RecordDotSyntaxFail12.hs:132:11: +RecordDotSyntaxFail12.hs:133:11: error: For this to work enable NamedFieldPuns. -RecordDotSyntaxFail12.hs:133:11: +RecordDotSyntaxFail12.hs:134:11: error: For this to work enable NamedFieldPuns. -RecordDotSyntaxFail12.hs:134:11: +RecordDotSyntaxFail12.hs:135:11: error: For this to work enable NamedFieldPuns. diff --git a/testsuite/tests/parser/should_fail/T12446.hs b/testsuite/tests/parser/should_fail/T12446.hs index 9f417e82da..83b0f4eecb 100644 --- a/testsuite/tests/parser/should_fail/T12446.hs +++ b/testsuite/tests/parser/should_fail/T12446.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T12446 where x = undefined @(_ ~ _) diff --git a/testsuite/tests/parser/should_fail/T12446.stderr b/testsuite/tests/parser/should_fail/T12446.stderr index 8e51913820..99a6f65e0b 100644 --- a/testsuite/tests/parser/should_fail/T12446.stderr +++ b/testsuite/tests/parser/should_fail/T12446.stderr @@ -1,4 +1,4 @@ -T12446.hs:3:5: error: +T12446.hs:4:5: error: Illegal visible type application ‘@(_ ~ _)’ Perhaps you intended to use TypeApplications diff --git a/testsuite/tests/parser/should_fail/T12811.hs b/testsuite/tests/parser/should_fail/T12811.hs index c82a830e65..8ef1fcf383 100644 --- a/testsuite/tests/parser/should_fail/T12811.hs +++ b/testsuite/tests/parser/should_fail/T12811.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} module Bug where diff --git a/testsuite/tests/parser/should_fail/T12811.stderr b/testsuite/tests/parser/should_fail/T12811.stderr index fab39d73cc..3dbf6bc342 100644 --- a/testsuite/tests/parser/should_fail/T12811.stderr +++ b/testsuite/tests/parser/should_fail/T12811.stderr @@ -1,7 +1,6 @@ -T12811.hs:4:15: error: +T12811.hs:5:15: error: Illegal operator ‘.’ in type ‘foral a . a’ Use TypeOperators to allow operators in types -T12811.hs:4:15: error: Not in scope: type constructor or class ‘.’ - +T12811.hs:5:15: error: Not in scope: type constructor or class ‘.’ diff --git a/testsuite/tests/parser/should_fail/T14588.hs b/testsuite/tests/parser/should_fail/T14588.hs index 8a0bcecd7b..2c011c873d 100644 --- a/testsuite/tests/parser/should_fail/T14588.hs +++ b/testsuite/tests/parser/should_fail/T14588.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T14588 where main = print (let !x = 1 + 2 in x) diff --git a/testsuite/tests/parser/should_fail/T14588.stderr b/testsuite/tests/parser/should_fail/T14588.stderr index 2efd9561e8..d4bf505703 100644 --- a/testsuite/tests/parser/should_fail/T14588.stderr +++ b/testsuite/tests/parser/should_fail/T14588.stderr @@ -1,4 +1,4 @@ -T14588.hs:3:19: error: +T14588.hs:4:19: error: Illegal bang-pattern (use BangPatterns): !x diff --git a/testsuite/tests/parser/should_fail/T16270.hs b/testsuite/tests/parser/should_fail/T16270.hs index 0147f9776a..4967eeb5ce 100644 --- a/testsuite/tests/parser/should_fail/T16270.hs +++ b/testsuite/tests/parser/should_fail/T16270.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE NoTraditionalRecordSyntax, NoDoAndIfThenElse, NoMultiWayIf, NoLambdaCase, NoNumericUnderscores, MagicHash #-} {-# OPTIONS -Werror=missing-space-after-bang #-} diff --git a/testsuite/tests/parser/should_fail/T16270.stderr b/testsuite/tests/parser/should_fail/T16270.stderr index a74bdeb8f0..6aecc3b264 100644 --- a/testsuite/tests/parser/should_fail/T16270.stderr +++ b/testsuite/tests/parser/should_fail/T16270.stderr @@ -1,71 +1,68 @@ -T16270.hs:2:12: warning: +T16270.hs:3:12: warning: -Werror=missing-space-after-bang is deprecated: bang patterns can no longer be written with a space -T16270.hs:7:1: warning: [-Wtabs (in -Wdefault)] +T16270.hs:8:1: warning: [-Wtabs (in -Wdefault)] Tab character found here, and in five further locations. Please use spaces instead. -T16270.hs:7:12: error: +T16270.hs:8:12: error: Unexpected semi-colons in conditional: if c then False; else True Perhaps you meant to use DoAndIfThenElse? -T16270.hs:12:8: error: +T16270.hs:13:8: error: Unexpected do block in function application: do 1 You could write it with parentheses Or perhaps you meant to enable BlockArguments? -T16270.hs:13:8: error: +T16270.hs:14:8: error: Unexpected lambda expression in function application: \ x -> x You could write it with parentheses Or perhaps you meant to enable BlockArguments? -T16270.hs:15:6: error: - Illegal datatype context (use DatatypeContexts): Num a => - -T16270.hs:17:22: error: +T16270.hs:18:22: error: Illegal record syntax (use TraditionalRecordSyntax): {fst :: a, snd :: b} -T16270.hs:18:5: error: +T16270.hs:19:5: error: Illegal record syntax (use TraditionalRecordSyntax): p {fst = 1, snd = True} -T16270.hs:20:6: error: +T16270.hs:21:6: error: Illegal symbol ‘forall’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type> -T16270.hs:21:8: error: +T16270.hs:22:8: error: Unexpected semi-colons in conditional: if True; then (); else () Perhaps you meant to use DoAndIfThenElse? -T16270.hs:23:10: error: +T16270.hs:24:10: error: Illegal keyword 'where' in data declaration Perhaps you intended to use GADTs or a similar language extension to enable syntax: data T where -T16270.hs:25:12: error: +T16270.hs:26:12: error: Illegal bang-pattern (use BangPatterns): !i -T16270.hs:27:9: error: +T16270.hs:28:9: error: Multi-way if-expressions need MultiWayIf turned on -T16270.hs:29:9: error: +T16270.hs:30:9: error: Multi-way if-expressions need MultiWayIf turned on -T16270.hs:32:6: error: Illegal lambda-case (use LambdaCase) +T16270.hs:33:6: error: Illegal lambda-case (use LambdaCase) -T16270.hs:35:5: error: +T16270.hs:36:5: error: Use NumericUnderscores to allow underscores in integer literals -T16270.hs:37:5: error: +T16270.hs:38:5: error: primitive string literal must contain only characters <= '\xFF' -T16270.hs:43:1: error: +T16270.hs:44:1: error: parse error (possibly incorrect indentation or mismatched brackets) diff --git a/testsuite/tests/parser/should_fail/T17162.hs b/testsuite/tests/parser/should_fail/T17162.hs index 6419da7544..6137b0eb5d 100644 --- a/testsuite/tests/parser/should_fail/T17162.hs +++ b/testsuite/tests/parser/should_fail/T17162.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- {-# LANGUAGE NoBangPatterns #-} module T17162 where diff --git a/testsuite/tests/parser/should_fail/T17162.stderr b/testsuite/tests/parser/should_fail/T17162.stderr index d621e08ccc..ff6cfb99c4 100644 --- a/testsuite/tests/parser/should_fail/T17162.stderr +++ b/testsuite/tests/parser/should_fail/T17162.stderr @@ -1,4 +1,4 @@ -T17162.hs:6:21: error: +T17162.hs:7:21: error: Illegal bang-pattern (use BangPatterns): !enc diff --git a/testsuite/tests/parser/should_fail/T18251c.hs b/testsuite/tests/parser/should_fail/T18251c.hs index da455fea64..a726df66df 100644 --- a/testsuite/tests/parser/should_fail/T18251c.hs +++ b/testsuite/tests/parser/should_fail/T18251c.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T18251c where f = id @Int diff --git a/testsuite/tests/parser/should_fail/T18251c.stderr b/testsuite/tests/parser/should_fail/T18251c.stderr index 9a7c66f8f3..b4f667d5dd 100644 --- a/testsuite/tests/parser/should_fail/T18251c.stderr +++ b/testsuite/tests/parser/should_fail/T18251c.stderr @@ -1,4 +1,4 @@ -T18251c.hs:3:5: error: +T18251c.hs:4:5: error: Illegal visible type application ‘@Int’ Perhaps you intended to use TypeApplications diff --git a/testsuite/tests/parser/should_fail/T3095.hs b/testsuite/tests/parser/should_fail/T3095.hs index 9c508eb81b..9a74893219 100644 --- a/testsuite/tests/parser/should_fail/T3095.hs +++ b/testsuite/tests/parser/should_fail/T3095.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE KindSignatures #-} -- #3095 module T3095 where diff --git a/testsuite/tests/parser/should_fail/T3095.stderr b/testsuite/tests/parser/should_fail/T3095.stderr index ea2ee44244..599579deb0 100644 --- a/testsuite/tests/parser/should_fail/T3095.stderr +++ b/testsuite/tests/parser/should_fail/T3095.stderr @@ -1,10 +1,10 @@ -T3095.hs:7:12: error: +T3095.hs:8:12: error: Illegal symbol ‘forall’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type> -T3095.hs:7:12: error: +T3095.hs:8:12: error: Unexpected type ‘forall x. x :: Type’ In the class declaration for ‘Bla’ A class declaration should have form diff --git a/testsuite/tests/parser/should_fail/T8258NoGADTs.hs b/testsuite/tests/parser/should_fail/T8258NoGADTs.hs index 1080233bcd..9ae035e7e7 100644 --- a/testsuite/tests/parser/should_fail/T8258NoGADTs.hs +++ b/testsuite/tests/parser/should_fail/T8258NoGADTs.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T8258NoGADTs where data T where diff --git a/testsuite/tests/parser/should_fail/T8258NoGADTs.stderr b/testsuite/tests/parser/should_fail/T8258NoGADTs.stderr index 35f5306274..ecf3f7e11b 100644 --- a/testsuite/tests/parser/should_fail/T8258NoGADTs.stderr +++ b/testsuite/tests/parser/should_fail/T8258NoGADTs.stderr @@ -1,5 +1,5 @@ -T8258NoGADTs.hs:3:8: error: +T8258NoGADTs.hs:4:8: error: Illegal keyword 'where' in data declaration Perhaps you intended to use GADTs or a similar language extension to enable syntax: data T where diff --git a/testsuite/tests/parser/should_fail/readFail036.hs b/testsuite/tests/parser/should_fail/readFail036.hs index 15afd980f8..af2d1b3d0c 100644 --- a/testsuite/tests/parser/should_fail/readFail036.hs +++ b/testsuite/tests/parser/should_fail/readFail036.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Foo where import Data.Kind (Type) diff --git a/testsuite/tests/parser/should_fail/readFail036.stderr b/testsuite/tests/parser/should_fail/readFail036.stderr index a66afacacf..469f5fb985 100644 --- a/testsuite/tests/parser/should_fail/readFail036.stderr +++ b/testsuite/tests/parser/should_fail/readFail036.stderr @@ -1,5 +1,5 @@ -readFail036.hs:5:16: error: +readFail036.hs:6:16: error: Illegal kind signature: ‘Type’ Perhaps you intended to use KindSignatures In the data type declaration for ‘Foo’ diff --git a/testsuite/tests/parser/should_fail/readFail037.hs b/testsuite/tests/parser/should_fail/readFail037.hs index 499f5cc0f3..0155578c3e 100644 --- a/testsuite/tests/parser/should_fail/readFail037.hs +++ b/testsuite/tests/parser/should_fail/readFail037.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Foo where diff --git a/testsuite/tests/parser/should_fail/readFail037.stderr b/testsuite/tests/parser/should_fail/readFail037.stderr index 6b317eb051..27e36ab344 100644 --- a/testsuite/tests/parser/should_fail/readFail037.stderr +++ b/testsuite/tests/parser/should_fail/readFail037.stderr @@ -1,5 +1,5 @@ -readFail037.hs:4:1: error: +readFail037.hs:5:1: error: • Too many parameters for class ‘Foo’ (Enable MultiParamTypeClasses to allow multi-parameter classes) • In the class declaration for ‘Foo’ diff --git a/testsuite/tests/parser/should_fail/readFail039.hs b/testsuite/tests/parser/should_fail/readFail039.hs index c6cbdb9968..4aa2ff8d7f 100644 --- a/testsuite/tests/parser/should_fail/readFail039.hs +++ b/testsuite/tests/parser/should_fail/readFail039.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Foo where diff --git a/testsuite/tests/parser/should_fail/readFail039.stderr b/testsuite/tests/parser/should_fail/readFail039.stderr index be948f0a07..0200cdabd6 100644 --- a/testsuite/tests/parser/should_fail/readFail039.stderr +++ b/testsuite/tests/parser/should_fail/readFail039.stderr @@ -1,6 +1,6 @@ -readFail039.hs:8:14: error: - Can't make a derived instance of ‘C Foo’: - ‘C’ is not a stock derivable class (Eq, Show, etc.) - Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension - In the newtype declaration for ‘Foo’ +readFail039.hs:9:14: error: + • Can't make a derived instance of ‘C Foo’: + ‘C’ is not a stock derivable class (Eq, Show, etc.) + Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension + • In the newtype declaration for ‘Foo’ diff --git a/testsuite/tests/parser/should_run/BinaryLiterals0.hs b/testsuite/tests/parser/should_run/BinaryLiterals0.hs index 7257445fba..7dc44610a9 100644 --- a/testsuite/tests/parser/should_run/BinaryLiterals0.hs +++ b/testsuite/tests/parser/should_run/BinaryLiterals0.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- | Anti-Test for GHC 7.10+'s @BinaryLiterals@ extensions (see GHC #9224) -- -- NB: This code won't compile with -XBinaryLiterals enabled diff --git a/testsuite/tests/partial-sigs/should_compile/Meltdown.hs b/testsuite/tests/partial-sigs/should_compile/Meltdown.hs index 318dc2488d..a5acdc256c 100644 --- a/testsuite/tests/partial-sigs/should_compile/Meltdown.hs +++ b/testsuite/tests/partial-sigs/should_compile/Meltdown.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PartialTypeSignatures, ScopedTypeVariables, NamedWildCards #-} module Meltdown where diff --git a/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr b/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr index 9b0d449ca5..2791c29866 100644 --- a/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr +++ b/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr @@ -7,9 +7,9 @@ TYPE CONSTRUCTORS data type NukeMonad{3} :: * -> * -> * -> * roles phantom phantom phantom CLASS INSTANCES - instance Functor (NukeMonad a b) -- Defined at Meltdown.hs:8:10 + instance Functor (NukeMonad a b) -- Defined at Meltdown.hs:9:10 instance Applicative (NukeMonad a b) - -- Defined at Meltdown.hs:11:10 - instance Monad (NukeMonad a b) -- Defined at Meltdown.hs:15:10 + -- Defined at Meltdown.hs:12:10 + instance Monad (NukeMonad a b) -- Defined at Meltdown.hs:16:10 Dependent modules: [] -Dependent packages: [base-4.13.0.0, ghc-bignum-1.0, ghc-prim-0.7.0] +Dependent packages: [base-4.16.0.0, ghc-bignum-1.0, ghc-prim-0.8.0] diff --git a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.hs b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.hs index b171221058..ff7cc698bf 100644 --- a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.hs +++ b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, NamedWildCards #-} module NamedWildcardInTypeFamilyInstanceLHS where diff --git a/testsuite/tests/partial-sigs/should_compile/ScopedNamedWildcardsGood.hs b/testsuite/tests/partial-sigs/should_compile/ScopedNamedWildcardsGood.hs index f74df66369..77f3ef89e2 100644 --- a/testsuite/tests/partial-sigs/should_compile/ScopedNamedWildcardsGood.hs +++ b/testsuite/tests/partial-sigs/should_compile/ScopedNamedWildcardsGood.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PartialTypeSignatures, NamedWildCards #-} module ScopedNamedWildcardsGood where diff --git a/testsuite/tests/partial-sigs/should_compile/T10403.hs b/testsuite/tests/partial-sigs/should_compile/T10403.hs index 6610254805..5a0bff0f3c 100644 --- a/testsuite/tests/partial-sigs/should_compile/T10403.hs +++ b/testsuite/tests/partial-sigs/should_compile/T10403.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PartialTypeSignatures #-} {-# OPTIONS_GHC -fdefer-type-errors #-} module T10403 where diff --git a/testsuite/tests/partial-sigs/should_compile/T10403.stderr b/testsuite/tests/partial-sigs/should_compile/T10403.stderr index f3b6343893..e329410514 100644 --- a/testsuite/tests/partial-sigs/should_compile/T10403.stderr +++ b/testsuite/tests/partial-sigs/should_compile/T10403.stderr @@ -1,28 +1,28 @@ -T10403.hs:15:7: warning: [-Wpartial-type-signatures (in -Wdefault)] +T10403.hs:16:7: warning: [-Wpartial-type-signatures (in -Wdefault)] • Found extra-constraints wildcard standing for ‘Functor f’ Where: ‘f’ is a rigid type variable bound by the inferred type of h1 :: Functor f => (a -> a1) -> f a -> H f - at T10403.hs:17:1-41 + at T10403.hs:18:1-41 • In the type signature: h1 :: _ => _ -T10403.hs:15:12: warning: [-Wpartial-type-signatures (in -Wdefault)] +T10403.hs:16:12: warning: [-Wpartial-type-signatures (in -Wdefault)] • Found type wildcard ‘_’ standing for ‘(a -> a1) -> f a -> H f’ Where: ‘a1’, ‘a’, ‘f’ are rigid type variables bound by the inferred type of h1 :: Functor f => (a -> a1) -> f a -> H f - at T10403.hs:17:1-41 + at T10403.hs:18:1-41 • In the type signature: h1 :: _ => _ -T10403.hs:19:7: warning: [-Wpartial-type-signatures (in -Wdefault)] +T10403.hs:20:7: warning: [-Wpartial-type-signatures (in -Wdefault)] • Found type wildcard ‘_’ standing for ‘(a -> a1) -> B t0 a -> H (B t0)’ Where: ‘t0’ is an ambiguous type variable ‘a1’, ‘a’ are rigid type variables bound by the inferred type of h2 :: (a -> a1) -> B t0 a -> H (B t0) - at T10403.hs:22:1-41 + at T10403.hs:23:1-41 • In the type signature: h2 :: _ -T10403.hs:28:8: warning: [-Wdeferred-type-errors (in -Wdefault)] +T10403.hs:29:8: warning: [-Wdeferred-type-errors (in -Wdefault)] • Couldn't match type ‘t0’ with ‘t’ Expected: H (B t) Actual: H (B t0) @@ -30,8 +30,8 @@ T10403.hs:28:8: warning: [-Wdeferred-type-errors (in -Wdefault)] This (rigid, skolem) type variable is bound by the type signature for: app2 :: forall t. H (B t) - at T10403.hs:27:1-15 + at T10403.hs:28:1-15 • In the expression: h2 (H . I) (B ()) In an equation for ‘app2’: app2 = h2 (H . I) (B ()) • Relevant bindings include - app2 :: H (B t) (bound at T10403.hs:28:1) + app2 :: H (B t) (bound at T10403.hs:29:1) diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.hs b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.hs index a6ae0788c8..3a58678c8f 100644 --- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.hs +++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module NamedWildcardsNotEnabled where foo :: _a -> _b diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr index bddc470060..2fb55bfe2a 100644 --- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr +++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr @@ -1,24 +1,24 @@ -NamedWildcardsNotEnabled.hs:4:9: error: +NamedWildcardsNotEnabled.hs:5:9: error: • Couldn't match expected type ‘_b’ with actual type ‘Bool’ ‘_b’ is a rigid type variable bound by the type signature for: foo :: forall _a _b. _a -> _b - at NamedWildcardsNotEnabled.hs:3:1-15 + at NamedWildcardsNotEnabled.hs:4:1-15 • In the expression: not x In an equation for ‘foo’: foo x = not x • Relevant bindings include - foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1) + foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:5:1) -NamedWildcardsNotEnabled.hs:4:13: error: +NamedWildcardsNotEnabled.hs:5:13: error: • Couldn't match expected type ‘Bool’ with actual type ‘_a’ ‘_a’ is a rigid type variable bound by the type signature for: foo :: forall _a _b. _a -> _b - at NamedWildcardsNotEnabled.hs:3:1-15 + at NamedWildcardsNotEnabled.hs:4:1-15 • In the first argument of ‘not’, namely ‘x’ In the expression: not x In an equation for ‘foo’: foo x = not x • Relevant bindings include - x :: _a (bound at NamedWildcardsNotEnabled.hs:4:5) - foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1) + x :: _a (bound at NamedWildcardsNotEnabled.hs:5:5) + foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:5:1) diff --git a/testsuite/tests/partial-sigs/should_fail/T10615.hs b/testsuite/tests/partial-sigs/should_fail/T10615.hs index 6938736e02..32e87781ab 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10615.hs +++ b/testsuite/tests/partial-sigs/should_fail/T10615.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} module T10615 where diff --git a/testsuite/tests/partial-sigs/should_fail/T10615.stderr b/testsuite/tests/partial-sigs/should_fail/T10615.stderr index 9cd93c24a7..e9c048ce16 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10615.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T10615.stderr @@ -1,36 +1,36 @@ -T10615.hs:4:7: error: +T10615.hs:5:7: error: • Found type wildcard ‘_’ standing for ‘w1’ Where: ‘w1’ is an ambiguous type variable To use the inferred type, enable PartialTypeSignatures • In the type ‘_ -> f’ In the type signature: f1 :: _ -> f -T10615.hs:5:6: error: +T10615.hs:6:6: error: • Couldn't match type ‘f’ with ‘b1 -> w1’ Expected: w1 -> f Actual: w1 -> b1 -> w1 ‘f’ is a rigid type variable bound by the inferred type of f1 :: w1 -> f - at T10615.hs:4:1-12 + at T10615.hs:5:1-12 • In the expression: const In an equation for ‘f1’: f1 = const - • Relevant bindings include f1 :: w1 -> f (bound at T10615.hs:5:1) + • Relevant bindings include f1 :: w1 -> f (bound at T10615.hs:6:1) -T10615.hs:7:7: error: +T10615.hs:8:7: error: • Found type wildcard ‘_’ standing for ‘w0’ Where: ‘w0’ is an ambiguous type variable To use the inferred type, enable PartialTypeSignatures • In the type ‘_ -> _f’ In the type signature: f2 :: _ -> _f -T10615.hs:8:6: error: +T10615.hs:9:6: error: • Couldn't match type ‘_f’ with ‘b0 -> w0’ Expected: w0 -> _f Actual: w0 -> b0 -> w0 ‘_f’ is a rigid type variable bound by the inferred type of f2 :: w0 -> _f - at T10615.hs:7:1-13 + at T10615.hs:8:1-13 • In the expression: const In an equation for ‘f2’: f2 = const - • Relevant bindings include f2 :: w0 -> _f (bound at T10615.hs:8:1) + • Relevant bindings include f2 :: w0 -> _f (bound at T10615.hs:9:1) diff --git a/testsuite/tests/partial-sigs/should_fail/T12634.hs b/testsuite/tests/partial-sigs/should_fail/T12634.hs index 36865ed831..c5e3c5da36 100644 --- a/testsuite/tests/partial-sigs/should_fail/T12634.hs +++ b/testsuite/tests/partial-sigs/should_fail/T12634.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} diff --git a/testsuite/tests/partial-sigs/should_fail/T12634.stderr b/testsuite/tests/partial-sigs/should_fail/T12634.stderr index 4287110149..ef0386784c 100644 --- a/testsuite/tests/partial-sigs/should_fail/T12634.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T12634.stderr @@ -1,10 +1,10 @@ -T12634.hs:14:58: error: +T12634.hs:15:58: error: • Expected a type, but ‘'(t, m, m', r)’ has kind ‘(k1 -> k2 -> *, k0, k1, k2)’ • In the first argument of ‘Bench’, namely ‘'(t, m, m', r)’ In the type ‘t m' r -> Bench '(t, m, m', r)’ In the type signature: - bench_twacePow :: forall t m m' r. - _ => t m' r -> Bench '(t, m, m', r) + bench_twacePow :: forall t m m' r. _ => + t m' r -> Bench '(t, m, m', r) diff --git a/testsuite/tests/patsyn/should_compile/T10997_1.hs b/testsuite/tests/patsyn/should_compile/T10997_1.hs index 4cc4b40eec..7855343d5a 100644 --- a/testsuite/tests/patsyn/should_compile/T10997_1.hs +++ b/testsuite/tests/patsyn/should_compile/T10997_1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T10997_1 where import T10997_1a diff --git a/testsuite/tests/patsyn/should_compile/T10997_1a.hs b/testsuite/tests/patsyn/should_compile/T10997_1a.hs index 11af525c53..bf69c41fa3 100644 --- a/testsuite/tests/patsyn/should_compile/T10997_1a.hs +++ b/testsuite/tests/patsyn/should_compile/T10997_1a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PatternSynonyms, ViewPatterns, ConstraintKinds, TypeFamilies, PolyKinds, KindSignatures #-} module T10997_1a where diff --git a/testsuite/tests/patsyn/should_compile/T12698.hs b/testsuite/tests/patsyn/should_compile/T12698.hs index 68cd817677..bb2bccbb44 100644 --- a/testsuite/tests/patsyn/should_compile/T12698.hs +++ b/testsuite/tests/patsyn/should_compile/T12698.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language ViewPatterns, TypeOperators, KindSignatures, PolyKinds, StandaloneDeriving, GADTs, RebindableSyntax, RankNTypes, LambdaCase, PatternSynonyms, TypeApplications #-} diff --git a/testsuite/tests/patsyn/should_compile/T14394.script b/testsuite/tests/patsyn/should_compile/T14394.script index 208df0ca36..29f738bbbd 100644 --- a/testsuite/tests/patsyn/should_compile/T14394.script +++ b/testsuite/tests/patsyn/should_compile/T14394.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 :set -XPatternSynonyms -XGADTs -XViewPatterns -XScopedTypeVariables import Data.Type.Equality @@ -21,4 +22,4 @@ data S a where { MkS :: Ord a => a -> S a } pattern Bam x y <- (MkS (x::a), MkS (y::a)) :info Bam --- Expecting only one provided Ord constraint
\ No newline at end of file +-- Expecting only one provided Ord constraint diff --git a/testsuite/tests/patsyn/should_compile/T14394.stdout b/testsuite/tests/patsyn/should_compile/T14394.stdout index 83e745c60a..5838db9f43 100644 --- a/testsuite/tests/patsyn/should_compile/T14394.stdout +++ b/testsuite/tests/patsyn/should_compile/T14394.stdout @@ -1,10 +1,10 @@ pattern Foo :: () => (b ~ a) => a :~~: b - -- Defined at <interactive>:5:1 + -- Defined at <interactive>:6:1 pattern Bar :: forall {k1} {k2} {a :: k1} {b :: k2}. () => (k2 ~ k1, b ~~ a) => a :~~: b - -- Defined at <interactive>:11:1 + -- Defined at <interactive>:12:1 pattern Bam :: () => Ord a => a -> a -> (S a, S a) - -- Defined at <interactive>:21:1 + -- Defined at <interactive>:22:1 diff --git a/testsuite/tests/patsyn/should_fail/T14507.hs b/testsuite/tests/patsyn/should_fail/T14507.hs index 9599b73c77..b803f50734 100644 --- a/testsuite/tests/patsyn/should_fail/T14507.hs +++ b/testsuite/tests/patsyn/should_fail/T14507.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language PatternSynonyms, ViewPatterns, GADTs, ConstraintKinds, RankNTypes, PolyKinds, ScopedTypeVariables, DataKinds, TypeOperators, TypeApplications, TypeFamilies, TypeFamilyDependencies #-} diff --git a/testsuite/tests/patsyn/should_fail/T14507.stderr b/testsuite/tests/patsyn/should_fail/T14507.stderr index 1279ec1e4e..beeb4de685 100644 --- a/testsuite/tests/patsyn/should_fail/T14507.stderr +++ b/testsuite/tests/patsyn/should_fail/T14507.stderr @@ -1,5 +1,5 @@ -T14507.hs:20:9: error: +T14507.hs:21:9: error: • Iceland Jack! Iceland Jack! Stop torturing me! Pattern-bound variable x :: TypeRep a has a type that mentions pattern-bound coercion: co diff --git a/testsuite/tests/patsyn/should_fail/T15694.hs b/testsuite/tests/patsyn/should_fail/T15694.hs index 915ad7e7dd..44b3c7a8d6 100644 --- a/testsuite/tests/patsyn/should_fail/T15694.hs +++ b/testsuite/tests/patsyn/should_fail/T15694.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language RankNTypes, PatternSynonyms, TypeOperators, DataKinds, PolyKinds, KindSignatures, GADTs #-} module T15694 where diff --git a/testsuite/tests/patsyn/should_fail/T15694.stderr b/testsuite/tests/patsyn/should_fail/T15694.stderr index 2b0b7b77b1..2c3421321c 100644 --- a/testsuite/tests/patsyn/should_fail/T15694.stderr +++ b/testsuite/tests/patsyn/should_fail/T15694.stderr @@ -1,8 +1,8 @@ -T15694.hs:22:35: error: +T15694.hs:23:35: error: • Expected kind ‘k1 -> k0’, but ‘f a1’ has kind ‘ks’ ‘ks’ is a rigid type variable bound by an explicit forall ks k (f :: k -> ks) (a1 :: k) (ctx :: Ctx ks) (ks1 :: Type) k1 (a2 :: k1) (ctx1 :: Ctx ks1) a3 - at T15694.hs:18:30-31 + at T15694.hs:19:30-31 • In the first argument of ‘(~~)’, namely ‘f a1 a2’ diff --git a/testsuite/tests/patsyn/should_fail/T15695.hs b/testsuite/tests/patsyn/should_fail/T15695.hs index de8035c728..ebccb8a02e 100644 --- a/testsuite/tests/patsyn/should_fail/T15695.hs +++ b/testsuite/tests/patsyn/should_fail/T15695.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language RankNTypes, PatternSynonyms, DataKinds, PolyKinds, GADTs, TypeOperators, MultiParamTypeClasses, TypeFamilies, TypeSynonymInstances, FlexibleInstances, InstanceSigs, FlexibleContexts #-} diff --git a/testsuite/tests/patsyn/should_fail/T15695.stderr b/testsuite/tests/patsyn/should_fail/T15695.stderr index 9418f15a71..555c004360 100644 --- a/testsuite/tests/patsyn/should_fail/T15695.stderr +++ b/testsuite/tests/patsyn/should_fail/T15695.stderr @@ -1,5 +1,5 @@ -T15695.hs:39:14: warning: [-Wdeferred-type-errors (in -Wdefault)] +T15695.hs:40:14: warning: [-Wdeferred-type-errors (in -Wdefault)] • Could not deduce: a2 ~ NA 'VO from the context: ((* -> * -> *) ~ (k -> k1 -> *), Either ~~ f, ctx ~~ (a2 ':&: (a3 ':&: 'E)), f a2 ~~ f1, f1 a3 ~~ a4) @@ -12,7 +12,7 @@ T15695.hs:39:14: warning: [-Wdeferred-type-errors (in -Wdefault)] f a1 ~~ f1, f1 a2 ~~ a3) => a3 -> ApplyT kind a b, in an equation for ‘from'’ - at T15695.hs:39:8-21 + at T15695.hs:40:8-21 Expected: a4 Actual: Either (NA 'VO) a3 ‘a2’ is a rigid type variable bound by @@ -25,15 +25,15 @@ T15695.hs:39:14: warning: [-Wdeferred-type-errors (in -Wdefault)] f a1 ~~ f1, f1 a2 ~~ a3) => a3 -> ApplyT kind a b, in an equation for ‘from'’ - at T15695.hs:39:8-21 + at T15695.hs:40:8-21 • In the pattern: Left a In the pattern: ASSO (Left a) In an equation for ‘from'’: from' (ASSO (Left a)) = Here (a :* Nil) • Relevant bindings include from' :: ApplyT (* -> * -> *) Either ctx -> NS (NP NA) '[ '[ 'VO]] - (bound at T15695.hs:39:1) + (bound at T15695.hs:40:1) -T15695.hs:40:33: warning: [-Wdeferred-type-errors (in -Wdefault)] +T15695.hs:41:33: warning: [-Wdeferred-type-errors (in -Wdefault)] • Couldn't match type: a0 : as0 with: '[] Expected: NS (NP NA) '[] @@ -44,4 +44,4 @@ T15695.hs:40:33: warning: [-Wdeferred-type-errors (in -Wdefault)] from' (ASSO (Right b)) = There (Here undefined) • Relevant bindings include from' :: ApplyT (* -> * -> *) Either ctx -> NS (NP NA) '[ '[ 'VO]] - (bound at T15695.hs:39:1) + (bound at T15695.hs:40:1) diff --git a/testsuite/tests/perf/compiler/T13056.hs b/testsuite/tests/perf/compiler/T13056.hs index f2dd040bdc..bc0b7894d9 100644 --- a/testsuite/tests/perf/compiler/T13056.hs +++ b/testsuite/tests/perf/compiler/T13056.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveFunctor #-} diff --git a/testsuite/tests/perf/compiler/T14683.hs b/testsuite/tests/perf/compiler/T14683.hs index 41146c7f70..157d0eb6c6 100644 --- a/testsuite/tests/perf/compiler/T14683.hs +++ b/testsuite/tests/perf/compiler/T14683.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -w #-} {-# OPTIONS -XMagicHash -XBangPatterns #-} module Grammar where diff --git a/testsuite/tests/perf/compiler/T3064.hs b/testsuite/tests/perf/compiler/T3064.hs index 298a09cecf..af3dc2cde7 100644 --- a/testsuite/tests/perf/compiler/T3064.hs +++ b/testsuite/tests/perf/compiler/T3064.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE Rank2Types, TypeSynonymInstances, FlexibleInstances #-} {-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving #-} diff --git a/testsuite/tests/perf/compiler/T9872a.hs b/testsuite/tests/perf/compiler/T9872a.hs index 7ceba4ee66..8074cf98cd 100644 --- a/testsuite/tests/perf/compiler/T9872a.hs +++ b/testsuite/tests/perf/compiler/T9872a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {- - Instant Insanity using Type Families. - diff --git a/testsuite/tests/perf/compiler/T9872a.stderr b/testsuite/tests/perf/compiler/T9872a.stderr index b38fcaeeb1..067dc35606 100644 --- a/testsuite/tests/perf/compiler/T9872a.stderr +++ b/testsuite/tests/perf/compiler/T9872a.stderr @@ -1,5 +1,5 @@ -T9872a.hs:16:8: +T9872a.hs:17:8: No instance for (Show (Proxy (Cons diff --git a/testsuite/tests/perf/compiler/T9872c.hs b/testsuite/tests/perf/compiler/T9872c.hs index b925c9f791..dff3d792e8 100644 --- a/testsuite/tests/perf/compiler/T9872c.hs +++ b/testsuite/tests/perf/compiler/T9872c.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {- - Instant Insanity using Closed Type Families, but no DataKinds - diff --git a/testsuite/tests/perf/compiler/T9872c.stderr b/testsuite/tests/perf/compiler/T9872c.stderr index 121e54d48e..5c22868ff2 100644 --- a/testsuite/tests/perf/compiler/T9872c.stderr +++ b/testsuite/tests/perf/compiler/T9872c.stderr @@ -1,5 +1,5 @@ -T9872c.hs:17:8: +T9872c.hs:18:8: No instance for (Show (Proxy (Cons diff --git a/testsuite/tests/perf/should_run/T7257.hs b/testsuite/tests/perf/should_run/T7257.hs index 8907c3c918..17b103a3d8 100644 --- a/testsuite/tests/perf/should_run/T7257.hs +++ b/testsuite/tests/perf/should_run/T7257.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE BangPatterns #-} module Main where @@ -22,8 +23,8 @@ undo ref = do main = do ref <- newIORef [S.empty] let fn n = do - doStuff ref n - when (rem 5 n /= 0 ) $ undo ref + doStuff ref n + when (rem 5 n /= 0 ) $ undo ref mapM_ fn (take 5000000 $ cycle [1..100]) var <- readIORef ref diff --git a/testsuite/tests/plugins/FrontendPlugin.hs b/testsuite/tests/plugins/FrontendPlugin.hs index e264cc4062..7d5ed905e8 100644 --- a/testsuite/tests/plugins/FrontendPlugin.hs +++ b/testsuite/tests/plugins/FrontendPlugin.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE NondecreasingIndentation #-} module FrontendPlugin where import GHC.Plugins diff --git a/testsuite/tests/plugins/frontend01.hs b/testsuite/tests/plugins/frontend01.hs index db014568d4..e63c79b791 100644 --- a/testsuite/tests/plugins/frontend01.hs +++ b/testsuite/tests/plugins/frontend01.hs @@ -1 +1,2 @@ +{-# LANGUAGE Haskell2010 #-} main = putStrLn "hello world" diff --git a/testsuite/tests/pmcheck/complete_sigs/T14253.hs b/testsuite/tests/pmcheck/complete_sigs/T14253.hs index bb56d437bf..fc594b4355 100644 --- a/testsuite/tests/pmcheck/complete_sigs/T14253.hs +++ b/testsuite/tests/pmcheck/complete_sigs/T14253.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TypeOperators #-} diff --git a/testsuite/tests/polykinds/BadKindVar.hs b/testsuite/tests/polykinds/BadKindVar.hs index 9275d453c5..760a9b1b39 100644 --- a/testsuite/tests/polykinds/BadKindVar.hs +++ b/testsuite/tests/polykinds/BadKindVar.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, KindSignatures #-} module Foo where diff --git a/testsuite/tests/polykinds/BadKindVar.stderr b/testsuite/tests/polykinds/BadKindVar.stderr index 3312350602..19944a4df8 100644 --- a/testsuite/tests/polykinds/BadKindVar.stderr +++ b/testsuite/tests/polykinds/BadKindVar.stderr @@ -1,5 +1,5 @@ -BadKindVar.hs:8:21: error: +BadKindVar.hs:9:21: error: Unexpected kind variable ‘k’ Perhaps you intended to use PolyKinds In the type signature for ‘f’ diff --git a/testsuite/tests/polykinds/NestedProxies.hs b/testsuite/tests/polykinds/NestedProxies.hs index d59d026544..a9873b0102 100644 --- a/testsuite/tests/polykinds/NestedProxies.hs +++ b/testsuite/tests/polykinds/NestedProxies.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} diff --git a/testsuite/tests/polykinds/PolyKinds04.hs b/testsuite/tests/polykinds/PolyKinds04.hs index d3e1078c4f..fac9ff8963 100644 --- a/testsuite/tests/polykinds/PolyKinds04.hs +++ b/testsuite/tests/polykinds/PolyKinds04.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module PolyKinds04 where diff --git a/testsuite/tests/polykinds/PolyKinds04.stderr b/testsuite/tests/polykinds/PolyKinds04.stderr index 2a88291623..faa4f4cd69 100644 --- a/testsuite/tests/polykinds/PolyKinds04.stderr +++ b/testsuite/tests/polykinds/PolyKinds04.stderr @@ -1,7 +1,7 @@ -PolyKinds04.hs:5:16: - Expecting one more argument to ‘Maybe’ - Expected a type, but ‘Maybe’ has kind ‘* -> *’ - In the first argument of ‘A’, namely ‘Maybe’ - In the type ‘(A Maybe)’ - In the definition of data constructor ‘B1’ +PolyKinds04.hs:6:16: error: + • Expecting one more argument to ‘Maybe’ + Expected a type, but ‘Maybe’ has kind ‘* -> *’ + • In the first argument of ‘A’, namely ‘Maybe’ + In the type ‘(A Maybe)’ + In the definition of data constructor ‘B1’ diff --git a/testsuite/tests/polykinds/T10670a.hs b/testsuite/tests/polykinds/T10670a.hs index d398cb72a8..489e1d56c5 100644 --- a/testsuite/tests/polykinds/T10670a.hs +++ b/testsuite/tests/polykinds/T10670a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs , PolyKinds #-} module Bug2 where diff --git a/testsuite/tests/polykinds/T11362.hs b/testsuite/tests/polykinds/T11362.hs index d08ebe2461..7763cf460d 100644 --- a/testsuite/tests/polykinds/T11362.hs +++ b/testsuite/tests/polykinds/T11362.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE KindSignatures #-} diff --git a/testsuite/tests/polykinds/T11480a.hs b/testsuite/tests/polykinds/T11480a.hs index b491a21518..26e53807b2 100644 --- a/testsuite/tests/polykinds/T11480a.hs +++ b/testsuite/tests/polykinds/T11480a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# language KindSignatures, PolyKinds, TypeFamilies, NoImplicitPrelude, FlexibleContexts, MultiParamTypeClasses, GADTs, diff --git a/testsuite/tests/polykinds/T11480b.hs b/testsuite/tests/polykinds/T11480b.hs index 0ec19753a0..a144c97a34 100644 --- a/testsuite/tests/polykinds/T11480b.hs +++ b/testsuite/tests/polykinds/T11480b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# language KindSignatures #-} {-# language PolyKinds #-} {-# language DataKinds #-} diff --git a/testsuite/tests/polykinds/T11520.hs b/testsuite/tests/polykinds/T11520.hs index 9c1d4fe1be..18881f333f 100644 --- a/testsuite/tests/polykinds/T11520.hs +++ b/testsuite/tests/polykinds/T11520.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, PolyKinds, GADTs, UndecidableSuperClasses, UndecidableInstances #-} module T11520 where diff --git a/testsuite/tests/polykinds/T11520.stderr b/testsuite/tests/polykinds/T11520.stderr index 90a5826266..8b9ddb09a8 100644 --- a/testsuite/tests/polykinds/T11520.stderr +++ b/testsuite/tests/polykinds/T11520.stderr @@ -1,9 +1,9 @@ -T11520.hs:15:77: error: +T11520.hs:16:77: error: • Expected kind ‘k2 -> k1’, but ‘g’ has kind ‘k4’ ‘k4’ is a rigid type variable bound by an instance declaration - at T11520.hs:15:10-78 + at T11520.hs:16:10-78 • In the second argument of ‘Compose’, namely ‘g’ In the first argument of ‘Typeable’, namely ‘(Compose f g)’ In the instance declaration for ‘Typeable (Compose f g)’ diff --git a/testsuite/tests/polykinds/T11523.hs b/testsuite/tests/polykinds/T11523.hs index aff0f9ed90..97551b2208 100644 --- a/testsuite/tests/polykinds/T11523.hs +++ b/testsuite/tests/polykinds/T11523.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# language KindSignatures #-} {-# language PolyKinds #-} {-# language DataKinds #-} diff --git a/testsuite/tests/polykinds/T12055.hs b/testsuite/tests/polykinds/T12055.hs index cabc2dfbba..de3ad455ea 100644 --- a/testsuite/tests/polykinds/T12055.hs +++ b/testsuite/tests/polykinds/T12055.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} diff --git a/testsuite/tests/polykinds/T12055a.hs b/testsuite/tests/polykinds/T12055a.hs index ebc4dc7cad..e26da3246c 100644 --- a/testsuite/tests/polykinds/T12055a.hs +++ b/testsuite/tests/polykinds/T12055a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} diff --git a/testsuite/tests/polykinds/T12055a.stderr b/testsuite/tests/polykinds/T12055a.stderr index fb76dd4989..65d8b636ee 100644 --- a/testsuite/tests/polykinds/T12055a.stderr +++ b/testsuite/tests/polykinds/T12055a.stderr @@ -1,5 +1,5 @@ -T12055a.hs:27:1: error: +T12055a.hs:28:1: error: • Non type-variable argument in the constraint: Category (Dom f) (Use FlexibleContexts to permit this) • In the context: (Category (Dom f), Category (Cod f)) diff --git a/testsuite/tests/polykinds/T14172.hs b/testsuite/tests/polykinds/T14172.hs index 06956be91a..4089ea84db 100644 --- a/testsuite/tests/polykinds/T14172.hs +++ b/testsuite/tests/polykinds/T14172.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T14172 where import Data.Functor.Compose diff --git a/testsuite/tests/polykinds/T14172.stderr b/testsuite/tests/polykinds/T14172.stderr index 3496b04538..2ad319592c 100644 --- a/testsuite/tests/polykinds/T14172.stderr +++ b/testsuite/tests/polykinds/T14172.stderr @@ -1,26 +1,26 @@ -T14172.hs:6:46: error: +T14172.hs:7:46: error: • Found type wildcard ‘_’ standing for ‘a'’ Where: ‘a'’ is a rigid type variable bound by the inferred type of traverseCompose :: (a -> f b) -> g a -> f (h a') - at T14172.hs:7:1-46 + at T14172.hs:8:1-46 To use the inferred type, enable PartialTypeSignatures • In the first argument of ‘h’, namely ‘_’ In the first argument of ‘f’, namely ‘(h _)’ In the type ‘(a -> f b) -> g a -> f (h _)’ -T14172.hs:7:19: error: +T14172.hs:8:19: error: • Couldn't match type ‘h’ with ‘Compose f'0 g'0’ arising from a use of ‘_Wrapping’ ‘h’ is a rigid type variable bound by the inferred type of traverseCompose :: (a -> f b) -> g a -> f (h a') - at T14172.hs:6:1-47 + at T14172.hs:7:1-47 • In the first argument of ‘(.)’, namely ‘_Wrapping Compose’ In the expression: _Wrapping Compose . traverse In an equation for ‘traverseCompose’: traverseCompose = _Wrapping Compose . traverse • Relevant bindings include traverseCompose :: (a -> f b) -> g a -> f (h a') - (bound at T14172.hs:7:1) + (bound at T14172.hs:8:1) diff --git a/testsuite/tests/polykinds/T14270.hs b/testsuite/tests/polykinds/T14270.hs index d578be344e..efdc68cc5a 100644 --- a/testsuite/tests/polykinds/T14270.hs +++ b/testsuite/tests/polykinds/T14270.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE RankNTypes #-} diff --git a/testsuite/tests/polykinds/T14450.hs b/testsuite/tests/polykinds/T14450.hs index 8571829619..e660263b19 100644 --- a/testsuite/tests/polykinds/T14450.hs +++ b/testsuite/tests/polykinds/T14450.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language KindSignatures, TypeOperators, PolyKinds, TypeOperators, ConstraintKinds, TypeFamilies, DataKinds, GADTs, AllowAmbiguousTypes, InstanceSigs #-} diff --git a/testsuite/tests/polykinds/T14450.stderr b/testsuite/tests/polykinds/T14450.stderr index c631bade87..0c5110a442 100644 --- a/testsuite/tests/polykinds/T14450.stderr +++ b/testsuite/tests/polykinds/T14450.stderr @@ -1,5 +1,5 @@ -T14450.hs:33:3: error: +T14450.hs:34:3: error: • Type indexes must match class instance head Expected: Dom @k @k (IddSym0 @k) Actual: Dom @(*) @(*) (IddSym0 @(*)) diff --git a/testsuite/tests/polykinds/T14710.hs b/testsuite/tests/polykinds/T14710.hs index 2fec10a7a1..de34bc3e05 100644 --- a/testsuite/tests/polykinds/T14710.hs +++ b/testsuite/tests/polykinds/T14710.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} diff --git a/testsuite/tests/polykinds/T14710.stderr b/testsuite/tests/polykinds/T14710.stderr index 0bbfb0d641..fa83a74fc8 100644 --- a/testsuite/tests/polykinds/T14710.stderr +++ b/testsuite/tests/polykinds/T14710.stderr @@ -1,30 +1,30 @@ -T14710.hs:9:21: error: +T14710.hs:10:21: error: Unexpected kind variable ‘a’ Perhaps you intended to use PolyKinds In a class method signature for ‘c1’ -T14710.hs:10:22: error: +T14710.hs:11:22: error: Unexpected kind variable ‘a’ Perhaps you intended to use PolyKinds In a class method signature for ‘c2’ -T14710.hs:15:23: error: +T14710.hs:16:23: error: Unexpected kind variable ‘a’ Perhaps you intended to use PolyKinds In the type signature for ‘g1’ -T14710.hs:18:24: error: +T14710.hs:19:24: error: Unexpected kind variable ‘a’ Perhaps you intended to use PolyKinds In the type signature for ‘g2’ -T14710.hs:21:31: error: +T14710.hs:22:31: error: Unexpected kind variable ‘k’ Perhaps you intended to use PolyKinds In the type signature for ‘h1’ -T14710.hs:24:22: error: +T14710.hs:25:22: error: Unexpected kind variable ‘k’ Perhaps you intended to use PolyKinds In the type signature for ‘h2’ diff --git a/testsuite/tests/polykinds/T15787.hs b/testsuite/tests/polykinds/T15787.hs index 85e737a479..fbe67f3356 100644 --- a/testsuite/tests/polykinds/T15787.hs +++ b/testsuite/tests/polykinds/T15787.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language RankNTypes #-} {-# Language TypeApplications #-} {-# Language DataKinds #-} diff --git a/testsuite/tests/polykinds/T15787.stderr b/testsuite/tests/polykinds/T15787.stderr index b22e6c7b5b..4ab01d58fc 100644 --- a/testsuite/tests/polykinds/T15787.stderr +++ b/testsuite/tests/polykinds/T15787.stderr @@ -1,9 +1,9 @@ -T15787.hs:15:14: error: +T15787.hs:16:14: error: • Expected a type, but ‘k’ has kind ‘ob1’ ‘ob1’ is a rigid type variable bound by the data constructor ‘Kl’ - at T15787.hs:15:3-43 + at T15787.hs:16:3-43 • In the type ‘k’ In the definition of data constructor ‘Kl’ In the data declaration for ‘Kl_kind’ diff --git a/testsuite/tests/polykinds/T16244.hs b/testsuite/tests/polykinds/T16244.hs index dbcb5232b4..9b29c2237a 100644 --- a/testsuite/tests/polykinds/T16244.hs +++ b/testsuite/tests/polykinds/T16244.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} diff --git a/testsuite/tests/polykinds/T16244.stderr b/testsuite/tests/polykinds/T16244.stderr index 6b932ad285..4e83aa7b6f 100644 --- a/testsuite/tests/polykinds/T16244.stderr +++ b/testsuite/tests/polykinds/T16244.stderr @@ -1,11 +1,11 @@ -T16244.hs:11:18: error: +T16244.hs:12:18: error: • Expected kind ‘k’, but ‘b’ has kind ‘k1’ ‘k1’ is a rigid type variable bound by the class declaration for ‘C’ - at T16244.hs:11:26 + at T16244.hs:12:26 ‘k’ is a rigid type variable bound by the class declaration for ‘C’ - at T16244.hs:11:1-52 + at T16244.hs:12:1-52 • In the second argument of ‘SameKind’, namely ‘b’ In the class declaration for ‘C’ diff --git a/testsuite/tests/polykinds/T16245.hs b/testsuite/tests/polykinds/T16245.hs index 8fcd38cb77..ba8c6bd566 100644 --- a/testsuite/tests/polykinds/T16245.hs +++ b/testsuite/tests/polykinds/T16245.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} diff --git a/testsuite/tests/polykinds/T16245.stderr b/testsuite/tests/polykinds/T16245.stderr index 4f7cc415c2..36f9d487e2 100644 --- a/testsuite/tests/polykinds/T16245.stderr +++ b/testsuite/tests/polykinds/T16245.stderr @@ -1,11 +1,11 @@ -T16245.hs:11:36: error: +T16245.hs:12:36: error: • Expected kind ‘k’, but ‘b’ has kind ‘k1’ ‘k1’ is a rigid type variable bound by the class declaration for ‘C’ - at T16245.hs:11:45 + at T16245.hs:12:45 ‘k’ is a rigid type variable bound by the class declaration for ‘C’ - at T16245.hs:11:1-62 + at T16245.hs:12:1-62 • In the second argument of ‘SameKind’, namely ‘b’ In the class declaration for ‘C’ diff --git a/testsuite/tests/polykinds/T16245a.hs b/testsuite/tests/polykinds/T16245a.hs index d649701261..65d904f609 100644 --- a/testsuite/tests/polykinds/T16245a.hs +++ b/testsuite/tests/polykinds/T16245a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeInType #-} module Bug where diff --git a/testsuite/tests/polykinds/T16245a.stderr b/testsuite/tests/polykinds/T16245a.stderr index 6279ba18bb..0023432858 100644 --- a/testsuite/tests/polykinds/T16245a.stderr +++ b/testsuite/tests/polykinds/T16245a.stderr @@ -1,12 +1,12 @@ -T16245a.hs:10:66: error: +T16245a.hs:11:66: error: • Expected kind ‘k’, but ‘b’ has kind ‘k1’ ‘k1’ is a rigid type variable bound by the data constructor ‘MkT’ - at T16245a.hs:10:12 + at T16245a.hs:11:12 ‘k’ is a rigid type variable bound by the data constructor ‘MkT’ - at T16245a.hs:10:1-67 + at T16245a.hs:11:1-67 • In the second argument of ‘SameKind’, namely ‘b’ In the type ‘(forall (b :: k). SameKind a b)’ In the definition of data constructor ‘MkT’ diff --git a/testsuite/tests/polykinds/T16762b.hs b/testsuite/tests/polykinds/T16762b.hs index cad6bff33f..2aad708ef0 100644 --- a/testsuite/tests/polykinds/T16762b.hs +++ b/testsuite/tests/polykinds/T16762b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE StandaloneKindSignatures #-} module T16762b where diff --git a/testsuite/tests/polykinds/T16762b.stderr b/testsuite/tests/polykinds/T16762b.stderr index ffb29b70dc..3da5c88856 100644 --- a/testsuite/tests/polykinds/T16762b.stderr +++ b/testsuite/tests/polykinds/T16762b.stderr @@ -1,4 +1,4 @@ -T16762b.hs:7:11: error: +T16762b.hs:8:11: error: Illegal kind: forall k. Type Did you mean to enable PolyKinds? diff --git a/testsuite/tests/polykinds/T16902.hs b/testsuite/tests/polykinds/T16902.hs index 70fc7bd742..0eb7229a92 100644 --- a/testsuite/tests/polykinds/T16902.hs +++ b/testsuite/tests/polykinds/T16902.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} diff --git a/testsuite/tests/polykinds/T16902.stderr b/testsuite/tests/polykinds/T16902.stderr index 61d1b0a2ae..69022b3a1a 100644 --- a/testsuite/tests/polykinds/T16902.stderr +++ b/testsuite/tests/polykinds/T16902.stderr @@ -1,9 +1,9 @@ -T16902.hs:11:10: error: +T16902.hs:12:10: error: • Expected a type, but found something with kind ‘a’ ‘a’ is a rigid type variable bound by the data constructor ‘MkF’ - at T16902.hs:11:3-12 + at T16902.hs:12:3-12 • In the type ‘F a’ In the definition of data constructor ‘MkF’ In the data declaration for ‘F’ diff --git a/testsuite/tests/polykinds/T17841.hs b/testsuite/tests/polykinds/T17841.hs index c728a11f02..24189a6e84 100644 --- a/testsuite/tests/polykinds/T17841.hs +++ b/testsuite/tests/polykinds/T17841.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds #-} module T17841 where diff --git a/testsuite/tests/polykinds/T17841.stderr b/testsuite/tests/polykinds/T17841.stderr index 739e4f2680..878f30ae7a 100644 --- a/testsuite/tests/polykinds/T17841.stderr +++ b/testsuite/tests/polykinds/T17841.stderr @@ -1,9 +1,9 @@ -T17841.hs:7:45: error: +T17841.hs:8:45: error: • Expected a type, but ‘t’ has kind ‘k’ ‘k’ is a rigid type variable bound by the class declaration for ‘Foo’ - at T17841.hs:7:12-17 + at T17841.hs:8:12-17 • In the kind ‘t’ In the first argument of ‘Proxy’, namely ‘(a :: t)’ In the type signature: foo :: Proxy (a :: t) diff --git a/testsuite/tests/polykinds/T6068.hs b/testsuite/tests/polykinds/T6068.hs index cce718e92f..745f9b92c1 100644 --- a/testsuite/tests/polykinds/T6068.hs +++ b/testsuite/tests/polykinds/T6068.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, GADTs, MultiParamTypeClasses, KindSignatures, FunctionalDependencies, FlexibleInstances, UndecidableInstances, ExistentialQuantification #-} diff --git a/testsuite/tests/polykinds/T6068.script b/testsuite/tests/polykinds/T6068.script index 6b34183986..52b610dfe5 100644 --- a/testsuite/tests/polykinds/T6068.script +++ b/testsuite/tests/polykinds/T6068.script @@ -1,2 +1,3 @@ +:set -XHaskell2010 :l T6068 :t exists Nothing diff --git a/testsuite/tests/polykinds/T6137.hs b/testsuite/tests/polykinds/T6137.hs index b3f0c02ba6..6b7ebc47cc 100644 --- a/testsuite/tests/polykinds/T6137.hs +++ b/testsuite/tests/polykinds/T6137.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE KindSignatures #-} diff --git a/testsuite/tests/polykinds/T7053.hs b/testsuite/tests/polykinds/T7053.hs index d45dbadaee..9540e71c42 100644 --- a/testsuite/tests/polykinds/T7053.hs +++ b/testsuite/tests/polykinds/T7053.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds, GADTs #-} module T7053 where diff --git a/testsuite/tests/polykinds/T7053a.hs b/testsuite/tests/polykinds/T7053a.hs index d5ae04690b..8b798d530e 100644 --- a/testsuite/tests/polykinds/T7053a.hs +++ b/testsuite/tests/polykinds/T7053a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds, GADTs #-} module T7053a where diff --git a/testsuite/tests/polykinds/T7224.hs b/testsuite/tests/polykinds/T7224.hs index a065bc8494..0283b4be3c 100644 --- a/testsuite/tests/polykinds/T7224.hs +++ b/testsuite/tests/polykinds/T7224.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds #-} module T7224 where diff --git a/testsuite/tests/polykinds/T7224.stderr b/testsuite/tests/polykinds/T7224.stderr index ca1f32c1c2..8a6be86ce0 100644 --- a/testsuite/tests/polykinds/T7224.stderr +++ b/testsuite/tests/polykinds/T7224.stderr @@ -1,18 +1,18 @@ -T7224.hs:6:19: error: +T7224.hs:7:19: error: • Expected kind ‘i’, but ‘i’ has kind ‘*’ ‘i’ is a rigid type variable bound by the class declaration for ‘PMonad'’ - at T7224.hs:5:16-36 + at T7224.hs:6:16-36 • In the first argument of ‘m’, namely ‘i’ In the type signature: ret' :: a -> m i i a In the class declaration for ‘PMonad'’ -T7224.hs:7:14: error: +T7224.hs:8:14: error: • Expected kind ‘i’, but ‘i’ has kind ‘*’ ‘i’ is a rigid type variable bound by the class declaration for ‘PMonad'’ - at T7224.hs:5:16-36 + at T7224.hs:6:16-36 • In the first argument of ‘m’, namely ‘i’ In the type signature: bind' :: m i j a -> (a -> m j k b) -> m i k b diff --git a/testsuite/tests/polykinds/T7805.hs b/testsuite/tests/polykinds/T7805.hs index 914200b27f..ca1c2ee8b9 100644 --- a/testsuite/tests/polykinds/T7805.hs +++ b/testsuite/tests/polykinds/T7805.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, RankNTypes, TypeFamilies #-} module T7805 where diff --git a/testsuite/tests/polykinds/T7805.stderr b/testsuite/tests/polykinds/T7805.stderr index e4fdff52e0..cb87c5af6e 100644 --- a/testsuite/tests/polykinds/T7805.stderr +++ b/testsuite/tests/polykinds/T7805.stderr @@ -1,5 +1,5 @@ -T7805.hs:7:21: error: +T7805.hs:8:21: error: • Expected kind ‘forall a. a -> a’, but ‘x’ has kind ‘*’ • In the first argument of ‘HR’, namely ‘x’ In the first argument of ‘F’, namely ‘(HR x)’ diff --git a/testsuite/tests/polykinds/T9200.hs b/testsuite/tests/polykinds/T9200.hs index 63c934c91b..96edb604ad 100644 --- a/testsuite/tests/polykinds/T9200.hs +++ b/testsuite/tests/polykinds/T9200.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds, MultiParamTypeClasses, FlexibleContexts, DataKinds, TypeFamilies #-} diff --git a/testsuite/tests/polykinds/TidyClassKinds.hs b/testsuite/tests/polykinds/TidyClassKinds.hs index 83f6eaaea2..6328565308 100644 --- a/testsuite/tests/polykinds/TidyClassKinds.hs +++ b/testsuite/tests/polykinds/TidyClassKinds.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses, PolyKinds #-} {-# OPTIONS_GHC -fprint-explicit-kinds #-} diff --git a/testsuite/tests/polykinds/TidyClassKinds.stderr b/testsuite/tests/polykinds/TidyClassKinds.stderr index eb51ca5692..eb626c4461 100644 --- a/testsuite/tests/polykinds/TidyClassKinds.stderr +++ b/testsuite/tests/polykinds/TidyClassKinds.stderr @@ -1,5 +1,5 @@ -TidyClassKinds.hs:12:10: error: +TidyClassKinds.hs:13:10: error: • Illegal instance declaration for ‘Poly @{k -> *} @{k -> *} (ProxySyn @{k}) (ProxySyn @{k})’ (All instance types must be of the form (T t1 ... tn) diff --git a/testsuite/tests/primops/should_compile/T16293a.hs b/testsuite/tests/primops/should_compile/T16293a.hs index 69368c70b5..41f8a63b74 100644 --- a/testsuite/tests/primops/should_compile/T16293a.hs +++ b/testsuite/tests/primops/should_compile/T16293a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE TypeApplications #-} module T16293a where diff --git a/testsuite/tests/quantified-constraints/T15359.hs b/testsuite/tests/quantified-constraints/T15359.hs index 7ef1cc5572..2a58d89c05 100644 --- a/testsuite/tests/quantified-constraints/T15359.hs +++ b/testsuite/tests/quantified-constraints/T15359.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses, GADTs, RankNTypes, ConstraintKinds, QuantifiedConstraints #-} diff --git a/testsuite/tests/quantified-constraints/T15359a.hs b/testsuite/tests/quantified-constraints/T15359a.hs index 6ec5f861a8..a5b16acf75 100644 --- a/testsuite/tests/quantified-constraints/T15359a.hs +++ b/testsuite/tests/quantified-constraints/T15359a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses, GADTs, RankNTypes, ConstraintKinds, QuantifiedConstraints, UndecidableInstances #-} diff --git a/testsuite/tests/quantified-constraints/T18432.hs b/testsuite/tests/quantified-constraints/T18432.hs index ba50727420..6c02887ba7 100644 --- a/testsuite/tests/quantified-constraints/T18432.hs +++ b/testsuite/tests/quantified-constraints/T18432.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE QuantifiedConstraints #-} module Bug where diff --git a/testsuite/tests/rename/should_compile/T1972.hs b/testsuite/tests/rename/should_compile/T1972.hs index 7b6d7387c7..f4067cd1d5 100644 --- a/testsuite/tests/rename/should_compile/T1972.hs +++ b/testsuite/tests/rename/should_compile/T1972.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-name-shadowing -fwarn-unused-binds #-} -- #1972 diff --git a/testsuite/tests/rename/should_compile/T1972.stderr b/testsuite/tests/rename/should_compile/T1972.stderr index 78f58b5415..3311f0aded 100644 --- a/testsuite/tests/rename/should_compile/T1972.stderr +++ b/testsuite/tests/rename/should_compile/T1972.stderr @@ -1,13 +1,13 @@ -T1972.hs:12:3: warning: [-Wname-shadowing (in -Wall)] +T1972.hs:13:3: warning: [-Wname-shadowing (in -Wall)] This binding for ‘name’ shadows the existing binding - defined at T1972.hs:9:19 + defined at T1972.hs:10:19 -T1972.hs:14:3: warning: [-Wname-shadowing (in -Wall)] +T1972.hs:15:3: warning: [-Wname-shadowing (in -Wall)] This binding for ‘mapAccumL’ shadows the existing bindings - imported from ‘Data.List’ at T1972.hs:7:19-27 + imported from ‘Data.List’ at T1972.hs:8:19-27 (and originally defined in ‘Data.Traversable’) - defined at T1972.hs:16:1 + defined at T1972.hs:17:1 -T1972.hs:20:10: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)] +T1972.hs:21:10: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)] Defined but not used: ‘c’ diff --git a/testsuite/tests/rename/should_compile/T4003A.hs-boot b/testsuite/tests/rename/should_compile/T4003A.hs-boot index 04902ddc62..329fd32aef 100644 --- a/testsuite/tests/rename/should_compile/T4003A.hs-boot +++ b/testsuite/tests/rename/should_compile/T4003A.hs-boot @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T4003A where import Data.Data diff --git a/testsuite/tests/rename/should_compile/T4003B.hs b/testsuite/tests/rename/should_compile/T4003B.hs index 24ce2432a2..01c23b7597 100644 --- a/testsuite/tests/rename/should_compile/T4003B.hs +++ b/testsuite/tests/rename/should_compile/T4003B.hs @@ -1,4 +1,4 @@ - +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveDataTypeable #-} module T4003B where diff --git a/testsuite/tests/rename/should_fail/RnFail055.hs b/testsuite/tests/rename/should_fail/RnFail055.hs index bd95add36b..b71d0a7c3a 100644 --- a/testsuite/tests/rename/should_fail/RnFail055.hs +++ b/testsuite/tests/rename/should_fail/RnFail055.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses,RankNTypes,ExistentialQuantification,DatatypeContexts #-} module RnFail055 where diff --git a/testsuite/tests/rename/should_fail/RnFail055.hs-boot b/testsuite/tests/rename/should_fail/RnFail055.hs-boot index 57a97d3695..ae2e81db21 100644 --- a/testsuite/tests/rename/should_fail/RnFail055.hs-boot +++ b/testsuite/tests/rename/should_fail/RnFail055.hs-boot @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses,RankNTypes,ExistentialQuantification,DatatypeContexts #-} module RnFail055 where diff --git a/testsuite/tests/rename/should_fail/T11663.hs b/testsuite/tests/rename/should_fail/T11663.hs index 2b8380fba1..318f89e670 100644 --- a/testsuite/tests/rename/should_fail/T11663.hs +++ b/testsuite/tests/rename/should_fail/T11663.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T11663 where -- All of these should fail as type signatures are not allowed diff --git a/testsuite/tests/rename/should_fail/T11663.stderr b/testsuite/tests/rename/should_fail/T11663.stderr index 18ee6e62d1..77e2999cec 100644 --- a/testsuite/tests/rename/should_fail/T11663.stderr +++ b/testsuite/tests/rename/should_fail/T11663.stderr @@ -1,16 +1,16 @@ -T11663.hs:5:12: error: +T11663.hs:6:12: error: Illegal type signature: ‘Int’ Type signatures are only allowed in patterns with ScopedTypeVariables -T11663.hs:6:9: error: +T11663.hs:7:9: error: Illegal type signature: ‘Int’ Type signatures are only allowed in patterns with ScopedTypeVariables -T11663.hs:7:22: error: +T11663.hs:8:22: error: Illegal type signature: ‘Int’ Type signatures are only allowed in patterns with ScopedTypeVariables -T11663.hs:8:32: error: +T11663.hs:9:32: error: Illegal type signature: ‘Int’ Type signatures are only allowed in patterns with ScopedTypeVariables diff --git a/testsuite/tests/rename/should_fail/T3265.hs b/testsuite/tests/rename/should_fail/T3265.hs index 8e34fc2849..a04fffb8cd 100644 --- a/testsuite/tests/rename/should_fail/T3265.hs +++ b/testsuite/tests/rename/should_fail/T3265.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses #-} -- Test #3265 diff --git a/testsuite/tests/rename/should_fail/T3265.stderr b/testsuite/tests/rename/should_fail/T3265.stderr index 999b6b3ed2..42d89d0b4e 100644 --- a/testsuite/tests/rename/should_fail/T3265.stderr +++ b/testsuite/tests/rename/should_fail/T3265.stderr @@ -1,8 +1,8 @@ -T3265.hs:7:8: +T3265.hs:8:8: error: Illegal declaration of a type or class operator ‘:+:’ Use TypeOperators to declare operators in type and declarations -T3265.hs:9:9: +T3265.hs:10:9: error: Illegal declaration of a type or class operator ‘:*:’ Use TypeOperators to declare operators in type and declarations diff --git a/testsuite/tests/rename/should_fail/rnfail052.hs b/testsuite/tests/rename/should_fail/rnfail052.hs index bffb7e0d96..a3fc361432 100644 --- a/testsuite/tests/rename/should_fail/rnfail052.hs +++ b/testsuite/tests/rename/should_fail/rnfail052.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- Error messages when you use 'forall' *without* the RankN flags -- Test cases similar to #2114 diff --git a/testsuite/tests/rename/should_fail/rnfail052.stderr b/testsuite/tests/rename/should_fail/rnfail052.stderr index b8501cfad1..b818a4b6be 100644 --- a/testsuite/tests/rename/should_fail/rnfail052.stderr +++ b/testsuite/tests/rename/should_fail/rnfail052.stderr @@ -1,15 +1,15 @@ -rnfail052.hs:6:6: error: +rnfail052.hs:7:6: error: Illegal symbol ‘forall’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type> -rnfail052.hs:9:14: error: +rnfail052.hs:10:14: error: Illegal symbol ‘forall’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type> -rnfail052.hs:12:15: error: +rnfail052.hs:13:15: error: Illegal symbol ‘forall’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type> diff --git a/testsuite/tests/rename/should_fail/rnfail053.hs b/testsuite/tests/rename/should_fail/rnfail053.hs index 1135f42b8a..6250b5d181 100644 --- a/testsuite/tests/rename/should_fail/rnfail053.hs +++ b/testsuite/tests/rename/should_fail/rnfail053.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- Test #2114 (error message) module ShouldFail where diff --git a/testsuite/tests/rename/should_fail/rnfail053.stderr b/testsuite/tests/rename/should_fail/rnfail053.stderr index ab96278504..4d438c3821 100644 --- a/testsuite/tests/rename/should_fail/rnfail053.stderr +++ b/testsuite/tests/rename/should_fail/rnfail053.stderr @@ -1,5 +1,5 @@ -rnfail053.hs:5:10: error: +rnfail053.hs:6:10: error: • Data constructor ‘MkT’ has existential type variables, a context, or a specialised result type MkT :: forall a. a -> T (Enable ExistentialQuantification or GADTs to allow this) diff --git a/testsuite/tests/rename/should_fail/rnfail055.stderr b/testsuite/tests/rename/should_fail/rnfail055.stderr index ef4b09fd3a..28b20d989a 100644 --- a/testsuite/tests/rename/should_fail/rnfail055.stderr +++ b/testsuite/tests/rename/should_fail/rnfail055.stderr @@ -1,18 +1,18 @@ -RnFail055.hs:1:73: warning: +RnFail055.hs:2:73: warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. -RnFail055.hs-boot:1:73: warning: +RnFail055.hs-boot:2:73: warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. -RnFail055.hs-boot:4:1: error: +RnFail055.hs-boot:5:1: error: Identifier ‘f1’ has conflicting definitions in the module and its hs-boot file Main module: f1 :: Int -> Float Boot file: f1 :: Float -> Int The two types are different -RnFail055.hs-boot:6:1: error: +RnFail055.hs-boot:7:1: error: Type constructor ‘S1’ has conflicting definitions in the module and its hs-boot file Main module: type S1 :: * -> * -> * @@ -21,7 +21,7 @@ RnFail055.hs-boot:6:1: error: type S1 a b c = (a, b) The types have different kinds -RnFail055.hs-boot:8:1: error: +RnFail055.hs-boot:9:1: error: Type constructor ‘S2’ has conflicting definitions in the module and its hs-boot file Main module: type S2 :: * -> * -> * @@ -31,7 +31,7 @@ RnFail055.hs-boot:8:1: error: The roles do not match. Roles on abstract types default to ‘representational’ in boot files. -RnFail055.hs-boot:12:1: error: +RnFail055.hs-boot:13:1: error: Type constructor ‘T1’ has conflicting definitions in the module and its hs-boot file Main module: type T1 :: * -> * -> * @@ -40,7 +40,7 @@ RnFail055.hs-boot:12:1: error: data T1 a b = T1 [a] [b] The constructors do not match: The types for ‘T1’ differ -RnFail055.hs-boot:14:1: error: +RnFail055.hs-boot:15:1: error: Type constructor ‘T2’ has conflicting definitions in the module and its hs-boot file Main module: type role T2 representational nominal @@ -53,13 +53,13 @@ RnFail055.hs-boot:14:1: error: Roles on abstract types default to ‘representational’ in boot files. The datatype contexts do not match -RnFail055.hs-boot:16:11: error: +RnFail055.hs-boot:17:11: error: ‘T3’ is exported by the hs-boot file, but not exported by the module -RnFail055.hs-boot:17:12: error: +RnFail055.hs-boot:18:12: error: ‘T3'’ is exported by the hs-boot file, but not exported by the module -RnFail055.hs-boot:21:1: error: +RnFail055.hs-boot:22:1: error: Type constructor ‘T5’ has conflicting definitions in the module and its hs-boot file Main module: type T5 :: * -> * @@ -69,7 +69,7 @@ RnFail055.hs-boot:21:1: error: The constructors do not match: The record label lists for ‘T5’ differ -RnFail055.hs-boot:23:1: error: +RnFail055.hs-boot:24:1: error: Type constructor ‘T6’ has conflicting definitions in the module and its hs-boot file Main module: type T6 :: * @@ -79,7 +79,7 @@ RnFail055.hs-boot:23:1: error: The constructors do not match: The strictness annotations for ‘T6’ differ -RnFail055.hs-boot:25:1: error: +RnFail055.hs-boot:26:1: error: Type constructor ‘T7’ has conflicting definitions in the module and its hs-boot file Main module: type role T7 phantom @@ -91,10 +91,10 @@ RnFail055.hs-boot:25:1: error: Roles on abstract types default to ‘representational’ in boot files. The constructors do not match: The types for ‘T7’ differ -RnFail055.hs-boot:27:22: error: +RnFail055.hs-boot:28:22: error: ‘RnFail055.m1’ is exported by the hs-boot file, but not exported by the module -RnFail055.hs-boot:28:1: error: +RnFail055.hs-boot:29:1: error: Class ‘C2’ has conflicting definitions in the module and its hs-boot file Main module: type C2 :: * -> * -> Constraint @@ -109,7 +109,7 @@ RnFail055.hs-boot:28:1: error: The methods do not match: There are different numbers of methods The MINIMAL pragmas are not compatible -RnFail055.hs-boot:29:1: error: +RnFail055.hs-boot:30:1: error: Class ‘C3’ has conflicting definitions in the module and its hs-boot file Main module: type C3 :: * -> Constraint diff --git a/testsuite/tests/rename/should_fail/rnfail056.hs b/testsuite/tests/rename/should_fail/rnfail056.hs index 23ec008dc6..f41baec38e 100644 --- a/testsuite/tests/rename/should_fail/rnfail056.hs +++ b/testsuite/tests/rename/should_fail/rnfail056.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- TupleSections not enabled {-# LANGUAGE UnboxedTuples #-} diff --git a/testsuite/tests/rename/should_fail/rnfail056.stderr b/testsuite/tests/rename/should_fail/rnfail056.stderr index 19c1188ce4..b32a31d58c 100644 --- a/testsuite/tests/rename/should_fail/rnfail056.stderr +++ b/testsuite/tests/rename/should_fail/rnfail056.stderr @@ -1,4 +1,4 @@ -rnfail056.hs:6:7: Illegal tuple section: use TupleSections +rnfail056.hs:7:7: error: Illegal tuple section: use TupleSections -rnfail056.hs:8:7: Illegal tuple section: use TupleSections +rnfail056.hs:9:7: error: Illegal tuple section: use TupleSections diff --git a/testsuite/tests/roles/should_compile/Roles3.hs b/testsuite/tests/roles/should_compile/Roles3.hs index 3df74ec8e2..b71d9cf2ec 100644 --- a/testsuite/tests/roles/should_compile/Roles3.hs +++ b/testsuite/tests/roles/should_compile/Roles3.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, MultiParamTypeClasses #-} {-# LANGUAGE AllowAmbiguousTypes #-} -- meth3, meth4 are ambiguous diff --git a/testsuite/tests/roles/should_compile/T8958.hs b/testsuite/tests/roles/should_compile/T8958.hs index b3c2910e2e..e4bf28f1aa 100644 --- a/testsuite/tests/roles/should_compile/T8958.hs +++ b/testsuite/tests/roles/should_compile/T8958.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RoleAnnotations, DatatypeContexts, IncoherentInstances, FlexibleInstances #-} diff --git a/testsuite/tests/roles/should_compile/T8958.stderr b/testsuite/tests/roles/should_compile/T8958.stderr index 203f978daa..6cf07483d0 100644 --- a/testsuite/tests/roles/should_compile/T8958.stderr +++ b/testsuite/tests/roles/should_compile/T8958.stderr @@ -1,5 +1,5 @@ -T8958.hs:1:31: warning: +T8958.hs:2:31: warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. TYPE CONSTRUCTORS newtype Map{2} :: * -> * -> * @@ -13,10 +13,10 @@ DATA CONSTRUCTORS MkMap :: forall k v. [(k, v)] -> Map k v CLASS INSTANCES instance [incoherent] Representational a - -- Defined at T8958.hs:10:10 - instance [incoherent] Nominal a -- Defined at T8958.hs:7:10 + -- Defined at T8958.hs:11:10 + instance [incoherent] Nominal a -- Defined at T8958.hs:8:10 Dependent modules: [] -Dependent packages: [base-4.15.0.0, ghc-bignum-1.0, ghc-prim-0.7.0] +Dependent packages: [base-4.16.0.0, ghc-bignum-1.0, ghc-prim-0.8.0] ==================== Typechecker ==================== T8958.$tcMap diff --git a/testsuite/tests/roles/should_fail/Roles12.hs b/testsuite/tests/roles/should_fail/Roles12.hs index 0942a0be41..a31bf6534c 100644 --- a/testsuite/tests/roles/should_fail/Roles12.hs +++ b/testsuite/tests/roles/should_fail/Roles12.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Roles12 where import Roles12a diff --git a/testsuite/tests/roles/should_fail/Roles12.hs-boot b/testsuite/tests/roles/should_fail/Roles12.hs-boot index 6a708d984a..a78daefb53 100644 --- a/testsuite/tests/roles/should_fail/Roles12.hs-boot +++ b/testsuite/tests/roles/should_fail/Roles12.hs-boot @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Roles12 where -data T a
\ No newline at end of file +data T a diff --git a/testsuite/tests/roles/should_fail/Roles12.stderr b/testsuite/tests/roles/should_fail/Roles12.stderr index ec3bff4182..b4d7499fe9 100644 --- a/testsuite/tests/roles/should_fail/Roles12.stderr +++ b/testsuite/tests/roles/should_fail/Roles12.stderr @@ -1,5 +1,5 @@ -Roles12.hs:5:1: error: +Roles12.hs:6:1: error: Type constructor ‘T’ has conflicting definitions in the module and its hs-boot file Main module: type role T phantom diff --git a/testsuite/tests/roles/should_fail/Roles12a.hs b/testsuite/tests/roles/should_fail/Roles12a.hs index a7c02c5fcd..3a00c4f635 100644 --- a/testsuite/tests/roles/should_fail/Roles12a.hs +++ b/testsuite/tests/roles/should_fail/Roles12a.hs @@ -1,2 +1,3 @@ +{-# LANGUAGE Haskell2010 #-} module Roles12a where import {-# SOURCE #-} Roles12 diff --git a/testsuite/tests/roles/should_fail/T9204.hs b/testsuite/tests/roles/should_fail/T9204.hs index 52befcac20..fe2c81121e 100644 --- a/testsuite/tests/roles/should_fail/T9204.hs +++ b/testsuite/tests/roles/should_fail/T9204.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T9204 where diff --git a/testsuite/tests/roles/should_fail/T9204.hs-boot b/testsuite/tests/roles/should_fail/T9204.hs-boot index 7ee0f1db3e..3606c82d7e 100644 --- a/testsuite/tests/roles/should_fail/T9204.hs-boot +++ b/testsuite/tests/roles/should_fail/T9204.hs-boot @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T9204 where diff --git a/testsuite/tests/roles/should_fail/T9204.stderr b/testsuite/tests/roles/should_fail/T9204.stderr index 0e8cbf4524..c54df4870c 100644 --- a/testsuite/tests/roles/should_fail/T9204.stderr +++ b/testsuite/tests/roles/should_fail/T9204.stderr @@ -1,5 +1,5 @@ -T9204.hs:6:1: error: +T9204.hs:7:1: error: Type constructor ‘D’ has conflicting definitions in the module and its hs-boot file Main module: type role D phantom diff --git a/testsuite/tests/roles/should_fail/T9204a.hs b/testsuite/tests/roles/should_fail/T9204a.hs index a57e2b28a2..a290f1a1bf 100644 --- a/testsuite/tests/roles/should_fail/T9204a.hs +++ b/testsuite/tests/roles/should_fail/T9204a.hs @@ -1,2 +1,3 @@ +{-# LANGUAGE Haskell2010 #-} module T9204a where import {-# SOURCE #-} T9204 diff --git a/testsuite/tests/safeHaskell/check/Check01.hs b/testsuite/tests/safeHaskell/check/Check01.hs index 1d5df588a4..4d54accbf2 100644 --- a/testsuite/tests/safeHaskell/check/Check01.hs +++ b/testsuite/tests/safeHaskell/check/Check01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fpackage-trust #-} {-# LANGUAGE Unsafe #-} module Check01 ( main' ) where diff --git a/testsuite/tests/safeHaskell/check/Check01.stderr b/testsuite/tests/safeHaskell/check/Check01.stderr index 5c8b8a3da5..b63d8d4a10 100644 --- a/testsuite/tests/safeHaskell/check/Check01.stderr +++ b/testsuite/tests/safeHaskell/check/Check01.stderr @@ -1,4 +1,4 @@ [3 of 3] Compiling Check01 ( Check01.hs, Check01.o ) <no location info>: error: - The package (base-4.13.0.0) is required to be trusted but it isn't! + The package (base-4.16.0.0) is required to be trusted but it isn't! diff --git a/testsuite/tests/safeHaskell/check/Check01_A.hs b/testsuite/tests/safeHaskell/check/Check01_A.hs index 8b318a5124..44623da44d 100644 --- a/testsuite/tests/safeHaskell/check/Check01_A.hs +++ b/testsuite/tests/safeHaskell/check/Check01_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Check01_A ( trace diff --git a/testsuite/tests/safeHaskell/check/Check01_B.hs b/testsuite/tests/safeHaskell/check/Check01_B.hs index b584e51b97..7f2529e481 100644 --- a/testsuite/tests/safeHaskell/check/Check01_B.hs +++ b/testsuite/tests/safeHaskell/check/Check01_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- Since Safe we require base package be trusted to compile diff --git a/testsuite/tests/safeHaskell/check/Check02.hs b/testsuite/tests/safeHaskell/check/Check02.hs index 50e64b79e8..83d971dc9f 100644 --- a/testsuite/tests/safeHaskell/check/Check02.hs +++ b/testsuite/tests/safeHaskell/check/Check02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} module Check02 ( main' ) where diff --git a/testsuite/tests/safeHaskell/check/Check02_A.hs b/testsuite/tests/safeHaskell/check/Check02_A.hs index d43dab727a..709161892e 100644 --- a/testsuite/tests/safeHaskell/check/Check02_A.hs +++ b/testsuite/tests/safeHaskell/check/Check02_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Check02_A ( trace diff --git a/testsuite/tests/safeHaskell/check/Check02_B.hs b/testsuite/tests/safeHaskell/check/Check02_B.hs index 10d45ccfbb..70813b22ce 100644 --- a/testsuite/tests/safeHaskell/check/Check02_B.hs +++ b/testsuite/tests/safeHaskell/check/Check02_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- Since Safe we require base package be trusted to compile diff --git a/testsuite/tests/safeHaskell/check/Check03.hs b/testsuite/tests/safeHaskell/check/Check03.hs index 71d158d7f6..5e9d2b4cb4 100644 --- a/testsuite/tests/safeHaskell/check/Check03.hs +++ b/testsuite/tests/safeHaskell/check/Check03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} module Check03 where diff --git a/testsuite/tests/safeHaskell/check/Check03_A.hs b/testsuite/tests/safeHaskell/check/Check03_A.hs index e7b8d75d03..7dfec4fdab 100644 --- a/testsuite/tests/safeHaskell/check/Check03_A.hs +++ b/testsuite/tests/safeHaskell/check/Check03_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Check03_A ( trace diff --git a/testsuite/tests/safeHaskell/check/Check03_B.hs b/testsuite/tests/safeHaskell/check/Check03_B.hs index bce45af4e5..dc274e0638 100644 --- a/testsuite/tests/safeHaskell/check/Check03_B.hs +++ b/testsuite/tests/safeHaskell/check/Check03_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- Since Safe we require base package be trusted to compile diff --git a/testsuite/tests/safeHaskell/check/Check04.hs b/testsuite/tests/safeHaskell/check/Check04.hs index 2f6e94b3d5..de277d651f 100644 --- a/testsuite/tests/safeHaskell/check/Check04.hs +++ b/testsuite/tests/safeHaskell/check/Check04.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} module Main ( main ) where diff --git a/testsuite/tests/safeHaskell/check/Check04_A.hs b/testsuite/tests/safeHaskell/check/Check04_A.hs index 3f6b5f00e9..fc7b6165dd 100644 --- a/testsuite/tests/safeHaskell/check/Check04_A.hs +++ b/testsuite/tests/safeHaskell/check/Check04_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Check04_A ( trace diff --git a/testsuite/tests/safeHaskell/check/Check04_B.hs b/testsuite/tests/safeHaskell/check/Check04_B.hs index 5280c51fad..20f9b4731b 100644 --- a/testsuite/tests/safeHaskell/check/Check04_B.hs +++ b/testsuite/tests/safeHaskell/check/Check04_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- Since Safe we require base package be trusted to compile diff --git a/testsuite/tests/safeHaskell/check/Check06.hs b/testsuite/tests/safeHaskell/check/Check06.hs index 99649fa079..30c5955300 100644 --- a/testsuite/tests/safeHaskell/check/Check06.hs +++ b/testsuite/tests/safeHaskell/check/Check06.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy, NoImplicitPrelude #-} {-# OPTIONS_GHC -fpackage-trust #-} diff --git a/testsuite/tests/safeHaskell/check/Check06_A.hs b/testsuite/tests/safeHaskell/check/Check06_A.hs index 4cda329fec..f2c00ff3ab 100644 --- a/testsuite/tests/safeHaskell/check/Check06_A.hs +++ b/testsuite/tests/safeHaskell/check/Check06_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- safe inferred, with requirement base is trusted module Check06_A where diff --git a/testsuite/tests/safeHaskell/check/Check08.hs b/testsuite/tests/safeHaskell/check/Check08.hs index dde6908f30..da1aa6a50b 100644 --- a/testsuite/tests/safeHaskell/check/Check08.hs +++ b/testsuite/tests/safeHaskell/check/Check08.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy, NoImplicitPrelude #-} {-# OPTIONS_GHC -fpackage-trust #-} diff --git a/testsuite/tests/safeHaskell/check/Check08.stderr b/testsuite/tests/safeHaskell/check/Check08.stderr index d83ad784fd..9eb6691bc8 100644 --- a/testsuite/tests/safeHaskell/check/Check08.stderr +++ b/testsuite/tests/safeHaskell/check/Check08.stderr @@ -3,4 +3,4 @@ [3 of 3] Compiling Check08 ( Check08.hs, Check08.o ) <no location info>: error: - The package (base-4.13.0.0) is required to be trusted but it isn't! + The package (base-4.16.0.0) is required to be trusted but it isn't! diff --git a/testsuite/tests/safeHaskell/check/Check08_A.hs b/testsuite/tests/safeHaskell/check/Check08_A.hs index 4438a34e09..601bf518e4 100644 --- a/testsuite/tests/safeHaskell/check/Check08_A.hs +++ b/testsuite/tests/safeHaskell/check/Check08_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE NoImplicitPrelude #-} -- safe inferred, with no pkg trust reqs diff --git a/testsuite/tests/safeHaskell/check/Check08_B.hs b/testsuite/tests/safeHaskell/check/Check08_B.hs index 42d01f2b33..484f8dccec 100644 --- a/testsuite/tests/safeHaskell/check/Check08_B.hs +++ b/testsuite/tests/safeHaskell/check/Check08_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- safe inferred, with requirement base is trusted module Check08_B where diff --git a/testsuite/tests/safeHaskell/check/Check09.hs b/testsuite/tests/safeHaskell/check/Check09.hs index cb04dada0f..2770323517 100644 --- a/testsuite/tests/safeHaskell/check/Check09.hs +++ b/testsuite/tests/safeHaskell/check/Check09.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Check09 where diff --git a/testsuite/tests/safeHaskell/check/Check09.stderr b/testsuite/tests/safeHaskell/check/Check09.stderr index 6d1e031075..14af3c8f8b 100644 --- a/testsuite/tests/safeHaskell/check/Check09.stderr +++ b/testsuite/tests/safeHaskell/check/Check09.stderr @@ -1,8 +1,8 @@ -Check09.hs:4:1: error: +Check09.hs:5:1: error: Prelude: Can't be safely imported! - The package (base-4.13.0.0) the module resides in isn't trusted. + The package (base-4.16.0.0) the module resides in isn't trusted. -Check09.hs:5:1: error: +Check09.hs:6:1: error: Data.ByteString.Char8: Can't be safely imported! - The package (bytestring-0.10.9.0) the module resides in isn't trusted. + The package (bytestring-0.10.12.0) the module resides in isn't trusted. diff --git a/testsuite/tests/safeHaskell/check/Check10.hs b/testsuite/tests/safeHaskell/check/Check10.hs index e72e5f3886..67c04b7236 100644 --- a/testsuite/tests/safeHaskell/check/Check10.hs +++ b/testsuite/tests/safeHaskell/check/Check10.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Check10 where diff --git a/testsuite/tests/safeHaskell/check/CheckB.hs b/testsuite/tests/safeHaskell/check/CheckB.hs index 7e649a1598..98faadc79e 100644 --- a/testsuite/tests/safeHaskell/check/CheckB.hs +++ b/testsuite/tests/safeHaskell/check/CheckB.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- Since Safe we require base package be trusted to compile diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.hs index 107881b2d8..630c8bcef2 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} module ImpSafe01 ( MyWord ) where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.stderr index 5e4918e66f..0381edfccb 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.stderr +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.stderr @@ -1,4 +1,4 @@ -ImpSafe01.hs:9:1: error: +ImpSafe01.hs:10:1: error: Data.Word: Can't be safely imported! - The package (base-4.13.0.0) the module resides in isn't trusted. + The package (base-4.16.0.0) the module resides in isn't trusted. diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe02.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe02.hs index c6ba0968d0..c27c62fa1c 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe02.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} module ImpSafe02 ( MyWord ) where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03.hs index 485e9e238c..989fa1ed2e 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03_A.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03_A.hs index 06f5d39754..63f121f7ea 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03_A.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module ImpSafe03_A where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.hs index 3a8882905f..831d1b2bc1 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} module ImpSafe04 ( MyWord ) where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.stderr index cf9f32de45..a0445afd23 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.stderr +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.stderr @@ -1,4 +1,4 @@ -ImpSafe04.hs:9:1: error: +ImpSafe04.hs:10:1: error: Data.Word: Can't be safely imported! - The package (base-4.13.0.0) the module resides in isn't trusted. + The package (base-4.16.0.0) the module resides in isn't trusted. diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly01.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly01.hs index 2143d3139b..4a7364db8e 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly01.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly02.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly02.hs index 27281b9cce..460ee1771e 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly02.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.hs index d09e39937d..ea200510fe 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.stderr index 1afb523f9a..aef125b2ef 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.stderr +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.stderr @@ -1,4 +1,4 @@ -ImpSafeOnly03.hs:4:1: +ImpSafeOnly03.hs:5:1: error: M_SafePkg3: Can't be safely imported! The package (safePkg01-1.0) the module resides in isn't trusted. diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly04.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly04.hs index d09e39937d..ea200510fe 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly04.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly04.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.hs index be577d1ccc..e7c8403d97 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.stderr index 28826c8b16..7e854073bf 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.stderr +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.stderr @@ -1,4 +1,4 @@ -ImpSafeOnly05.hs:4:1: +ImpSafeOnly05.hs:5:1: error: M_SafePkg5: Can't be safely imported! The package (safePkg01-1.0) the module resides in isn't trusted. diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly06.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly06.hs index be577d1ccc..e7c8403d97 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly06.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly06.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.hs index 975cff482a..5b4b5a4199 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.hs index b81abf9ccb..d7bbdebb56 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly09.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly09.hs index 9311f26a89..dd89994e80 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly09.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly09.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Main where diff --git a/testsuite/tests/safeHaskell/flags/Flags02.hs b/testsuite/tests/safeHaskell/flags/Flags02.hs index 072d4509a1..080791133b 100644 --- a/testsuite/tests/safeHaskell/flags/Flags02.hs +++ b/testsuite/tests/safeHaskell/flags/Flags02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -pgmdll pgmdll, -I., -L., -Uggg, -Dggg, -with-rtsopts full #-} -- | These are all flags that should be allowed diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags01.hs b/testsuite/tests/safeHaskell/flags/SafeFlags01.hs index f5790eba64..37f3e18917 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags01.hs +++ b/testsuite/tests/safeHaskell/flags/SafeFlags01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Basic test to see if Safe flags compiles diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags11.hs b/testsuite/tests/safeHaskell/flags/SafeFlags11.hs index e90b105dde..aded57d931 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags11.hs +++ b/testsuite/tests/safeHaskell/flags/SafeFlags11.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE Safe #-} diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags17.hs b/testsuite/tests/safeHaskell/flags/SafeFlags17.hs index 9bbd7a0550..f991c17443 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags17.hs +++ b/testsuite/tests/safeHaskell/flags/SafeFlags17.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# OPTIONS_GHC -fpackage-trust #-} -- | Basic test to see if Safe flags compiles diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags17.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags17.stderr index 4f8eae80b9..4ce52ce072 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags17.stderr +++ b/testsuite/tests/safeHaskell/flags/SafeFlags17.stderr @@ -1,4 +1,4 @@ -SafeFlags17.hs:4:8: error: +SafeFlags17.hs:5:8: error: Prelude: Can't be safely imported! - The package (base-4.13.0.0) the module resides in isn't trusted. + The package (base-4.16.0.0) the module resides in isn't trusted. diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags20.hs b/testsuite/tests/safeHaskell/flags/SafeFlags20.hs index 8d415c1a09..01a7074ea0 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags20.hs +++ b/testsuite/tests/safeHaskell/flags/SafeFlags20.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# OPTIONS_GHC -fpackage-trust #-} -- | Basic test to see if Safe flags compiles diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags21.hs b/testsuite/tests/safeHaskell/flags/SafeFlags21.hs index 5169a03583..7efc24b6ed 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags21.hs +++ b/testsuite/tests/safeHaskell/flags/SafeFlags21.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} -- | Basic test to see if Safe warning flags compile -- Warn if module is inferred unsafe diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags22.hs b/testsuite/tests/safeHaskell/flags/SafeFlags22.hs index 3d5d8dc1af..4411f3d1a2 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags22.hs +++ b/testsuite/tests/safeHaskell/flags/SafeFlags22.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} -- | Basic test to see if Safe warning flags compile -- Warn if module is inferred unsafe diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags22.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags22.stderr index 42d10b32c8..9d93e5e332 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags22.stderr +++ b/testsuite/tests/safeHaskell/flags/SafeFlags22.stderr @@ -1,7 +1,7 @@ -SafeFlags22.hs:1:16: warning: [-Wunsafe] +SafeFlags22.hs:2:16: warning: [-Wunsafe] ‘SafeFlags22’ has been inferred as unsafe! Reason: - SafeFlags22.hs:7:1: error: + SafeFlags22.hs:8:1: error: System.IO.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags23.hs b/testsuite/tests/safeHaskell/flags/SafeFlags23.hs index b3180bc1e1..854ea0a856 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags23.hs +++ b/testsuite/tests/safeHaskell/flags/SafeFlags23.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} -- | Basic test to see if Safe warning flags compile -- Warn if module is inferred unsafe diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags23.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags23.stderr index ea03484823..6fef7a3e4c 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags23.stderr +++ b/testsuite/tests/safeHaskell/flags/SafeFlags23.stderr @@ -1,7 +1,7 @@ -SafeFlags23.hs:1:16: error: [-Wunsafe, -Werror=unsafe] +SafeFlags23.hs:2:16: error: [-Wunsafe, -Werror=unsafe] ‘SafeFlags22’ has been inferred as unsafe! Reason: - SafeFlags23.hs:7:1: error: + SafeFlags23.hs:8:1: error: System.IO.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags25.hs b/testsuite/tests/safeHaskell/flags/SafeFlags25.hs index 7d650d6a72..f8d7ff292a 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags25.hs +++ b/testsuite/tests/safeHaskell/flags/SafeFlags25.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-safe #-} -- | Basic test to see if Safe warning flags compile -- Warn if module is inferred safe diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags25.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags25.stderr index bf82025b4c..e26a813e83 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags25.stderr +++ b/testsuite/tests/safeHaskell/flags/SafeFlags25.stderr @@ -1,3 +1,3 @@ -SafeFlags25.hs:1:16: warning: [-Wsafe] +SafeFlags25.hs:2:16: warning: [-Wsafe] ‘SafeFlags25’ has been inferred as safe! diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags26.hs b/testsuite/tests/safeHaskell/flags/SafeFlags26.hs index 45b65f3d9e..faf116c01f 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags26.hs +++ b/testsuite/tests/safeHaskell/flags/SafeFlags26.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-safe -Werror #-} -- | Basic test to see if Safe warning flags compile -- Warn if module is inferred safe diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags26.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags26.stderr index 45047aa019..dabbd92c00 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags26.stderr +++ b/testsuite/tests/safeHaskell/flags/SafeFlags26.stderr @@ -1,3 +1,3 @@ -SafeFlags26.hs:1:16: error: [-Wsafe, -Werror=safe] +SafeFlags26.hs:2:16: error: [-Wsafe, -Werror=safe] ‘SafeFlags26’ has been inferred as safe! diff --git a/testsuite/tests/safeHaskell/flags/all.T b/testsuite/tests/safeHaskell/flags/all.T index b92067d372..ed7ca4f88d 100644 --- a/testsuite/tests/safeHaskell/flags/all.T +++ b/testsuite/tests/safeHaskell/flags/all.T @@ -59,8 +59,8 @@ test('SafeFlags28', normal, compile_fail, ['']) test('SafeFlags29', normal, compile_fail, ['']) # test certain flags are still allowed under -XSafe -test('Flags01', normal, compile, ['-XSafe']) -test('Flags02', normal, compile, ['-XSafe']) +test('Flags01', normal, compile, ['-XHaskell2010 -XSafe']) +test('Flags02', normal, compile, ['-XHaskell2010 -XSafe']) test('SafeFlags30', normal, compile_fail, ['']) diff --git a/testsuite/tests/safeHaskell/ghci/all.T b/testsuite/tests/safeHaskell/ghci/all.T index 26f72d20b8..fac80f36c0 100644 --- a/testsuite/tests/safeHaskell/ghci/all.T +++ b/testsuite/tests/safeHaskell/ghci/all.T @@ -18,6 +18,6 @@ test('p16', normal, ghci_script, ['p16.script']) test('p17', normalise_version("bytestring"), ghci_script, ['p17.script']) # 7172 test('p18', normalise_version("bytestring"), ghci_script, ['p18.script']) -test('T12509', [extra_hc_opts('-XSafe')], ghci_script, ['T12509.script']) +test('T12509', [extra_hc_opts('-XNoGeneralizedNewtypeDeriving -XSafe')], ghci_script, ['T12509.script']) test('T19243', normal, ghci_script, ['T19243.script']) diff --git a/testsuite/tests/safeHaskell/ghci/p1.script b/testsuite/tests/safeHaskell/ghci/p1.script index 3c55ad7208..caa5eb8383 100644 --- a/testsuite/tests/safeHaskell/ghci/p1.script +++ b/testsuite/tests/safeHaskell/ghci/p1.script @@ -1,4 +1,5 @@ -- Test disabled language extensions +:set -XHaskell2010 :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p10.script b/testsuite/tests/safeHaskell/ghci/p10.script index e1cefae496..4baa1aa631 100644 --- a/testsuite/tests/safeHaskell/ghci/p10.script +++ b/testsuite/tests/safeHaskell/ghci/p10.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test load works :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p10.stderr b/testsuite/tests/safeHaskell/ghci/p10.stderr index fdb45da711..d3c7fe2f5e 100644 --- a/testsuite/tests/safeHaskell/ghci/p10.stderr +++ b/testsuite/tests/safeHaskell/ghci/p10.stderr @@ -1,2 +1,2 @@ -<interactive>:9:1: error: Variable not in scope: b +<interactive>:10:1: error: Variable not in scope: b diff --git a/testsuite/tests/safeHaskell/ghci/p11.script b/testsuite/tests/safeHaskell/ghci/p11.script index 19fb759600..f4aaaf8336 100644 --- a/testsuite/tests/safeHaskell/ghci/p11.script +++ b/testsuite/tests/safeHaskell/ghci/p11.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test load works :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p12.script b/testsuite/tests/safeHaskell/ghci/p12.script index 486302e8ed..df003ecbda 100644 --- a/testsuite/tests/safeHaskell/ghci/p12.script +++ b/testsuite/tests/safeHaskell/ghci/p12.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test you can't unset options :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p13.script b/testsuite/tests/safeHaskell/ghci/p13.script index 950f95ab67..0336061b0c 100644 --- a/testsuite/tests/safeHaskell/ghci/p13.script +++ b/testsuite/tests/safeHaskell/ghci/p13.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test restricted functionality: Overlapping :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p13.stderr b/testsuite/tests/safeHaskell/ghci/p13.stderr index 7ba149a36b..ba73130146 100644 --- a/testsuite/tests/safeHaskell/ghci/p13.stderr +++ b/testsuite/tests/safeHaskell/ghci/p13.stderr @@ -1,13 +1,13 @@ -<interactive>:10:1: error: - Unsafe overlapping instances for Pos [Int] - arising from a use of ‘res’ - The matching instance is: - instance [overlapping] [safe] Pos [Int] - -- Defined at <interactive>:8:30 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance [safe] Pos [a] -- Defined at P13_A.hs:6:10 - In the expression: res [1 :: Int, 2 :: Int] - In an equation for ‘it’: it = res [1 :: Int, 2 :: Int] +<interactive>:11:1: error: + • Unsafe overlapping instances for Pos [Int] + arising from a use of ‘res’ + The matching instance is: + instance [overlapping] [safe] Pos [Int] + -- Defined at <interactive>:9:30 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance [safe] Pos [a] -- Defined at P13_A.hs:6:10 + • In the expression: res [1 :: Int, 2 :: Int] + In an equation for ‘it’: it = res [1 :: Int, 2 :: Int] diff --git a/testsuite/tests/safeHaskell/ghci/p14.script b/testsuite/tests/safeHaskell/ghci/p14.script index 4802faf940..909b512c39 100644 --- a/testsuite/tests/safeHaskell/ghci/p14.script +++ b/testsuite/tests/safeHaskell/ghci/p14.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test restricted functionality: RULES :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p14.stderr b/testsuite/tests/safeHaskell/ghci/p14.stderr index 736e8b448c..3e0ac0ae46 100644 --- a/testsuite/tests/safeHaskell/ghci/p14.stderr +++ b/testsuite/tests/safeHaskell/ghci/p14.stderr @@ -1,5 +1,5 @@ -<interactive>:9:25: error: +<interactive>:10:25: error: • No instance for (Num a) arising from a use of ‘f’ Possible fix: add (Num a) to the context of the RULE "id/Int" • In the expression: f diff --git a/testsuite/tests/safeHaskell/ghci/p16.script b/testsuite/tests/safeHaskell/ghci/p16.script index 2bcea65c95..a4b829c9d8 100644 --- a/testsuite/tests/safeHaskell/ghci/p16.script +++ b/testsuite/tests/safeHaskell/ghci/p16.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test restricted functionality: GeneralizedNewtypeDeriving :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p16.stderr b/testsuite/tests/safeHaskell/ghci/p16.stderr index 52315cce17..36ee15327d 100644 --- a/testsuite/tests/safeHaskell/ghci/p16.stderr +++ b/testsuite/tests/safeHaskell/ghci/p16.stderr @@ -2,14 +2,14 @@ <no location info>: warning: -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving -<interactive>:15:29: error: +<interactive>:16:29: error: • Can't make a derived instance of ‘Op T2’: ‘Op’ is not a stock derivable class (Eq, Show, etc.) Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension • In the newtype declaration for ‘T2’ -<interactive>:18:9: error: +<interactive>:19:9: error: • Data constructor not in scope: T2 :: T -> t - • Perhaps you meant ‘T1’ (line 12) + • Perhaps you meant ‘T1’ (line 13) -<interactive>:21:4: error: Variable not in scope: y +<interactive>:22:4: error: Variable not in scope: y diff --git a/testsuite/tests/safeHaskell/ghci/p17.script b/testsuite/tests/safeHaskell/ghci/p17.script index c9821d4e17..1402ff1d21 100644 --- a/testsuite/tests/safeHaskell/ghci/p17.script +++ b/testsuite/tests/safeHaskell/ghci/p17.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test bad imports :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p2.script b/testsuite/tests/safeHaskell/ghci/p2.script index 188915579e..7eab1d425f 100644 --- a/testsuite/tests/safeHaskell/ghci/p2.script +++ b/testsuite/tests/safeHaskell/ghci/p2.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test bad options :unset +s diff --git a/testsuite/tests/safeHaskell/ghci/p3.script b/testsuite/tests/safeHaskell/ghci/p3.script index c2d9061739..9d34af8c4d 100644 --- a/testsuite/tests/safeHaskell/ghci/p3.script +++ b/testsuite/tests/safeHaskell/ghci/p3.script @@ -1,3 +1,5 @@ +:set -XHaskell2010 + -- Test bad imports :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p4.script b/testsuite/tests/safeHaskell/ghci/p4.script index 8d78f40679..ae08ed619c 100644 --- a/testsuite/tests/safeHaskell/ghci/p4.script +++ b/testsuite/tests/safeHaskell/ghci/p4.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test bad direct calls :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p4.stderr b/testsuite/tests/safeHaskell/ghci/p4.stderr index 1d416eba39..621960f9e2 100644 --- a/testsuite/tests/safeHaskell/ghci/p4.stderr +++ b/testsuite/tests/safeHaskell/ghci/p4.stderr @@ -1,9 +1,8 @@ -<interactive>:5:9: error: +<interactive>:6:9: error: Not in scope: ‘System.IO.Unsafe.unsafePerformIO’ No module named ‘System.IO.Unsafe’ is imported. -<interactive>:6:9: error: - Variable not in scope: x :: IO b0 -> t +<interactive>:7:9: error: Variable not in scope: x :: IO b0 -> t -<interactive>:7:1: error: Variable not in scope: y +<interactive>:8:1: error: Variable not in scope: y diff --git a/testsuite/tests/safeHaskell/ghci/p5.script b/testsuite/tests/safeHaskell/ghci/p5.script index cdf6088812..b42973e0fe 100644 --- a/testsuite/tests/safeHaskell/ghci/p5.script +++ b/testsuite/tests/safeHaskell/ghci/p5.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test unsetting safe :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p6.script b/testsuite/tests/safeHaskell/ghci/p6.script index 8590fd6449..2e326acd74 100644 --- a/testsuite/tests/safeHaskell/ghci/p6.script +++ b/testsuite/tests/safeHaskell/ghci/p6.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test restricted functionality: FFI :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p6.stderr b/testsuite/tests/safeHaskell/ghci/p6.stderr index 6213243bb0..d8dc09a996 100644 --- a/testsuite/tests/safeHaskell/ghci/p6.stderr +++ b/testsuite/tests/safeHaskell/ghci/p6.stderr @@ -1,10 +1,10 @@ -<interactive>:11:1: error: +<interactive>:12:1: error: • Unacceptable result type in foreign declaration: Safe Haskell is on, all FFI imports must be in the IO monad • When checking declaration: foreign import ccall safe "sin" c_sin :: Double -> Double -<interactive>:12:1: error: +<interactive>:13:1: error: • Variable not in scope: c_sin :: t0 -> t - • Perhaps you meant ‘c_sin'’ (line 7) + • Perhaps you meant ‘c_sin'’ (line 8) diff --git a/testsuite/tests/safeHaskell/ghci/p7.script b/testsuite/tests/safeHaskell/ghci/p7.script index ea4190b0a4..9aba5c55e7 100644 --- a/testsuite/tests/safeHaskell/ghci/p7.script +++ b/testsuite/tests/safeHaskell/ghci/p7.script @@ -1,3 +1,5 @@ +:set -XHaskell2010 + -- Test load works :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p8.script b/testsuite/tests/safeHaskell/ghci/p8.script index 7d5101f226..49e905bd45 100644 --- a/testsuite/tests/safeHaskell/ghci/p8.script +++ b/testsuite/tests/safeHaskell/ghci/p8.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test load works :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p9.script b/testsuite/tests/safeHaskell/ghci/p9.script index 298944dcae..b8d5f0bf13 100644 --- a/testsuite/tests/safeHaskell/ghci/p9.script +++ b/testsuite/tests/safeHaskell/ghci/p9.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test load works :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p9.stderr b/testsuite/tests/safeHaskell/ghci/p9.stderr index fdb45da711..d3c7fe2f5e 100644 --- a/testsuite/tests/safeHaskell/ghci/p9.stderr +++ b/testsuite/tests/safeHaskell/ghci/p9.stderr @@ -1,2 +1,2 @@ -<interactive>:9:1: error: Variable not in scope: b +<interactive>:10:1: error: Variable not in scope: b diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.hs index beaf3881f5..896ddbff39 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.stderr index 20349c6024..54dab18cd3 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.stderr +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.stderr @@ -2,14 +2,15 @@ [2 of 3] Compiling SH_Overlap1_A ( SH_Overlap1_A.hs, SH_Overlap1_A.o ) [3 of 3] Compiling SH_Overlap1 ( SH_Overlap1.hs, SH_Overlap1.o ) -SH_Overlap1.hs:15:8: error: - Unsafe overlapping instances for C [Int] arising from a use of ‘f’ - The matching instance is: - instance [overlap ok] [safe] C [Int] - -- Defined at SH_Overlap1_A.hs:11:3 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance C [a] -- Defined at SH_Overlap1.hs:11:3 - In the expression: f ([1, 2, 3, 4] :: [Int]) - In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) +SH_Overlap1.hs:16:8: error: + • Unsafe overlapping instances for C [Int] + arising from a use of ‘f’ + The matching instance is: + instance [overlap ok] [safe] C [Int] + -- Defined at SH_Overlap1_A.hs:12:3 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance C [a] -- Defined at SH_Overlap1.hs:12:3 + • In the expression: f ([1, 2, 3, 4] :: [Int]) + In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap10.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap10.hs index 7c5e5a1929..8f455d0501 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap10.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap10.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_A.hs index 76d0b2ea9e..551088edbd 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap10_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_B.hs index 1efb86c064..72a9dc5a1e 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} module SH_Overlap10_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.hs index f591c0a188..2c336ed037 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.stderr index aca02ef4a9..9eb029951f 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.stderr +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.stderr @@ -2,18 +2,18 @@ [2 of 3] Compiling SH_Overlap11_A ( SH_Overlap11_A.hs, SH_Overlap11_A.o ) [3 of 3] Compiling SH_Overlap11 ( SH_Overlap11.hs, SH_Overlap11.o ) -SH_Overlap11.hs:1:16: warning: [-Wunsafe] +SH_Overlap11.hs:2:16: warning: [-Wunsafe] ‘SH_Overlap11’ has been inferred as unsafe! Reason: - SH_Overlap11.hs:17:8: warning: + SH_Overlap11.hs:18:8: warning: • Unsafe overlapping instances for C [Int] arising from a use of ‘f’ The matching instance is: instance [overlap ok] [safe] C [Int] - -- Defined at SH_Overlap11_A.hs:11:3 + -- Defined at SH_Overlap11_A.hs:12:3 It is compiled in a Safe module and as such can only overlap instances from the same module, however it overlaps the following instances from different modules: - instance C [a] -- Defined at SH_Overlap11.hs:13:3 + instance C [a] -- Defined at SH_Overlap11.hs:14:3 • In the expression: f ([1, 2, 3, 4] :: [Int]) In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_A.hs index 100a9f30db..6f834cae24 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap11_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_B.hs index 63ba1d7c6f..4d1e226a96 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} module SH_Overlap11_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_A.hs index d231bc9365..6a8a2c2970 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap1_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_B.hs index 1dbb59b6b4..fb2e648854 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SH_Overlap1_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.hs index 5df87abcab..9ce118d9cb 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.stderr index b4f15515b0..2eed7608d1 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.stderr +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.stderr @@ -2,14 +2,15 @@ [2 of 3] Compiling SH_Overlap2_A ( SH_Overlap2_A.hs, SH_Overlap2_A.o ) [3 of 3] Compiling SH_Overlap2 ( SH_Overlap2.hs, SH_Overlap2.o ) -SH_Overlap2.hs:18:8: error: - Unsafe overlapping instances for C [Int] arising from a use of ‘f’ - The matching instance is: - instance [overlap ok] [safe] C [Int] - -- Defined at SH_Overlap2_A.hs:11:3 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance C [a] -- Defined at SH_Overlap2.hs:14:3 - In the expression: f ([1, 2, 3, 4] :: [Int]) - In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) +SH_Overlap2.hs:19:8: error: + • Unsafe overlapping instances for C [Int] + arising from a use of ‘f’ + The matching instance is: + instance [overlap ok] [safe] C [Int] + -- Defined at SH_Overlap2_A.hs:12:3 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance C [a] -- Defined at SH_Overlap2.hs:15:3 + • In the expression: f ([1, 2, 3, 4] :: [Int]) + In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_A.hs index 2510818e06..2e2be0bd56 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap2_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_B.hs index fcd8ef8f56..0fbb784ff2 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SH_Overlap2_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap3.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap3.hs index 8ffa53f84b..019c315db3 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap3.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap3.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_A.hs index 0a3393ef4d..50eedd6e1a 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap3_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_B.hs index 4908d73427..12d6d5103d 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SH_Overlap3_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap4.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap4.hs index 0d9f445080..a9951fac94 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap4.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap4.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_A.hs index bb1625e222..a0caa60cfb 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap4_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_B.hs index 2a53fff8c6..56f974fd06 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SH_Overlap4_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.hs index 185946d56f..79b5567580 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.stderr index 8c2bc7df9d..9de7ecc708 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.stderr +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.stderr @@ -2,14 +2,15 @@ [2 of 3] Compiling SH_Overlap5_A ( SH_Overlap5_A.hs, SH_Overlap5_A.o ) [3 of 3] Compiling SH_Overlap5 ( SH_Overlap5.hs, SH_Overlap5.o ) -SH_Overlap5.hs:15:8: error: - Unsafe overlapping instances for C [Int] arising from a use of ‘f’ - The matching instance is: - instance [overlap ok] [safe] C [Int] - -- Defined at SH_Overlap5_A.hs:11:3 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance [safe] C [a] -- Defined at SH_Overlap5.hs:11:3 - In the expression: f ([1, 2, 3, 4] :: [Int]) - In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) +SH_Overlap5.hs:16:8: error: + • Unsafe overlapping instances for C [Int] + arising from a use of ‘f’ + The matching instance is: + instance [overlap ok] [safe] C [Int] + -- Defined at SH_Overlap5_A.hs:12:3 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance [safe] C [a] -- Defined at SH_Overlap5.hs:12:3 + • In the expression: f ([1, 2, 3, 4] :: [Int]) + In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_A.hs index 71c6bac0f0..7032b16747 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap5_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_B.hs index e7e8102b98..3dc6ff18fc 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SH_Overlap5_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.hs index e38037ab8b..fa07f61e91 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.stderr index e5b7ac95d6..7804b9e5d5 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.stderr +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.stderr @@ -2,14 +2,15 @@ [2 of 3] Compiling SH_Overlap6_A ( SH_Overlap6_A.hs, SH_Overlap6_A.o ) [3 of 3] Compiling SH_Overlap6 ( SH_Overlap6.hs, SH_Overlap6.o ) -SH_Overlap6.hs:14:8: error: - Unsafe overlapping instances for C [Int] arising from a use of ‘f’ - The matching instance is: - instance [overlap ok] [safe] C [Int] - -- Defined at SH_Overlap6_A.hs:11:3 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance [safe] C [a] -- Defined at SH_Overlap6.hs:10:10 - In the expression: f ([1, 2, 3, 4] :: [Int]) - In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) +SH_Overlap6.hs:15:8: error: + • Unsafe overlapping instances for C [Int] + arising from a use of ‘f’ + The matching instance is: + instance [overlap ok] [safe] C [Int] + -- Defined at SH_Overlap6_A.hs:12:3 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance [safe] C [a] -- Defined at SH_Overlap6.hs:11:10 + • In the expression: f ([1, 2, 3, 4] :: [Int]) + In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_A.hs index 788c2f384b..b495e284f0 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap6_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_B.hs index 5ec45676e9..0a8a81156e 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} module SH_Overlap6_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.hs index e99e73fd41..179008744f 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr index 45701f2529..ce90de4c72 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr @@ -2,18 +2,18 @@ [2 of 3] Compiling SH_Overlap7_A ( SH_Overlap7_A.hs, SH_Overlap7_A.o ) [3 of 3] Compiling SH_Overlap7 ( SH_Overlap7.hs, SH_Overlap7.o ) -SH_Overlap7.hs:1:16: error: [-Wunsafe, -Werror=unsafe] +SH_Overlap7.hs:2:16: error: [-Wunsafe, -Werror=unsafe] ‘SH_Overlap7’ has been inferred as unsafe! Reason: - SH_Overlap7.hs:14:8: warning: + SH_Overlap7.hs:15:8: warning: • Unsafe overlapping instances for C [Int] arising from a use of ‘f’ The matching instance is: instance [overlap ok] [safe] C [Int] - -- Defined at SH_Overlap7_A.hs:12:3 + -- Defined at SH_Overlap7_A.hs:13:3 It is compiled in a Safe module and as such can only overlap instances from the same module, however it overlaps the following instances from different modules: - instance C [a] -- Defined at SH_Overlap7.hs:10:10 + instance C [a] -- Defined at SH_Overlap7.hs:11:10 • In the expression: f ([1, 2, 3, 4] :: [Int]) In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_A.hs index 972c5abf4e..3ad4c87641 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE Safe #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_B.hs index 382cad01c8..8e0121f9b7 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE Safe #-} module SH_Overlap7_B ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap8.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap8.hs index 6026769941..173c4ff03f 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap8.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap8.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap8_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap8_A.hs index 8c19b1acbd..3d437aaead 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap8_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap8_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap8_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap9.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap9.hs index 5ae00fa101..cdce1d9fcb 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap9.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap9.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-safe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_A.hs index 580bbda17b..608c937ce9 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap9_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_B.hs index 4cbf88692c..9db3e5a99f 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} module SH_Overlap9_B ( C(..) diff --git a/testsuite/tests/safeHaskell/safeInfered/Mixed02.hs b/testsuite/tests/safeHaskell/safeInfered/Mixed02.hs index 062c2db64d..165feca79b 100644 --- a/testsuite/tests/safeHaskell/safeInfered/Mixed02.hs +++ b/testsuite/tests/safeHaskell/safeInfered/Mixed02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} -- | Should fail compilation because we import Data.Word as safe and unsafe module Mixed02 where diff --git a/testsuite/tests/safeHaskell/safeInfered/Mixed02.stderr b/testsuite/tests/safeHaskell/safeInfered/Mixed02.stderr index b170a4550d..9fa48d4338 100644 --- a/testsuite/tests/safeHaskell/safeInfered/Mixed02.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/Mixed02.stderr @@ -1,3 +1,3 @@ -Mixed02.hs:5:1: +Mixed02.hs:6:1: error: Module DW is imported both as a safe and unsafe import! diff --git a/testsuite/tests/safeHaskell/safeInfered/Mixed03.hs b/testsuite/tests/safeHaskell/safeInfered/Mixed03.hs index fba39654d9..9212656d6c 100644 --- a/testsuite/tests/safeHaskell/safeInfered/Mixed03.hs +++ b/testsuite/tests/safeHaskell/safeInfered/Mixed03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} -- | Should fail compilation because we import Data.Word as safe and unsafe module Mixed03 where diff --git a/testsuite/tests/safeHaskell/safeInfered/Mixed03.stderr b/testsuite/tests/safeHaskell/safeInfered/Mixed03.stderr index 4f4dcccbcf..0a9523ca33 100644 --- a/testsuite/tests/safeHaskell/safeInfered/Mixed03.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/Mixed03.stderr @@ -1,3 +1,3 @@ -Mixed03.hs:5:1: +Mixed03.hs:6:1: error: Module DW is imported both as a safe and unsafe import! diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered01.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered01.hs index 0e48580c98..a1e953ced5 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered01.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SafeInfered01 where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered01_A.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered01_A.hs index f66ac43d78..9f52c43f40 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered01_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered01_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- | Trivial Safe Module module SafeInfered01_A where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered02.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered02.hs index 6656c5acf7..c1e4c37c99 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered02.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SafeInfered02 where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered02_A.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered02_A.hs index 57438d2761..bf9b8c9e70 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered02_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered02_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveDataTypeable #-} -- | Only uses deriving of Typeable so should be considered safe module SafeInfered02_A where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered03.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered03.hs index 9c7af12231..cea614c558 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered03.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SafeInfered03 where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered03_A.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered03_A.hs index 9844ec6525..d6947e2d27 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered03_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered03_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ForeignFunctionInterface #-} -- | FFI but in IO monad so safe module SafeInfered03_A where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered04.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered04.hs index 8752383a6b..deb2e8494f 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered04.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered04.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SafeInfered04 where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered04_A.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered04_A.hs index 6f4db5db79..da7e808acb 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered04_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered04_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fenable-rewrite-rules #-} -- | Safe as while it enables rules it doesn't define any. UnsafeInfered05 is a -- test case for when rules are defined and it should be unsafe diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs index 1e933ac3b0..ad4f232cc2 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr index 5d194064b8..7815bb7c81 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr @@ -1,8 +1,8 @@ -SafeInfered05.hs:2:14: warning: +SafeInfered05.hs:3:14: warning: -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS [1 of 2] Compiling SafeInfered05_A ( SafeInfered05_A.hs, SafeInfered05_A.o ) -SafeInfered05_A.hs:2:16: warning: [-Wsafe] +SafeInfered05_A.hs:3:16: warning: [-Wsafe] ‘SafeInfered05_A’ has been inferred as safe! [2 of 2] Compiling SafeInfered05 ( SafeInfered05.hs, SafeInfered05.o ) diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05_A.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05_A.hs index c9e5c964cb..72eeaeb097 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fwarn-safe #-} module SafeInfered05_A where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.hs b/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.hs index 507367929b..84ed104d43 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} {-# OPTIONS_GHC -fwarn-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.stderr b/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.stderr index 5e824de641..7efaba3490 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.stderr @@ -1,3 +1,3 @@ -SafeWarn01.hs:2:16: warning: [-Wsafe] +SafeWarn01.hs:3:16: warning: [-Wsafe] ‘SafeWarn01’ has been inferred as safe! diff --git a/testsuite/tests/safeHaskell/safeInfered/T16689.hs b/testsuite/tests/safeHaskell/safeInfered/T16689.hs index a1820aa4a1..2621ec6cff 100644 --- a/testsuite/tests/safeHaskell/safeInfered/T16689.hs +++ b/testsuite/tests/safeHaskell/safeInfered/T16689.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} main = return () diff --git a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.hs b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.hs index 9dfaccd950..5a374cb99d 100644 --- a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.hs +++ b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS_GHC -fwarn-trustworthy-safe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.stderr b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.stderr index 7d42cb016f..7723e98dc1 100644 --- a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.stderr @@ -1,3 +1,3 @@ -TrustworthySafe02.hs:1:14: warning: [-Wtrustworthy-safe (in -Wall)] +TrustworthySafe02.hs:2:14: warning: [-Wtrustworthy-safe (in -Wall)] ‘TrustworthySafe02’ is marked as Trustworthy but has been inferred as safe! diff --git a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs index ad63e090e1..fe3e27ef5f 100644 --- a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs +++ b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fwarn-trustworthy-safe #-} -- temp broken by 452d6aa95 diff --git a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.stderr b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.stderr index 9938109dcb..ff4a4e3631 100644 --- a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.stderr @@ -1,3 +1,3 @@ -TrustworthySafe03.hs:1:14: warning: [-Wtrustworthy-safe (in -Wall)] +TrustworthySafe03.hs:2:14: warning: [-Wtrustworthy-safe (in -Wall)] ‘TrustworthySafe03’ is marked as Trustworthy but has been inferred as safe! diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.hs index b1db9ea578..0a356f190b 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered01 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.stderr index 4e705d6a16..2698172348 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.stderr @@ -1,6 +1,6 @@ [1 of 2] Compiling UnsafeInfered01_A ( UnsafeInfered01_A.hs, UnsafeInfered01_A.o ) [2 of 2] Compiling UnsafeInfered01 ( UnsafeInfered01.hs, UnsafeInfered01.o ) -UnsafeInfered01.hs:4:1: error: +UnsafeInfered01.hs:5:1: error: UnsafeInfered01_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.hs index 67105965d8..f41e7e32f3 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered02 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.stderr index e5593d57e9..203e241c99 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.stderr @@ -1,6 +1,6 @@ [1 of 2] Compiling UnsafeInfered02_A ( UnsafeInfered02_A.hs, UnsafeInfered02_A.o, UnsafeInfered02_A.dyn_o ) [2 of 2] Compiling UnsafeInfered02 ( UnsafeInfered02.hs, UnsafeInfered02.o, UnsafeInfered02.dyn_o ) -UnsafeInfered02.hs:4:1: error: +UnsafeInfered02.hs:5:1: error: UnsafeInfered02_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.hs index 67220ac4d0..115070b573 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered03 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.stderr index 8a48fec4b0..b722af9bc9 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.stderr @@ -1,6 +1,6 @@ [1 of 2] Compiling UnsafeInfered03_A ( UnsafeInfered03_A.hs, UnsafeInfered03_A.o ) [2 of 2] Compiling UnsafeInfered03 ( UnsafeInfered03.hs, UnsafeInfered03.o ) -UnsafeInfered03.hs:4:1: error: +UnsafeInfered03.hs:5:1: error: UnsafeInfered03_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.hs index 712d02a350..4bf2b2bddc 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered05 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.stderr index e70f03df38..4a0eb8000d 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.stderr @@ -1,6 +1,6 @@ [1 of 2] Compiling UnsafeInfered05_A ( UnsafeInfered05_A.hs, UnsafeInfered05_A.o ) [2 of 2] Compiling UnsafeInfered05 ( UnsafeInfered05.hs, UnsafeInfered05.o ) -UnsafeInfered05.hs:4:1: error: +UnsafeInfered05.hs:5:1: error: UnsafeInfered05_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.hs index a5bb127202..f12f5f90df 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered06 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.stderr index 42c8c3d1e5..623f4aea3c 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.stderr @@ -1,6 +1,6 @@ [1 of 2] Compiling UnsafeInfered06_A ( UnsafeInfered06_A.hs, UnsafeInfered06_A.o ) [2 of 2] Compiling UnsafeInfered06 ( UnsafeInfered06.hs, UnsafeInfered06.o ) -UnsafeInfered06.hs:4:1: error: +UnsafeInfered06.hs:5:1: error: UnsafeInfered06_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08.hs index 394d7e6999..b9e2eff6ca 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered08 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08_A.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08_A.hs index d88eda96b1..d8c5137c82 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE OverlappingInstances #-} {-# OPTIONS_GHC -w #-} -- Turn off deprecation for OverlappingInstances -- | Safe, as we now check at overlap occurrence, not definition. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.hs index 1c1e61d3c5..4dcd5c82ea 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered09 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.stderr index bf9b623eaa..b5ddab3f35 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.stderr @@ -2,6 +2,6 @@ [2 of 3] Compiling UnsafeInfered09_A ( UnsafeInfered09_A.hs, UnsafeInfered09_A.o ) [3 of 3] Compiling UnsafeInfered09 ( UnsafeInfered09.hs, UnsafeInfered09.o ) -UnsafeInfered09.hs:4:1: error: +UnsafeInfered09.hs:5:1: error: UnsafeInfered09_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.hs index 3ba1584b08..ddedb09407 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Basic test to see if no safe infer flag works module UnsafeInfered10 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.stderr index f626cf952f..fb4488000b 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.stderr @@ -1,6 +1,6 @@ [1 of 2] Compiling UnsafeInfered10_A ( UnsafeInfered10_A.hs, UnsafeInfered10_A.o ) [2 of 2] Compiling UnsafeInfered10 ( UnsafeInfered10.hs, UnsafeInfered10.o ) -UnsafeInfered10.hs:5:1: error: +UnsafeInfered10.hs:6:1: error: UnsafeInfered10_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.hs index 34555594e9..c8fd8b3f7b 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Basic test to see if no safe infer flag works module UnsafeInfered11 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr index 18a6a459c7..919eec4e6b 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr @@ -1,13 +1,13 @@ [1 of 2] Compiling UnsafeInfered11_A ( UnsafeInfered11_A.hs, UnsafeInfered11_A.o ) -UnsafeInfered11_A.hs:1:16: warning: [-Wunsafe] +UnsafeInfered11_A.hs:2:16: warning: [-Wunsafe] ‘UnsafeInfered11_A’ has been inferred as unsafe! Reason: - UnsafeInfered11_A.hs:17:11: warning: + UnsafeInfered11_A.hs:18:11: warning: Rule "lookupx/T" ignored User defined rules are disabled under Safe Haskell [2 of 2] Compiling UnsafeInfered11 ( UnsafeInfered11.hs, UnsafeInfered11.o ) -UnsafeInfered11.hs:5:1: error: +UnsafeInfered11.hs:6:1: error: UnsafeInfered11_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11_A.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11_A.hs index d209dcf5fe..aefaacac30 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# OPTIONS_GHC -fenable-rewrite-rules #-} -- | Basic test to see if no safe infer flag works diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.hs index a39b46e2a0..24ae448a88 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} module UnsafeInfered12 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr index f05bf7fa8c..e3529474bd 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr @@ -1,6 +1,6 @@ -UnsafeInfered12.hs:2:16: error: [-Wunsafe, -Werror=unsafe] +UnsafeInfered12.hs:3:16: error: [-Wunsafe, -Werror=unsafe] ‘UnsafeInfered12’ has been inferred as unsafe! Reason: - UnsafeInfered12.hs:1:14: + UnsafeInfered12.hs:2:14: -XTemplateHaskell is not allowed in Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered13.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered13.hs index defc3a5243..ae9281643e 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered13.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered13.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} {-# LANGUAGE FlexibleInstances #-} module UnsafeInfered13 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered14.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered14.hs index 5b9f64210f..644c63f4cf 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered14.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered14.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} {-# LANGUAGE FlexibleInstances #-} module UnsafeInfered14 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered15.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered15.hs index 427c97b0ac..72008319c5 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered15.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered15.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} {-# LANGUAGE FlexibleInstances #-} module UnsafeInfered15 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered16.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered16.hs index b3e7f34586..ffc65d093b 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered16.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered16.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} {-# LANGUAGE FlexibleInstances #-} module UnsafeInfered16 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered17.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered17.hs index 7f17a136ff..ff2abe647d 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered17.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered17.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} {-# LANGUAGE FlexibleInstances #-} module UnsafeInfered17 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.hs index a6dbfe1745..1aaaf8e47a 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverlappingInstances #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr index 58db37d3f0..2e15aa3954 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr @@ -1,3 +1,3 @@ -UnsafeInfered18.hs:3:14: warning: +UnsafeInfered18.hs:4:14: warning: -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered19.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered19.hs index 587bc4edbf..4b0b33b410 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered19.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered19.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE IncoherentInstances #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.hs index afe188db4f..f3eeea02ad 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.stderr index 6d2afb2193..5424c5f2a2 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.stderr @@ -1,7 +1,7 @@ -UnsafeWarn01.hs:2:16: warning: [-Wunsafe] +UnsafeWarn01.hs:3:16: warning: [-Wunsafe] ‘UnsafeWarn01’ has been inferred as unsafe! Reason: - UnsafeWarn01.hs:7:1: error: + UnsafeWarn01.hs:8:1: error: System.IO.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.hs index 6f62ca5c94..0d1924bf8f 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.stderr index 2ee83ac140..881db587d5 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.stderr @@ -1,6 +1,6 @@ -UnsafeWarn02.hs:2:16: warning: [-Wunsafe] +UnsafeWarn02.hs:3:16: warning: [-Wunsafe] ‘UnsafeWarn02’ has been inferred as unsafe! Reason: - UnsafeWarn02.hs:4:14: + UnsafeWarn02.hs:5:14: -XTemplateHaskell is not allowed in Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.hs index ded02de888..433824f8bd 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS_GHC -fwarn-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.stderr index 6ddea45af1..ba23b72ee1 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.stderr @@ -1,7 +1,7 @@ -UnsafeWarn03.hs:3:16: warning: [-Wunsafe] +UnsafeWarn03.hs:4:16: warning: [-Wunsafe] ‘UnsafeWarn03’ has been inferred as unsafe! Reason: - UnsafeWarn03.hs:8:1: error: + UnsafeWarn03.hs:9:1: error: System.IO.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.hs index d8e8b84fa5..1d02985734 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS_GHC -fwarn-trustworthy-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.stderr index c91f421344..90e6d5b6f1 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.stderr @@ -1,7 +1,7 @@ -UnsafeWarn04.hs:3:16: warning: [-Wunsafe] +UnsafeWarn04.hs:4:16: warning: [-Wunsafe] ‘UnsafeWarn04’ has been inferred as unsafe! Reason: - UnsafeWarn04.hs:8:1: error: + UnsafeWarn04.hs:9:1: error: System.IO.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.hs index 76258d362b..3c9b3109f7 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} {-# OPTIONS_GHC -fwarn-trustworthy-safe #-} {-# OPTIONS_GHC -fwarn-safe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.stderr index dfd4193b7a..2977504457 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.stderr @@ -1,14 +1,14 @@ -UnsafeWarn05.hs:4:16: warning: [-Wunsafe] +UnsafeWarn05.hs:5:16: warning: [-Wunsafe] ‘UnsafeWarn05’ has been inferred as unsafe! Reason: - UnsafeWarn05.hs:10:1: error: + UnsafeWarn05.hs:11:1: error: System.IO.Unsafe: Can't be safely imported! The module itself isn't safe. -UnsafeWarn05.hs:4:16: warning: [-Wunsafe] +UnsafeWarn05.hs:5:16: warning: [-Wunsafe] ‘UnsafeWarn05’ has been inferred as unsafe! Reason: - UnsafeWarn05.hs:15:11: warning: + UnsafeWarn05.hs:16:11: warning: Rule "g" ignored User defined rules are disabled under Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.hs index 671a64822b..8680fe5d6f 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fenable-rewrite-rules #-} {-# OPTIONS_GHC -fwarn-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.stderr index 323bb19a39..98b1360202 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.stderr @@ -1,7 +1,7 @@ -UnsafeWarn06.hs:3:16: warning: [-Wunsafe] +UnsafeWarn06.hs:4:16: warning: [-Wunsafe] ‘UnsafeWarn06’ has been inferred as unsafe! Reason: - UnsafeWarn06.hs:8:11: warning: + UnsafeWarn06.hs:9:11: warning: Rule "f" ignored User defined rules are disabled under Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.hs index 43982939b8..7efc9157e7 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS_GHC -fenable-rewrite-rules #-} {-# OPTIONS_GHC -fwarn-safe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.stderr index 11116b6460..91a4ec3547 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.stderr @@ -1,7 +1,7 @@ -UnsafeWarn07.hs:4:16: warning: [-Wunsafe] +UnsafeWarn07.hs:5:16: warning: [-Wunsafe] ‘UnsafeWarn07’ has been inferred as unsafe! Reason: - UnsafeWarn07.hs:9:11: warning: + UnsafeWarn07.hs:10:11: warning: Rule "f" ignored User defined rules are disabled under Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.hs index 5920c03161..399c0ea04d 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe, TemplateHaskell #-} -- | Test SafeLanguage disables things diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.stderr index 88b5e05ab3..1fb5ec66bb 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.stderr @@ -1,3 +1,3 @@ -SafeLang01.hs:1:20: - Warning: -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell +SafeLang01.hs:2:20: warning: + -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.hs index 4f3bce7e0a..8c73aeaf41 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# OPTIONS_GHC -fenable-rewrite-rules #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr index 33a66e6267..20d4d174b2 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr @@ -1,4 +1,4 @@ -SafeLang03.hs:7:11: Warning: +SafeLang03.hs:8:11: warning: Rule "f" ignored User defined rules are disabled under Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.hs index 7249c8d0ec..5cdb87cb13 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE ForeignFunctionInterface #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.stderr index ae5d658619..7e1655e00a 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.stderr @@ -1,7 +1,7 @@ -SafeLang08.hs:9:1: - Unacceptable result type in foreign declaration: - Safe Haskell is on, all FFI imports must be in the IO monad - When checking declaration: - foreign import ccall safe "SafeLang08_A" c_sin - :: CDouble -> CDouble +SafeLang08.hs:10:1: error: + • Unacceptable result type in foreign declaration: + Safe Haskell is on, all FFI imports must be in the IO monad + • When checking declaration: + foreign import ccall safe "SafeLang08_A" c_sin + :: CDouble -> CDouble diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.hs index 5c88d3916d..bafddd068e 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Main where diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.stderr index 557c4f4858..26f04624af 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.stderr @@ -2,19 +2,19 @@ [2 of 3] Compiling SafeLang10_B ( SafeLang10_B.hs, SafeLang10_B.o ) [3 of 3] Compiling Main ( SafeLang10.hs, SafeLang10.o ) -SafeLang10.hs:8:13: - Unsafe overlapping instances for Pos [Int] - arising from a use of ‘res’ - The matching instance is: - instance [overlapping] [safe] Pos [Int] - -- Defined at SafeLang10_B.hs:13:30 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance Pos [a] -- Defined at SafeLang10_A.hs:13:10 - In the expression: res [(1 :: Int)] - In an equation for ‘r’: r = res [(1 :: Int)] - In the expression: - do let r = res ... - putStrLn $ "Result: " ++ show r - putStrLn $ "Result: " ++ show function +SafeLang10.hs:9:13: error: + • Unsafe overlapping instances for Pos [Int] + arising from a use of ‘res’ + The matching instance is: + instance [overlapping] [safe] Pos [Int] + -- Defined at SafeLang10_B.hs:14:30 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance Pos [a] -- Defined at SafeLang10_A.hs:14:10 + • In the expression: res [(1 :: Int)] + In an equation for ‘r’: r = res [(1 :: Int)] + In the expression: + do let r = res ... + putStrLn $ "Result: " ++ show r + putStrLn $ "Result: " ++ show function diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_A.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_A.hs index 7be17b5ec0..9a94458c7e 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_A.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE Trustworthy #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs index d9a8f63f50..5b9aa814cb 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE Safe #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs index ba5766b064..930257a7e0 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE TemplateHaskell #-} module Main where diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr index c7923a0403..33bf7ce3fe 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr @@ -1,8 +1,8 @@ -SafeLang12.hs:2:14: warning: +SafeLang12.hs:3:14: warning: -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell -SafeLang12_B.hs:2:14: warning: +SafeLang12_B.hs:3:14: warning: -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell [1 of 3] Compiling SafeLang12_A ( SafeLang12_A.hs, SafeLang12_A.o ) [2 of 3] Compiling SafeLang12_B ( SafeLang12_B.hs, SafeLang12_B.o ) diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_A.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_A.hs index 3122859b59..9d6ce5cdb3 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_A.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SafeLang12_A ( A ) where diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_B.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_B.hs index 7219b7a200..50e7930c2d 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_B.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE TemplateHaskell #-} module SafeLang12_B ( Class(..), mkSimpleClass ) where diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.hs index 78708da6ac..cbcb7a376a 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Safe #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stderr index e15b20bb18..5aaab72d8a 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stderr @@ -1,3 +1,3 @@ -SafeLang16.hs:1:14: - Warning: -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell +SafeLang16.hs:2:14: warning: + -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.hs index 411addd00c..1fb79da713 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Main where diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.stderr index 3585721654..1aab52a646 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.stderr @@ -2,19 +2,19 @@ [2 of 3] Compiling SafeLang17_B ( SafeLang17_B.hs, SafeLang17_B.o ) [3 of 3] Compiling Main ( SafeLang17.hs, SafeLang17.o ) -SafeLang17.hs:8:13: - Unsafe overlapping instances for Pos [Int] - arising from a use of ‘res’ - The matching instance is: - instance [incoherent] [safe] Pos [Int] - -- Defined at SafeLang17_B.hs:14:10 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance Pos [a] -- Defined at SafeLang17_A.hs:13:10 - In the expression: res [(1 :: Int)] - In an equation for ‘r’: r = res [(1 :: Int)] - In the expression: - do let r = res ... - putStrLn $ "Result: " ++ show r - putStrLn $ "Result: " ++ show function +SafeLang17.hs:9:13: error: + • Unsafe overlapping instances for Pos [Int] + arising from a use of ‘res’ + The matching instance is: + instance [incoherent] [safe] Pos [Int] + -- Defined at SafeLang17_B.hs:15:10 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance Pos [a] -- Defined at SafeLang17_A.hs:14:10 + • In the expression: res [(1 :: Int)] + In an equation for ‘r’: r = res [(1 :: Int)] + In the expression: + do let r = res ... + putStrLn $ "Result: " ++ show r + putStrLn $ "Result: " ++ show function diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_A.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_A.hs index 0ce2bdf6b9..ef506e3b57 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_A.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_B.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_B.hs index 2059f01523..b18192c0fb 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_B.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE IncoherentInstances #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang18.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang18.hs index 330a80d069..ad11681da8 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang18.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang18.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Safe #-} diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.hs b/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.hs index 175365c17c..d1026ea55f 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import unsafe module System.IO.Unsafe to make sure it fails module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.stderr b/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.stderr index 7c5128d7e2..8afd025680 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.stderr @@ -1,4 +1,4 @@ -BadImport01.hs:5:1: +BadImport01.hs:6:1: error: System.IO.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.hs b/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.hs index e64a7ea09b..d912b7da73 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import unsafe module Debug.Trace to make sure it fails module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.stderr b/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.stderr index 51a5bebec3..06995b8f2c 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.stderr @@ -1,4 +1,4 @@ -BadImport06.hs:5:1: +BadImport06.hs:6:1: error: Debug.Trace: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.hs b/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.hs index da0f440a50..5e29dad2bb 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import unsafe module Unsafe.Coerce to make sure it fails module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.stderr b/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.stderr index 5133f045ec..4782befae7 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.stderr @@ -1,4 +1,4 @@ -BadImport07.hs:5:1: +BadImport07.hs:6:1: error: Unsafe.Coerce: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.hs b/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.hs index d2688fab80..338e1e13df 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import unsafe module Control.ST to make sure it fails module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.stderr b/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.stderr index aa8b5a57f4..5c45d2ab6a 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.stderr @@ -1,4 +1,4 @@ -BadImport08.hs:5:1: +BadImport08.hs:6:1: error: Control.Monad.ST.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.hs b/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.hs index 90d1c49090..2db8642d46 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import unsafe module Control.ST to make sure it fails module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.stderr b/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.stderr index 88556c8997..91611c0fcc 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.stderr @@ -1,4 +1,4 @@ -BadImport09.hs:5:1: +BadImport09.hs:6:1: error: Control.Monad.ST.Lazy.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep05.hs b/testsuite/tests/safeHaskell/unsafeLibs/Dep05.hs index 1d64daa5ae..1d868c3e9e 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep05.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep05.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE UnboxedTuples #-} diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep05.stderr b/testsuite/tests/safeHaskell/unsafeLibs/Dep05.stderr index 4c93c907e8..fb3cb5eecd 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep05.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep05.stderr @@ -1,3 +1,3 @@ -Dep05.hs:6:1: error: +Dep05.hs:7:1: error: GHC.Arr: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep06.hs b/testsuite/tests/safeHaskell/unsafeLibs/Dep06.hs index 2dbb15e197..42da25b2f3 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep06.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep06.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Dep06 where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep06.stderr b/testsuite/tests/safeHaskell/unsafeLibs/Dep06.stderr index ae8bdf8fd6..7824935d91 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep06.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep06.stderr @@ -1,3 +1,3 @@ -Dep06.hs:4:1: +Dep06.hs:5:1: error: GHC.Conc: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep07.hs b/testsuite/tests/safeHaskell/unsafeLibs/Dep07.hs index 662b6a4754..0a2309190e 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep07.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep07.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Dep07 where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep07.stderr b/testsuite/tests/safeHaskell/unsafeLibs/Dep07.stderr index dcc7c4849d..cf79a18f6e 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep07.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep07.stderr @@ -1,4 +1,4 @@ -Dep07.hs:4:1: +Dep07.hs:5:1: error: GHC.ForeignPtr: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep08.hs b/testsuite/tests/safeHaskell/unsafeLibs/Dep08.hs index 76a0dde570..19bf730952 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep08.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep08.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Dep08 where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep08.stderr b/testsuite/tests/safeHaskell/unsafeLibs/Dep08.stderr index 386f6412c3..09fa7d86ee 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep08.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep08.stderr @@ -1,4 +1,4 @@ -Dep08.hs:5:1: +Dep08.hs:6:1: error: GHC.IOArray: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep09.hs b/testsuite/tests/safeHaskell/unsafeLibs/Dep09.hs index a92f739b50..a5808d4680 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep09.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep09.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Dep09 where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep09.stderr b/testsuite/tests/safeHaskell/unsafeLibs/Dep09.stderr index 76606c2e40..4c776d3832 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep09.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep09.stderr @@ -1,3 +1,3 @@ -Dep09.hs:4:1: +Dep09.hs:5:1: error: GHC.Ptr: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep10.hs b/testsuite/tests/safeHaskell/unsafeLibs/Dep10.hs index 84a7adcff7..61dad2505d 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep10.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep10.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Dep10 where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep10.stderr b/testsuite/tests/safeHaskell/unsafeLibs/Dep10.stderr index 68fe214bc8..af1627c985 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep10.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep10.stderr @@ -1,3 +1,3 @@ -Dep10.hs:4:1: +Dep10.hs:5:1: error: GHC.ST: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport01.hs b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport01.hs index 7834de52bc..276f183a59 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport01.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import SYB stuff that should be safe module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport02.hs b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport02.hs index 86c34adb0d..c8ebcd4833 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport02.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import (now safe by default) modules. module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs index 2ea80fbd09..2a89ee2d91 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} -- | Import all modules from prelude that should be safe diff --git a/testsuite/tests/saks/should_fail/saks_fail001.hs b/testsuite/tests/saks/should_fail/saks_fail001.hs index c71f7a4a68..2adfa3a3a7 100644 --- a/testsuite/tests/saks/should_fail/saks_fail001.hs +++ b/testsuite/tests/saks/should_fail/saks_fail001.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- No -XStandaloneKindSignatures! module SAKS_Fail001 where diff --git a/testsuite/tests/saks/should_fail/saks_fail001.stderr b/testsuite/tests/saks/should_fail/saks_fail001.stderr index 81ab28278d..ed20d70860 100644 --- a/testsuite/tests/saks/should_fail/saks_fail001.stderr +++ b/testsuite/tests/saks/should_fail/saks_fail001.stderr @@ -1,4 +1,4 @@ -saks_fail001.hs:7:1: error: +saks_fail001.hs:8:1: error: Illegal standalone kind signature Did you mean to enable StandaloneKindSignatures? diff --git a/testsuite/tests/simplCore/should_compile/T14270a.hs b/testsuite/tests/simplCore/should_compile/T14270a.hs index b69de35eec..1cf422f709 100644 --- a/testsuite/tests/simplCore/should_compile/T14270a.hs +++ b/testsuite/tests/simplCore/should_compile/T14270a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeApplications, ScopedTypeVariables, GADTs, RankNTypes, PolyKinds, KindSignatures #-} {-# OPTIONS_GHC -O2 #-} -- We are provoking a bug in GHC.Core.Opt.SpecConstr diff --git a/testsuite/tests/simplCore/should_compile/T16038/A.hs b/testsuite/tests/simplCore/should_compile/T16038/A.hs index 3e5137bf94..5bff464334 100644 --- a/testsuite/tests/simplCore/should_compile/T16038/A.hs +++ b/testsuite/tests/simplCore/should_compile/T16038/A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module A where import B diff --git a/testsuite/tests/simplCore/should_compile/T16038/A.hs-boot b/testsuite/tests/simplCore/should_compile/T16038/A.hs-boot index 48f6768e39..bad91fcdd0 100644 --- a/testsuite/tests/simplCore/should_compile/T16038/A.hs-boot +++ b/testsuite/tests/simplCore/should_compile/T16038/A.hs-boot @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module A where data HsExpr i diff --git a/testsuite/tests/simplCore/should_compile/T16038/B.hs b/testsuite/tests/simplCore/should_compile/T16038/B.hs index 9eb315a419..98ab2d7ee6 100644 --- a/testsuite/tests/simplCore/should_compile/T16038/B.hs +++ b/testsuite/tests/simplCore/should_compile/T16038/B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module B where import {-# SOURCE #-} A (HsExpr) diff --git a/testsuite/tests/simplCore/should_compile/T16979b.hs b/testsuite/tests/simplCore/should_compile/T16979b.hs index d2b5712674..92c6d28a07 100644 --- a/testsuite/tests/simplCore/should_compile/T16979b.hs +++ b/testsuite/tests/simplCore/should_compile/T16979b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} diff --git a/testsuite/tests/simplCore/should_compile/T5329.hs b/testsuite/tests/simplCore/should_compile/T5329.hs index f681103578..3c14ee8132 100644 --- a/testsuite/tests/simplCore/should_compile/T5329.hs +++ b/testsuite/tests/simplCore/should_compile/T5329.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE EmptyDataDecls #-} diff --git a/testsuite/tests/simplCore/should_compile/T8331.stderr b/testsuite/tests/simplCore/should_compile/T8331.stderr index 1c51037481..0fbd7a577c 100644 --- a/testsuite/tests/simplCore/should_compile/T8331.stderr +++ b/testsuite/tests/simplCore/should_compile/T8331.stderr @@ -7,7 +7,7 @@ = (useAbstractMonad1 @s) `cast` (<Int>_R %<'Many>_N ->_R <Int>_R %<'Many>_N ->_R Sym (N:ST[0] <s>_N <Int>_R) - ; Sym (N:ReaderT[0] <Int>_R <ST s>_R <Int>_N) + ; Sym (N:ReaderT[0] <*>_N <Int>_R <ST s>_R <Int>_N) :: Coercible (Int -> Int -> STRep s Int) (Int -> ReaderT Int (ST s) Int)) diff --git a/testsuite/tests/simplCore/should_compile/rule2.hs b/testsuite/tests/simplCore/should_compile/rule2.hs index 2b091de5e9..97b50b92d9 100644 --- a/testsuite/tests/simplCore/should_compile/rule2.hs +++ b/testsuite/tests/simplCore/should_compile/rule2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} {-# OPTIONS_GHC -ddump-simpl-stats #-} diff --git a/testsuite/tests/simplCore/should_run/T5315.hs b/testsuite/tests/simplCore/should_run/T5315.hs index 5b2ff39346..6af1fa2332 100644 --- a/testsuite/tests/simplCore/should_run/T5315.hs +++ b/testsuite/tests/simplCore/should_run/T5315.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE TypeOperators #-} diff --git a/testsuite/tests/simplCore/should_run/runST.hs b/testsuite/tests/simplCore/should_run/runST.hs index dc06c243cf..0357778ce2 100644 --- a/testsuite/tests/simplCore/should_run/runST.hs +++ b/testsuite/tests/simplCore/should_run/runST.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} import Control.Monad.ST import Data.STRef @@ -7,7 +8,7 @@ import Data.STRef main = let f () = runST $ do - ref <- newSTRef 0 - modifySTRef ref (+1) - readSTRef ref + ref <- newSTRef 0 + modifySTRef ref (+1) + readSTRef ref in print (f () + f ()) diff --git a/testsuite/tests/stranal/should_compile/T8743.hs b/testsuite/tests/stranal/should_compile/T8743.hs index 80c850f143..1feda6ddbb 100644 --- a/testsuite/tests/stranal/should_compile/T8743.hs +++ b/testsuite/tests/stranal/should_compile/T8743.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T8743 where -- Without the following import, it does not fail diff --git a/testsuite/tests/stranal/should_compile/T8743.hs-boot b/testsuite/tests/stranal/should_compile/T8743.hs-boot index 7f22b248c2..f98c48204a 100644 --- a/testsuite/tests/stranal/should_compile/T8743.hs-boot +++ b/testsuite/tests/stranal/should_compile/T8743.hs-boot @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T8743 where class ToRow a instance ToRow (Maybe a) diff --git a/testsuite/tests/stranal/should_compile/T8743a.hs b/testsuite/tests/stranal/should_compile/T8743a.hs index 23b3b7bc5e..531fa9efaa 100644 --- a/testsuite/tests/stranal/should_compile/T8743a.hs +++ b/testsuite/tests/stranal/should_compile/T8743a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T8743a where import {-# SOURCE #-} T8743 () diff --git a/testsuite/tests/th/ClosedFam2TH.hs b/testsuite/tests/th/ClosedFam2TH.hs index f1e5eee9c0..43ccf216f8 100644 --- a/testsuite/tests/th/ClosedFam2TH.hs +++ b/testsuite/tests/th/ClosedFam2TH.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TemplateHaskell, TypeFamilies, PolyKinds, TypeApplications, TypeFamilyDependencies #-} module ClosedFam2 where diff --git a/testsuite/tests/th/T10811.hs b/testsuite/tests/th/T10811.hs index 3fac1905d6..cad100aad5 100644 --- a/testsuite/tests/th/T10811.hs +++ b/testsuite/tests/th/T10811.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TemplateHaskell, TypeFamilies #-} module Bug where diff --git a/testsuite/tests/th/T10820.hs b/testsuite/tests/th/T10820.hs index 0e53bbde72..d981afd00a 100644 --- a/testsuite/tests/th/T10820.hs +++ b/testsuite/tests/th/T10820.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE LiberalTypeSynonyms #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} diff --git a/testsuite/tests/th/T10891.hs b/testsuite/tests/th/T10891.hs index 030c5ebb10..266d5d98aa 100644 --- a/testsuite/tests/th/T10891.hs +++ b/testsuite/tests/th/T10891.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T10891 where diff --git a/testsuite/tests/th/T11721_TH.hs b/testsuite/tests/th/T11721_TH.hs index b8e895c155..a062427452 100644 --- a/testsuite/tests/th/T11721_TH.hs +++ b/testsuite/tests/th/T11721_TH.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} diff --git a/testsuite/tests/th/T12045TH1.hs b/testsuite/tests/th/T12045TH1.hs index c16bab29f9..d8b9e00bf3 100644 --- a/testsuite/tests/th/T12045TH1.hs +++ b/testsuite/tests/th/T12045TH1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TemplateHaskell, DataKinds, PolyKinds , TypeInType, TypeApplications, TypeFamilies #-} diff --git a/testsuite/tests/th/T12045TH1.stderr b/testsuite/tests/th/T12045TH1.stderr index 2b856434d5..fd727295eb 100644 --- a/testsuite/tests/th/T12045TH1.stderr +++ b/testsuite/tests/th/T12045TH1.stderr @@ -1,4 +1,4 @@ -T12045TH1.hs:(8,2)-(10,53): Splicing declarations +T12045TH1.hs:(9,2)-(11,53): Splicing declarations [d| type family F (a :: k) :: Type where F @Type Int = Bool F @(Type -> Type) Maybe = Char |] @@ -6,13 +6,13 @@ T12045TH1.hs:(8,2)-(10,53): Splicing declarations type family F (a :: k) :: Type where F @Type Int = Bool F @(Type -> Type) Maybe = Char -T12045TH1.hs:13:2-32: Splicing declarations +T12045TH1.hs:14:2-32: Splicing declarations [d| data family D (a :: k) |] ======> data family D (a :: k) -T12045TH1.hs:15:2-41: Splicing declarations +T12045TH1.hs:16:2-41: Splicing declarations [d| data instance D @Type a = DBool |] ======> data instance D @Type a = DBool -T12045TH1.hs:17:2-51: Splicing declarations +T12045TH1.hs:18:2-51: Splicing declarations [d| data instance D @(Type -> Type) b = DChar |] ======> data instance D @(Type -> Type) b = DChar diff --git a/testsuite/tests/th/T12045TH2.hs b/testsuite/tests/th/T12045TH2.hs index 21d04cb826..cab400d301 100644 --- a/testsuite/tests/th/T12045TH2.hs +++ b/testsuite/tests/th/T12045TH2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TemplateHaskell, TypeApplications, PolyKinds , TypeFamilies, DataKinds #-} diff --git a/testsuite/tests/th/T12411.hs b/testsuite/tests/th/T12411.hs index fd8f9db8f3..2b52e01694 100644 --- a/testsuite/tests/th/T12411.hs +++ b/testsuite/tests/th/T12411.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TemplateHaskell #-} module T12411 where diff --git a/testsuite/tests/th/T12411.stderr b/testsuite/tests/th/T12411.stderr index 22f7de0190..79172a1a46 100644 --- a/testsuite/tests/th/T12411.stderr +++ b/testsuite/tests/th/T12411.stderr @@ -1,6 +1,6 @@ -T12411.hs:4:1: error: +T12411.hs:5:1: error: Illegal visible type application ‘@Q’ Perhaps you intended to use TypeApplications -T12411.hs:4:7: error: Not in scope: type constructor or class ‘Q’ +T12411.hs:5:7: error: Not in scope: type constructor or class ‘Q’ diff --git a/testsuite/tests/th/T12646.hs b/testsuite/tests/th/T12646.hs index b3ba86e54c..aa33f5cb05 100644 --- a/testsuite/tests/th/T12646.hs +++ b/testsuite/tests/th/T12646.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} diff --git a/testsuite/tests/th/T15243.hs b/testsuite/tests/th/T15243.hs index 8b366404c8..c429f783aa 100644 --- a/testsuite/tests/th/T15243.hs +++ b/testsuite/tests/th/T15243.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TemplateHaskell #-} diff --git a/testsuite/tests/th/T15243.stderr b/testsuite/tests/th/T15243.stderr index 4cf78cacd6..74f316e7d7 100644 --- a/testsuite/tests/th/T15243.stderr +++ b/testsuite/tests/th/T15243.stderr @@ -1,4 +1,4 @@ -T15243.hs:(10,2)-(15,7): Splicing declarations +T15243.hs:(11,2)-(16,7): Splicing declarations [d| type family F (a :: k) :: k where F 'Unit = 'Unit F '(,) = '(,) diff --git a/testsuite/tests/th/T16133.hs b/testsuite/tests/th/T16133.hs index b7f5e23d09..e650042b7a 100644 --- a/testsuite/tests/th/T16133.hs +++ b/testsuite/tests/th/T16133.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TemplateHaskell #-} module T16133 where diff --git a/testsuite/tests/th/T16133.stderr b/testsuite/tests/th/T16133.stderr index 3a9b9f7480..840f9f066f 100644 --- a/testsuite/tests/th/T16133.stderr +++ b/testsuite/tests/th/T16133.stderr @@ -1,9 +1,8 @@ -T16133.hs:10:2: error: +T16133.hs:11:2: error: Illegal visible type application ‘@Int’ Perhaps you intended to use TypeApplications -T16133.hs:10:2: error: +T16133.hs:11:2: error: Illegal visible kind application ‘@Type’ Perhaps you intended to use TypeApplications - diff --git a/testsuite/tests/th/T16976.hs b/testsuite/tests/th/T16976.hs index 4d2c889794..862419d348 100644 --- a/testsuite/tests/th/T16976.hs +++ b/testsuite/tests/th/T16976.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE NoMonomorphismRestriction #-} diff --git a/testsuite/tests/th/T18388.hs b/testsuite/tests/th/T18388.hs index d31758004b..a5975a6eb5 100644 --- a/testsuite/tests/th/T18388.hs +++ b/testsuite/tests/th/T18388.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DerivingVia #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} diff --git a/testsuite/tests/th/TH_Roles4.hs b/testsuite/tests/th/TH_Roles4.hs index 16dbb67102..c081c73588 100644 --- a/testsuite/tests/th/TH_Roles4.hs +++ b/testsuite/tests/th/TH_Roles4.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TemplateHaskell #-} module Roles4 where diff --git a/testsuite/tests/th/TH_reifyExplicitForAllFams.hs b/testsuite/tests/th/TH_reifyExplicitForAllFams.hs index 60a6d4563f..f242144404 100644 --- a/testsuite/tests/th/TH_reifyExplicitForAllFams.hs +++ b/testsuite/tests/th/TH_reifyExplicitForAllFams.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- test reification of explicit foralls in type families {-# LANGUAGE TypeFamilies, ExplicitForAll #-} diff --git a/testsuite/tests/typecheck/should_compile/LocalGivenEqs.hs b/testsuite/tests/typecheck/should_compile/LocalGivenEqs.hs index f1280205b2..fd37ede0db 100644 --- a/testsuite/tests/typecheck/should_compile/LocalGivenEqs.hs +++ b/testsuite/tests/typecheck/should_compile/LocalGivenEqs.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, TypeFamilies, FlexibleInstances #-} {-# OPTIONS_GHC -Wno-missing-methods -Wno-unused-matches #-} diff --git a/testsuite/tests/typecheck/should_compile/SplitWD.hs b/testsuite/tests/typecheck/should_compile/SplitWD.hs index 5281cdbf0e..b0f37cc4b1 100644 --- a/testsuite/tests/typecheck/should_compile/SplitWD.hs +++ b/testsuite/tests/typecheck/should_compile/SplitWD.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ScopedTypeVariables, TypeOperators, DataKinds, PolyKinds, TypeFamilies, GADTs, StandaloneDeriving #-} diff --git a/testsuite/tests/typecheck/should_compile/T11524.hs b/testsuite/tests/typecheck/should_compile/T11524.hs index d6e2adf4f4..0856afe50b 100644 --- a/testsuite/tests/typecheck/should_compile/T11524.hs +++ b/testsuite/tests/typecheck/should_compile/T11524.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ExplicitForAll #-} diff --git a/testsuite/tests/typecheck/should_compile/T11811.hs b/testsuite/tests/typecheck/should_compile/T11811.hs index e3e0f810b3..5387ef62a5 100644 --- a/testsuite/tests/typecheck/should_compile/T11811.hs +++ b/testsuite/tests/typecheck/should_compile/T11811.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds, GADTs #-} module T11811 where diff --git a/testsuite/tests/typecheck/should_compile/T12919.hs b/testsuite/tests/typecheck/should_compile/T12919.hs index 778abfa1e7..29eb9dc469 100644 --- a/testsuite/tests/typecheck/should_compile/T12919.hs +++ b/testsuite/tests/typecheck/should_compile/T12919.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, PolyKinds, TypeFamilies, GADTs, ConstraintKinds #-} module T12919 where diff --git a/testsuite/tests/typecheck/should_compile/T13333.hs b/testsuite/tests/typecheck/should_compile/T13333.hs index 9a84e87265..843b3d8165 100644 --- a/testsuite/tests/typecheck/should_compile/T13333.hs +++ b/testsuite/tests/typecheck/should_compile/T13333.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} diff --git a/testsuite/tests/typecheck/should_compile/T13651.hs b/testsuite/tests/typecheck/should_compile/T13651.hs index 57e627aa71..a426cb5543 100644 --- a/testsuite/tests/typecheck/should_compile/T13651.hs +++ b/testsuite/tests/typecheck/should_compile/T13651.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, TypeFamilyDependencies #-} module T13651 where diff --git a/testsuite/tests/typecheck/should_compile/T13651.stderr b/testsuite/tests/typecheck/should_compile/T13651.stderr index cc7af849d3..99d57d1c96 100644 --- a/testsuite/tests/typecheck/should_compile/T13651.stderr +++ b/testsuite/tests/typecheck/should_compile/T13651.stderr @@ -1,5 +1,5 @@ -T13651.hs:11:8: error: +T13651.hs:12:8: error: • Could not deduce: F cr (Bar h (Foo u)) ~ Bar h (Bar r u) from the context: (F cr cu ~ Bar h (Bar r u), F cu cs ~ Bar (Foo h) (Bar u s)) @@ -7,7 +7,7 @@ T13651.hs:11:8: error: foo :: forall cr cu h r u cs s. (F cr cu ~ Bar h (Bar r u), F cu cs ~ Bar (Foo h) (Bar u s)) => Bar h (Bar r u) -> Bar (Foo h) (Bar u s) -> Foo (cr -> cs) - at T13651.hs:(11,8)-(13,65) + at T13651.hs:(12,8)-(14,65) Expected: forall cr cu h r u cs s. (F cr cu ~ Bar h (Bar r u), F cu cs ~ Bar (Foo h) (Bar u s)) => Bar h (Bar r u) -> Bar (Foo h) (Bar u s) -> Foo (cr -> cs) diff --git a/testsuite/tests/typecheck/should_compile/T13651a.hs b/testsuite/tests/typecheck/should_compile/T13651a.hs index 482231b6f2..f08407b738 100644 --- a/testsuite/tests/typecheck/should_compile/T13651a.hs +++ b/testsuite/tests/typecheck/should_compile/T13651a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, TypeFamilyDependencies #-} module T13651 where diff --git a/testsuite/tests/typecheck/should_compile/T13822.hs b/testsuite/tests/typecheck/should_compile/T13822.hs index 5c4d51382f..cd5ff23478 100644 --- a/testsuite/tests/typecheck/should_compile/T13822.hs +++ b/testsuite/tests/typecheck/should_compile/T13822.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs, TypeOperators, PolyKinds, DataKinds, TypeFamilyDependencies, RankNTypes, LambdaCase, EmptyCase, UndecidableInstances #-} diff --git a/testsuite/tests/typecheck/should_compile/T13871.hs b/testsuite/tests/typecheck/should_compile/T13871.hs index 623923eaca..fa233247ca 100644 --- a/testsuite/tests/typecheck/should_compile/T13871.hs +++ b/testsuite/tests/typecheck/should_compile/T13871.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} diff --git a/testsuite/tests/typecheck/should_compile/T13879.hs b/testsuite/tests/typecheck/should_compile/T13879.hs index 2e10c472fb..8a70565e7a 100644 --- a/testsuite/tests/typecheck/should_compile/T13879.hs +++ b/testsuite/tests/typecheck/should_compile/T13879.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} diff --git a/testsuite/tests/typecheck/should_compile/T14366.hs b/testsuite/tests/typecheck/should_compile/T14366.hs index 56abad5d30..9405c9b91b 100644 --- a/testsuite/tests/typecheck/should_compile/T14366.hs +++ b/testsuite/tests/typecheck/should_compile/T14366.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeOperators #-} diff --git a/testsuite/tests/typecheck/should_compile/T14451.hs b/testsuite/tests/typecheck/should_compile/T14451.hs index a67ce74537..40f03e3ece 100644 --- a/testsuite/tests/typecheck/should_compile/T14451.hs +++ b/testsuite/tests/typecheck/should_compile/T14451.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language KindSignatures, TypeOperators, PolyKinds, TypeOperators, ConstraintKinds, TypeFamilies, DataKinds, TypeInType, GADTs, AllowAmbiguousTypes, InstanceSigs, RankNTypes, UndecidableInstances #-} module T14451 where diff --git a/testsuite/tests/typecheck/should_compile/T14590.stderr b/testsuite/tests/typecheck/should_compile/T14590.stderr index 6f0ab068bc..4704a7aa01 100644 --- a/testsuite/tests/typecheck/should_compile/T14590.stderr +++ b/testsuite/tests/typecheck/should_compile/T14590.stderr @@ -1,5 +1,5 @@ -T14590.hs:4:13: warning: [-Wtyped-holes (in -Wdefault)] +T14590.hs:4:11: warning: [-Wtyped-holes (in -Wdefault)] • Found hole: _ :: Int -> Int -> Int • In the expression: (x `_`) y In an equation for ‘f1’: f1 x y = (x `_`) y @@ -85,7 +85,7 @@ T14590.hs:4:13: warning: [-Wtyped-holes (in -Wdefault)] (imported from ‘Prelude’ at T14590.hs:1:8-13 (and originally defined in ‘GHC.Base’)) -T14590.hs:5:13: warning: [-Wtyped-holes (in -Wdefault)] +T14590.hs:5:11: warning: [-Wtyped-holes (in -Wdefault)] • Found hole: _a :: Int -> Int -> Int Or perhaps ‘_a’ is mis-spelled, or not in scope • In the expression: (x `_a`) y diff --git a/testsuite/tests/typecheck/should_compile/T14735.hs b/testsuite/tests/typecheck/should_compile/T14735.hs index c48231b7c2..0a00379b6b 100644 --- a/testsuite/tests/typecheck/should_compile/T14735.hs +++ b/testsuite/tests/typecheck/should_compile/T14735.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language QuantifiedConstraints #-} {-# Language StandaloneDeriving #-} {-# Language DataKinds #-} diff --git a/testsuite/tests/typecheck/should_compile/T14763.hs b/testsuite/tests/typecheck/should_compile/T14763.hs index c159291322..8bb451c7fe 100644 --- a/testsuite/tests/typecheck/should_compile/T14763.hs +++ b/testsuite/tests/typecheck/should_compile/T14763.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} diff --git a/testsuite/tests/typecheck/should_compile/T15079.hs b/testsuite/tests/typecheck/should_compile/T15079.hs index 62115182af..22e86abc56 100644 --- a/testsuite/tests/typecheck/should_compile/T15079.hs +++ b/testsuite/tests/typecheck/should_compile/T15079.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} diff --git a/testsuite/tests/typecheck/should_compile/T17202.hs b/testsuite/tests/typecheck/should_compile/T17202.hs index 9f28ccc753..cda5783ec9 100644 --- a/testsuite/tests/typecheck/should_compile/T17202.hs +++ b/testsuite/tests/typecheck/should_compile/T17202.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE QuantifiedConstraints #-} {-# LANGUAGE TypeFamilies #-} diff --git a/testsuite/tests/typecheck/should_compile/T17562b.hs b/testsuite/tests/typecheck/should_compile/T17562b.hs index 0d635d9248..b73e6b1bc7 100644 --- a/testsuite/tests/typecheck/should_compile/T17562b.hs +++ b/testsuite/tests/typecheck/should_compile/T17562b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE QuantifiedConstraints, MultiParamTypeClasses, TypeFamilies #-} -- NB: No PolyKinds diff --git a/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.hs b/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.hs index 36a4bca1e5..d555511004 100644 --- a/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.hs +++ b/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE QuantifiedConstraints, DatatypeContexts, TypeFamilies #-} -- NB: -XNoPolyKinds, to get defaulting. diff --git a/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr b/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr index 5e98268d8b..3975d2c54d 100644 --- a/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr +++ b/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr @@ -1,3 +1,3 @@ -T17567StupidThetaB.hs:1:37: warning: +T17567StupidThetaB.hs:2:37: warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/typecheck/should_compile/T4355.hs b/testsuite/tests/typecheck/should_compile/T4355.hs index 7e49dd8225..62ba16baa0 100644 --- a/testsuite/tests/typecheck/should_compile/T4355.hs +++ b/testsuite/tests/typecheck/should_compile/T4355.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fno-warn-redundant-constraints -fno-warn-missing-methods #-} {-# LANGUAGE DeriveDataTypeable, ExistentialQuantification, RankNTypes, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, FlexibleContexts, PatternGuards, DatatypeContexts #-} diff --git a/testsuite/tests/typecheck/should_compile/T4355.stderr b/testsuite/tests/typecheck/should_compile/T4355.stderr index a977ce0190..77d919f992 100644 --- a/testsuite/tests/typecheck/should_compile/T4355.stderr +++ b/testsuite/tests/typecheck/should_compile/T4355.stderr @@ -1,3 +1,3 @@ -T4355.hs:2:172: Warning: +T4355.hs:3:172: warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/typecheck/should_compile/T4524.hs b/testsuite/tests/typecheck/should_compile/T4524.hs index fbdc0cd77c..9f86ecd00c 100644 --- a/testsuite/tests/typecheck/should_compile/T4524.hs +++ b/testsuite/tests/typecheck/should_compile/T4524.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE GADTs, diff --git a/testsuite/tests/typecheck/should_compile/T5490.hs b/testsuite/tests/typecheck/should_compile/T5490.hs index 5679ee9baa..487fe0d841 100644 --- a/testsuite/tests/typecheck/should_compile/T5490.hs +++ b/testsuite/tests/typecheck/should_compile/T5490.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ViewPatterns #-} diff --git a/testsuite/tests/typecheck/should_compile/T5490.stderr b/testsuite/tests/typecheck/should_compile/T5490.stderr index 93ae57550f..bd54d9df94 100644 --- a/testsuite/tests/typecheck/should_compile/T5490.stderr +++ b/testsuite/tests/typecheck/should_compile/T5490.stderr @@ -1,4 +1,4 @@ -T5490.hs:295:5: warning: [-Woverlapping-patterns (in -Wdefault)] +T5490.hs:296:5: warning: [-Woverlapping-patterns (in -Wdefault)] Pattern match is redundant In a case alternative: _ -> ... diff --git a/testsuite/tests/typecheck/should_compile/T6018.hs b/testsuite/tests/typecheck/should_compile/T6018.hs index e8a194343b..f4b431cda4 100644 --- a/testsuite/tests/typecheck/should_compile/T6018.hs +++ b/testsuite/tests/typecheck/should_compile/T6018.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} diff --git a/testsuite/tests/typecheck/should_compile/T6018.stderr b/testsuite/tests/typecheck/should_compile/T6018.stderr index c4baec422d..9423a0e706 100644 --- a/testsuite/tests/typecheck/should_compile/T6018.stderr +++ b/testsuite/tests/typecheck/should_compile/T6018.stderr @@ -2,10 +2,10 @@ [2 of 3] Compiling T6018a ( T6018a.hs, T6018a.o ) [3 of 3] Compiling T6018 ( T6018.hs, T6018.o ) -T6018.hs:108:5: warning: +T6018.hs:109:5: warning: Type family instance equation is overlapped: - Foo Bool = Bool -- Defined at T6018.hs:108:5 + Foo Bool = Bool -- Defined at T6018.hs:109:5 -T6018.hs:115:5: warning: +T6018.hs:116:5: warning: Type family instance equation is overlapped: - Bar Bool = Char -- Defined at T6018.hs:115:5 + Bar Bool = Char -- Defined at T6018.hs:116:5 diff --git a/testsuite/tests/typecheck/should_compile/T7503a.hs b/testsuite/tests/typecheck/should_compile/T7503a.hs index 61c0fb34e2..638265a8df 100644 --- a/testsuite/tests/typecheck/should_compile/T7503a.hs +++ b/testsuite/tests/typecheck/should_compile/T7503a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ExistentialQuantification, DataKinds, PolyKinds, KindSignatures, GADTs #-} module T7503a where import Data.Kind diff --git a/testsuite/tests/typecheck/should_compile/T9151.hs b/testsuite/tests/typecheck/should_compile/T9151.hs index 351c563b67..c3546438d2 100644 --- a/testsuite/tests/typecheck/should_compile/T9151.hs +++ b/testsuite/tests/typecheck/should_compile/T9151.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, UndecidableInstances #-} module T9151 where diff --git a/testsuite/tests/typecheck/should_compile/Tc251_Help.hs b/testsuite/tests/typecheck/should_compile/Tc251_Help.hs index c4d29d45bc..57d86f83eb 100644 --- a/testsuite/tests/typecheck/should_compile/Tc251_Help.hs +++ b/testsuite/tests/typecheck/should_compile/Tc251_Help.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module Tc251_Help where diff --git a/testsuite/tests/typecheck/should_compile/Tc271.hs b/testsuite/tests/typecheck/should_compile/Tc271.hs index 5f0c3f0a1a..25971223f7 100644 --- a/testsuite/tests/typecheck/should_compile/Tc271.hs +++ b/testsuite/tests/typecheck/should_compile/Tc271.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Tc271 where import Tc271a diff --git a/testsuite/tests/typecheck/should_compile/Tc271.hs-boot b/testsuite/tests/typecheck/should_compile/Tc271.hs-boot index 9f15065a11..0e264a93f5 100644 --- a/testsuite/tests/typecheck/should_compile/Tc271.hs-boot +++ b/testsuite/tests/typecheck/should_compile/Tc271.hs-boot @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Tc271 where class K a where diff --git a/testsuite/tests/typecheck/should_compile/Tc271a.hs b/testsuite/tests/typecheck/should_compile/Tc271a.hs index b5fd136599..526b5482ee 100644 --- a/testsuite/tests/typecheck/should_compile/Tc271a.hs +++ b/testsuite/tests/typecheck/should_compile/Tc271a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Tc271a where import {-# SOURCE #-} Tc271 diff --git a/testsuite/tests/typecheck/should_compile/tc146.hs b/testsuite/tests/typecheck/should_compile/tc146.hs index 5603c5ed78..61fac49197 100644 --- a/testsuite/tests/typecheck/should_compile/tc146.hs +++ b/testsuite/tests/typecheck/should_compile/tc146.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} -- The interesting thing about this one is that diff --git a/testsuite/tests/typecheck/should_compile/tc153.hs b/testsuite/tests/typecheck/should_compile/tc153.hs index a127cdcb8b..b255ac25c0 100644 --- a/testsuite/tests/typecheck/should_compile/tc153.hs +++ b/testsuite/tests/typecheck/should_compile/tc153.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- No ScopedTypeVariables, so (v::a) means (v:: forall a.a) module ShouldCompile where diff --git a/testsuite/tests/typecheck/should_compile/tc231.hs b/testsuite/tests/typecheck/should_compile/tc231.hs index a00f17cf83..9e91be3a6a 100644 --- a/testsuite/tests/typecheck/should_compile/tc231.hs +++ b/testsuite/tests/typecheck/should_compile/tc231.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -ddump-types -dsuppress-module-prefixes #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts #-} diff --git a/testsuite/tests/typecheck/should_compile/tc250.hs b/testsuite/tests/typecheck/should_compile/tc250.hs index 5d6e8beeb9..445d702b69 100644 --- a/testsuite/tests/typecheck/should_compile/tc250.hs +++ b/testsuite/tests/typecheck/should_compile/tc250.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module ShouldCompile where diff --git a/testsuite/tests/typecheck/should_compile/tc251.hs b/testsuite/tests/typecheck/should_compile/tc251.hs index bf9ef34787..e9315263af 100644 --- a/testsuite/tests/typecheck/should_compile/tc251.hs +++ b/testsuite/tests/typecheck/should_compile/tc251.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module ShouldCompile where diff --git a/testsuite/tests/typecheck/should_compile/tc252.hs b/testsuite/tests/typecheck/should_compile/tc252.hs index 215e1ff8cc..1ad9c7c514 100644 --- a/testsuite/tests/typecheck/should_compile/tc252.hs +++ b/testsuite/tests/typecheck/should_compile/tc252.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module ShouldCompile where diff --git a/testsuite/tests/typecheck/should_compile/tc253.hs b/testsuite/tests/typecheck/should_compile/tc253.hs index 7a337ed639..7553b756a8 100644 --- a/testsuite/tests/typecheck/should_compile/tc253.hs +++ b/testsuite/tests/typecheck/should_compile/tc253.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} -- this is needed because |FamHelper a x| /< |Fam a x| diff --git a/testsuite/tests/typecheck/should_fail/AssocTyDef02.hs b/testsuite/tests/typecheck/should_fail/AssocTyDef02.hs index 5db82037ba..c8e5966435 100644 --- a/testsuite/tests/typecheck/should_fail/AssocTyDef02.hs +++ b/testsuite/tests/typecheck/should_fail/AssocTyDef02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module AssocTyDef02 where diff --git a/testsuite/tests/typecheck/should_fail/AssocTyDef02.stderr b/testsuite/tests/typecheck/should_fail/AssocTyDef02.stderr index 79c3e86c67..b486676323 100644 --- a/testsuite/tests/typecheck/should_fail/AssocTyDef02.stderr +++ b/testsuite/tests/typecheck/should_fail/AssocTyDef02.stderr @@ -1,5 +1,5 @@ -AssocTyDef02.hs:6:5: error: +AssocTyDef02.hs:7:5: error: • Illegal argument ‘[b]’ in: ‘type Typ [b] = ...’ The arguments to ‘Typ’ must all be distinct type variables diff --git a/testsuite/tests/typecheck/should_fail/LevPolyBounded.hs b/testsuite/tests/typecheck/should_fail/LevPolyBounded.hs index 0a68a69a38..674de050d6 100644 --- a/testsuite/tests/typecheck/should_fail/LevPolyBounded.hs +++ b/testsuite/tests/typecheck/should_fail/LevPolyBounded.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- inspired by comment:25 on #12708 {-# LANGUAGE PolyKinds #-} diff --git a/testsuite/tests/typecheck/should_fail/LevPolyBounded.stderr b/testsuite/tests/typecheck/should_fail/LevPolyBounded.stderr index c4c8d83a77..d5c20ed70f 100644 --- a/testsuite/tests/typecheck/should_fail/LevPolyBounded.stderr +++ b/testsuite/tests/typecheck/should_fail/LevPolyBounded.stderr @@ -1,16 +1,16 @@ -LevPolyBounded.hs:10:15: error: +LevPolyBounded.hs:11:15: error: • Expected a type, but ‘a’ has kind ‘TYPE r’ ‘r’ is a rigid type variable bound by the class declaration for ‘XBounded’ - at LevPolyBounded.hs:9:17-27 + at LevPolyBounded.hs:10:17-27 • In the type signature: LevPolyBounded.minBound :: a In the class declaration for ‘XBounded’ -LevPolyBounded.hs:11:15: error: +LevPolyBounded.hs:12:15: error: • Expected a type, but ‘a’ has kind ‘TYPE r’ ‘r’ is a rigid type variable bound by the class declaration for ‘XBounded’ - at LevPolyBounded.hs:9:17-27 + at LevPolyBounded.hs:10:17-27 • In the type signature: LevPolyBounded.maxBound :: a In the class declaration for ‘XBounded’ diff --git a/testsuite/tests/typecheck/should_fail/T10351.hs b/testsuite/tests/typecheck/should_fail/T10351.hs index 411698b397..6be96a2301 100644 --- a/testsuite/tests/typecheck/should_fail/T10351.hs +++ b/testsuite/tests/typecheck/should_fail/T10351.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T10351 where class C a where diff --git a/testsuite/tests/typecheck/should_fail/T10351.stderr b/testsuite/tests/typecheck/should_fail/T10351.stderr index bd28a5a3e1..22acdf50db 100644 --- a/testsuite/tests/typecheck/should_fail/T10351.stderr +++ b/testsuite/tests/typecheck/should_fail/T10351.stderr @@ -1,5 +1,5 @@ -T10351.hs:6:1: error: +T10351.hs:7:1: error: • Non type-variable argument in the constraint: C [a] (Use FlexibleContexts to permit this) • When checking the inferred type diff --git a/testsuite/tests/typecheck/should_fail/T11563.hs b/testsuite/tests/typecheck/should_fail/T11563.hs index 83992da92b..5a04c84cf6 100644 --- a/testsuite/tests/typecheck/should_fail/T11563.hs +++ b/testsuite/tests/typecheck/should_fail/T11563.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T11563 where data T a = MkT diff --git a/testsuite/tests/typecheck/should_fail/T11563.stderr b/testsuite/tests/typecheck/should_fail/T11563.stderr index 27eca84816..5ed6d3c799 100644 --- a/testsuite/tests/typecheck/should_fail/T11563.stderr +++ b/testsuite/tests/typecheck/should_fail/T11563.stderr @@ -1,5 +1,5 @@ -T11563.hs:5:19: error: +T11563.hs:6:19: error: • Expecting one more argument to ‘T’ Expected a type, but ‘T’ has kind ‘* -> *’ • In the first argument of ‘C’, namely ‘T’ diff --git a/testsuite/tests/typecheck/should_fail/T12083a.hs b/testsuite/tests/typecheck/should_fail/T12083a.hs index 0ca86f7222..9d5021387d 100644 --- a/testsuite/tests/typecheck/should_fail/T12083a.hs +++ b/testsuite/tests/typecheck/should_fail/T12083a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UnicodeSyntax #-} module T12803a where diff --git a/testsuite/tests/typecheck/should_fail/T12083a.stderr b/testsuite/tests/typecheck/should_fail/T12083a.stderr index fe126f9f0b..05f1450008 100644 --- a/testsuite/tests/typecheck/should_fail/T12083a.stderr +++ b/testsuite/tests/typecheck/should_fail/T12083a.stderr @@ -1,10 +1,10 @@ -T12083a.hs:5:1: error: +T12083a.hs:6:1: error: • Illegal qualified type: Num a => a Perhaps you intended to use RankNTypes • In the type synonym declaration for ‘Constrd’ -T12083a.hs:9:26: error: +T12083a.hs:10:26: error: • Data constructor ‘ExistentiallyLost’ has existential type variables, a context, or a specialised result type ExistentiallyLost :: forall u. TC u => u -> ExistentiallyLost (Enable ExistentialQuantification or GADTs to allow this) diff --git a/testsuite/tests/typecheck/should_fail/T12083b.hs b/testsuite/tests/typecheck/should_fail/T12083b.hs index 3992db3f9e..54985df32f 100644 --- a/testsuite/tests/typecheck/should_fail/T12083b.hs +++ b/testsuite/tests/typecheck/should_fail/T12083b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} module T12083b where diff --git a/testsuite/tests/typecheck/should_fail/T12083b.stderr b/testsuite/tests/typecheck/should_fail/T12083b.stderr index 87649ec4c3..98ff9bb6a0 100644 --- a/testsuite/tests/typecheck/should_fail/T12083b.stderr +++ b/testsuite/tests/typecheck/should_fail/T12083b.stderr @@ -1,5 +1,5 @@ -T12083b.hs:6:5: error: +T12083b.hs:7:5: error: • Illegal qualified type: Eq a => r Perhaps you intended to use RankNTypes • When checking the class method: diff --git a/testsuite/tests/typecheck/should_fail/T12430.hs b/testsuite/tests/typecheck/should_fail/T12430.hs index 03cded2b44..b5144604db 100644 --- a/testsuite/tests/typecheck/should_fail/T12430.hs +++ b/testsuite/tests/typecheck/should_fail/T12430.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilyDependencies #-} module T12430 where diff --git a/testsuite/tests/typecheck/should_fail/T12430.stderr b/testsuite/tests/typecheck/should_fail/T12430.stderr index fd73b40fc4..eab71af1fc 100644 --- a/testsuite/tests/typecheck/should_fail/T12430.stderr +++ b/testsuite/tests/typecheck/should_fail/T12430.stderr @@ -1,8 +1,8 @@ -T12430.hs:6:3: error: +T12430.hs:7:3: error: • Type family equation violates the family's injectivity annotation. Type variable ‘x’ cannot be inferred from the right-hand side. In the type family equation: - F x = C x -- Defined at T12430.hs:6:3 + F x = C x -- Defined at T12430.hs:7:3 • In the equations for closed type family ‘F’ In the type family declaration for ‘F’ diff --git a/testsuite/tests/typecheck/should_fail/T12563.hs b/testsuite/tests/typecheck/should_fail/T12563.hs index 394fa615d8..745f0b77dd 100644 --- a/testsuite/tests/typecheck/should_fail/T12563.hs +++ b/testsuite/tests/typecheck/should_fail/T12563.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} module T12563 where diff --git a/testsuite/tests/typecheck/should_fail/T12563.stderr b/testsuite/tests/typecheck/should_fail/T12563.stderr index f141a23e96..c5b8e1dc40 100644 --- a/testsuite/tests/typecheck/should_fail/T12563.stderr +++ b/testsuite/tests/typecheck/should_fail/T12563.stderr @@ -1,5 +1,5 @@ -T12563.hs:7:15: error: +T12563.hs:8:15: error: • Couldn't match expected type ‘(forall a. f0 a) -> f0 r0’ with actual type ‘p0’ Cannot instantiate unification variable ‘p0’ @@ -8,5 +8,5 @@ T12563.hs:7:15: error: In the expression: foo g In the expression: \ g -> foo g • Relevant bindings include - g :: p0 (bound at T12563.hs:7:6) - x :: p0 -> f0 r0 (bound at T12563.hs:7:1) + g :: p0 (bound at T12563.hs:8:6) + x :: p0 -> f0 r0 (bound at T12563.hs:8:1) diff --git a/testsuite/tests/typecheck/should_fail/T12785b.hs b/testsuite/tests/typecheck/should_fail/T12785b.hs index 951b04c6cd..ccc53f6093 100644 --- a/testsuite/tests/typecheck/should_fail/T12785b.hs +++ b/testsuite/tests/typecheck/should_fail/T12785b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, TypeOperators, ViewPatterns #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds, PolyKinds, GADTs #-} diff --git a/testsuite/tests/typecheck/should_fail/T12785b.stderr b/testsuite/tests/typecheck/should_fail/T12785b.stderr index 85d7361421..14ce110c0d 100644 --- a/testsuite/tests/typecheck/should_fail/T12785b.stderr +++ b/testsuite/tests/typecheck/should_fail/T12785b.stderr @@ -1,5 +1,5 @@ -T12785b.hs:29:65: error: +T12785b.hs:30:65: error: • Could not deduce: Payload ('S n) (Payload n s1) ~ s arising from a use of ‘SBranchX’ from the context: m ~ 'S n @@ -7,13 +7,13 @@ T12785b.hs:29:65: error: Branch :: forall a (n :: Peano). a -> HTree n (HTree ('S n) a) -> HTree ('S n) a, in an equation for ‘nest’ - at T12785b.hs:29:7-51 + at T12785b.hs:30:7-51 ‘s’ is a rigid type variable bound by a pattern with constructor: Hide :: forall {a} (n :: Peano) (f :: a -> *) (s :: HTree n a). STree n f s -> Hidden n f, in an equation for ‘nest’ - at T12785b.hs:29:7-12 + at T12785b.hs:30:7-12 • In the second argument of ‘($)’, namely ‘a `SBranchX` tr’ In the expression: Hide $ a `SBranchX` tr In an equation for ‘nest’: @@ -21,7 +21,7 @@ T12785b.hs:29:65: error: = Hide $ a `SBranchX` tr • Relevant bindings include tr :: STree n (STree ('S n) (STree ('S ('S n)) f)) s1 - (bound at T12785b.hs:29:49) - a :: STree ('S m) f s (bound at T12785b.hs:29:12) + (bound at T12785b.hs:30:49) + a :: STree ('S m) f s (bound at T12785b.hs:30:12) nest :: HTree m (Hidden ('S m) f) -> Hidden m (STree ('S m) f) - (bound at T12785b.hs:27:1) + (bound at T12785b.hs:28:1) diff --git a/testsuite/tests/typecheck/should_fail/T14618.hs b/testsuite/tests/typecheck/should_fail/T14618.hs index da30d7ad85..e032b7b27c 100644 --- a/testsuite/tests/typecheck/should_fail/T14618.hs +++ b/testsuite/tests/typecheck/should_fail/T14618.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} module T14618 where diff --git a/testsuite/tests/typecheck/should_fail/T14618.stderr b/testsuite/tests/typecheck/should_fail/T14618.stderr index 2faf4a925b..c6fae3f81e 100644 --- a/testsuite/tests/typecheck/should_fail/T14618.stderr +++ b/testsuite/tests/typecheck/should_fail/T14618.stderr @@ -1,12 +1,12 @@ -T14618.hs:6:14: error: +T14618.hs:7:14: error: • Couldn't match type ‘b’ with ‘forall c. a’ Expected: a -> b Actual: a -> forall c. a ‘b’ is a rigid type variable bound by the type signature for: safeCoerce :: forall a b. a -> b - at T14618.hs:5:1-20 + at T14618.hs:6:1-20 • In the expression: f' In an equation for ‘safeCoerce’: safeCoerce @@ -16,4 +16,4 @@ T14618.hs:6:14: error: f x = x f' = f • Relevant bindings include - safeCoerce :: a -> b (bound at T14618.hs:6:1) + safeCoerce :: a -> b (bound at T14618.hs:7:1) diff --git a/testsuite/tests/typecheck/should_fail/T14904a.hs b/testsuite/tests/typecheck/should_fail/T14904a.hs index af4cf65a33..0043067e51 100644 --- a/testsuite/tests/typecheck/should_fail/T14904a.hs +++ b/testsuite/tests/typecheck/should_fail/T14904a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE PolyKinds #-} diff --git a/testsuite/tests/typecheck/should_fail/T14904a.stderr b/testsuite/tests/typecheck/should_fail/T14904a.stderr index 3b8d005bab..1ed0946f6c 100644 --- a/testsuite/tests/typecheck/should_fail/T14904a.stderr +++ b/testsuite/tests/typecheck/should_fail/T14904a.stderr @@ -1,8 +1,8 @@ -T14904a.hs:9:6: error: +T14904a.hs:10:6: error: • Expected kind ‘forall (a :: k). g a’, but ‘f’ has kind ‘k1’ ‘k1’ is a rigid type variable bound by a family instance declaration - at T14904a.hs:9:3-30 + at T14904a.hs:10:3-30 • In the first argument of ‘F’, namely ‘(f :: forall a. g a)’ In the type family declaration for ‘F’ diff --git a/testsuite/tests/typecheck/should_fail/T15527.hs b/testsuite/tests/typecheck/should_fail/T15527.hs index b65c26ca7a..ad5271359a 100644 --- a/testsuite/tests/typecheck/should_fail/T15527.hs +++ b/testsuite/tests/typecheck/should_fail/T15527.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T15527 where f :: (Int -> Int) -> (Int -> Int) -> (Int -> Int) diff --git a/testsuite/tests/typecheck/should_fail/T15527.stderr b/testsuite/tests/typecheck/should_fail/T15527.stderr index 8908b17218..6729c26bd5 100644 --- a/testsuite/tests/typecheck/should_fail/T15527.stderr +++ b/testsuite/tests/typecheck/should_fail/T15527.stderr @@ -1,4 +1,4 @@ -T15527.hs:4:6: error: +T15527.hs:5:6: error: Illegal visible type application ‘@Int’ Perhaps you intended to use TypeApplications diff --git a/testsuite/tests/typecheck/should_fail/T15552a.hs b/testsuite/tests/typecheck/should_fail/T15552a.hs index 86c71dc9c0..67fa4dd741 100644 --- a/testsuite/tests/typecheck/should_fail/T15552a.hs +++ b/testsuite/tests/typecheck/should_fail/T15552a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, ExistentialQuantification, GADTs, PolyKinds, TypeOperators #-} {-# LANGUAGE TypeInType, TypeFamilies #-} {- # LANGUAGE UndecidableInstances #-} diff --git a/testsuite/tests/typecheck/should_fail/T15552a.stderr b/testsuite/tests/typecheck/should_fail/T15552a.stderr index 9f44248ae2..f7a6094d9e 100644 --- a/testsuite/tests/typecheck/should_fail/T15552a.stderr +++ b/testsuite/tests/typecheck/should_fail/T15552a.stderr @@ -1,22 +1,21 @@ -T15552a.hs:25:9: error: +T15552a.hs:26:9: error: • Illegal nested type family application ‘GetEntryOfVal (FirstEntryOfVal v kvs)’ (Use UndecidableInstances to permit this) • In the equations for closed type family ‘FirstEntryOfVal’ In the type family declaration for ‘FirstEntryOfVal’ -T15552a.hs:25:9: error: +T15552a.hs:26:9: error: • Illegal nested type family application ‘EntryOfValKey (FirstEntryOfVal v kvs)’ (Use UndecidableInstances to permit this) • In the equations for closed type family ‘FirstEntryOfVal’ In the type family declaration for ‘FirstEntryOfVal’ -T15552a.hs:25:9: error: +T15552a.hs:26:9: error: • Illegal nested type family application ‘EntryOfValKey (FirstEntryOfVal v kvs)’ (Use UndecidableInstances to permit this) • In the equations for closed type family ‘FirstEntryOfVal’ In the type family declaration for ‘FirstEntryOfVal’ - diff --git a/testsuite/tests/typecheck/should_fail/T15712.hs b/testsuite/tests/typecheck/should_fail/T15712.hs index a0b1d5f975..855e96a8f5 100644 --- a/testsuite/tests/typecheck/should_fail/T15712.hs +++ b/testsuite/tests/typecheck/should_fail/T15712.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language RankNTypes #-} {-# Language DerivingVia #-} {-# Language DeriveFunctor #-} diff --git a/testsuite/tests/typecheck/should_fail/T15712.stderr b/testsuite/tests/typecheck/should_fail/T15712.stderr index e8b5d397de..8031f5f0da 100644 --- a/testsuite/tests/typecheck/should_fail/T15712.stderr +++ b/testsuite/tests/typecheck/should_fail/T15712.stderr @@ -1,5 +1,5 @@ -T15712.hs:18:16: error: +T15712.hs:19:16: error: • Expecting one more argument to ‘GEndo’ Expected kind ‘* -> *’, but ‘GEndo’ has kind ‘(* -> *) -> * -> *’ • In the first argument of ‘Codensity’, namely ‘GEndo’ diff --git a/testsuite/tests/typecheck/should_fail/T16059c.hs b/testsuite/tests/typecheck/should_fail/T16059c.hs index d26c7db6d4..6e705113e9 100644 --- a/testsuite/tests/typecheck/should_fail/T16059c.hs +++ b/testsuite/tests/typecheck/should_fail/T16059c.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T16059c where import T16059b diff --git a/testsuite/tests/typecheck/should_fail/T16059c.stderr b/testsuite/tests/typecheck/should_fail/T16059c.stderr index 6c6113fb5f..873b7088bf 100644 --- a/testsuite/tests/typecheck/should_fail/T16059c.stderr +++ b/testsuite/tests/typecheck/should_fail/T16059c.stderr @@ -1,5 +1,5 @@ -T16059c.hs:5:6: error: +T16059c.hs:6:6: error: • Illegal polymorphic type: forall a1. a1 Perhaps you intended to use RankNTypes • In the expansion of type synonym ‘Foo’ diff --git a/testsuite/tests/typecheck/should_fail/T16059e.hs b/testsuite/tests/typecheck/should_fail/T16059e.hs index 4747edc302..ba4bff5f8c 100644 --- a/testsuite/tests/typecheck/should_fail/T16059e.hs +++ b/testsuite/tests/typecheck/should_fail/T16059e.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T16059e where import T16059b diff --git a/testsuite/tests/typecheck/should_fail/T16059e.stderr b/testsuite/tests/typecheck/should_fail/T16059e.stderr index f5a6bb00ba..582d5fbe62 100644 --- a/testsuite/tests/typecheck/should_fail/T16059e.stderr +++ b/testsuite/tests/typecheck/should_fail/T16059e.stderr @@ -1,5 +1,5 @@ -T16059e.hs:14:6: error: +T16059e.hs:15:6: error: • Illegal polymorphic type: forall a. a Perhaps you intended to use RankNTypes • In the expansion of type synonym ‘Foo’ diff --git a/testsuite/tests/typecheck/should_fail/T16255.hs b/testsuite/tests/typecheck/should_fail/T16255.hs index ef2f0a9cb6..2f20d4c788 100644 --- a/testsuite/tests/typecheck/should_fail/T16255.hs +++ b/testsuite/tests/typecheck/should_fail/T16255.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} diff --git a/testsuite/tests/typecheck/should_fail/T16255.stderr b/testsuite/tests/typecheck/should_fail/T16255.stderr index 74379a316c..ba23f0e466 100644 --- a/testsuite/tests/typecheck/should_fail/T16255.stderr +++ b/testsuite/tests/typecheck/should_fail/T16255.stderr @@ -1,10 +1,10 @@ -T16255.hs:13:3: error: +T16255.hs:14:3: error: • Illegal oversaturated visible kind argument: ‘@Bool’ • In the equations for closed type family ‘F1’ In the type family declaration for ‘F1’ -T16255.hs:21:3: error: +T16255.hs:22:3: error: • Illegal oversaturated visible kind argument: ‘@Symbol’ • In the equations for closed type family ‘F2’ In the type family declaration for ‘F2’ diff --git a/testsuite/tests/typecheck/should_fail/T16414.hs b/testsuite/tests/typecheck/should_fail/T16414.hs index 27807e82bf..592aa7de3c 100644 --- a/testsuite/tests/typecheck/should_fail/T16414.hs +++ b/testsuite/tests/typecheck/should_fail/T16414.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances, AllowAmbiguousTypes #-} {-# LANGUAGE UndecidableSuperClasses #-} module T16414 where diff --git a/testsuite/tests/typecheck/should_fail/T16414.stderr b/testsuite/tests/typecheck/should_fail/T16414.stderr index 5cfbf7549a..601f4097db 100644 --- a/testsuite/tests/typecheck/should_fail/T16414.stderr +++ b/testsuite/tests/typecheck/should_fail/T16414.stderr @@ -1,13 +1,13 @@ -T16414.hs:14:6: error: +T16414.hs:15:6: error: • Overlapping instances for AllZip2 f0 arising from a use of ‘f2’ Matching givens (or their superclasses): AllZip2 I bound by the type signature for: f1 :: forall x. (All x, AllZip2 I) => x -> () - at T16414.hs:13:1-35 + at T16414.hs:14:1-35 Matching instances: - instance AllZip2 f -- Defined at T16414.hs:11:10 + instance AllZip2 f -- Defined at T16414.hs:12:10 (The choice depends on the instantiation of ‘f0’) • In the expression: f2 In an equation for ‘f1’: f1 = f2 diff --git a/testsuite/tests/typecheck/should_fail/T16502.hs b/testsuite/tests/typecheck/should_fail/T16502.hs index 5fac062d85..c5ddea3938 100644 --- a/testsuite/tests/typecheck/should_fail/T16502.hs +++ b/testsuite/tests/typecheck/should_fail/T16502.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} diff --git a/testsuite/tests/typecheck/should_fail/T17213.hs b/testsuite/tests/typecheck/should_fail/T17213.hs index e9c093c903..8f35d459f5 100644 --- a/testsuite/tests/typecheck/should_fail/T17213.hs +++ b/testsuite/tests/typecheck/should_fail/T17213.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T17213 where import T17213a diff --git a/testsuite/tests/typecheck/should_fail/T17213.stderr b/testsuite/tests/typecheck/should_fail/T17213.stderr index 1172992660..ff73505d26 100644 --- a/testsuite/tests/typecheck/should_fail/T17213.stderr +++ b/testsuite/tests/typecheck/should_fail/T17213.stderr @@ -1,5 +1,5 @@ -T17213.hs:5:1: error: +T17213.hs:6:1: error: • Illegal polymorphic type: forall a. a -> a Perhaps you intended to use RankNTypes • When checking the inferred type diff --git a/testsuite/tests/typecheck/should_fail/T17563.hs b/testsuite/tests/typecheck/should_fail/T17563.hs index cab972a1bf..565cd9f59e 100644 --- a/testsuite/tests/typecheck/should_fail/T17563.hs +++ b/testsuite/tests/typecheck/should_fail/T17563.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE QuantifiedConstraints #-} module T17563 where diff --git a/testsuite/tests/typecheck/should_fail/T17563.stderr b/testsuite/tests/typecheck/should_fail/T17563.stderr index c24587c1a6..5b46701859 100644 --- a/testsuite/tests/typecheck/should_fail/T17563.stderr +++ b/testsuite/tests/typecheck/should_fail/T17563.stderr @@ -1,5 +1,5 @@ -T17563.hs:5:9: error: +T17563.hs:6:9: error: • Illegal equational constraint a b ~ a c (Use GADTs or TypeFamilies to permit this) • In the quantified constraint ‘forall (a :: * -> *). a b ~ a c’ diff --git a/testsuite/tests/typecheck/should_fail/T18939_Fail.hs b/testsuite/tests/typecheck/should_fail/T18939_Fail.hs index c2faade865..04ceec1e2a 100644 --- a/testsuite/tests/typecheck/should_fail/T18939_Fail.hs +++ b/testsuite/tests/typecheck/should_fail/T18939_Fail.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE PolyKinds #-} module T18939_Fail where diff --git a/testsuite/tests/typecheck/should_fail/T18939_Fail.stderr b/testsuite/tests/typecheck/should_fail/T18939_Fail.stderr index 2cdbab4bb3..eb9bb6c5fd 100644 --- a/testsuite/tests/typecheck/should_fail/T18939_Fail.stderr +++ b/testsuite/tests/typecheck/should_fail/T18939_Fail.stderr @@ -1,5 +1,5 @@ -T18939_Fail.hs:5:1: error: +T18939_Fail.hs:6:1: error: • Illegal polymorphic type: forall a -> a Perhaps you intended to use RankNTypes • In the data type declaration for ‘F’ diff --git a/testsuite/tests/typecheck/should_fail/T19109.hs b/testsuite/tests/typecheck/should_fail/T19109.hs index 614f883b52..d1037260c8 100644 --- a/testsuite/tests/typecheck/should_fail/T19109.hs +++ b/testsuite/tests/typecheck/should_fail/T19109.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T19109 where import Data.Functor.Identity diff --git a/testsuite/tests/typecheck/should_fail/T19109.stderr b/testsuite/tests/typecheck/should_fail/T19109.stderr index 25ce535835..83f60680da 100644 --- a/testsuite/tests/typecheck/should_fail/T19109.stderr +++ b/testsuite/tests/typecheck/should_fail/T19109.stderr @@ -1,4 +1,4 @@ -T19109.hs:5:4: error: +T19109.hs:6:4: error: Illegal visible type application in a pattern: ‘@Int’ Both ScopedTypeVariables and TypeApplications are required to use this feature diff --git a/testsuite/tests/typecheck/should_fail/T19187.hs b/testsuite/tests/typecheck/should_fail/T19187.hs index 52f0e11c69..8ced67e5f4 100644 --- a/testsuite/tests/typecheck/should_fail/T19187.hs +++ b/testsuite/tests/typecheck/should_fail/T19187.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UndecidableInstances #-} module T19187 where diff --git a/testsuite/tests/typecheck/should_fail/T19187.stderr b/testsuite/tests/typecheck/should_fail/T19187.stderr index 637cd22c4d..45cc96833a 100644 --- a/testsuite/tests/typecheck/should_fail/T19187.stderr +++ b/testsuite/tests/typecheck/should_fail/T19187.stderr @@ -1,5 +1,5 @@ -T19187.hs:7:10: error: +T19187.hs:8:10: error: • Non type-variable argument in the constraint: Eq Int (Use FlexibleContexts to permit this) • In the instance declaration for ‘Eq T’ diff --git a/testsuite/tests/typecheck/should_fail/T2247.hs b/testsuite/tests/typecheck/should_fail/T2247.hs index 3779f2db76..9fdd92c258 100644 --- a/testsuite/tests/typecheck/should_fail/T2247.hs +++ b/testsuite/tests/typecheck/should_fail/T2247.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FunctionalDependencies, MultiParamTypeClasses, UndecidableInstances, FlexibleInstances #-} module T2247 where diff --git a/testsuite/tests/typecheck/should_fail/T2247.stderr b/testsuite/tests/typecheck/should_fail/T2247.stderr index 54a6c2a23d..8335fb0033 100644 --- a/testsuite/tests/typecheck/should_fail/T2247.stderr +++ b/testsuite/tests/typecheck/should_fail/T2247.stderr @@ -1,8 +1,8 @@ -T2247.hs:6:10: error: - Illegal instance declaration for ‘FD a b’ - The liberal coverage condition fails in class ‘FD’ - for functional dependency: ‘a -> b’ - Reason: lhs type ‘a’ does not determine rhs type ‘b’ - Un-determined variable: b - In the instance declaration for ‘FD a b’ +T2247.hs:7:10: error: + • Illegal instance declaration for ‘FD a b’ + The liberal coverage condition fails in class ‘FD’ + for functional dependency: ‘a -> b’ + Reason: lhs type ‘a’ does not determine rhs type ‘b’ + Un-determined variable: b + • In the instance declaration for ‘FD a b’ diff --git a/testsuite/tests/typecheck/should_fail/T2538.hs b/testsuite/tests/typecheck/should_fail/T2538.hs index 849256ad3a..6f76293d76 100644 --- a/testsuite/tests/typecheck/should_fail/T2538.hs +++ b/testsuite/tests/typecheck/should_fail/T2538.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- #2538 module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/T2538.stderr b/testsuite/tests/typecheck/should_fail/T2538.stderr index 726ac8fd71..768ad65fa3 100644 --- a/testsuite/tests/typecheck/should_fail/T2538.stderr +++ b/testsuite/tests/typecheck/should_fail/T2538.stderr @@ -1,15 +1,15 @@ -T2538.hs:6:6: error: +T2538.hs:7:6: error: • Illegal qualified type: Eq a => a -> a Perhaps you intended to use RankNTypes • In the type signature: f :: (Eq a => a -> a) -> Int -T2538.hs:9:6: error: +T2538.hs:10:6: error: • Illegal qualified type: Eq a => a -> a Perhaps you intended to use ImpredicativeTypes • In the type signature: g :: [Eq a => a -> a] -> Int -T2538.hs:12:6: error: +T2538.hs:13:6: error: • Illegal qualified type: Eq a => a -> a Perhaps you intended to use ImpredicativeTypes • In the type signature: h :: Ix (Eq a => a -> a) => Int diff --git a/testsuite/tests/typecheck/should_fail/T2994.hs b/testsuite/tests/typecheck/should_fail/T2994.hs index aed2c4aa21..6a79e0ef97 100644 --- a/testsuite/tests/typecheck/should_fail/T2994.hs +++ b/testsuite/tests/typecheck/should_fail/T2994.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses #-} -- #2994 diff --git a/testsuite/tests/typecheck/should_fail/T2994.stderr b/testsuite/tests/typecheck/should_fail/T2994.stderr index 7f20acf5aa..a3ae3bc4d2 100644 --- a/testsuite/tests/typecheck/should_fail/T2994.stderr +++ b/testsuite/tests/typecheck/should_fail/T2994.stderr @@ -1,23 +1,23 @@ -T2994.hs:11:10: error: +T2994.hs:12:10: error: • Expecting one more argument to ‘MonadReader Int’ Expected a constraint, but ‘MonadReader Int’ has kind ‘* -> Constraint’ • In the instance declaration for ‘MonadReader Int’ -T2994.hs:13:10: error: +T2994.hs:14:10: error: • Expecting one more argument to ‘MonadReader (Reader' r)’ Expected a constraint, but ‘MonadReader (Reader' r)’ has kind ‘* -> Constraint’ • In the instance declaration for ‘MonadReader (Reader' r)’ -T2994.hs:13:23: error: +T2994.hs:14:23: error: • Expecting one more argument to ‘Reader' r’ Expected a type, but ‘Reader' r’ has kind ‘* -> *’ • In the first argument of ‘MonadReader’, namely ‘(Reader' r)’ In the instance declaration for ‘MonadReader (Reader' r)’ -T2994.hs:15:10: error: +T2994.hs:16:10: error: • Expected kind ‘(* -> *) -> Constraint’, but ‘MonadReader r r’ has kind ‘Constraint’ • In the instance declaration for ‘MonadReader r r (Reader' r)’ diff --git a/testsuite/tests/typecheck/should_fail/T3155.hs b/testsuite/tests/typecheck/should_fail/T3155.hs index 81f8c7d139..129885f438 100644 --- a/testsuite/tests/typecheck/should_fail/T3155.hs +++ b/testsuite/tests/typecheck/should_fail/T3155.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs, TypeOperators #-} module T3155 where diff --git a/testsuite/tests/typecheck/should_fail/T3155.stderr b/testsuite/tests/typecheck/should_fail/T3155.stderr index 0f04d76bff..e82803fd22 100644 --- a/testsuite/tests/typecheck/should_fail/T3155.stderr +++ b/testsuite/tests/typecheck/should_fail/T3155.stderr @@ -1,5 +1,5 @@ -T3155.hs:13:9: error: +T3155.hs:14:9: error: Illegal symbol ‘forall’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type> diff --git a/testsuite/tests/typecheck/should_fail/T3468.hs b/testsuite/tests/typecheck/should_fail/T3468.hs index 4c4bf975bc..f091f09b2c 100644 --- a/testsuite/tests/typecheck/should_fail/T3468.hs +++ b/testsuite/tests/typecheck/should_fail/T3468.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ExistentialQuantification #-} module T3468 where diff --git a/testsuite/tests/typecheck/should_fail/T3950.hs b/testsuite/tests/typecheck/should_fail/T3950.hs index 1a3bcc1d31..ca78ab68ea 100644 --- a/testsuite/tests/typecheck/should_fail/T3950.hs +++ b/testsuite/tests/typecheck/should_fail/T3950.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} module T3950 where diff --git a/testsuite/tests/typecheck/should_fail/T3950.stderr b/testsuite/tests/typecheck/should_fail/T3950.stderr index 69ff276479..16fde0e488 100644 --- a/testsuite/tests/typecheck/should_fail/T3950.stderr +++ b/testsuite/tests/typecheck/should_fail/T3950.stderr @@ -1,5 +1,5 @@ -T3950.hs:15:13: error: +T3950.hs:16:13: error: • Couldn't match kind ‘*’ with ‘* -> *’ When matching types w :: (* -> * -> *) -> * @@ -15,4 +15,4 @@ T3950.hs:15:13: error: rp' :: Sealed (Id p x) rp' = undefined • Relevant bindings include - rp :: Bool -> Maybe (w (Id p)) (bound at T3950.hs:15:1) + rp :: Bool -> Maybe (w (Id p)) (bound at T3950.hs:16:1) diff --git a/testsuite/tests/typecheck/should_fail/T5300.hs b/testsuite/tests/typecheck/should_fail/T5300.hs index b15713d290..e200ca0c24 100644 --- a/testsuite/tests/typecheck/should_fail/T5300.hs +++ b/testsuite/tests/typecheck/should_fail/T5300.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FunctionalDependencies, MultiParamTypeClasses #-} module T5300 where diff --git a/testsuite/tests/typecheck/should_fail/T5300.stderr b/testsuite/tests/typecheck/should_fail/T5300.stderr index a80839455e..06d870dff3 100644 --- a/testsuite/tests/typecheck/should_fail/T5300.stderr +++ b/testsuite/tests/typecheck/should_fail/T5300.stderr @@ -1,26 +1,26 @@ -T5300.hs:11:7: error: +T5300.hs:12:7: error: • Could not deduce (C1 a b c0) from the context: (Monad m, C1 a b c) bound by the type signature for: f1 :: forall (m :: * -> *) a b c. (Monad m, C1 a b c) => a -> StateT (T b) m a - at T5300.hs:11:7-50 + at T5300.hs:12:7-50 The type variable ‘c0’ is ambiguous • In the ambiguity check for ‘f1’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes In the type signature: f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a -T5300.hs:14:7: error: +T5300.hs:15:7: error: • Could not deduce (C1 a1 b1 c10) from the context: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) bound by the type signature for: f2 :: forall (m :: * -> *) a1 b1 c1 a2 b2 c2. (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) => a1 -> StateT (T b2) m a2 - at T5300.hs:14:7-69 + at T5300.hs:15:7-69 The type variable ‘c10’ is ambiguous • In the ambiguity check for ‘f2’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes diff --git a/testsuite/tests/typecheck/should_fail/T5957.hs b/testsuite/tests/typecheck/should_fail/T5957.hs index c168a00f3a..badb4309a1 100644 --- a/testsuite/tests/typecheck/should_fail/T5957.hs +++ b/testsuite/tests/typecheck/should_fail/T5957.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T5957 where flex :: Int -> Show a => a -> String diff --git a/testsuite/tests/typecheck/should_fail/T5957.stderr b/testsuite/tests/typecheck/should_fail/T5957.stderr index 66bc0c1d0d..05a7316915 100644 --- a/testsuite/tests/typecheck/should_fail/T5957.stderr +++ b/testsuite/tests/typecheck/should_fail/T5957.stderr @@ -1,6 +1,5 @@ -T5957.hs:3:9: error: +T5957.hs:4:9: error: • Illegal qualified type: Show a => a -> String Perhaps you intended to use RankNTypes - • In the type signature: - flex :: Int -> Show a => a -> String + • In the type signature: flex :: Int -> Show a => a -> String diff --git a/testsuite/tests/typecheck/should_fail/T6022.hs b/testsuite/tests/typecheck/should_fail/T6022.hs index 994b779626..de4adb5ff9 100644 --- a/testsuite/tests/typecheck/should_fail/T6022.hs +++ b/testsuite/tests/typecheck/should_fail/T6022.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T6022 where f x = x == head diff --git a/testsuite/tests/typecheck/should_fail/T6022.stderr b/testsuite/tests/typecheck/should_fail/T6022.stderr index 6423925b12..9f4bc91622 100644 --- a/testsuite/tests/typecheck/should_fail/T6022.stderr +++ b/testsuite/tests/typecheck/should_fail/T6022.stderr @@ -1,5 +1,5 @@ -T6022.hs:3:1: error: +T6022.hs:4:1: error: • Non type-variable argument in the constraint: Eq ([a] -> a) (Use FlexibleContexts to permit this) • When checking the inferred type diff --git a/testsuite/tests/typecheck/should_fail/T6069.stderr b/testsuite/tests/typecheck/should_fail/T6069.stderr index 98b0587bbc..0456a84280 100644 --- a/testsuite/tests/typecheck/should_fail/T6069.stderr +++ b/testsuite/tests/typecheck/should_fail/T6069.stderr @@ -23,5 +23,5 @@ T6069.hs:15:16: error: Expected: ST s2 Int -> b2 Actual: (forall s. ST s b2) -> b2 • In the second argument of ‘(.)’, namely ‘runST’ - In the first argument of ‘($)’, namely ‘(print . runST)’ + In the expression: print . runST In the expression: ((print . runST) $) fourty_two diff --git a/testsuite/tests/typecheck/should_fail/T8034.hs b/testsuite/tests/typecheck/should_fail/T8034.hs index e432152e08..c696f68e57 100644 --- a/testsuite/tests/typecheck/should_fail/T8034.hs +++ b/testsuite/tests/typecheck/should_fail/T8034.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T8034 where diff --git a/testsuite/tests/typecheck/should_fail/T8034.stderr b/testsuite/tests/typecheck/should_fail/T8034.stderr index 8f64538554..05f2ca42a3 100644 --- a/testsuite/tests/typecheck/should_fail/T8034.stderr +++ b/testsuite/tests/typecheck/should_fail/T8034.stderr @@ -1,5 +1,5 @@ -T8034.hs:6:3: error: +T8034.hs:7:3: error: • Couldn't match type: F a0 with: F a Expected: F a -> F a diff --git a/testsuite/tests/typecheck/should_fail/T8883.hs b/testsuite/tests/typecheck/should_fail/T8883.hs index c3af3af513..d2d5c1eca6 100644 --- a/testsuite/tests/typecheck/should_fail/T8883.hs +++ b/testsuite/tests/typecheck/should_fail/T8883.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} -- #8883 diff --git a/testsuite/tests/typecheck/should_fail/T8883.stderr b/testsuite/tests/typecheck/should_fail/T8883.stderr index c56c434c4c..6febdaa2b9 100644 --- a/testsuite/tests/typecheck/should_fail/T8883.stderr +++ b/testsuite/tests/typecheck/should_fail/T8883.stderr @@ -1,5 +1,5 @@ -T8883.hs:20:1: error: +T8883.hs:21:1: error: • Non type-variable argument in the constraint: Functor (PF a) (Use FlexibleContexts to permit this) • When checking the inferred type diff --git a/testsuite/tests/typecheck/should_fail/T9201.hs b/testsuite/tests/typecheck/should_fail/T9201.hs index 7702fa369c..b041628805 100644 --- a/testsuite/tests/typecheck/should_fail/T9201.hs +++ b/testsuite/tests/typecheck/should_fail/T9201.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds, FunctionalDependencies, MultiParamTypeClasses #-} module T9201 where diff --git a/testsuite/tests/typecheck/should_fail/T9201.stderr b/testsuite/tests/typecheck/should_fail/T9201.stderr index ad873a0d0a..f0901b4d56 100644 --- a/testsuite/tests/typecheck/should_fail/T9201.stderr +++ b/testsuite/tests/typecheck/should_fail/T9201.stderr @@ -1,12 +1,12 @@ -T9201.hs:6:17: error: +T9201.hs:7:17: error: • Expected kind ‘x’, but ‘a’ has kind ‘y’ ‘y’ is a rigid type variable bound by the class declaration for ‘MonoidalCCC’ - at T9201.hs:5:20-49 + at T9201.hs:6:20-49 ‘x’ is a rigid type variable bound by the class declaration for ‘MonoidalCCC’ - at T9201.hs:5:20-49 + at T9201.hs:6:20-49 • In the first argument of ‘f’, namely ‘a’ In the second argument of ‘d’, namely ‘(f a)’ In the type signature: ret :: d a (f a) diff --git a/testsuite/tests/typecheck/should_fail/T9858a.hs b/testsuite/tests/typecheck/should_fail/T9858a.hs index b9cbf8fa1a..c61b29baee 100644 --- a/testsuite/tests/typecheck/should_fail/T9858a.hs +++ b/testsuite/tests/typecheck/should_fail/T9858a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- From comment:76 in #9858 -- This exploit still works in GHC 7.10.1. -- By Shachaf Ben-Kiki, Ørjan Johansen and Nathan van Doorn diff --git a/testsuite/tests/typecheck/should_fail/T9858a.stderr b/testsuite/tests/typecheck/should_fail/T9858a.stderr index fcf76ef247..b179fcf595 100644 --- a/testsuite/tests/typecheck/should_fail/T9858a.stderr +++ b/testsuite/tests/typecheck/should_fail/T9858a.stderr @@ -1,5 +1,5 @@ -T9858a.hs:20:18: error: +T9858a.hs:21:18: error: • Illegal qualified type: (() :: Constraint, () :: Constraint) => () • In the expansion of type synonym ‘PX’ diff --git a/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.hs b/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.hs index de5e4436f7..2928f5ccf5 100644 --- a/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.hs +++ b/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module NoNullaryTC where class A where diff --git a/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.stderr b/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.stderr index e41b8aa1bd..15c9cd2ab6 100644 --- a/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.stderr +++ b/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.stderr @@ -1,5 +1,5 @@ -TcNoNullaryTC.hs:3:1: error: +TcNoNullaryTC.hs:4:1: error: • No parameters for class ‘A’ (Enable MultiParamTypeClasses to allow no-parameter classes) • In the class declaration for ‘A’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail044.hs b/testsuite/tests/typecheck/should_fail/tcfail044.hs index b271d0f977..09d756693f 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail044.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail044.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- !!! tcfail044: duplicated type variable in instance decls -- module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail044.stderr b/testsuite/tests/typecheck/should_fail/tcfail044.stderr index 9733cc4fc8..a83ae86d81 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail044.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail044.stderr @@ -1,16 +1,16 @@ -tcfail044.hs:5:20: - Illegal instance declaration for ‘Eq (a -> a)’ - (All instance types must be of the form (T a1 ... an) - where a1 ... an are *distinct type variables*, - and each type variable appears at most once in the instance head. - Use FlexibleInstances if you want to disable this.) - In the instance declaration for ‘Eq (a -> a)’ +tcfail044.hs:6:20: error: + • Illegal instance declaration for ‘Eq (a -> a)’ + (All instance types must be of the form (T a1 ... an) + where a1 ... an are *distinct type variables*, + and each type variable appears at most once in the instance head. + Use FlexibleInstances if you want to disable this.) + • In the instance declaration for ‘Eq (a -> a)’ -tcfail044.hs:8:21: - Illegal instance declaration for ‘Num (a -> a)’ - (All instance types must be of the form (T a1 ... an) - where a1 ... an are *distinct type variables*, - and each type variable appears at most once in the instance head. - Use FlexibleInstances if you want to disable this.) - In the instance declaration for ‘Num (a -> a)’ +tcfail044.hs:9:21: error: + • Illegal instance declaration for ‘Num (a -> a)’ + (All instance types must be of the form (T a1 ... an) + where a1 ... an are *distinct type variables*, + and each type variable appears at most once in the instance head. + Use FlexibleInstances if you want to disable this.) + • In the instance declaration for ‘Num (a -> a)’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail047.hs b/testsuite/tests/typecheck/should_fail/tcfail047.hs index f3cdb19741..7c31e33197 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail047.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail047.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldFail where class A a where diff --git a/testsuite/tests/typecheck/should_fail/tcfail047.stderr b/testsuite/tests/typecheck/should_fail/tcfail047.stderr index 53eb4defdd..c1c0dca619 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail047.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail047.stderr @@ -1,8 +1,8 @@ -tcfail047.hs:6:10: - Illegal instance declaration for ‘A (a, (b, c))’ - (All instance types must be of the form (T a1 ... an) - where a1 ... an are *distinct type variables*, - and each type variable appears at most once in the instance head. - Use FlexibleInstances if you want to disable this.) - In the instance declaration for ‘A (a, (b, c))’ +tcfail047.hs:7:10: error: + • Illegal instance declaration for ‘A (a, (b, c))’ + (All instance types must be of the form (T a1 ... an) + where a1 ... an are *distinct type variables*, + and each type variable appears at most once in the instance head. + Use FlexibleInstances if you want to disable this.) + • In the instance declaration for ‘A (a, (b, c))’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail076.hs b/testsuite/tests/typecheck/should_fail/tcfail076.hs index fc4fc011d4..384b6d2560 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail076.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail076.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} {- diff --git a/testsuite/tests/typecheck/should_fail/tcfail076.stderr b/testsuite/tests/typecheck/should_fail/tcfail076.stderr index 47432ae851..c45eed328e 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail076.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail076.stderr @@ -1,19 +1,19 @@ -tcfail076.hs:18:82: error: +tcfail076.hs:19:82: error: • Couldn't match type ‘res1’ with ‘res’ Expected: m res1 Actual: m res ‘res1’ is a rigid type variable bound by a type expected by the context: forall res1. (b -> m res1) -> m res1 - at tcfail076.hs:18:71-88 + at tcfail076.hs:19:71-88 ‘res’ is a rigid type variable bound by a type expected by the context: forall res. (a -> m res) -> m res - at tcfail076.hs:18:35-96 + at tcfail076.hs:19:35-96 • In the expression: cont a In the first argument of ‘KContT’, namely ‘(\ cont' -> cont a)’ In the expression: KContT (\ cont' -> cont a) • Relevant bindings include - cont' :: b -> m res1 (bound at tcfail076.hs:18:73) - cont :: a -> m res (bound at tcfail076.hs:18:37) + cont' :: b -> m res1 (bound at tcfail076.hs:19:73) + cont :: a -> m res (bound at tcfail076.hs:19:37) diff --git a/testsuite/tests/typecheck/should_fail/tcfail098.hs b/testsuite/tests/typecheck/should_fail/tcfail098.hs index 159e9c8081..c1c7e93f1e 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail098.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail098.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UndecidableInstances #-} module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail098.stderr b/testsuite/tests/typecheck/should_fail/tcfail098.stderr index 503c3e3898..a0c2735c26 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail098.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail098.stderr @@ -1,10 +1,10 @@ -tcfail098.hs:12:10: error: +tcfail098.hs:13:10: error: • Could not deduce (Bar a0) from the context: Bar a bound by an instance declaration: forall a. Bar a => Bar Bool - at tcfail098.hs:12:10-26 + at tcfail098.hs:13:10-26 The type variable ‘a0’ is ambiguous • In the ambiguity check for an instance declaration To defer the ambiguity check to use sites, enable AllowAmbiguousTypes diff --git a/testsuite/tests/typecheck/should_fail/tcfail116.hs b/testsuite/tests/typecheck/should_fail/tcfail116.hs index 1c32c956d3..656ffac4e2 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail116.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail116.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldFail where -- in Haskell 98, methods must mention the class variable diff --git a/testsuite/tests/typecheck/should_fail/tcfail116.stderr b/testsuite/tests/typecheck/should_fail/tcfail116.stderr index 952512686e..83a76daf30 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail116.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail116.stderr @@ -1,10 +1,10 @@ -tcfail116.hs:6:5: error: +tcfail116.hs:7:5: error: • Could not deduce (Foo a0) from the context: Foo a bound by the type signature for: bug :: forall a. Foo a => () - at tcfail116.hs:6:5-13 + at tcfail116.hs:7:5-13 The type variable ‘a0’ is ambiguous • In the ambiguity check for ‘bug’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes diff --git a/testsuite/tests/typecheck/should_fail/tcfail117.hs b/testsuite/tests/typecheck/should_fail/tcfail117.hs index 2a5ae99172..4afc0f527e 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail117.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail117.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldFail where -- Without any extensions enabled both of these should fail diff --git a/testsuite/tests/typecheck/should_fail/tcfail117.stderr b/testsuite/tests/typecheck/should_fail/tcfail117.stderr index e35a2581c8..41caeaea92 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail117.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail117.stderr @@ -1,13 +1,13 @@ -tcfail117.hs:5:32: - Can't make a derived instance of ‘Enum N1’: - ‘N1’ must be an enumeration type - (an enumeration consists of one or more nullary, non-GADT constructors) - Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension - In the newtype declaration for ‘N1’ +tcfail117.hs:6:32: error: + • Can't make a derived instance of ‘Enum N1’: + ‘N1’ must be an enumeration type + (an enumeration consists of one or more nullary, non-GADT constructors) + Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension + • In the newtype declaration for ‘N1’ -tcfail117.hs:6:32: - Can't make a derived instance of ‘Enum N2’: - ‘N2’ must be an enumeration type - (an enumeration consists of one or more nullary, non-GADT constructors) - In the data declaration for ‘N2’ +tcfail117.hs:7:32: error: + • Can't make a derived instance of ‘Enum N2’: + ‘N2’ must be an enumeration type + (an enumeration consists of one or more nullary, non-GADT constructors) + • In the data declaration for ‘N2’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail122.hs b/testsuite/tests/typecheck/should_fail/tcfail122.hs index 2594ca6e24..77455c7c7b 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail122.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail122.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, KindSignatures #-} module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail122.stderr b/testsuite/tests/typecheck/should_fail/tcfail122.stderr index 39507bdbeb..9aed03214b 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail122.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail122.stderr @@ -1,5 +1,5 @@ -tcfail122.hs:8:9: error: +tcfail122.hs:9:9: error: • Couldn't match kind ‘*’ with ‘* -> *’ When matching types c0 :: (* -> *) -> * @@ -16,4 +16,4 @@ tcfail122.hs:8:9: error: = [undefined :: forall a b. a b, undefined :: forall (c :: (* -> *) -> *) (d :: * -> *). c d] • Relevant bindings include - foo :: [a b] (bound at tcfail122.hs:7:1) + foo :: [a b] (bound at tcfail122.hs:8:1) diff --git a/testsuite/tests/typecheck/should_fail/tcfail132.hs b/testsuite/tests/typecheck/should_fail/tcfail132.hs index 910fc2267c..c241c18e4c 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail132.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail132.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- Fails with a kind error. -- The current error message was rather horrible (trac bug #312): -- diff --git a/testsuite/tests/typecheck/should_fail/tcfail132.stderr b/testsuite/tests/typecheck/should_fail/tcfail132.stderr index 92f7c2ab52..a026a3a9f9 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail132.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail132.stderr @@ -1,5 +1,5 @@ -tcfail132.hs:17:37: error: +tcfail132.hs:18:37: error: • Couldn't match kind ‘*’ with ‘* -> *’ Expected kind ‘* -> * -> * -> *’, but ‘Object f' f t’ has kind ‘* -> * -> *’ @@ -7,7 +7,7 @@ tcfail132.hs:17:37: error: In the type ‘T (Object f' f t) (DUnit t)’ In the type declaration for ‘LiftObject’ -tcfail132.hs:17:53: error: +tcfail132.hs:18:53: error: • Couldn't match kind ‘*’ with ‘* -> *’ Expected kind ‘* -> * -> * -> *’, but ‘DUnit t’ has kind ‘* -> * -> *’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail139.hs b/testsuite/tests/typecheck/should_fail/tcfail139.hs index af21c8afba..5532523a7c 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail139.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail139.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- Should be rejected by Haskell 98 module Foo where diff --git a/testsuite/tests/typecheck/should_fail/tcfail139.stderr b/testsuite/tests/typecheck/should_fail/tcfail139.stderr index e97ff3bf8a..496df9488f 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail139.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail139.stderr @@ -1,7 +1,7 @@ -tcfail139.hs:6:10: - Illegal instance declaration for ‘Bounded Foo’ - (All instance types must be of the form (T t1 ... tn) - where T is not a synonym. - Use TypeSynonymInstances if you want to disable this.) - In the instance declaration for ‘Bounded Foo’ +tcfail139.hs:7:10: error: + • Illegal instance declaration for ‘Bounded Foo’ + (All instance types must be of the form (T t1 ... tn) + where T is not a synonym. + Use TypeSynonymInstances if you want to disable this.) + • In the instance declaration for ‘Bounded Foo’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail140.hs b/testsuite/tests/typecheck/should_fail/tcfail140.hs index 8a4bb7dbe5..d897f138de 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail140.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail140.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- GHC 6.4 gave pretty horrible error messages -- for some of these examples -- c.f. SourceForge [ ghc-Bugs-1231273 ] confusing error diff --git a/testsuite/tests/typecheck/should_fail/tcfail140.stderr b/testsuite/tests/typecheck/should_fail/tcfail140.stderr index 8bce6238c6..d40b317130 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail140.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail140.stderr @@ -1,38 +1,38 @@ -tcfail140.hs:10:7: error: +tcfail140.hs:11:7: error: • Couldn't match expected type ‘t0 -> t’ with actual type ‘Int’ • The function ‘f’ is applied to two value arguments, but its type ‘Int -> Int’ has only one In the expression: f 3 9 In an equation for ‘bar’: bar = f 3 9 - • Relevant bindings include bar :: t (bound at tcfail140.hs:10:1) + • Relevant bindings include bar :: t (bound at tcfail140.hs:11:1) -tcfail140.hs:12:10: error: +tcfail140.hs:13:10: error: • Couldn't match expected type ‘t1 -> t’ with actual type ‘Int’ • The function ‘f’ is applied to two value arguments, but its type ‘Int -> Int’ has only one In the expression: 3 `f` 4 In an equation for ‘rot’: rot xs = 3 `f` 4 • Relevant bindings include - rot :: p -> t (bound at tcfail140.hs:12:1) + rot :: p -> t (bound at tcfail140.hs:13:1) -tcfail140.hs:14:15: error: +tcfail140.hs:15:15: error: • Couldn't match expected type ‘a -> b’ with actual type ‘Int’ • In the first argument of ‘map’, namely ‘(3 `f`)’ In the expression: map (3 `f`) xs In an equation for ‘bot’: bot xs = map (3 `f`) xs • Relevant bindings include - xs :: [a] (bound at tcfail140.hs:14:5) - bot :: [a] -> [b] (bound at tcfail140.hs:14:1) + xs :: [a] (bound at tcfail140.hs:15:5) + bot :: [a] -> [b] (bound at tcfail140.hs:15:1) -tcfail140.hs:16:8: error: +tcfail140.hs:17:8: error: • The constructor ‘Just’ should have 1 argument, but has been given none • In the pattern: Just The lambda expression ‘\ Just x -> x’ has two value arguments, but its type ‘Maybe a -> a’ has only one In the expression: (\ Just x -> x) :: Maybe a -> a -tcfail140.hs:19:1: error: +tcfail140.hs:20:1: error: • Couldn't match expected type ‘Int’ with actual type ‘p0 -> Bool’ • The equation(s) for ‘g’ have two value arguments, but its type ‘Int -> Int’ has only one diff --git a/testsuite/tests/typecheck/should_fail/tcfail142.hs b/testsuite/tests/typecheck/should_fail/tcfail142.hs index a628b0e335..246d568e01 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail142.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail142.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses #-} -- Tests top-level ambiguity resolution diff --git a/testsuite/tests/typecheck/should_fail/tcfail142.stderr b/testsuite/tests/typecheck/should_fail/tcfail142.stderr index ac36ffb5e0..ecb22021f3 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail142.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail142.stderr @@ -1,10 +1,10 @@ -tcfail142.hs:18:8: error: +tcfail142.hs:19:8: error: • Could not deduce (Bar a0 r) from the context: Bar a r bound by the type signature for: bar :: forall a r. Bar a r => r -> () - at tcfail142.hs:18:8-25 + at tcfail142.hs:19:8-25 The type variable ‘a0’ is ambiguous • In the ambiguity check for ‘bar’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes diff --git a/testsuite/tests/typecheck/should_fail/tcfail143.hs b/testsuite/tests/typecheck/should_fail/tcfail143.hs index 55b45eca31..9051c629da 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail143.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail143.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UndecidableInstances, FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies #-} diff --git a/testsuite/tests/typecheck/should_fail/tcfail143.stderr b/testsuite/tests/typecheck/should_fail/tcfail143.stderr index 576ac1903d..841504d3f9 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail143.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail143.stderr @@ -1,8 +1,8 @@ -tcfail143.hs:29:9: error: +tcfail143.hs:30:9: error: • Couldn't match type ‘S Z’ with ‘Z’ arising from a functional dependency between: constraint ‘MinMax (S Z) Z Z Z’ arising from a use of ‘extend’ - instance ‘MinMax a Z Z a’ at tcfail143.hs:11:10-23 + instance ‘MinMax a Z Z a’ at tcfail143.hs:12:10-23 • In the expression: n1 `extend` n0 In an equation for ‘t2’: t2 = n1 `extend` n0 diff --git a/testsuite/tests/typecheck/should_fail/tcfail150.hs b/testsuite/tests/typecheck/should_fail/tcfail150.hs index cc2ca034ef..dc10e56727 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail150.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail150.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldFail where -- !!! constraining the type variable in a class head is illegal diff --git a/testsuite/tests/typecheck/should_fail/tcfail150.stderr b/testsuite/tests/typecheck/should_fail/tcfail150.stderr index fe14a3ab1c..50a2793add 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail150.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail150.stderr @@ -1,5 +1,5 @@ -tcfail150.hs:6:3: error: +tcfail150.hs:7:3: error: • Constraint ‘Eq a’ in the type of ‘op’ constrains only the class type variables Enable ConstrainedClassMethods to allow it diff --git a/testsuite/tests/typecheck/should_fail/tcfail154.hs b/testsuite/tests/typecheck/should_fail/tcfail154.hs index 6e3161bd46..f7e8bd1b82 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail154.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail154.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses #-} module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail154.stderr b/testsuite/tests/typecheck/should_fail/tcfail154.stderr index 3e613201f7..a4bda5998e 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail154.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail154.stderr @@ -1,5 +1,5 @@ -tcfail154.hs:12:10: error: +tcfail154.hs:13:10: error: • Variable ‘a’ occurs more often in the constraint ‘C a a’ than in the instance head ‘Eq (T a)’ (Use UndecidableInstances to permit this) diff --git a/testsuite/tests/typecheck/should_fail/tcfail158.hs b/testsuite/tests/typecheck/should_fail/tcfail158.hs index 95af345b36..f87ecbc53a 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail158.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail158.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ExplicitForAll #-} -- This one actually crashed in 6.4.1 diff --git a/testsuite/tests/typecheck/should_fail/tcfail158.stderr b/testsuite/tests/typecheck/should_fail/tcfail158.stderr index c473465740..526db0a6ea 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail158.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail158.stderr @@ -1,5 +1,5 @@ -tcfail158.hs:14:19: error: +tcfail158.hs:15:19: error: • Expecting one more argument to ‘Val v’ Expected a type, but ‘Val v’ has kind ‘* -> *’ • In the type signature: bar :: forall v. Val v diff --git a/testsuite/tests/typecheck/should_fail/tcfail166.hs b/testsuite/tests/typecheck/should_fail/tcfail166.hs index 5a2d4b8df7..31fa9fad20 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail166.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail166.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- Without -XScopedTypeVariables, this should fail module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail166.stderr b/testsuite/tests/typecheck/should_fail/tcfail166.stderr index 5cc11d4a4b..ab8805183d 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail166.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail166.stderr @@ -1,5 +1,5 @@ -tcfail166.hs:5:13: error: +tcfail166.hs:6:13: error: Illegal symbol ‘forall’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type> diff --git a/testsuite/tests/typecheck/should_fail/tcfail173.hs b/testsuite/tests/typecheck/should_fail/tcfail173.hs index bad14bd539..0221aa74af 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail173.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail173.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail173.stderr b/testsuite/tests/typecheck/should_fail/tcfail173.stderr index 70a22c3af9..a3da917f27 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail173.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail173.stderr @@ -1,4 +1,4 @@ -tcfail173.hs:5:12: +tcfail173.hs:6:12: error: Illegal declaration of a type or class operator ‘<.>’ Use TypeOperators to declare operators in type and declarations diff --git a/testsuite/tests/typecheck/should_fail/tcfail183.hs b/testsuite/tests/typecheck/should_fail/tcfail183.hs index d46d87ad7c..0e21d72345 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail183.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail183.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldCompile where diff --git a/testsuite/tests/typecheck/should_fail/tcfail183.stderr b/testsuite/tests/typecheck/should_fail/tcfail183.stderr index 7a0e2ab346..96245ce100 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail183.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail183.stderr @@ -1,5 +1,5 @@ -tcfail183.hs:4:30: error: +tcfail183.hs:5:30: error: Illegal symbol ‘forall’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type> diff --git a/testsuite/tests/typecheck/should_fail/tcfail184.hs b/testsuite/tests/typecheck/should_fail/tcfail184.hs index 210a9c7c9b..17ae2f5756 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail184.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail184.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -XScopedTypeVariables #-} -- We don't actually want scoped type variables, but this flag makes the diff --git a/testsuite/tests/typecheck/should_fail/tcfail184.stderr b/testsuite/tests/typecheck/should_fail/tcfail184.stderr index fd6f1fdefd..8a1117caea 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail184.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail184.stderr @@ -1,5 +1,5 @@ -tcfail184.hs:8:19: error: +tcfail184.hs:9:19: error: • Illegal polymorphic type: forall a. Ord a => [a] -> [a] Perhaps you intended to use RankNTypes • In the definition of data constructor ‘MkSwizzle’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail195.hs b/testsuite/tests/typecheck/should_fail/tcfail195.hs index 4c2408e8ba..0b06236a52 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail195.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail195.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, GADTs #-} module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail195.stderr b/testsuite/tests/typecheck/should_fail/tcfail195.stderr index 1fa821fbac..93a4b8f92f 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail195.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail195.stderr @@ -1,5 +1,5 @@ -tcfail195.hs:6:3: error: +tcfail195.hs:7:3: error: • Illegal polymorphic type: forall a. a • In the definition of data constructor ‘Foo’ In the data type declaration for ‘Foo’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail209.hs b/testsuite/tests/typecheck/should_fail/tcfail209.hs index f4f0922231..e91b16dc1b 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail209.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail209.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module FancyContextsWithoutExtension1 where type Showish = Show diff --git a/testsuite/tests/typecheck/should_fail/tcfail209.stderr b/testsuite/tests/typecheck/should_fail/tcfail209.stderr index 1d2f315494..f52d2a8f79 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail209.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail209.stderr @@ -1,5 +1,5 @@ -tcfail209.hs:3:1: error: +tcfail209.hs:4:1: error: • Illegal constraint synonym of kind: ‘* -> Constraint’ (Use ConstraintKinds to permit this) • In the type synonym declaration for ‘Showish’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail209a.hs b/testsuite/tests/typecheck/should_fail/tcfail209a.hs index 90abb73520..ba0b192991 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail209a.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail209a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module TcFail209a where g :: ((Show a, Num a), Eq a) => a -> a diff --git a/testsuite/tests/typecheck/should_fail/tcfail209a.stderr b/testsuite/tests/typecheck/should_fail/tcfail209a.stderr index 1ccd64ff2b..aad518014e 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail209a.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail209a.stderr @@ -1,6 +1,5 @@ -tcfail209a.hs:3:6: error: +tcfail209a.hs:4:6: error: • Illegal tuple constraint: (Show a, Num a) (Use ConstraintKinds to permit this) - • In the type signature: - g :: ((Show a, Num a), Eq a) => a -> a + • In the type signature: g :: ((Show a, Num a), Eq a) => a -> a diff --git a/testsuite/tests/typecheck/should_run/TypeOf.hs b/testsuite/tests/typecheck/should_run/TypeOf.hs index 37113bfe80..0c3ac14b0f 100644 --- a/testsuite/tests/typecheck/should_run/TypeOf.hs +++ b/testsuite/tests/typecheck/should_run/TypeOf.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, UnicodeSyntax #-} {-# OPTIONS -Wno-star-is-type #-} |