diff --git a/.gitignore b/.gitignore index d01e08fa40ca4348b85a716195d0198c4a64d7a1..902d8d89f4272b8e021f1d1068d661daded80e8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1194,3 +1194,89 @@ tests/rts/T6006 tests/simplCore/should_run/T5915 tests/simplCore/should_run/T5920 tests/simplCore/should_run/T5997 + +tests/codeGen/should_run/T5900 +tests/codeGen/should_run/T7163 +tests/codeGen/should_run/T7361 +tests/codeGen/should_run/T7600 +tests/codeGen/should_run/Word2Float64 +tests/concurrent/should_run/367 +tests/concurrent/should_run/367_letnoescape +tests/deSugar/should_run/DsLambdaCase +tests/deSugar/should_run/DsMultiWayIf +tests/dph/nbody/dph-nbody-copy-fast +tests/dph/nbody/dph-nbody-copy-opt +tests/driver/T7060dump/ +tests/driver/dynamicToo/A001.dyn_hi +tests/driver/dynamicToo/A001.dyn_o +tests/driver/dynamicToo/B001.dyn_hi +tests/driver/dynamicToo/B001.dyn_o +tests/driver/dynamicToo/C001.dyn_hi +tests/driver/dynamicToo/C001.dyn_o +tests/driver/dynamicToo/d001 +tests/driver/dynamicToo/s001 +tests/driver/objc/objc-hi +tests/driver/objc/objcpp-hi +tests/driver/recomp012/Foo.hs +tests/driver/recomp012/Main +tests/driver/recomp012/Main.hs +tests/driver/recomp012/MyBool.hs +tests/ext-core/T7239.hcr +tests/ffi/should_run/7170 +tests/ffi/should_run/T4012 +tests/ghc-api/T7478/A +tests/ghc-api/T7478/T7478 +tests/lib/integer/IntegerConversionRules.simpl +tests/lib/integer/gcdInteger +tests/mdo/should_fail/mdofail006 +tests/mdo/should_run/mdorun004 +tests/mdo/should_run/mdorun005 +tests/numeric/should_run/T7014 +tests/numeric/should_run/T7014.simpl +tests/numeric/should_run/T7233 +tests/optasm-log +tests/optllvm-32-log +tests/optllvm-log +tests/parser/should_compile/T7476/Main.imports +tests/parser/should_compile/T7476/T7476 +tests/parser/should_run/ParserMultiWayIf +tests/perf/compiler/T5837.comp.stats +tests/perf/should_run/Conversions +tests/perf/should_run/Conversions.stats +tests/perf/should_run/T7257 +tests/perf/should_run/T7257.stats +tests/perf/should_run/T7436 +tests/perf/should_run/T7436.stats +tests/perf/should_run/T7507 +tests/plugins/simple-plugin/pkg.plugins01/ +tests/plugins/simple-plugin/pkg.plugins02/ +tests/plugins/simple-plugin/pkg.plugins03/ +tests/rts/7087 +tests/rts/T7037 +tests/rts/T7037_main +tests/rts/T7040 +tests/rts/T7160 +tests/rts/T7227 +tests/rts/T7227.stat +tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly01/ +tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly02/ +tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly03/ +tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly04/ +tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly05/ +tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly06/ +tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly07/ +tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly08/ +tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly09/ +tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly10/ +tests/safeHaskell/check/pkg01/pdb.safePkg01/ +tests/simplCore/should_compile/T4138.simpl +tests/simplCore/should_run/T7101 +tests/th/T5555 +tests/th/T7064 +tests/th/TH_StringPrimL +tests/typecheck/should_run/T5751 +tests/typecheck/should_run/T5913 +tests/typecheck/should_run/T6117 +tests/typecheck/should_run/T7023 +tests/typecheck/should_run/T7126 + diff --git a/config/ghc b/config/ghc index 73ff7d3fd62707a2095aa2f4eb647445cd28acec..da7cc3a2afb51c53061ebf31eb3b05ecbb2b61fb 100644 --- a/config/ghc +++ b/config/ghc @@ -80,7 +80,7 @@ if (ghc_with_llvm == 1): config.in_tree_compiler = in_tree_compiler config.clean_only = clean_only -config.way_flags = { +config.way_flags = lambda name : { 'normal' : [], 'g1' : [], 'optasm' : ['-O', '-fasm'], @@ -97,7 +97,7 @@ config.way_flags = { 'threaded1_ls' : ['-threaded', '-debug'], 'threaded2' : ['-O', '-threaded', '-eventlog'], 'threaded2_hT' : ['-O', '-threaded'], - 'hpc' : ['-O', '-fhpc' ], + 'hpc' : ['-O', '-fhpc', '-hpcdir', '.hpc.' + name ], 'prof_hc_hb' : ['-O', '-prof', '-static', '-auto-all'], 'prof_hb' : ['-O', '-prof', '-static', '-auto-all'], 'prof_hd' : ['-O', '-prof', '-static', '-auto-all'], @@ -153,15 +153,15 @@ config.way_rts_flags = { prof_ways = map (lambda x: x[0], \ filter(lambda x: '-prof' in x[1], \ - config.way_flags.items())) + config.way_flags('dummy_name').items())) threaded_ways = map (lambda x: x[0], \ filter(lambda x: '-threaded' in x[1] or 'ghci' == x[0], \ - config.way_flags.items())) + config.way_flags('dummy_name').items())) opt_ways = map (lambda x: x[0], \ filter(lambda x: '-O' in x[1], \ - config.way_flags.items())) + config.way_flags('dummy_name').items())) def get_compiler_info(): # This should really not go through the shell diff --git a/driver/runtests.py b/driver/runtests.py index 66e3bf4d5ef14efb112e02f49cdf19a5bfe98e71..1b8ddb171a7f41a1da5f256bf543ea5f4a459d00 100644 --- a/driver/runtests.py +++ b/driver/runtests.py @@ -207,9 +207,6 @@ if windows or darwin: global testopts_local testopts_local.x = TestOptions() -global thisdir_testopts -thisdir_testopts = getThisDirTestOpts() - if config.use_threads: t.lock = threading.Lock() t.thread_pool = threading.Condition(t.lock) @@ -257,24 +254,39 @@ for file in t_files: t.n_framework_failures = t.n_framework_failures + 1 traceback.print_exc() -# Now run all the tests -if config.use_threads: - t.running_threads=0 -for oneTest in parallelTests: - oneTest() -if config.use_threads: - t.thread_pool.acquire() - while t.running_threads>0: - t.thread_pool.wait() - t.thread_pool.release() -config.use_threads = False -for oneTest in aloneTests: - oneTest() +if config.list_broken: + global brokens + print '' + print 'Broken tests:' + print (' '.join(map (lambda (b, d, n) : '#' + str(b) + '(' + d + '/' + n + ')', brokens))) + print '' + + if t.n_framework_failures != 0: + print 'WARNING:', str(t.n_framework_failures), 'framework failures!' + print '' +else: + # Now run all the tests + if config.use_threads: + t.running_threads=0 + for oneTest in parallelTests: + if stopping(): + break + oneTest() + if config.use_threads: + t.thread_pool.acquire() + while t.running_threads>0: + t.thread_pool.wait() + t.thread_pool.release() + config.use_threads = False + for oneTest in aloneTests: + if stopping(): + break + oneTest() -summary(t, sys.stdout) + summary(t, sys.stdout) -if config.output_summary != '': - summary(t, open(config.output_summary, 'w')) + if config.output_summary != '': + summary(t, open(config.output_summary, 'w')) sys.exit(0) diff --git a/driver/testglobals.py b/driver/testglobals.py index 10a11050344c4ea0025a21268aae3e7201e757ae..a9595570fcaa9b1a414e2b4f29f787d8ca005e25 100644 --- a/driver/testglobals.py +++ b/driver/testglobals.py @@ -48,6 +48,8 @@ class TestConfig: # run the "fast" version of the test suite self.fast = 0 + self.list_broken = False + # Compiler type (ghc, hugs, nhc, etc.) self.compiler_type = '' @@ -214,17 +216,6 @@ class TestOptions: self.compiler_stats_range_fields = {} self.stats_range_fields = {} - # TODO: deprecate this in favour of compiler_stats_range_fields - # - # which -t numeric fields do we want to look at, and what bounds must - # they fall within? - # Elements of these lists should be things like - # ('bytes allocated', - # 9300000000, - # 9400000000) - self.compiler_stats_num_fields = {} - self.stats_num_fields = {} - # should we run this test alone, i.e. not run it in parallel with # any other threads self.alone = False @@ -237,6 +228,9 @@ class TestOptions: self.objc_src = 0 self.objcpp_src = 0 + # Does this test use a .cmm file? + self.cmm_src = 0 + # Should we put .hi/.o files in a subdirectory? self.outputdir = None @@ -271,3 +265,7 @@ class TestOptions: global default_testopts default_testopts = TestOptions() +# (bug, directory, name) of tests marked broken +global brokens +brokens = [] + diff --git a/driver/testlib.py b/driver/testlib.py index 0332d926ec3c76ca1c08956c8592797cde127556..66987a1f599920854fd5f0518ed9ec6b3e6052de 100644 --- a/driver/testlib.py +++ b/driver/testlib.py @@ -15,7 +15,7 @@ import traceback import copy import glob import types -import math +from math import ceil, trunc have_subprocess = False try: @@ -32,15 +32,13 @@ if config.use_threads: import threading import thread -# Options valid for all the tests in the current "directory". After -# each test, we reset the options to these. To change the options for -# multiple tests, the function setTestOpts() below can be used to alter -# these options. -global thisdir_testopts -thisdir_testopts = TestOptions() - -def getThisDirTestOpts(): - return thisdir_testopts +global wantToStop +wantToStop = False +def stopNow(): + global wantToStop + wantToStop = True +def stopping(): + return wantToStop # Options valid for the current test only (these get reset to # testdir_testopts after each test). @@ -63,7 +61,8 @@ def setLocalTestOpts(opts): # This can be called at the top of a file of tests, to set default test options # for the following tests. def setTestOpts( f ): - f( thisdir_testopts ); + global thisdir_settings + thisdir_settings = [thisdir_settings, f] # ----------------------------------------------------------------------------- # Canned setup functions for common cases. eg. for a test you might say @@ -76,23 +75,23 @@ def setTestOpts( f ): # # to expect failure for this test. -def normal( opts ): +def normal( name, opts ): return; -def skip( opts ): +def skip( name, opts ): opts.skip = 1 -def expect_fail( opts ): +def expect_fail( name, opts ): opts.expect = 'fail'; def reqlib( lib ): - return lambda opts, l=lib: _reqlib (opts, l ) + return lambda name, opts, l=lib: _reqlib (name, opts, l ) # Cache the results of looking to see if we have a library or not. # This makes quite a difference, especially on Windows. have_lib = {} -def _reqlib( opts, lib ): +def _reqlib( name, opts, lib ): if have_lib.has_key(lib): got_it = have_lib[lib] else: @@ -115,370 +114,267 @@ def _reqlib( opts, lib ): if not got_it: opts.expect = 'missing-lib' -def req_profiling( opts ): +def req_profiling( name, opts ): if not config.have_profiling: opts.expect = 'fail' -def req_shared_libs( opts ): +def req_shared_libs( name, opts ): if not config.have_shared_libs: opts.expect = 'fail' -def req_interp( opts ): +def req_interp( name, opts ): if not config.have_interp: opts.expect = 'fail' -def req_smp( opts ): +def req_smp( name, opts ): if not config.have_smp: opts.expect = 'fail' -def expect_broken( bug ): - return lambda opts, b=bug: _expect_broken (opts, b ) - -def _expect_broken( opts, bug ): - opts.expect = 'fail'; - -def ignore_output( opts ): +def ignore_output( name, opts ): opts.ignore_output = 1 -def no_stdin( opts ): +def no_stdin( name, opts ): opts.no_stdin = 1 -def combined_output( opts ): +def combined_output( name, opts ): opts.combined_output = True # ----- def expect_fail_for( ways ): - return lambda opts, w=ways: _expect_fail_for( opts, w ) + return lambda name, opts, w=ways: _expect_fail_for( name, opts, w ) -def _expect_fail_for( opts, ways ): +def _expect_fail_for( name, opts, ways ): opts.expect_fail_for = ways +def expect_broken( bug ): + return lambda name, opts, b=bug: _expect_broken (name, opts, b ) + +def _expect_broken( name, opts, bug ): + record_broken(name, opts, bug) + opts.expect = 'fail'; + def expect_broken_for( bug, ways ): - return lambda opts, b=bug, w=ways: _expect_broken_for( opts, b, w ) + return lambda name, opts, b=bug, w=ways: _expect_broken_for( name, opts, b, w ) -def _expect_broken_for( opts, bug, ways ): +def _expect_broken_for( name, opts, bug, ways ): + record_broken(name, opts, bug) opts.expect_fail_for = ways +def record_broken(name, opts, bug): + global brokens + me = (bug, opts.testdir, name) + if not me in brokens: + brokens.append(me) + # ----- def omit_ways( ways ): - return lambda opts, w=ways: _omit_ways( opts, w ) + return lambda name, opts, w=ways: _omit_ways( name, opts, w ) -def _omit_ways( opts, ways ): +def _omit_ways( name, opts, ways ): opts.omit_ways = ways # ----- def only_ways( ways ): - return lambda opts, w=ways: _only_ways( opts, w ) + return lambda name, opts, w=ways: _only_ways( name, opts, w ) -def _only_ways( opts, ways ): +def _only_ways( name, opts, ways ): opts.only_ways = ways # ----- def extra_ways( ways ): - return lambda opts, w=ways: _extra_ways( opts, w ) + return lambda name, opts, w=ways: _extra_ways( name, opts, w ) -def _extra_ways( opts, ways ): +def _extra_ways( name, opts, ways ): opts.extra_ways = ways # ----- def omit_compiler_types( compiler_types ): - return lambda opts, c=compiler_types: _omit_compiler_types(opts, c) + return lambda name, opts, c=compiler_types: _omit_compiler_types(name, opts, c) -def _omit_compiler_types( opts, compiler_types ): +def _omit_compiler_types( name, opts, compiler_types ): if config.compiler_type in compiler_types: opts.skip = 1 # ----- def only_compiler_types( compiler_types ): - return lambda opts, c=compiler_types: _only_compiler_types(opts, c) + return lambda name, opts, c=compiler_types: _only_compiler_types(name, opts, c) -def _only_compiler_types( opts, compiler_types ): +def _only_compiler_types( name, opts, compiler_types ): if config.compiler_type not in compiler_types: opts.skip = 1 # ----- def set_stdin( file ): - return lambda opts, f=file: _set_stdin(opts, f); + return lambda name, opts, f=file: _set_stdin(name, opts, f); -def _set_stdin( opts, f ): +def _set_stdin( name, opts, f ): opts.stdin = f # ----- def exit_code( val ): - return lambda opts, v=val: _exit_code(opts, v); + return lambda name, opts, v=val: _exit_code(name, opts, v); -def _exit_code( opts, v ): +def _exit_code( name, opts, v ): opts.exit_code = v # ----- def timeout_multiplier( val ): - return lambda opts, v=val: _timeout_multiplier(opts, v) + return lambda name, opts, v=val: _timeout_multiplier(name, opts, v) -def _timeout_multiplier( opts, v ): +def _timeout_multiplier( name, opts, v ): opts.timeout_multiplier = v # ----- def extra_run_opts( val ): - return lambda opts, v=val: _extra_run_opts(opts, v); + return lambda name, opts, v=val: _extra_run_opts(name, opts, v); -def _extra_run_opts( opts, v ): +def _extra_run_opts( name, opts, v ): opts.extra_run_opts = v # ----- def extra_hc_opts( val ): - return lambda opts, v=val: _extra_hc_opts(opts, v); + return lambda name, opts, v=val: _extra_hc_opts(name, opts, v); -def _extra_hc_opts( opts, v ): +def _extra_hc_opts( name, opts, v ): opts.extra_hc_opts = v # ----- def extra_clean( files ): - return lambda opts, v=files: _extra_clean(opts, v); + return lambda name, opts, v=files: _extra_clean(name, opts, v); -def _extra_clean( opts, v ): +def _extra_clean( name, opts, v ): opts.clean_files = v # ----- -def stats_num_field( field, min, max ): - return lambda opts, f=field, x=min, y=max: _stats_num_field(opts, f, x, y); - -def _stats_num_field( opts, f, x, y ): - # copy the dictionary, as the config gets shared between all tests - opts.stats_num_fields = opts.stats_num_fields.copy() - opts.stats_num_fields[f] = (x, y) - -def compiler_stats_num_field( field, min, max ): - return lambda opts, f=field, x=min, y=max: _compiler_stats_num_field(opts, f, x, y); +def stats_num_field( field, expecteds ): + return lambda name, opts, f=field, e=expecteds: _stats_num_field(name, opts, f, e); -def _compiler_stats_num_field( opts, f, x, y ): - # copy the dictionary, as the config gets shared between all tests - opts.compiler_stats_num_fields = opts.compiler_stats_num_fields.copy() - opts.compiler_stats_num_fields[f] = (x, y) - -# ----- +def _stats_num_field( name, opts, field, expecteds ): + if field in opts.stats_range_fields: + framework_fail(name, 'duplicate-numfield', 'Duplicate ' + field + ' num_field check') -def stats_range_field( field, min, max ): - return lambda opts, f=field, x=min, y=max: _stats_range_field(opts, f, x, y); + if type(expecteds) is types.ListType: + for (b, expected, dev) in expecteds: + if b: + opts.stats_range_fields[field] = (expected, dev) + return + framework_fail(name, 'numfield-no-expected', 'No expected value found for ' + field + ' in num_field check') -def _stats_range_field( opts, f, x, y ): - # copy the dictionary, as the config gets shared between all tests - opts.stats_range_fields = opts.stats_range_fields.copy() - opts.stats_range_fields[f] = (x, y) - -def compiler_stats_range_field( field, min, max ): - return lambda opts, f=field, x=min, y=max: _compiler_stats_range_field(opts, f, x, y); - -def _compiler_stats_range_field( opts, f, x, y ): - # copy the dictionary, as the config gets shared between all tests - opts.compiler_stats_range_fields = opts.compiler_stats_range_fields.copy() - opts.compiler_stats_range_fields[f] = (x, y) + else: + (expected, dev) = expecteds + opts.stats_range_fields[field] = (expected, dev) -# ----- +def compiler_stats_num_field( field, expecteds ): + return lambda name, opts, f=field, e=expecteds: _compiler_stats_num_field(name, opts, f, e); -def skip_if_no_ghci(opts): - if not ('ghci' in config.run_ways): - opts.skip = 1 +def _compiler_stats_num_field( name, opts, field, expecteds ): + if field in opts.compiler_stats_range_fields: + framework_fail(name, 'duplicate-numfield', 'Duplicate ' + field + ' num_field check') -# ---- + for (b, expected, dev) in expecteds: + if b: + opts.compiler_stats_range_fields[field] = (expected, dev) + return -def skip_if_fast(opts): - if config.fast: - opts.skip = 1 + framework_fail(name, 'numfield-no-expected', 'No expected value found for ' + field + ' in num_field check') # ----- -def if_platform( plat, f ): - if config.platform == plat: - return f - else: - return normal - -def unless_platform( plat, f ): - if config.platform != plat: - return f - else: - return normal - -def if_os( os, f ): - if config.os == os: - return f - else: - return normal - -def unless_os( os, f ): - if config.os == os: - return normal - else: - return f - -def if_arch( arch, f ): - if config.arch == arch: +def when(b, f): + # When list_brokens is on, we want to see all expect_broken calls, + # so we always do f + if b or config.list_broken: return f else: return normal -def unless_arch( arch, f ): - if config.arch == arch: - return normal - else: - return f +def unless(b, f): + return when(not b, f) -def if_wordsize( ws, f ): - if config.wordsize == str(ws): - return f - else: - return normal - -def unless_wordsize( ws, f ): - if config.wordsize == str(ws): - return normal - else: - return f +def doing_ghci(): + return 'ghci' in config.run_ways -def if_unregisterised( f ): - if config.unregisterised: - return f - else: - return normal +def ghci_dynamic( ): + return config.ghc_dynamic_by_default -def unless_unregisterised( f ): - if config.unregisterised: - return normal - else: - return f +def fast(): + return config.fast -def if_msys( f ): - if config.msys: - return f - else: - return normal +def platform( plat ): + return config.platform == plat -def if_cygwin( f ): - if config.cygwin: - return f - else: - return normal +def opsys( os ): + return config.os == os -def when_have_vanilla( f ): - if config.have_vanilla: - return f - else: - return normal +def arch( arch ): + return config.arch == arch -def unless_have_vanilla( f ): - if config.have_vanilla: - return normal - else: - return f +def wordsize( ws ): + return config.wordsize == str(ws) -def when_have_dynamic( f ): - if config.have_dynamic: - return f - else: - return normal +def msys( ): + return config.msys -def unless_have_dynamic( f ): - if config.have_dynamic: - return normal - else: - return f +def cygwin( ): + return config.cygwin -def when_have_profiling( f ): - if config.have_profiling: - return f - else: - return normal +def have_vanilla( ): + return config.have_vanilla -def unless_have_profiling( f ): - if config.have_profiling: - return normal - else: - return f +def have_dynamic( ): + return config.have_dynamic -# --- +def have_profiling( ): + return config.have_profiling -def if_ghci_dynamic( f ): - if config.ghc_dynamic_by_default: - return f - else: - return normal +def in_tree_compiler( ): + return config.in_tree_compiler -def if_in_tree_compiler( f ): - if config.in_tree_compiler: - return f - else: - return normal +def compiler_type( compiler ): + return config.compiler_type == compiler -def unless_in_tree_compiler( f ): - if config.in_tree_compiler: - return normal - else: - return f +def compiler_lt( compiler, version ): + return config.compiler_type == compiler and \ + version_lt(config.compiler_version, version) -def if_compiler_type( compiler, f ): - if config.compiler_type == compiler: - return f - else: - return normal +def compiler_le( compiler, version ): + return config.compiler_type == compiler and \ + version_le(config.compiler_version, version) -def if_compiler_profiled( f ): - if config.compiler_profiled: - return f - else: - return normal +def compiler_gt( compiler, version ): + return config.compiler_type == compiler and \ + version_gt(config.compiler_version, version) -def unless_compiler_profiled( f ): - if config.compiler_profiled: - return normal - else: - return f +def compiler_ge( compiler, version ): + return config.compiler_type == compiler and \ + version_ge(config.compiler_version, version) -def if_compiler_lt( compiler, version, f ): - if config.compiler_type == compiler and \ - version_lt(config.compiler_version, version): - return f - else: - return normal +def unregisterised( ): + return config.unregisterised -def if_compiler_le( compiler, version, f ): - if config.compiler_type == compiler and \ - version_le(config.compiler_version, version): - return f - else: - return normal +def compiler_profiled( ): + return config.compiler_profiled -def if_compiler_gt( compiler, version, f ): - if config.compiler_type == compiler and \ - version_gt(config.compiler_version, version): - return f - else: - return normal +def compiler_debugged( ): + return config.compiler_debugged -def if_compiler_ge( compiler, version, f ): - if config.compiler_type == compiler and \ - version_ge(config.compiler_version, version): - return f - else: - return normal +def tag( t ): + return t in config.compiler_tags -def if_compiler_debugged( f ): - if config.compiler_debugged: - return f - else: - return normal +# --- def namebase( nb ): return lambda opts, nb=nb: _namebase(opts, nb) @@ -488,99 +384,89 @@ def _namebase( opts, nb ): # --- -def if_tag( tag, f ): - if tag in config.compiler_tags: - return f - else: - return normal - -def unless_tag( tag, f ): - if not (tag in config.compiler_tags): - return f - else: - return normal - -# --- -def high_memory_usage(opts): +def high_memory_usage(name, opts): opts.alone = True # --- -def literate( opts ): +def literate( name, opts ): opts.literate = 1; -def c_src( opts ): +def c_src( name, opts ): opts.c_src = 1; -def objc_src( opts ): +def objc_src( name, opts ): opts.objc_src = 1; -def objcpp_src( opts ): +def objcpp_src( name, opts ): opts.objcpp_src = 1; +def cmm_src( name, opts ): + opts.cmm_src = 1; + def outputdir( odir ): - return lambda opts, d=odir: _outputdir(opts, d) + return lambda name, opts, d=odir: _outputdir(name, opts, d) -def _outputdir( opts, odir ): +def _outputdir( name, opts, odir ): opts.outputdir = odir; # ---- def pre_cmd( cmd ): - return lambda opts, c=cmd: _pre_cmd(opts, cmd) + return lambda name, opts, c=cmd: _pre_cmd(name, opts, cmd) -def _pre_cmd( opts, cmd ): +def _pre_cmd( name, opts, cmd ): opts.pre_cmd = cmd # ---- def clean_cmd( cmd ): - return lambda opts, c=cmd: _clean_cmd(opts, cmd) + return lambda name, opts, c=cmd: _clean_cmd(name, opts, cmd) -def _clean_cmd( opts, cmd ): +def _clean_cmd( name, opts, cmd ): opts.clean_cmd = cmd # ---- def cmd_prefix( prefix ): - return lambda opts, p=prefix: _cmd_prefix(opts, prefix) + return lambda name, opts, p=prefix: _cmd_prefix(name, opts, prefix) -def _cmd_prefix( opts, prefix ): +def _cmd_prefix( name, opts, prefix ): opts.cmd_wrapper = lambda cmd, p=prefix: p + ' ' + cmd; # ---- def cmd_wrapper( fun ): - return lambda opts, f=fun: _cmd_wrapper(opts, fun) + return lambda name, opts, f=fun: _cmd_wrapper(name, opts, fun) -def _cmd_wrapper( opts, fun ): +def _cmd_wrapper( name, opts, fun ): opts.cmd_wrapper = fun # ---- def compile_cmd_prefix( prefix ): - return lambda opts, p=prefix: _compile_cmd_prefix(opts, prefix) + return lambda name, opts, p=prefix: _compile_cmd_prefix(name, opts, prefix) -def _compile_cmd_prefix( opts, prefix ): +def _compile_cmd_prefix( name, opts, prefix ): opts.compile_cmd_prefix = prefix # ---- -def normalise_slashes( opts ): +def normalise_slashes( name, opts ): opts.extra_normaliser = normalise_slashes_ -def normalise_exe( opts ): +def normalise_exe( name, opts ): opts.extra_normaliser = normalise_exe_ def normalise_fun( fun ): - return lambda opts, f=fun: _normalise_fun(opts, f) + return lambda name, opts, f=fun: _normalise_fun(name, opts, f) -def _normalise_fun( opts, f ): +def _normalise_fun( name, opts, f ): opts.extra_normaliser = f def normalise_errmsg_fun( fun ): - return lambda opts, f=fun: _normalise_errmsg_fun(opts, f) + return lambda name, opts, f=fun: _normalise_errmsg_fun(name, opts, f) -def _normalise_errmsg_fun( opts, f ): +def _normalise_errmsg_fun( name, opts, f ): opts.extra_errmsg_normaliser = f def two_normalisers(f, g): @@ -589,25 +475,25 @@ def two_normalisers(f, g): # ---- # Function for composing two opt-fns together -def composes( fs ): - return reduce(lambda f, g: compose(f, g), fs) - -def compose( f, g ): - return lambda opts, f=f, g=g: _compose(opts,f,g) - -def _compose( opts, f, g ): - f(opts) - g(opts) +def executeSetups(fs, name, opts): + if type(fs) is types.ListType: + # If we have a list of setups, then execute each one + map (lambda f : executeSetups(f, name, opts), fs) + else: + # fs is a single function, so just apply it + fs(name, opts) # ----------------------------------------------------------------------------- # The current directory of tests def newTestDir( dir ): - global thisdir_testopts + global thisdir_settings # reset the options for this test directory - thisdir_testopts = copy.copy(default_testopts) - thisdir_testopts.testdir = dir - thisdir_testopts.compiler_always_flags = config.compiler_always_flags + thisdir_settings = lambda name, opts, dir=dir: _newTestDir( name, opts, dir ) + +def _newTestDir( name, opts, dir ): + opts.testdir = dir + opts.compiler_always_flags = config.compiler_always_flags # ----------------------------------------------------------------------------- # Actually doing tests @@ -640,14 +526,18 @@ def test (name, setup, func, args): global aloneTests global parallelTests global allTestNames + global thisdir_settings if name in allTestNames: framework_fail(name, 'duplicate', 'There are multiple tests with this name') - myTestOpts = copy.copy(thisdir_testopts) + if not re.match('^[0-9]*[a-zA-Z][a-zA-Z0-9._-]*$', name): + framework_fail(name, 'bad_name', 'This test has an invalid name') - if type(setup) is types.ListType: - setup = composes(setup) + # Make a deep copy of the default_testopts, as we need our own copy + # of any dictionaries etc inside it. Otherwise, if one test modifies + # them, all tests will see the modified version! + myTestOpts = copy.deepcopy(default_testopts) - setup(myTestOpts) + executeSetups([thisdir_settings, setup], name, myTestOpts) thisTest = lambda : runTest(myTestOpts, name, func, args) if myTestOpts.alone: @@ -721,6 +611,8 @@ def test_common_work (name, opts, func, args): if not config.clean_only: # Run the required tests... for way in do_ways: + if stopping(): + break do_test (name, way, func, args) for way in all_ways: @@ -756,6 +648,11 @@ def test_common_work (name, opts, func, args): except: pass + try: + shutil.rmtree(in_testdir('.hpc.' + name)) + except: + pass + try: cleanCmd = getTestOpts().clean_cmd if cleanCmd != None: @@ -877,6 +774,8 @@ def do_test(name, way, func, args): t.expected_failures[name] = [way] else: framework_fail(name, way, 'bad result ' + passFail) + except KeyboardInterrupt: + stopNow() except: framework_fail(name, way, 'do_test exception') traceback.print_exc() @@ -916,7 +815,7 @@ def skiptest (name, way): def framework_fail( name, way, reason ): full_name = name + '(' + way + ')' - print '*** framework failure for', full_name, reason, ':' + print '*** framework failure for', full_name, reason t.n_framework_failures = t.n_framework_failures + 1 if name in t.framework_failures: t.framework_failures[name].append(way) @@ -1099,15 +998,14 @@ def multi_compile_and_run( name, way, top_mod, extra_mods, extra_hc_opts ): def stats( name, way, stats_file ): opts = getTestOpts() - return checkStats(stats_file, opts.stats_range_fields - , opts.stats_num_fields) + return checkStats(stats_file, opts.stats_range_fields) # ----------------------------------------------------------------------------- # Check -t stats info -def checkStats(stats_file, range_fields, num_fields): +def checkStats(stats_file, range_fields): result = passed() - if len(num_fields) + len(range_fields) > 0: + if len(range_fields) > 0: f = open(in_testdir(stats_file)) contents = f.read() f.close() @@ -1119,36 +1017,31 @@ def checkStats(stats_file, range_fields, num_fields): result = failBecause('no such stats field') val = int(m.group(1)) - min = expected * ((100 - float(dev))/100); - max = expected * ((100 + float(dev))/100); - - if val < min: - print field, val, 'is more than ' + repr(dev) + '%' - print 'less than the exepected value', expected - print 'If this is because you have improved GHC, please' - print 'update the test so that GHC doesn\'t regress again' - result = failBecause('stat too good') - if val > max: - print field, val, 'is more than ' + repr(dev) + '% greater than the expected value,', expected, max - result = failBecause('stat not good enough') - - # ToDo: remove all uses of this, and delete it - for (field, (min, max)) in num_fields.items(): - m = re.search('\("' + field + '", "([0-9]+)"\)', contents) - if m == None: - print 'Failed to find field: ', field - result = failBecause('no such stats field') - val = int(m.group(1)) + lowerBound = trunc( expected * ((100 - float(dev))/100)); + upperBound = trunc(0.5 + ceil(expected * ((100 + float(dev))/100))); - if val < min: - print field, val, 'is less than minimum allowed', min - print 'If this is because you have improved GHC, please' - print 'update the test so that GHC doesn\'t regress again' + if val < lowerBound: + print field, 'value is too low:' + print '(If this is because you have improved GHC, please' + print 'update the test so that GHC doesn\'t regress again)' result = failBecause('stat too good') - if val > max: - print field, val, 'is more than maximum allowed', max + if val > upperBound: + print field, 'value is too high:' result = failBecause('stat not good enough') + if val < lowerBound or val > upperBound: + valStr = str(val) + valLen = len(valStr) + expectedStr = str(expected) + expectedLen = len(expectedStr) + length = max(map (lambda x : len(str(x)), [expected, lowerBound, upperBound, val])) + def display(descr, val, extra): + print descr, string.rjust(str(val), length), extra + display(' Expected ' + field + ':', expected, '+/-' + str(dev) + '%') + display(' Lower bound ' + field + ':', lowerBound, '') + display(' Upper bound ' + field + ':', upperBound, '') + display(' Actual ' + field + ':', val, '') + return result # ----------------------------------------------------------------------------- @@ -1199,13 +1092,14 @@ def simple_build( name, way, extra_hc_opts, should_fail, top_mod, link, addsuf, to_do = '-c' # just compile stats_file = name + '.comp.stats' - if len(opts.compiler_stats_num_fields) + len(opts.compiler_stats_range_fields) > 0: + if len(opts.compiler_stats_range_fields) > 0: extra_hc_opts += ' +RTS -V0 -t' + stats_file + ' --machine-readable -RTS' # Required by GHC 7.3+, harmless for earlier versions: if (getTestOpts().c_src or getTestOpts().objc_src or - getTestOpts().objcpp_src): + getTestOpts().objcpp_src or + getTestOpts().cmm_src): extra_hc_opts += ' -no-hs-main ' if getTestOpts().compile_cmd_prefix == '': @@ -1223,7 +1117,7 @@ def simple_build( name, way, extra_hc_opts, should_fail, top_mod, link, addsuf, + config.compiler + "' " \ + join(comp_flags,' ') + ' ' \ + to_do + ' ' + srcname + ' ' \ - + join(config.way_flags[way],' ') + ' ' \ + + join(config.way_flags(name)[way],' ') + ' ' \ + extra_hc_opts + ' ' \ + opts.extra_hc_opts + ' ' \ + '>' + errname + ' 2>&1' @@ -1237,8 +1131,7 @@ def simple_build( name, way, extra_hc_opts, should_fail, top_mod, link, addsuf, # ToDo: if the sub-shell was killed by ^C, then exit - statsResult = checkStats(stats_file, opts.compiler_stats_range_fields - , opts.compiler_stats_num_fields) + statsResult = checkStats(stats_file, opts.compiler_stats_range_fields) if badResult(statsResult): return statsResult @@ -1284,7 +1177,7 @@ def simple_run( name, way, prog, args ): my_rts_flags = rts_flags(way) stats_file = name + '.stats' - if len(opts.stats_num_fields) + len(opts.stats_range_fields) > 0: + if len(opts.stats_range_fields) > 0: args += ' +RTS -V0 -t' + stats_file + ' --machine-readable -RTS' if opts.no_stdin: @@ -1338,8 +1231,7 @@ def simple_run( name, way, prog, args ): if check_prof and not check_prof_ok(name): return failBecause('bad profile') - return checkStats(stats_file, opts.stats_range_fields - , opts.stats_num_fields) + return checkStats(stats_file, opts.stats_range_fields) def rts_flags(way): if (way == ''): @@ -1409,7 +1301,7 @@ def interpreter_run( name, way, extra_hc_opts, compile_only, top_mod ): cmd = "'" + config.compiler + "' " \ + join(flags,' ') + ' ' \ + srcname + ' ' \ - + join(config.way_flags[way],' ') + ' ' \ + + join(config.way_flags(name)[way],' ') + ' ' \ + extra_hc_opts + ' ' \ + getTestOpts().extra_hc_opts + ' ' \ + '<' + scriptname + ' 1>' + outname + ' 2>' + errname @@ -1505,7 +1397,7 @@ def extcore_run( name, way, extra_hc_opts, compile_only, top_mod ): cmd = 'cd ' + getTestOpts().testdir + " && '" \ + config.compiler + "' " \ + join(flags,' ') + ' ' \ - + join(config.way_flags[way],' ') + ' ' \ + + join(config.way_flags(name)[way],' ') + ' ' \ + extra_hc_opts + ' ' \ + getTestOpts().extra_hc_opts \ + to_do \ @@ -1530,7 +1422,7 @@ def extcore_run( name, way, extra_hc_opts, compile_only, top_mod ): deplist2 = string.replace(deplist,'.lhs,', '.hcr'); to_compile = string.replace(deplist2,'.hs,', '.hcr'); - flags = join(filter(lambda f: f != '-fext-core',config.way_flags[way]),' ') + flags = join(filter(lambda f: f != '-fext-core',config.way_flags(name)[way]),' ') if getTestOpts().outputdir != None: flags.extend(["-outputdir", getTestOpts().outputdir]) @@ -1602,7 +1494,7 @@ def check_stderr_ok( name ): return normalise_errmsg(str) return compare_outputs('stderr', \ - two_normalisers(norm, getTestOpts().extra_normaliser), \ + two_normalisers(norm, getTestOpts().extra_errmsg_normaliser), \ expected_stderr_file, actual_stderr_file) def dump_stderr( name ): @@ -1848,6 +1740,15 @@ def rawSystem(cmd_and_args): else: return os.spawnv(os.P_WAIT, cmd_and_args[0], cmd_and_args) +# Note that this doesn't handle the timeout itself; it is just used for +# commands that have timeout handling built-in. +def rawSystemWithTimeout(cmd_and_args): + r = rawSystem(cmd_and_args) + if r == 98: + # The python timeout program uses 98 to signal that ^C was pressed + stopNow() + return r + # cmd is a complex command in Bourne-shell syntax # e.g (cd . && 'c:/users/simonpj/darcs/HEAD/compiler/stage1/ghc-inplace' ...etc) # Hence it must ultimately be run by a Bourne shell @@ -1867,7 +1768,7 @@ def runCmd( cmd ): assert config.timeout_prog!='' if config.timeout_prog != '': - r = rawSystem([config.timeout_prog, str(config.timeout), cmd]) + r = rawSystemWithTimeout([config.timeout_prog, str(config.timeout), cmd]) else: r = os.system(cmd) return r << 8 @@ -1878,18 +1779,19 @@ def runCmdFor( name, cmd, timeout_multiplier=1.0 ): if config.os == 'mingw32': # On MinGW, we will always have timeout assert config.timeout_prog!='' - timeout = int(math.ceil(config.timeout * timeout_multiplier)) + timeout = int(ceil(config.timeout * timeout_multiplier)) if config.timeout_prog != '': if config.check_files_written: fn = name + ".strace" - r = rawSystem(["strace", "-o", fn, "-fF", "-e", "creat,open,chdir,clone,vfork", - config.timeout_prog, str(timeout), - cmd]) + r = rawSystemWithTimeout( + ["strace", "-o", fn, "-fF", + "-e", "creat,open,chdir,clone,vfork", + config.timeout_prog, str(timeout), cmd]) addTestFilesWritten(name, fn) rm_no_fail(fn) else: - r = rawSystem([config.timeout_prog, str(timeout), cmd]) + r = rawSystemWithTimeout([config.timeout_prog, str(timeout), cmd]) else: r = os.system(cmd) return r << 8 @@ -2111,6 +2013,8 @@ def add_suffix( name, suffix ): def add_hs_lhs_suffix(name): if getTestOpts().c_src: return add_suffix(name, 'c') + elif getTestOpts().cmm_src: + return add_suffix(name, 'cmm') elif getTestOpts().objc_src: return add_suffix(name, 'm') elif getTestOpts().objcpp_src: @@ -2201,25 +2105,28 @@ def findTFiles_(path): def summary(t, file): file.write('\n') - file.write('OVERALL SUMMARY for test run started at ' \ - + t.start_time + '\n'\ - + string.rjust(`t.total_tests`, 8) \ - + ' total tests, which gave rise to\n' \ - + string.rjust(`t.total_test_cases`, 8) \ - + ' test cases, of which\n' \ - + string.rjust(`t.n_framework_failures`, 8) \ - + ' caused framework failures\n' \ + printUnexpectedTests(file, [t.unexpected_passes, t.unexpected_failures]) + file.write('OVERALL SUMMARY for test run started at ' + + t.start_time + '\n' + + string.rjust(`t.total_tests`, 8) + + ' total tests, which gave rise to\n' + + string.rjust(`t.total_test_cases`, 8) + + ' test cases, of which\n' + string.rjust(`t.n_tests_skipped`, 8) - + ' were skipped\n\n' \ - + string.rjust(`t.n_expected_passes`, 8) - + ' expected passes\n' \ + + ' were skipped\n' + + '\n' + string.rjust(`t.n_missing_libs`, 8) - + ' had missing libraries\n' \ - + string.rjust(`t.n_expected_failures`, 8) \ - + ' expected failures\n' \ - + string.rjust(`t.n_unexpected_passes`, 8) \ + + ' had missing libraries\n' + + string.rjust(`t.n_expected_passes`, 8) + + ' expected passes\n' + + string.rjust(`t.n_expected_failures`, 8) + + ' expected failures\n' + + '\n' + + string.rjust(`t.n_framework_failures`, 8) + + ' caused framework failures\n' + + string.rjust(`t.n_unexpected_passes`, 8) + ' unexpected passes\n' - + string.rjust(`t.n_unexpected_failures`, 8) \ + + string.rjust(`t.n_unexpected_failures`, 8) + ' unexpected failures\n' + '\n') @@ -2234,6 +2141,21 @@ def summary(t, file): if config.check_files_written: checkForFilesWrittenProblems(file) + if stopping(): + file.write('WARNING: Testsuite run was terminated early\n') + +def printUnexpectedTests(file, testInfoss): + unexpected = [] + for testInfos in testInfoss: + directories = testInfos.keys() + for directory in directories: + tests = testInfos[directory].keys() + unexpected += tests + if unexpected != []: + file.write('Unexpected results from:\n') + file.write('TEST="' + ' '.join(unexpected) + '"\n') + file.write('\n') + def printPassingTestInfosSummary(file, testInfos): directories = testInfos.keys() directories.sort() diff --git a/mk/boilerplate.mk b/mk/boilerplate.mk index f1cd6c81319d752ebc67f73d72aadf485c51d15a..f9ed52ee0f34b64c425fcf016769ea6f6c911d08 100644 --- a/mk/boilerplate.mk +++ b/mk/boilerplate.mk @@ -66,9 +66,21 @@ IN_TREE_COMPILER = NO # passed in by the user, but # which ghc == /usr/bin/ghc # which /usr/bin/ghc == /usr/bin/ghc -# so we can just always 'which' it. We need to use 'override' in order -# to override a value given on the commandline. +# so on unix-like platforms we can just always 'which' it. +# However, on cygwin, we can't just use which: +# $ which c:/ghc/ghc-7.4.1/bin/ghc.exe +# which: no ghc.exe in (./c:/ghc/ghc-7.4.1/bin) +# so we start off by using realpath, and if that succeeds then we use +# that value. Otherwise we fall back on 'which'. +# +# Note also that we need to use 'override' in order to override a +# value given on the commandline. +TEST_HC_REALPATH := $(realpath $(TEST_HC)) +ifeq "$(TEST_HC_REALPATH)" "" override TEST_HC := $(shell which '$(TEST_HC)') +else +override TEST_HC := $(TEST_HC_REALPATH) +endif endif # We can't use $(dir ...) here as TEST_HC might be in a path diff --git a/mk/test.mk b/mk/test.mk index 6c974cc1d85aa92385f1299aa83fd06fa24fbc5d..e7604bdd7dbd3cdad0eb1f56e55073c98881c4f2 100644 --- a/mk/test.mk +++ b/mk/test.mk @@ -175,6 +175,12 @@ endif RUNTEST_OPTS += \ $(EXTRA_RUNTEST_OPTS) +ifeq "$(list_broken)" "YES" +set_list_broken = -e config.list_broken=True +else +set_list_broken = +endif + ifeq "$(fast)" "YES" setfast = -e config.fast=1 else @@ -209,6 +215,7 @@ test: $(TIMEOUT_PROGRAM) $(patsubst %, --only=%, $(TESTS)) \ $(patsubst %, --way=%, $(WAY)) \ $(patsubst %, --skipway=%, $(SKIPWAY)) \ + $(set_list_broken) \ $(setfast) \ $(setaccept) @@ -220,3 +227,6 @@ accept: fast: $(MAKE) fast=YES +list_broken: + $(MAKE) list_broken=YES + diff --git a/tests/Makefile b/tests/Makefile index d0fc4ee651c5f4eeeef58aa98942db0848d437d8..9234bcc68ee062b7c3ccc2f3a0e0e374e9bba9ae 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -3,7 +3,8 @@ include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/test.mk # The libraries that we actually know about. We don't want to test -# extralibs that are in our tree but which we haven't built. +# extralibs that are in our tree but which we haven't built, and +# we don't want to test unix on Windows or Win32 on non-Windows. LIBRARIES := $(shell '$(GHC_PKG)' list --simple-output --names-only) ifeq "$(findstring base,$(LIBRARIES))" "" diff --git a/tests/annotations/should_compile/all.T b/tests/annotations/should_compile/all.T index e13c24e72ba8bfeed73581a1cdb84f702256bea2..1c6690b2b85387f09dfd562cb43383d9dc4abb98 100644 --- a/tests/annotations/should_compile/all.T +++ b/tests/annotations/should_compile/all.T @@ -1,5 +1,5 @@ -setTestOpts(if_compiler_profiled(skip)) +setTestOpts(when(compiler_profiled(), skip)) # Annotations, like Template Haskell, require runtime evaluation. In # order for this to work with profiling, we would have to build the diff --git a/tests/annotations/should_fail/annfail01.stderr b/tests/annotations/should_fail/annfail01.stderr index 70553f983f0931e0f5bd43eaa675c95ba1a576bb..160575cf922235a99fcb98b79786a145163811a4 100644 --- a/tests/annotations/should_fail/annfail01.stderr +++ b/tests/annotations/should_fail/annfail01.stderr @@ -1,4 +1,4 @@ -annfail01.hs:4:1: Not in scope: type constructor or class `Foo' +annfail01.hs:4:1: Not in scope: type constructor or class ‛Foo’ -annfail01.hs:5:1: Not in scope: `f' +annfail01.hs:5:1: Not in scope: ‛f’ diff --git a/tests/annotations/should_fail/annfail02.stderr b/tests/annotations/should_fail/annfail02.stderr index 83d54f9840a3780ecbb495492e3a20400b0ab930..21f7aff82113b9e6353a052ad7aadb1fc5f1bd41 100644 --- a/tests/annotations/should_fail/annfail02.stderr +++ b/tests/annotations/should_fail/annfail02.stderr @@ -1,4 +1,4 @@ -annfail02.hs:6:1: Not in scope: data constructor `Foo' +annfail02.hs:6:1: Not in scope: data constructor ‛Foo’ -annfail02.hs:7:1: Not in scope: type constructor or class `Bar' +annfail02.hs:7:1: Not in scope: type constructor or class ‛Bar’ diff --git a/tests/annotations/should_fail/annfail03.stderr b/tests/annotations/should_fail/annfail03.stderr index a7be7feb93c7871fe70498383fbec24d64926ada..9c158550760a4b194c5de623915ba1ae9715217f 100644 --- a/tests/annotations/should_fail/annfail03.stderr +++ b/tests/annotations/should_fail/annfail03.stderr @@ -1,7 +1,8 @@ annfail03.hs:17:1: - GHC stage restriction: instance for `Data InModule' - is used in a top-level splice or annotation, + GHC stage restriction: + instance for ‛Data + InModule’ is used in a top-level splice or annotation, and must be imported, not defined locally In the expression: InModule In the annotation: {-# ANN f InModule #-} diff --git a/tests/annotations/should_fail/annfail04.stderr b/tests/annotations/should_fail/annfail04.stderr index dcbe0e7945ec1a850fd28fbecae9dc7345853a18..9d7bf397785693f8985e5de76fde40816b541db6 100644 --- a/tests/annotations/should_fail/annfail04.stderr +++ b/tests/annotations/should_fail/annfail04.stderr @@ -1,7 +1,8 @@ annfail04.hs:14:12: - GHC stage restriction: instance for `Thing Int' - is used in a top-level splice or annotation, + GHC stage restriction: + instance for ‛Thing + Int’ is used in a top-level splice or annotation, and must be imported, not defined locally In the expression: (thing :: Int) In the annotation: {-# ANN f (thing :: Int) #-} diff --git a/tests/annotations/should_fail/annfail06.hs b/tests/annotations/should_fail/annfail06.hs index 51c922098af730110268b12e8107ec1181aa5ea2..671f0c748e78b9b932966239fd7a096f454c88a1 100644 --- a/tests/annotations/should_fail/annfail06.hs +++ b/tests/annotations/should_fail/annfail06.hs @@ -7,7 +7,7 @@ import Data.Data import Data.Typeable instance Typeable InstancesInWrongModule where - typeOf _ = undefined + typeRep _ = undefined instance Data InstancesInWrongModule where gfoldl = undefined diff --git a/tests/annotations/should_fail/annfail06.stderr b/tests/annotations/should_fail/annfail06.stderr index c5082c386ea0b6199a06741116759f03a886e348..aec329d5fa2a1e149e587bbe3049e12955a90f6b 100644 --- a/tests/annotations/should_fail/annfail06.stderr +++ b/tests/annotations/should_fail/annfail06.stderr @@ -1,7 +1,8 @@ annfail06.hs:21:1: - GHC stage restriction: instance for `Data InstancesInWrongModule' - is used in a top-level splice or annotation, + GHC stage restriction: + instance for ‛Data + InstancesInWrongModule’ is used in a top-level splice or annotation, and must be imported, not defined locally In the expression: InstancesInWrongModule In the annotation: {-# ANN f InstancesInWrongModule #-} diff --git a/tests/annotations/should_fail/annfail07.stderr b/tests/annotations/should_fail/annfail07.stderr index 01f4b62c456b9e8cf77f313ad819c50c653acd5f..678a1609ecdcc18ff963fca6b138f79afd5c76e1 100644 --- a/tests/annotations/should_fail/annfail07.stderr +++ b/tests/annotations/should_fail/annfail07.stderr @@ -1,6 +1,6 @@ annfail07.hs:9:17: - Couldn't match expected type `[a0]' with actual type `Bool' - In the first argument of `head', namely `True' + Couldn't match expected type ‛[a0]’ with actual type ‛Bool’ + In the first argument of ‛head’, namely ‛True’ In the expression: (head True) In the annotation: {-# ANN f (head True) #-} diff --git a/tests/annotations/should_fail/annfail08.stderr b/tests/annotations/should_fail/annfail08.stderr index df18d002ee6532a72ac47c3ee7a76e79031dd074..b9023476f08c9f8ada4ebdd75a02d154d71757a7 100644 --- a/tests/annotations/should_fail/annfail08.stderr +++ b/tests/annotations/should_fail/annfail08.stderr @@ -6,6 +6,6 @@ annfail08.hs:9:1: In the annotation: {-# ANN f (id + 1) #-} annfail08.hs:9:15: - No instance for (Num (a0 -> a0)) arising from a use of `+' + No instance for (Num (a0 -> a0)) arising from a use of ‛+’ In the expression: (id + 1) In the annotation: {-# ANN f (id + 1) #-} diff --git a/tests/annotations/should_fail/annfail09.stderr b/tests/annotations/should_fail/annfail09.stderr index 5eae63a012c732f1211db89e4f9a74a50c9f6cd9..4bddab8dd0cc52de6b6d57f518f0e42a113c69d8 100644 --- a/tests/annotations/should_fail/annfail09.stderr +++ b/tests/annotations/should_fail/annfail09.stderr @@ -1,7 +1,7 @@ annfail09.hs:11:11: - GHC stage restriction: `g' - is used in a top-level splice or annotation, + GHC stage restriction: + ‛g’ is used in a top-level splice or annotation, and must be imported, not defined locally In the expression: g In the annotation: {-# ANN f g #-} diff --git a/tests/annotations/should_fail/annfail10.stderr b/tests/annotations/should_fail/annfail10.stderr index c5b0356892c3878794c2953b9ef574ef478a32dc..0fd7859ef7e25721f26033b03122ae3d48116c82 100644 --- a/tests/annotations/should_fail/annfail10.stderr +++ b/tests/annotations/should_fail/annfail10.stderr @@ -1,27 +1,27 @@ annfail10.hs:9:1: No instance for (Data.Data.Data a0) arising from an annotation - The type variable `a0' is ambiguous + The type variable ‛a0’ is ambiguous Note: there are several potential instances: - instance Data.Data.Data () -- Defined in `Data.Data' + instance Data.Data.Data () -- Defined in ‛Data.Data’ instance (Data.Data.Data a, Data.Data.Data b) => Data.Data.Data (a, b) - -- Defined in `Data.Data' + -- Defined in ‛Data.Data’ instance (Data.Data.Data a, Data.Data.Data b, Data.Data.Data c) => Data.Data.Data (a, b, c) - -- Defined in `Data.Data' + -- Defined in ‛Data.Data’ ...plus 27 others In the expression: 1 In the annotation: {-# ANN f 1 #-} annfail10.hs:9:11: - No instance for (Num a0) arising from the literal `1' - The type variable `a0' is ambiguous + No instance for (Num a0) arising from the literal ‛1’ + The type variable ‛a0’ is ambiguous Note: there are several potential instances: - instance Num Double -- Defined in `GHC.Float' - instance Num Float -- Defined in `GHC.Float' + instance Num Double -- Defined in ‛GHC.Float’ + instance Num Float -- Defined in ‛GHC.Float’ instance Integral a => Num (GHC.Real.Ratio a) - -- Defined in `GHC.Real' + -- Defined in ‛GHC.Real’ ...plus 11 others In the expression: 1 In the annotation: {-# ANN f 1 #-} diff --git a/tests/annotations/should_fail/annfail11.stderr b/tests/annotations/should_fail/annfail11.stderr index 18769f74666959e5fc8662d4b2ec64abc98022b5..39ff0e82eb70fcf97f2b66dd93f6284865b94a59 100644 --- a/tests/annotations/should_fail/annfail11.stderr +++ b/tests/annotations/should_fail/annfail11.stderr @@ -1,4 +1,4 @@ -annfail11.hs:3:1: Not in scope: `length' +annfail11.hs:3:1: Not in scope: ‛length’ -annfail11.hs:4:1: Not in scope: type constructor or class `Integer' +annfail11.hs:4:1: Not in scope: type constructor or class ‛Integer’ diff --git a/tests/annotations/should_run/all.T b/tests/annotations/should_run/all.T index 22256b2f854d5181b713d0aac5c1e15c8ab15191..444ac309125fda254110c8397a17491f920e2d8b 100644 --- a/tests/annotations/should_run/all.T +++ b/tests/annotations/should_run/all.T @@ -1,6 +1,6 @@ -setTestOpts(if_compiler_profiled(skip)) +setTestOpts(when(compiler_profiled(), skip)) # These tests are very slow due to their use of package GHC -setTestOpts(skip_if_fast) +setTestOpts(when(fast(), skip)) # Annotations, like Template Haskell, require runtime evaluation. In # order for this to work with profiling, we would have to build the @@ -10,7 +10,7 @@ test('annrun01', [extra_clean(['Annrun01_Help.hi', 'Annrun01_Help.o', 'annrun01.hi', 'annrun01.o', 'Config.hs', 'Config.hi', 'Config.o']), - pre_cmd('$MAKE -s config'), + pre_cmd('$MAKE -s --no-print-directory config'), omit_ways(['profasm','profthreaded', 'dyn'])], multimod_compile_and_run, ['annrun01', '-package ghc'] diff --git a/tests/array/should_run/all.T b/tests/array/should_run/all.T index eee3b123d26b33af9d774a7578e2e07b3b9d73a5..6b5500700eb646e095dc764a61dbf62540c3c666 100644 --- a/tests/array/should_run/all.T +++ b/tests/array/should_run/all.T @@ -4,23 +4,23 @@ # extra run flags # expected process return value, if not zero -test('arr001', skip_if_fast, compile_and_run, ['']) -test('arr002', skip_if_fast, compile_and_run, ['']) -test('arr003', compose(skip_if_fast,exit_code(1)), compile_and_run, ['']) -test('arr004', compose(skip_if_fast,exit_code(1)), compile_and_run, ['']) -test('arr005', skip_if_fast, compile_and_run, ['']) -test('arr006', skip_if_fast, compile_and_run, ['']) -test('arr007', compose(skip_if_fast,exit_code(1)), compile_and_run, ['']) -test('arr008', compose(skip_if_fast,exit_code(1)), compile_and_run, ['']) -test('arr009', skip_if_fast, compile_and_run, ['']) -test('arr010', skip_if_fast, compile_and_run, ['']) -test('arr011', skip_if_fast, compile_and_run, ['']) -test('arr012', skip_if_fast, compile_and_run, ['']) -test('arr013', skip_if_fast, compile_and_run, ['']) -test('arr014', skip_if_fast, compile_and_run, ['']) -test('arr015', skip_if_fast, compile_and_run, ['']) +test('arr001', when(fast(), skip), compile_and_run, ['']) +test('arr002', when(fast(), skip), compile_and_run, ['']) +test('arr003', [when(fast(), skip),exit_code(1)], compile_and_run, ['']) +test('arr004', [when(fast(), skip),exit_code(1)], compile_and_run, ['']) +test('arr005', when(fast(), skip), compile_and_run, ['']) +test('arr006', when(fast(), skip), compile_and_run, ['']) +test('arr007', [when(fast(), skip),exit_code(1)], compile_and_run, ['']) +test('arr008', [when(fast(), skip),exit_code(1)], compile_and_run, ['']) +test('arr009', when(fast(), skip), compile_and_run, ['']) +test('arr010', when(fast(), skip), compile_and_run, ['']) +test('arr011', when(fast(), skip), compile_and_run, ['']) +test('arr012', when(fast(), skip), compile_and_run, ['']) +test('arr013', when(fast(), skip), compile_and_run, ['']) +test('arr014', when(fast(), skip), compile_and_run, ['']) +test('arr015', when(fast(), skip), compile_and_run, ['']) test('arr016', reqlib('random'), compile_and_run, ['']) -test('arr017', skip_if_fast, compile_and_run, ['']) -test('arr018', skip_if_fast, compile_and_run, ['']) +test('arr017', when(fast(), skip), compile_and_run, ['']) +test('arr018', when(fast(), skip), compile_and_run, ['']) test('arr019', normal, compile_and_run, ['']) test('arr020', normal, compile_and_run, ['']) diff --git a/tests/arrows/should_compile/all.T b/tests/arrows/should_compile/all.T index 24e95e8ef62117230fc7fd7d348f7d4c3387c7a2..0a1e6516ce3df9ddd4736dd77f6ae89e5de92e6c 100644 --- a/tests/arrows/should_compile/all.T +++ b/tests/arrows/should_compile/all.T @@ -16,5 +16,5 @@ test('arrowrec1', normal, compile, ['']) test('arrowpat', normal, compile, ['']) test('T3964', normal, compile, ['']) test('T5283', normal, compile, ['']) -test('T5267', expect_broken(5605), compile, ['']) +test('T5267', expect_broken(5267), compile, ['']) test('T5022', normal, compile, ['']) diff --git a/tests/arrows/should_fail/T5380.stderr b/tests/arrows/should_fail/T5380.stderr index 1d3fa3a1ed11ea8bd405591b3d1e50375dbdf1a5..567450ef2792c4bd4341e8f82d84d56a207c2d74 100644 --- a/tests/arrows/should_fail/T5380.stderr +++ b/tests/arrows/should_fail/T5380.stderr @@ -1,7 +1,7 @@ T5380.hs:7:27: - Couldn't match expected type `Bool' with actual type `not_bool' - `not_bool' is a rigid type variable bound by + Couldn't match expected type ‛Bool’ with actual type ‛not_bool’ + ‛not_bool’ is a rigid type variable bound by the type signature for testB :: not_bool -> (() -> ()) -> () -> not_unit at T5380.hs:6:10 @@ -11,12 +11,12 @@ T5380.hs:7:27: b :: not_bool (bound at T5380.hs:7:7) In the expression: b In the expression: proc () -> if b then f -< () else f -< () - In an equation for `testB': + In an equation for ‛testB’: testB b f = proc () -> if b then f -< () else f -< () T5380.hs:7:34: - Couldn't match type `not_unit' with `()' - `not_unit' is a rigid type variable bound by + Couldn't match type ‛not_unit’ with ‛()’ + ‛not_unit’ is a rigid type variable bound by the type signature for testB :: not_bool -> (() -> ()) -> () -> not_unit at T5380.hs:6:10 @@ -27,5 +27,5 @@ T5380.hs:7:34: (bound at T5380.hs:7:1) In the expression: f In the expression: proc () -> if b then f -< () else f -< () - In an equation for `testB': + In an equation for ‛testB’: testB b f = proc () -> if b then f -< () else f -< () diff --git a/tests/arrows/should_fail/all.T b/tests/arrows/should_fail/all.T index 557929454177e3f6f6eb2316a1365c2dba25261b..6b7920d3186c4bb1a9824c90036e3d847290c1ed 100644 --- a/tests/arrows/should_fail/all.T +++ b/tests/arrows/should_fail/all.T @@ -1,7 +1,7 @@ setTestOpts(only_compiler_types(['ghc'])) test('arrowfail001', - if_compiler_debugged(expect_broken(5267)), + when(compiler_debugged(), expect_broken(5267)), compile_fail, ['']) # arrowfail001 gets an ASSERT error in the stage1 compiler diff --git a/tests/arrows/should_fail/arrowfail001.stderr b/tests/arrows/should_fail/arrowfail001.stderr index 261aa278a407d2d904de02bfc5b8e2bc42c71067..6dc2cb76c4a192830fa50d1be47a4dc9f863a2d6 100644 --- a/tests/arrows/should_fail/arrowfail001.stderr +++ b/tests/arrows/should_fail/arrowfail001.stderr @@ -1,7 +1,7 @@ arrowfail001.hs:16:36: - No instance for (Foo a) arising from a use of `foo' + No instance for (Foo a) arising from a use of ‛foo’ In the expression: foo In the expression: proc x -> case x of { Bar a -> foo -< a } - In an equation for `get': + In an equation for ‛get’: get = proc x -> case x of { Bar a -> foo -< a } diff --git a/tests/arrows/should_fail/arrowfail002.stderr b/tests/arrows/should_fail/arrowfail002.stderr index c653acc339d9548c84f0188c09e77d5456a35fc0..67a93db719a6541d5dfdd53e44809e5f138f2e84 100644 --- a/tests/arrows/should_fail/arrowfail002.stderr +++ b/tests/arrows/should_fail/arrowfail002.stderr @@ -1,2 +1,2 @@ -arrowfail002.hs:6:17: Not in scope: `x' +arrowfail002.hs:6:17: Not in scope: ‛x’ diff --git a/tests/arrows/should_fail/arrowfail004.stderr b/tests/arrows/should_fail/arrowfail004.stderr index 8a20c6bcbb249c937e681f6fe075297609ad4691..65cef2545b93ddaf6d30f7f9933e25ef9aa703b1 100644 --- a/tests/arrows/should_fail/arrowfail004.stderr +++ b/tests/arrows/should_fail/arrowfail004.stderr @@ -3,5 +3,5 @@ arrowfail004.hs:12:15: Proc patterns cannot use existential or GADT data constructors In the pattern: T x In the expression: proc (T x) -> do { returnA -< T x } - In an equation for `panic': + In an equation for ‛panic’: panic = proc (T x) -> do { returnA -< T x } diff --git a/tests/arrows/should_run/all.T b/tests/arrows/should_run/all.T index a9867dd395227387751685fe3522f093230b49cf..ec26c1fa92c9b38b1b9f46538abd58949151fea1 100644 --- a/tests/arrows/should_run/all.T +++ b/tests/arrows/should_run/all.T @@ -1,8 +1,8 @@ setTestOpts(only_compiler_types(['ghc'])) test('arrowrun001', normal, compile_and_run, ['']) -test('arrowrun002', skip_if_fast, compile_and_run, ['']) +test('arrowrun002', when(fast(), skip), compile_and_run, ['']) test('arrowrun003', normal, compile_and_run, ['']) -test('arrowrun004', skip_if_fast, compile_and_run, ['']) +test('arrowrun004', when(fast(), skip), compile_and_run, ['']) test('T3822', normal, compile_and_run, ['']) diff --git a/tests/cabal/1750.stderr b/tests/cabal/1750.stderr deleted file mode 100644 index 71bed0745beb0ded1671cb27b611f6d26f67c0fe..0000000000000000000000000000000000000000 --- a/tests/cabal/1750.stderr +++ /dev/null @@ -1,5 +0,0 @@ -WARNING: there are broken packages. Run 'ghc-pkg check' for more details. -<command line>: cannot satisfy -package 1750A: - 1750A-1-XXX is unusable due to missing or recursive dependencies: - 1750B-1-XXX - (use -v for more information) diff --git a/tests/cabal/1750.stdout b/tests/cabal/1750.stdout deleted file mode 100644 index dac998e2aca0ad1e72e38c79b3677ef7c1c845d7..0000000000000000000000000000000000000000 --- a/tests/cabal/1750.stdout +++ /dev/null @@ -1,4 +0,0 @@ -local1750.package.conf: - {1750A-1} - {1750B-1} - diff --git a/tests/cabal/1750A.pkg b/tests/cabal/1750A.pkg deleted file mode 100644 index e32c97ff8b1c37310e81b620a10e40ad62233774..0000000000000000000000000000000000000000 --- a/tests/cabal/1750A.pkg +++ /dev/null @@ -1,4 +0,0 @@ -name: 1750A -version: 1 -id: 1750A-1-XXX -depends: 1750B-1-XXX diff --git a/tests/cabal/1750B.pkg b/tests/cabal/1750B.pkg deleted file mode 100644 index 5e9ff1f56d63e156836d0cfc582f25e8c6a1939d..0000000000000000000000000000000000000000 --- a/tests/cabal/1750B.pkg +++ /dev/null @@ -1,4 +0,0 @@ -name: 1750B -version: 1 -id: 1750B-1-XXX -depends: 1750A-1-XXX diff --git a/tests/cabal/Makefile b/tests/cabal/Makefile index 769a50d3fd70ab2851f089cd72f8db56ad1720a4..f0091bceeb2fe7666a5832e7d3b0f59e1ffc9a43 100644 --- a/tests/cabal/Makefile +++ b/tests/cabal/Makefile @@ -110,20 +110,20 @@ ghcpkg06 : if $(LOCAL_GHC_PKG06) register testdup.pkg; then false else true; fi $(LOCAL_GHC_PKG06) register --force testdup.pkg -PKGCONF1750=local1750.package.conf -LOCAL_GHC_PKG1750 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONF1750) - -1750: - rm -rf $(PKGCONF1750) 1750.hs 1750.o 1750.hi 1750.out - $(LOCAL_GHC_PKG1750) init $(PKGCONF1750) - $(LOCAL_GHC_PKG1750) register --force 1750A.pkg >1750.out 2>&1 - $(LOCAL_GHC_PKG1750) register --force 1750B.pkg >1750.out 2>&1 - GHC_PACKAGE_PATH=$(PKGCONF1750) '$(GHC_PKG)' --no-user-package-db list +PKGCONFT1750=localT1750.package.conf +LOCAL_GHC_PKGT1750 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONFT1750) + +T1750: + rm -rf $(PKGCONFT1750) T1750.hs T1750.o T1750.hi T1750.out + $(LOCAL_GHC_PKGT1750) init $(PKGCONFT1750) + $(LOCAL_GHC_PKGT1750) register --force T1750A.pkg >T1750.out 2>&1 + $(LOCAL_GHC_PKGT1750) register --force T1750B.pkg >T1750.out 2>&1 + GHC_PACKAGE_PATH=$(PKGCONFT1750) '$(GHC_PKG)' --no-user-package-db list # GHC_PACKAGE_PATH trick is to make this work with 6.8.2 which doesn't have # the patch "Change the command-line semantics for query commands" to # ghc-pkg - echo "main = return ()" >1750.hs - '$(TEST_HC)' $(TEST_HC_OPTS) -package-db $(PKGCONF1750) -package 1750A 1750.hs || true + echo "main = return ()" >T1750.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -package-db $(PKGCONFT1750) -package T1750A T1750.hs || true PKGCONFSHADOW1=localshadow1.package.conf PKGCONFSHADOW2=localshadow2.package.conf diff --git a/tests/cabal/T1750.stderr b/tests/cabal/T1750.stderr new file mode 100644 index 0000000000000000000000000000000000000000..1809d5b05062a94816b73f40c0e2fd7059673a75 --- /dev/null +++ b/tests/cabal/T1750.stderr @@ -0,0 +1,5 @@ +WARNING: there are broken packages. Run 'ghc-pkg check' for more details. +<command line>: cannot satisfy -package T1750A: + T1750A-1-XXX is unusable due to missing or recursive dependencies: + T1750B-1-XXX + (use -v for more information) diff --git a/tests/cabal/T1750.stdout b/tests/cabal/T1750.stdout new file mode 100644 index 0000000000000000000000000000000000000000..62d032334a911cb5f1b2f7ad9c6a9f0044858001 --- /dev/null +++ b/tests/cabal/T1750.stdout @@ -0,0 +1,4 @@ +localT1750.package.conf: + {T1750A-1} + {T1750B-1} + diff --git a/tests/cabal/T1750A.pkg b/tests/cabal/T1750A.pkg new file mode 100644 index 0000000000000000000000000000000000000000..9bda51eea08d613e458310ee62ad4136d18b7d40 --- /dev/null +++ b/tests/cabal/T1750A.pkg @@ -0,0 +1,4 @@ +name: T1750A +version: 1 +id: T1750A-1-XXX +depends: T1750B-1-XXX diff --git a/tests/cabal/T1750B.pkg b/tests/cabal/T1750B.pkg new file mode 100644 index 0000000000000000000000000000000000000000..479ce7092c66d1f2cb64be3dfab27f934f052d7f --- /dev/null +++ b/tests/cabal/T1750B.pkg @@ -0,0 +1,4 @@ +name: T1750B +version: 1 +id: T1750B-1-XXX +depends: T1750A-1-XXX diff --git a/tests/cabal/all.T b/tests/cabal/all.T index f84688cbb5617cf2754bccd7e0f3ebeab1322d4e..d05d05fe1e741ede84baf6fbb49455355d8d9c19 100644 --- a/tests/cabal/all.T +++ b/tests/cabal/all.T @@ -16,7 +16,7 @@ test('ghcpkg02', test('ghcpkg03', [extra_clean(['local03.package.conf', 'local03.package.conf.old']), - normalise_fun(normaliseDynlibNames)], + normalise_errmsg_fun(normaliseDynlibNames)], run_command, ['$MAKE -s --no-print-directory ghcpkg03']) test('ghcpkg04', @@ -36,8 +36,8 @@ test('ghcpkg05', 'local05a.package.conf.old', 'local05b.package.conf', 'local05b.package.conf.old']), - normalise_fun(two_normalisers(normalise_haddock_junk, - normaliseDynlibNames)) + normalise_errmsg_fun(two_normalisers(normalise_haddock_junk, + normaliseDynlibNames)) ], run_command, ['$MAKE -s --no-print-directory ghcpkg05']) @@ -51,11 +51,11 @@ test('ghcpkg06', # (this was disallowed in GHC 6.4 and earlier) test('pkg01', normal, compile, ['']) -test('1750', - extra_clean(['1750.hs', '1750.out', - 'local1750.package.conf', - 'local1750.package.conf.old']), - run_command, ['$MAKE -s --no-print-directory 1750']) +test('T1750', + extra_clean(['T1750.hs', 'T1750.out', + 'localT1750.package.conf', + 'localT1750.package.conf.old']), + run_command, ['$MAKE -s --no-print-directory T1750']) test('shadow', extra_clean(['shadow.out', 'shadow.hs', 'shadow.hi', diff --git a/tests/cabal/cabal01/all.T b/tests/cabal/cabal01/all.T index 2c64449c9ca8d7d1fe2485ca31031f50a85f9a12..f8873230b26c86771ce0fc52871fd3f8c4bcd301 100644 --- a/tests/cabal/cabal01/all.T +++ b/tests/cabal/cabal01/all.T @@ -20,7 +20,10 @@ if default_testopts.cleanup != '': else: cleanup = '' +def ignoreLdOutput(str): + return re.sub('Creating library file: dist.build.libHStest-1.0-ghc[0-9.]*.dll.a\n', '', str) + test('cabal01', - normal, + normalise_errmsg_fun(ignoreLdOutput), run_command, ['$MAKE -s --no-print-directory cabal01 VANILLA=' + vanilla + ' PROF=' + prof + ' DYN=' + dyn + ' ' + cleanup]) diff --git a/tests/codeGen/should_compile/Makefile b/tests/codeGen/should_compile/Makefile index ff43099198da50676717c881f2784b80a57a271c..c804a12ea75a4d9de1a663a796b55df95bee5118 100644 --- a/tests/codeGen/should_compile/Makefile +++ b/tests/codeGen/should_compile/Makefile @@ -2,6 +2,6 @@ TOP=../../.. include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/test.mk -2578: - '$(TEST_HC)' $(TEST_HC_OPTS) --make 2578 -fforce-recomp -v0 +T2578: + '$(TEST_HC)' $(TEST_HC_OPTS) --make T2578 -fforce-recomp -v0 diff --git a/tests/codeGen/should_compile/1916.hs b/tests/codeGen/should_compile/T1916.hs similarity index 100% rename from tests/codeGen/should_compile/1916.hs rename to tests/codeGen/should_compile/T1916.hs diff --git a/tests/codeGen/should_compile/2388.hs b/tests/codeGen/should_compile/T2388.hs similarity index 100% rename from tests/codeGen/should_compile/2388.hs rename to tests/codeGen/should_compile/T2388.hs diff --git a/tests/codeGen/should_compile/2578.hs b/tests/codeGen/should_compile/T2578.hs similarity index 100% rename from tests/codeGen/should_compile/2578.hs rename to tests/codeGen/should_compile/T2578.hs diff --git a/tests/codeGen/should_compile/3132.hs b/tests/codeGen/should_compile/T3132.hs similarity index 100% rename from tests/codeGen/should_compile/3132.hs rename to tests/codeGen/should_compile/T3132.hs diff --git a/tests/codeGen/should_compile/3579.hs b/tests/codeGen/should_compile/T3579.hs similarity index 100% rename from tests/codeGen/should_compile/3579.hs rename to tests/codeGen/should_compile/T3579.hs diff --git a/tests/codeGen/should_compile/all.T b/tests/codeGen/should_compile/all.T index 77d7f0247399ce3075217fd8d1f208e9d6e3dab1..220ff85003f3c0451a9e5b2a2d382314aa56cf75 100644 --- a/tests/codeGen/should_compile/all.T +++ b/tests/codeGen/should_compile/all.T @@ -7,16 +7,16 @@ test('cg006', normal, compile, ['']) test('cg007', normal, compile, ['']) test('cg008', normal, compile, ['']) -test('1916', normal, compile, ['']) -test('2388', normal, compile, ['']) -test('3132', normal, compile, ['-dcmm-lint']) +test('T1916', normal, compile, ['']) +test('T2388', normal, compile, ['']) +test('T3132', normal, compile, ['-dcmm-lint']) test('T3286', extra_clean(['T3286b.o','T3286b.hi']), multimod_compile, ['T3286', '-v0']) -test('3579', normal, compile, ['']) -test('2578', normal, run_command, ['$MAKE -s --no-print-directory 2578']) +test('T3579', normal, compile, ['']) +test('T2578', normal, run_command, ['$MAKE -s --no-print-directory T2578']) # skip llvm on i386 as we don't support fPIC -test('jmp_tbl', if_arch('i386', omit_ways(['llvm', 'optllvm'])), compile, ['-fPIC -O']) +test('jmp_tbl', when(arch('i386'), omit_ways(['llvm', 'optllvm'])), compile, ['-fPIC -O']) test('massive_array', - [ if_arch('i386', omit_ways(['llvm', 'optllvm'])) ], + [ when(arch('i386'), omit_ways(['llvm', 'optllvm'])) ], compile, ['-fPIC']) test('T7237', normal, compile, ['']) diff --git a/tests/codeGen/should_gen_asm/all.T b/tests/codeGen/should_gen_asm/all.T index a24ae311b956b55f173175a76b36d34907c48b11..be30d5fe10a7ebf4aac097ce4956cd51accd08bf 100644 --- a/tests/codeGen/should_gen_asm/all.T +++ b/tests/codeGen/should_gen_asm/all.T @@ -1,6 +1,6 @@ test('memcpy', - unless_platform('x86_64-unknown-linux',skip), compile_cmp_asm, ['']) + unless(platform('x86_64-unknown-linux'),skip), compile_cmp_asm, ['']) test('memcpy-unroll', - unless_platform('x86_64-unknown-linux',skip), compile_cmp_asm, ['']) + unless(platform('x86_64-unknown-linux'),skip), compile_cmp_asm, ['']) test('memcpy-unroll-conprop', - unless_platform('x86_64-unknown-linux',skip), compile_cmp_asm, ['']) + unless(platform('x86_64-unknown-linux'),skip), compile_cmp_asm, ['']) diff --git a/tests/codeGen/should_run/5626.stderr b/tests/codeGen/should_run/5626.stderr deleted file mode 100644 index 7cab83de799d986b1aa9dba8c9f737ee33865c3a..0000000000000000000000000000000000000000 --- a/tests/codeGen/should_run/5626.stderr +++ /dev/null @@ -1 +0,0 @@ -5626: Prelude.undefined diff --git a/tests/codeGen/should_run/1852.hs b/tests/codeGen/should_run/T1852.hs similarity index 100% rename from tests/codeGen/should_run/1852.hs rename to tests/codeGen/should_run/T1852.hs diff --git a/tests/codeGen/should_run/1852.stdout b/tests/codeGen/should_run/T1852.stdout similarity index 100% rename from tests/codeGen/should_run/1852.stdout rename to tests/codeGen/should_run/T1852.stdout diff --git a/tests/codeGen/should_run/1861.hs b/tests/codeGen/should_run/T1861.hs similarity index 100% rename from tests/codeGen/should_run/1861.hs rename to tests/codeGen/should_run/T1861.hs diff --git a/tests/codeGen/should_run/1861.stdout b/tests/codeGen/should_run/T1861.stdout similarity index 100% rename from tests/codeGen/should_run/1861.stdout rename to tests/codeGen/should_run/T1861.stdout diff --git a/tests/codeGen/should_run/2080.hs b/tests/codeGen/should_run/T2080.hs similarity index 100% rename from tests/codeGen/should_run/2080.hs rename to tests/codeGen/should_run/T2080.hs diff --git a/tests/codeGen/should_run/2080.stdout b/tests/codeGen/should_run/T2080.stdout similarity index 100% rename from tests/codeGen/should_run/2080.stdout rename to tests/codeGen/should_run/T2080.stdout diff --git a/tests/codeGen/should_run/2838.hs b/tests/codeGen/should_run/T2838.hs similarity index 100% rename from tests/codeGen/should_run/2838.hs rename to tests/codeGen/should_run/T2838.hs diff --git a/tests/codeGen/should_run/2838.stdout b/tests/codeGen/should_run/T2838.stdout similarity index 100% rename from tests/codeGen/should_run/2838.stdout rename to tests/codeGen/should_run/T2838.stdout diff --git a/tests/codeGen/should_run/2838.stdout-ws-64 b/tests/codeGen/should_run/T2838.stdout-ws-64 similarity index 100% rename from tests/codeGen/should_run/2838.stdout-ws-64 rename to tests/codeGen/should_run/T2838.stdout-ws-64 diff --git a/tests/codeGen/should_run/3207.hs b/tests/codeGen/should_run/T3207.hs similarity index 100% rename from tests/codeGen/should_run/3207.hs rename to tests/codeGen/should_run/T3207.hs diff --git a/tests/codeGen/should_run/3207.stdout b/tests/codeGen/should_run/T3207.stdout similarity index 100% rename from tests/codeGen/should_run/3207.stdout rename to tests/codeGen/should_run/T3207.stdout diff --git a/tests/codeGen/should_run/3561.hs b/tests/codeGen/should_run/T3561.hs similarity index 100% rename from tests/codeGen/should_run/3561.hs rename to tests/codeGen/should_run/T3561.hs diff --git a/tests/codeGen/should_run/3561.stdout b/tests/codeGen/should_run/T3561.stdout similarity index 100% rename from tests/codeGen/should_run/3561.stdout rename to tests/codeGen/should_run/T3561.stdout diff --git a/tests/codeGen/should_run/3677.hs b/tests/codeGen/should_run/T3677.hs similarity index 100% rename from tests/codeGen/should_run/3677.hs rename to tests/codeGen/should_run/T3677.hs diff --git a/tests/codeGen/should_run/3677.stdout b/tests/codeGen/should_run/T3677.stdout similarity index 100% rename from tests/codeGen/should_run/3677.stdout rename to tests/codeGen/should_run/T3677.stdout diff --git a/tests/codeGen/should_run/4441.hs b/tests/codeGen/should_run/T4441.hs similarity index 100% rename from tests/codeGen/should_run/4441.hs rename to tests/codeGen/should_run/T4441.hs diff --git a/tests/codeGen/should_run/4441.stdout b/tests/codeGen/should_run/T4441.stdout similarity index 100% rename from tests/codeGen/should_run/4441.stdout rename to tests/codeGen/should_run/T4441.stdout diff --git a/tests/codeGen/should_run/5129.hs b/tests/codeGen/should_run/T5129.hs similarity index 100% rename from tests/codeGen/should_run/5129.hs rename to tests/codeGen/should_run/T5129.hs diff --git a/tests/codeGen/should_run/5149.hs b/tests/codeGen/should_run/T5149.hs similarity index 100% rename from tests/codeGen/should_run/5149.hs rename to tests/codeGen/should_run/T5149.hs diff --git a/tests/codeGen/should_run/5149.stdout b/tests/codeGen/should_run/T5149.stdout similarity index 100% rename from tests/codeGen/should_run/5149.stdout rename to tests/codeGen/should_run/T5149.stdout diff --git a/tests/codeGen/should_run/5149_cmm.cmm b/tests/codeGen/should_run/T5149_cmm.cmm similarity index 100% rename from tests/codeGen/should_run/5149_cmm.cmm rename to tests/codeGen/should_run/T5149_cmm.cmm diff --git a/tests/codeGen/should_run/5626.hs b/tests/codeGen/should_run/T5626.hs similarity index 100% rename from tests/codeGen/should_run/5626.hs rename to tests/codeGen/should_run/T5626.hs diff --git a/tests/codeGen/should_run/T5626.stderr b/tests/codeGen/should_run/T5626.stderr new file mode 100644 index 0000000000000000000000000000000000000000..df9cfc932ac80e54403ff07900f81816ae5df09c --- /dev/null +++ b/tests/codeGen/should_run/T5626.stderr @@ -0,0 +1 @@ +T5626: Prelude.undefined diff --git a/tests/codeGen/should_run/5747.hs b/tests/codeGen/should_run/T5747.hs similarity index 100% rename from tests/codeGen/should_run/5747.hs rename to tests/codeGen/should_run/T5747.hs diff --git a/tests/codeGen/should_run/5747.stdout b/tests/codeGen/should_run/T5747.stdout similarity index 100% rename from tests/codeGen/should_run/5747.stdout rename to tests/codeGen/should_run/T5747.stdout diff --git a/tests/codeGen/should_run/5785.hs b/tests/codeGen/should_run/T5785.hs similarity index 100% rename from tests/codeGen/should_run/5785.hs rename to tests/codeGen/should_run/T5785.hs diff --git a/tests/codeGen/should_run/5785.stdout b/tests/codeGen/should_run/T5785.stdout similarity index 100% rename from tests/codeGen/should_run/5785.stdout rename to tests/codeGen/should_run/T5785.stdout diff --git a/tests/codeGen/should_run/6146.hs b/tests/codeGen/should_run/T6146.hs similarity index 100% rename from tests/codeGen/should_run/6146.hs rename to tests/codeGen/should_run/T6146.hs diff --git a/tests/codeGen/should_run/6146.stdin b/tests/codeGen/should_run/T6146.stdin similarity index 100% rename from tests/codeGen/should_run/6146.stdin rename to tests/codeGen/should_run/T6146.stdin diff --git a/tests/codeGen/should_run/6146.stdout b/tests/codeGen/should_run/T6146.stdout similarity index 100% rename from tests/codeGen/should_run/6146.stdout rename to tests/codeGen/should_run/T6146.stdout diff --git a/tests/codeGen/should_run/T7600.hs b/tests/codeGen/should_run/T7600.hs new file mode 100644 index 0000000000000000000000000000000000000000..9f0e118b4431bc803e57300a341d9ad06997517e --- /dev/null +++ b/tests/codeGen/should_run/T7600.hs @@ -0,0 +1,111 @@ +-- !!! Bug # 7600. +-- The LLVM backend can be tricky to get right with floating point constants +-- and GHC. See Note [LLVM Float Types] in compiler/llvmGen/Llvm/Types.hs for +-- why this is. +-- +-- Two issues to watch for (that this bug tries to track): +-- +-- 1) We need to narrow a double to a float but then expand back out (so that +-- we end up with the precision of a float but in double precision byte form). +-- GHC seems to optimize this away for some ways of doing this. +-- +-- 2) The 'realToFrac' method returns different results at the byte level +-- depending on if optimisations are on or off. We use the double2float and +-- float2Double methods instead as they don't suffer from this. +-- +-- Also worth looking at ticket # 3676 about issues with 'realToFrac'. +module Main (main) where + +import T7600_A + +-- a fp constant that requires double precision, but we only use a single +-- precision type. +-- expected output: float 0x7FF0000000000000 +float_number :: Float +float_number = 1.82173691287639817263897126389712638972163e+300 + +-- as above but use double precision so we can represent it. +-- expected output: double 0x7E45C3163C1ACF96 +double_number :: Double +double_number = 1.82173691287639817263897126389712638972163e+300 + +-- Test run +main :: IO () +main = test_run float_number double_number + + + +-- XXX: We don't run below, but it can be useful to test how the optimizer is +-- running... the NOINLINE pragmas are needed below generally, but often not +-- for Bug31_A as the constant is in a different module... + +-- -- Test run +-- test_run' :: Float -> Double -> IO () +-- test_run' float_number double_number = do +-- print $ dToStr double_number +-- print $ dToStr (widen $ narrow double_number) +-- print $ dToStr (widen' $ narrow' double_number) +-- let dd = case double_number of { (D# x) -> x } +-- print $ dToStr (D# (float2Double# (double2Float# dd))) +-- +-- -- use standard Haskell functions for type conversion... which are kind of +-- -- insane (see ticket # 3676) [these fail when -O0 is used...] +-- {-# NOINLINE narrow #-} +-- narrow :: Double -> Float +-- narrow = realToFrac +-- +-- {-# NOINLINE widen #-} +-- widen :: Float -> Double +-- widen = realToFrac +-- +-- -- use GHC specific functions which work as expected [work for both -O0 and -O] +-- {-# NOINLINE narrow' #-} +-- narrow' :: Double -> Float +-- narrow' = double2Float +-- +-- {-# NOINLINE widen' #-} +-- widen' :: Float -> Double +-- widen' = float2Double +-- +-- doubleToBytes :: Double -> [Int] +-- doubleToBytes d +-- = runST (do +-- arr <- newArray_ ((0::Int),7) +-- writeArray arr 0 d +-- arr <- castDoubleToWord8Array arr +-- i0 <- readArray arr 0 +-- i1 <- readArray arr 1 +-- i2 <- readArray arr 2 +-- i3 <- readArray arr 3 +-- i4 <- readArray arr 4 +-- i5 <- readArray arr 5 +-- i6 <- readArray arr 6 +-- i7 <- readArray arr 7 +-- return (map fromIntegral [i0,i1,i2,i3,i4,i5,i6,i7]) +-- ) +-- +-- castFloatToWord8Array :: STUArray s Int Float -> ST s (STUArray s Int Word8) +-- castFloatToWord8Array = castSTUArray +-- +-- castDoubleToWord8Array :: STUArray s Int Double -> ST s (STUArray s Int Word8) +-- castDoubleToWord8Array = castSTUArray +-- +-- dToStr :: Double -> String +-- dToStr d +-- = let bs = doubleToBytes d +-- hex d' = case showHex d' "" of +-- [] -> error "dToStr: too few hex digits for float" +-- [x] -> ['0',x] +-- [x,y] -> [x,y] +-- _ -> error "dToStr: too many hex digits for float" +-- +-- str = map toUpper $ concat . fixEndian . (map hex) $ bs +-- in "0x" ++ str +-- +-- fixEndian :: [a] -> [a] +-- -- #ifdef WORDS_BIGENDIAN +-- -- fixEndian = id +-- -- #else +-- fixEndian = reverse +-- -- #endif + diff --git a/tests/codeGen/should_run/T7600.stdout b/tests/codeGen/should_run/T7600.stdout new file mode 100644 index 0000000000000000000000000000000000000000..d37bad086b4af1c0c524022ffaa72cff03a54ba7 --- /dev/null +++ b/tests/codeGen/should_run/T7600.stdout @@ -0,0 +1,2 @@ +"0x7E45C3163C1ACF96" +"0x7FF0000000000000" diff --git a/tests/codeGen/should_run/T7600_A.hs b/tests/codeGen/should_run/T7600_A.hs new file mode 100644 index 0000000000000000000000000000000000000000..52c28cbd8b5ec2ff9cd2447fdae16efd96272bc5 --- /dev/null +++ b/tests/codeGen/should_run/T7600_A.hs @@ -0,0 +1,83 @@ +-- !!! Bug # 7600. +-- See file T7600 for main description. +{-# LANGUAGE CPP #-} +module T7600_A (test_run) where + +import Control.Monad.ST +import Data.Array.Unsafe( castSTUArray ) +import Data.Array.ST hiding( castSTUArray ) +import Data.Char +import Data.Word +import Numeric + +import GHC.Float + +-- Test run +test_run :: Float -> Double -> IO () +test_run float_number double_number = do + print $ dToStr double_number + -- XXX: Below is the bad code due to changing with optimisation. + -- print $ dToStr (widen $ narrow double_number) + print $ dToStr (widen' $ narrow' double_number) + +-- use standard Haskell functions for type conversion... which are kind of +-- insane (see ticket # 3676) [these fail when -O0 is used...] +narrow :: Double -> Float +{-# NOINLINE narrow #-} +narrow = realToFrac + +widen :: Float -> Double +{-# NOINLINE widen #-} +widen = realToFrac + +-- use GHC specific functions which work as expected [work for both -O0 and -O] +narrow' :: Double -> Float +{-# NOINLINE narrow' #-} +narrow' = double2Float + +widen' :: Float -> Double +{-# NOINLINE widen' #-} +widen' = float2Double + +doubleToBytes :: Double -> [Int] +doubleToBytes d + = runST (do + arr <- newArray_ ((0::Int),7) + writeArray arr 0 d + arr <- castDoubleToWord8Array arr + i0 <- readArray arr 0 + i1 <- readArray arr 1 + i2 <- readArray arr 2 + i3 <- readArray arr 3 + i4 <- readArray arr 4 + i5 <- readArray arr 5 + i6 <- readArray arr 6 + i7 <- readArray arr 7 + return (map fromIntegral [i0,i1,i2,i3,i4,i5,i6,i7]) + ) + +castFloatToWord8Array :: STUArray s Int Float -> ST s (STUArray s Int Word8) +castFloatToWord8Array = castSTUArray + +castDoubleToWord8Array :: STUArray s Int Double -> ST s (STUArray s Int Word8) +castDoubleToWord8Array = castSTUArray + +dToStr :: Double -> String +dToStr d + = let bs = doubleToBytes d + hex d' = case showHex d' "" of + [] -> error "dToStr: too few hex digits for float" + [x] -> ['0',x] + [x,y] -> [x,y] + _ -> error "dToStr: too many hex digits for float" + + str = map toUpper $ concat . fixEndian . (map hex) $ bs + in "0x" ++ str + +fixEndian :: [a] -> [a] +#ifdef WORDS_BIGENDIAN +fixEndian = id +#else +fixEndian = reverse +#endif + diff --git a/tests/codeGen/should_run/all.T b/tests/codeGen/should_run/all.T index 456f2c2b1d930fa7267b42616537ce4c95ebdec8..958d338646c9983b07c73e4f2e58eb00266b8d66 100644 --- a/tests/codeGen/should_run/all.T +++ b/tests/codeGen/should_run/all.T @@ -24,8 +24,9 @@ test('cgrun020', normal, compile_and_run, ['']) test('cgrun021', normal, compile_and_run, ['']) test('cgrun022', normal, compile_and_run, ['']) test('cgrun024', normal, compile_and_run, ['']) -test('cgrun025', compose(reqlib('regex-compat'), compose(extra_run_opts('cg025.hs'),exit_code(1))), - compile_and_run, ['-package regex-compat']) +test('cgrun025', + [reqlib('regex-compat'), extra_run_opts('cg025.hs'), exit_code(1)], + compile_and_run, ['-package regex-compat']) test('cgrun026', only_compiler_types(['ghc']), compile_and_run, ['']) test('cgrun027', normal, compile_and_run, ['']) test('cgrun028', normal, compile_and_run, ['']) @@ -48,7 +49,8 @@ test('cgrun048', normal, compile_and_run, ['']) test('cgrun049', normal, compile_and_run, ['-funbox-strict-fields']) test('cgrun050', normal, compile_and_run, ['']) # Doesn't work with External Core due to datatype declaration with no constructors -test('cgrun051', (compose (expect_fail_for(['extcore','optextcore']),exit_code(1))), compile_and_run, ['']) +test('cgrun051', [expect_fail_for(['extcore','optextcore']), exit_code(1)], + compile_and_run, ['']) test('cgrun052', only_ways(['optasm']), compile_and_run, ['-funbox-strict-fields']) test('cgrun053', normal, compile_and_run, ['']) test('cgrun054', normal, compile_and_run, ['']) @@ -75,23 +77,23 @@ test('cgrun069', omit_ways(['ghci']), multi_compile_and_run, test('cgrun070', normal, compile_and_run, ['']) test('cgrun071', normal, compile_and_run, ['']) -test('1852', normal, compile_and_run, ['']) -test('1861', extra_run_opts('0'), compile_and_run, ['']) -test('2080', normal, compile_and_run, ['']) -test('2838', normal, compile_and_run, ['']) -test('3207', normal, compile_and_run, ['']) -test('3561', normal, compile_and_run, ['']) -test('3677', extra_run_opts('+RTS -K8k -RTS'), compile_and_run, ['']) -test('4441', normal, compile_and_run, ['']) -test('5149', omit_ways(['ghci']), multi_compile_and_run, - ['5149', [('5149_cmm.cmm', '')], '']) -test('5129', normal, compile_and_run, ['']) -test('5626', exit_code(1), compile_and_run, ['']) -test('5747', if_arch('i386', extra_hc_opts('-msse2')), compile_and_run, ['-O2']) -test('5785', normal, compile_and_run, ['']) +test('T1852', normal, compile_and_run, ['']) +test('T1861', extra_run_opts('0'), compile_and_run, ['']) +test('T2080', normal, compile_and_run, ['']) +test('T2838', normal, compile_and_run, ['']) +test('T3207', normal, compile_and_run, ['']) +test('T3561', normal, compile_and_run, ['']) +test('T3677', extra_run_opts('+RTS -K8k -RTS'), compile_and_run, ['']) +test('T4441', normal, compile_and_run, ['']) +test('T5149', omit_ways(['ghci']), multi_compile_and_run, + ['T5149', [('T5149_cmm.cmm', '')], '']) +test('T5129', normal, compile_and_run, ['']) +test('T5626', exit_code(1), compile_and_run, ['']) +test('T5747', when(arch('i386'), extra_hc_opts('-msse2')), compile_and_run, ['-O2']) +test('T5785', normal, compile_and_run, ['']) test('setByteArray', normal, compile_and_run, ['']) -test('6146', normal, compile_and_run, ['']) +test('T6146', normal, compile_and_run, ['']) test('T5900', normal, compile_and_run, ['']) test('T7163', normal, compile_and_run, ['']) @@ -100,7 +102,9 @@ test('T7319', [ extra_ways(['prof']), only_ways(['prof']), exit_code(1), req_profiling, extra_hc_opts('-fprof-auto'), extra_run_opts('+RTS -xc') ], compile_and_run, ['']) -test('Word2Float32', unless_wordsize(32, skip), compile_and_run, ['']) -test('Word2Float64', unless_wordsize(64, skip), compile_and_run, ['']) +test('Word2Float32', unless(wordsize(32), skip), compile_and_run, ['']) +test('Word2Float64', unless(wordsize(64), skip), compile_and_run, ['']) test('T7361', normal, compile_and_run, ['']) +test('T7600', normal, compile_and_run, ['']) + diff --git a/tests/codeGen/should_run/cgrun055.hs b/tests/codeGen/should_run/cgrun055.hs index 737632748d68a31f507f93f1dc94f958073305c2..f824e1b9f606b5f836d23a6828cdee2486478b81 100644 --- a/tests/codeGen/should_run/cgrun055.hs +++ b/tests/codeGen/should_run/cgrun055.hs @@ -1,4 +1,4 @@ --- This program broke GHC 6.3, becuase dataToTag was called with +-- This program broke GHC 6.3, because dataToTag was called with -- an unevaluated argument module Main where diff --git a/tests/codeGen/should_run/cgrun064.hs b/tests/codeGen/should_run/cgrun064.hs index aa037e8782015e89d194d73b0323f5b2b37fcb03..24544c43821dc2953c8d21272f8f8320539a9c78 100644 --- a/tests/codeGen/should_run/cgrun064.hs +++ b/tests/codeGen/should_run/cgrun064.hs @@ -5,7 +5,7 @@ module Main ( main ) where -import GHC.Exts +import GHC.Exts hiding (IsList(..)) import GHC.Prim import GHC.ST diff --git a/tests/codeGen/should_run/cgrun068.hs b/tests/codeGen/should_run/cgrun068.hs index 9d9a0f954f6c6ed43d4f9db1736b2858a30ab551..69a8b279f8e9c47229fbbe25d8e7c8d67809cb80 100644 --- a/tests/codeGen/should_run/cgrun068.hs +++ b/tests/codeGen/should_run/cgrun068.hs @@ -33,7 +33,7 @@ import Control.Exception (assert) import Control.Monad import Control.Monad.Trans.State.Strict import Control.Monad.Trans.Class -import GHC.Exts +import GHC.Exts hiding (IsList(..)) import GHC.ST hiding (liftST) import Prelude hiding (length, read) import qualified Prelude as P diff --git a/tests/codeGen/should_run/cgrun070.hs b/tests/codeGen/should_run/cgrun070.hs index 1f6b5622ba867c165c3e6ede72d66752a8b94997..3187af6f67130370001e3a18df3fd5340072a9fc 100644 --- a/tests/codeGen/should_run/cgrun070.hs +++ b/tests/codeGen/should_run/cgrun070.hs @@ -6,7 +6,7 @@ module Main ( main ) where import GHC.Word -import GHC.Exts +import GHC.Exts hiding (IsList(..)) import GHC.Prim import GHC.ST diff --git a/tests/concurrent/2317/Makefile b/tests/concurrent/T2317/Makefile similarity index 100% rename from tests/concurrent/2317/Makefile rename to tests/concurrent/T2317/Makefile diff --git a/tests/concurrent/2317/2317.hs b/tests/concurrent/T2317/T2317.hs similarity index 100% rename from tests/concurrent/2317/2317.hs rename to tests/concurrent/T2317/T2317.hs diff --git a/tests/concurrent/2317/2317.stdout b/tests/concurrent/T2317/T2317.stdout similarity index 100% rename from tests/concurrent/2317/2317.stdout rename to tests/concurrent/T2317/T2317.stdout diff --git a/tests/concurrent/2317/all.T b/tests/concurrent/T2317/all.T similarity index 56% rename from tests/concurrent/2317/all.T rename to tests/concurrent/T2317/all.T index ab4e8907219c9f8e6014e005863789eee1f7dc71..c9bcda2434c04437024a317c4da259560a96e81c 100644 --- a/tests/concurrent/2317/all.T +++ b/tests/concurrent/T2317/all.T @@ -1,5 +1,5 @@ -test('2317', - [skip_if_fast, +test('T2317', + [when(fast(), skip), reqlib('parallel'), reqlib('random')], multimod_compile_and_run, - ['2317','']) + ['T2317','']) diff --git a/tests/concurrent/prog001/all.T b/tests/concurrent/prog001/all.T index 70f38dca4fbbafedef400fce619b71c9a28f64ee..a3ba7b61f14942c8f898740acfd0cae5bdc9148a 100644 --- a/tests/concurrent/prog001/all.T +++ b/tests/concurrent/prog001/all.T @@ -13,7 +13,7 @@ # right now. --SDM 1/4/2010 test('concprog001', - [skip_if_fast, + [when(fast(), skip), only_ways(['threaded2']), extra_clean(['Arithmetic.hi', 'Arithmetic.o', 'Converter.hi', 'Converter.o', diff --git a/tests/concurrent/prog002/all.T b/tests/concurrent/prog002/all.T index bef9de3bb73418ed190ec4c62d30a2bbc41ee216..54613a7e4a0be06c2de28eb6a3ee63cbf25f1954 100644 --- a/tests/concurrent/prog002/all.T +++ b/tests/concurrent/prog002/all.T @@ -13,7 +13,7 @@ test('concprog002', [only_ways(['threaded2','threaded2_hT']), extra_ways(ways), exit_code(1), - skip_if_fast, + when(fast(), skip), reqlib('random'), extra_clean(['Event.hi', 'Event.o', 'Scheduler.hi', 'Scheduler.o', diff --git a/tests/concurrent/prog003/TestRun.hs b/tests/concurrent/prog003/TestRun.hs index fd6e19de1db843ec858815c58b4a76db7cb97119..13c84ea89a2a57feebedae294d4d1f9dae806ff3 100644 --- a/tests/concurrent/prog003/TestRun.hs +++ b/tests/concurrent/prog003/TestRun.hs @@ -176,10 +176,10 @@ run_testdata testdata_fname mode = do -- ; wait <- atomically (newTVar 0) ; wait <- newEmptyMVar ; start <- getCurrentTime - ; zipWithM (\n work -> forkOnIO n (do { executeTasks nl work - ; putMVar wait () })) - --atomically(do counter <- readTVar wait --- writeTVar wait (counter+1)) })) + ; zipWithM (\n work -> forkOn n (do { executeTasks nl work + ; putMVar wait () })) + --atomically(do counter <- readTVar wait +-- writeTVar wait (counter+1)) })) [0..] works ; replicateM_ (length works) (takeMVar wait) -- ; atomically ( do { counter <- readTVar wait diff --git a/tests/concurrent/prog003/all.T b/tests/concurrent/prog003/all.T index 874b3967dd16f2fa6092957b0c8de7a25cc8d89e..7522b10010eb9588170cf3dec9a1a7edc110cd1e 100644 --- a/tests/concurrent/prog003/all.T +++ b/tests/concurrent/prog003/all.T @@ -10,7 +10,7 @@ # occasionally, but at least the test is here for posterity. test('concprog003', - [skip_if_fast, + [when(fast(), skip), extra_clean([ 'BackList2.hi', 'BackList2.o', 'ImmList.hi', 'ImmList.o', diff --git a/tests/concurrent/should_run/4030.hs b/tests/concurrent/should_run/4030.hs deleted file mode 100644 index 1993bad86bc63417ad733e12ff33ed31e1d9bf1d..0000000000000000000000000000000000000000 --- a/tests/concurrent/should_run/4030.hs +++ /dev/null @@ -1,8 +0,0 @@ -module Main where - -import Control.Concurrent ( forkIO, killThread ) -import Control.Exception ( block ) - -main :: IO () -main = do tid <- block $ forkIO $ let x = x in x - killThread tid diff --git a/tests/concurrent/should_run/4030.stderr b/tests/concurrent/should_run/4030.stderr deleted file mode 100644 index 0e2a7bfc12a74364bb21c4d04d167249b4ee5411..0000000000000000000000000000000000000000 --- a/tests/concurrent/should_run/4030.stderr +++ /dev/null @@ -1 +0,0 @@ -4030: <<loop>> diff --git a/tests/concurrent/should_run/5611.stderr b/tests/concurrent/should_run/5611.stderr deleted file mode 100644 index 7a7f2c7acce742fcc472fb3e2490ab47179f29e6..0000000000000000000000000000000000000000 --- a/tests/concurrent/should_run/5611.stderr +++ /dev/null @@ -1 +0,0 @@ -5611: user error (Exception delivered successfully) diff --git a/tests/concurrent/should_run/5866.stderr b/tests/concurrent/should_run/5866.stderr deleted file mode 100644 index a4774f25ab9b2399521f4862d8f9b93da90d04f4..0000000000000000000000000000000000000000 --- a/tests/concurrent/should_run/5866.stderr +++ /dev/null @@ -1 +0,0 @@ -5866: thread blocked indefinitely in an STM transaction diff --git a/tests/concurrent/should_run/1980.hs b/tests/concurrent/should_run/T1980.hs similarity index 100% rename from tests/concurrent/should_run/1980.hs rename to tests/concurrent/should_run/T1980.hs diff --git a/tests/concurrent/should_run/2910.hs b/tests/concurrent/should_run/T2910.hs similarity index 82% rename from tests/concurrent/should_run/2910.hs rename to tests/concurrent/should_run/T2910.hs index 28670081591921923e491c52a67fcaae2d0bd711..76b8d2f1e0c425a331304d9829240ff117f6e7b9 100644 --- a/tests/concurrent/should_run/2910.hs +++ b/tests/concurrent/should_run/T2910.hs @@ -2,7 +2,7 @@ import Control.Exception import GHC.Conc main = do - t1 <- block $ forkIO yield + t1 <- mask $ \_ -> forkIO yield t2 <- forkIO $ killThread t1 threadDelay 100000 threadStatus t1 >>= print diff --git a/tests/concurrent/should_run/2910.stdout b/tests/concurrent/should_run/T2910.stdout similarity index 100% rename from tests/concurrent/should_run/2910.stdout rename to tests/concurrent/should_run/T2910.stdout diff --git a/tests/concurrent/should_run/2910a.hs b/tests/concurrent/should_run/T2910a.hs similarity index 100% rename from tests/concurrent/should_run/2910a.hs rename to tests/concurrent/should_run/T2910a.hs diff --git a/tests/concurrent/should_run/2910a.stdout b/tests/concurrent/should_run/T2910a.stdout similarity index 100% rename from tests/concurrent/should_run/2910a.stdout rename to tests/concurrent/should_run/T2910a.stdout diff --git a/tests/concurrent/should_run/3279.hs b/tests/concurrent/should_run/T3279.hs similarity index 81% rename from tests/concurrent/should_run/3279.hs rename to tests/concurrent/should_run/T3279.hs index f47970431030cdd253716cffd76e501228148fa4..a90d38aaa448ac06a4588665307a301c55dca82e 100644 --- a/tests/concurrent/should_run/3279.hs +++ b/tests/concurrent/should_run/T3279.hs @@ -3,19 +3,20 @@ import System.IO.Unsafe import GHC.Conc import Control.Exception +import GHC.IO (unsafeUnmask) f :: Int f = (1 +) . unsafePerformIO $ do error "foo" `catch` \(SomeException e) -> do myThreadId >>= flip throwTo e -- point X - unblock $ return 1 + unsafeUnmask $ return 1 main :: IO () main = do evaluate f `catch` \(SomeException e) -> return 0 -- the evaluation of 'x' is now suspended at point X - tid <- block $ forkIO (evaluate f >> return ()) + tid <- mask_ $ forkIO (evaluate f >> return ()) killThread tid -- now execute the 'unblock' above with a pending exception yield diff --git a/tests/concurrent/should_run/3279.stdout b/tests/concurrent/should_run/T3279.stdout similarity index 100% rename from tests/concurrent/should_run/3279.stdout rename to tests/concurrent/should_run/T3279.stdout diff --git a/tests/concurrent/should_run/3429.hs b/tests/concurrent/should_run/T3429.hs similarity index 100% rename from tests/concurrent/should_run/3429.hs rename to tests/concurrent/should_run/T3429.hs diff --git a/tests/concurrent/should_run/3429.stdout b/tests/concurrent/should_run/T3429.stdout similarity index 100% rename from tests/concurrent/should_run/3429.stdout rename to tests/concurrent/should_run/T3429.stdout diff --git a/tests/concurrent/should_run/367.hs b/tests/concurrent/should_run/T367.hs similarity index 100% rename from tests/concurrent/should_run/367.hs rename to tests/concurrent/should_run/T367.hs diff --git a/tests/concurrent/should_run/367.stdout b/tests/concurrent/should_run/T367.stdout similarity index 100% rename from tests/concurrent/should_run/367.stdout rename to tests/concurrent/should_run/T367.stdout diff --git a/tests/concurrent/should_run/367_letnoescape.hs b/tests/concurrent/should_run/T367_letnoescape.hs similarity index 100% rename from tests/concurrent/should_run/367_letnoescape.hs rename to tests/concurrent/should_run/T367_letnoescape.hs diff --git a/tests/concurrent/should_run/367_letnoescape.stdout b/tests/concurrent/should_run/T367_letnoescape.stdout similarity index 100% rename from tests/concurrent/should_run/367_letnoescape.stdout rename to tests/concurrent/should_run/T367_letnoescape.stdout diff --git a/tests/concurrent/should_run/T4030.hs b/tests/concurrent/should_run/T4030.hs new file mode 100644 index 0000000000000000000000000000000000000000..f160dfda808e8d1eeaf6031e93e916970dfcd6a0 --- /dev/null +++ b/tests/concurrent/should_run/T4030.hs @@ -0,0 +1,8 @@ +module Main where + +import Control.Concurrent +import Control.Exception + +main :: IO () +main = do tid <- mask $ \_ -> forkIO $ let x = x in x + killThread tid diff --git a/tests/concurrent/should_run/T4030.stderr b/tests/concurrent/should_run/T4030.stderr new file mode 100644 index 0000000000000000000000000000000000000000..428476bb8f2a354b552ba565aa3b4afa6a88728c --- /dev/null +++ b/tests/concurrent/should_run/T4030.stderr @@ -0,0 +1 @@ +T4030: <<loop>> diff --git a/tests/concurrent/should_run/4262.hs b/tests/concurrent/should_run/T4262.hs similarity index 100% rename from tests/concurrent/should_run/4262.hs rename to tests/concurrent/should_run/T4262.hs diff --git a/tests/concurrent/should_run/4262.stdout b/tests/concurrent/should_run/T4262.stdout similarity index 100% rename from tests/concurrent/should_run/4262.stdout rename to tests/concurrent/should_run/T4262.stdout diff --git a/tests/concurrent/should_run/4811.hs b/tests/concurrent/should_run/T4811.hs similarity index 100% rename from tests/concurrent/should_run/4811.hs rename to tests/concurrent/should_run/T4811.hs diff --git a/tests/concurrent/should_run/4813.hs b/tests/concurrent/should_run/T4813.hs similarity index 100% rename from tests/concurrent/should_run/4813.hs rename to tests/concurrent/should_run/T4813.hs diff --git a/tests/concurrent/should_run/5238.hs b/tests/concurrent/should_run/T5238.hs similarity index 100% rename from tests/concurrent/should_run/5238.hs rename to tests/concurrent/should_run/T5238.hs diff --git a/tests/concurrent/should_run/5238.stdout b/tests/concurrent/should_run/T5238.stdout similarity index 100% rename from tests/concurrent/should_run/5238.stdout rename to tests/concurrent/should_run/T5238.stdout diff --git a/tests/concurrent/should_run/5421.hs b/tests/concurrent/should_run/T5421.hs similarity index 100% rename from tests/concurrent/should_run/5421.hs rename to tests/concurrent/should_run/T5421.hs diff --git a/tests/concurrent/should_run/5558.hs b/tests/concurrent/should_run/T5558.hs similarity index 100% rename from tests/concurrent/should_run/5558.hs rename to tests/concurrent/should_run/T5558.hs diff --git a/tests/concurrent/should_run/5611.hs b/tests/concurrent/should_run/T5611.hs similarity index 100% rename from tests/concurrent/should_run/5611.hs rename to tests/concurrent/should_run/T5611.hs diff --git a/tests/concurrent/should_run/T5611.stderr b/tests/concurrent/should_run/T5611.stderr new file mode 100644 index 0000000000000000000000000000000000000000..6fdc96912cfdb750b69e6c50ea2b42c1982fa87f --- /dev/null +++ b/tests/concurrent/should_run/T5611.stderr @@ -0,0 +1 @@ +T5611: user error (Exception delivered successfully) diff --git a/tests/concurrent/should_run/5611.stdout b/tests/concurrent/should_run/T5611.stdout similarity index 100% rename from tests/concurrent/should_run/5611.stdout rename to tests/concurrent/should_run/T5611.stdout diff --git a/tests/concurrent/should_run/5866.hs b/tests/concurrent/should_run/T5866.hs similarity index 100% rename from tests/concurrent/should_run/5866.hs rename to tests/concurrent/should_run/T5866.hs diff --git a/tests/concurrent/should_run/T5866.stderr b/tests/concurrent/should_run/T5866.stderr new file mode 100644 index 0000000000000000000000000000000000000000..f2d13997e737439742735c13b11dc7ba1d5126cc --- /dev/null +++ b/tests/concurrent/should_run/T5866.stderr @@ -0,0 +1 @@ +T5866: thread blocked indefinitely in an STM transaction diff --git a/tests/concurrent/should_run/all.T b/tests/concurrent/should_run/all.T index 71b821f47c4ef906d22e311ef8a59eddefc98b71..bb2bcd383decc10ec70d250c1c03ba63750cfb03 100644 --- a/tests/concurrent/should_run/all.T +++ b/tests/concurrent/should_run/all.T @@ -22,20 +22,20 @@ test('conc072', only_ways(['threaded2']), compile_and_run, ['']) test('conc073', normal, compile_and_run, ['']) # vector code must get inlined to become non-allocating -test('367', composes([reqlib('vector'), timeout_multiplier(0.001)]), compile_and_run, ['-O2 -fno-omit-yields']) -test('367_letnoescape', composes([timeout_multiplier(0.001)]), compile_and_run, ['-fno-omit-yields']) +test('T367', [reqlib('vector'), timeout_multiplier(0.001)], compile_and_run, ['-O2 -fno-omit-yields']) +test('T367_letnoescape', [timeout_multiplier(0.001)], compile_and_run, ['-fno-omit-yields']) -test('1980', normal, compile_and_run, ['']) -test('2910', normal, compile_and_run, ['']) -test('2910a', normal, compile_and_run, ['']) -test('3279', normal, compile_and_run, ['']) +test('T1980', normal, compile_and_run, ['']) +test('T2910', normal, compile_and_run, ['']) +test('T2910a', normal, compile_and_run, ['']) +test('T3279', normal, compile_and_run, ['']) # This test takes a long time with the default context switch interval -test('3429', extra_run_opts('+RTS -C0.001 -RTS'), compile_and_run, ['']) +test('T3429', extra_run_opts('+RTS -C0.001 -RTS'), compile_and_run, ['']) # without -O, goes into an infinite loop # GHCi does not detect the infinite loop. We should really fix this. -test('4030', omit_ways('ghci'), compile_and_run, ['-O']) +test('T4030', omit_ways('ghci'), compile_and_run, ['-O']) # each of these runs for about a second test('throwto001', [reqlib('random'), extra_run_opts('1000 2000')], @@ -50,34 +50,34 @@ test('async001', normal, compile_and_run, ['']) test('numsparks001', only_ways(['threaded1']), compile_and_run, ['']) -test('4262', [ skip, # skip for now, it doesn't give reliable results - only_ways(['threaded1']), - unless_os('linux',skip), - if_compiler_lt('ghc', '7.1', expect_fail) ], - compile_and_run, ['']) +test('T4262', [ skip, # skip for now, it doesn't give reliable results + only_ways(['threaded1']), + unless(opsys('linux'),skip), + when(compiler_lt('ghc', '7.1'), expect_fail) ], + compile_and_run, ['']) -test('4813', normal, compile_and_run, ['']) -test('4811', normal, compile_and_run, ['']) +test('T4813', normal, compile_and_run, ['']) +test('T4811', normal, compile_and_run, ['']) test('allowinterrupt001', normal, compile_and_run, ['']) # try hard to provoke the error by running the test 100 times -test('5558', +test('T5558', [ only_ways(['threaded2']), cmd_wrapper( lambda c: "for i in %s; do %s || break; done" % (" ".join(str(i) for i in range(1,101)), c)) ], compile_and_run, ['']) -test('5421', normal, compile_and_run, ['']) -test('5611', normal, compile_and_run, ['']) -test('5238', normal, compile_and_run, ['']) -test('5866', exit_code(1), compile_and_run, ['']) +test('T5421', normal, compile_and_run, ['']) +test('T5611', normal, compile_and_run, ['']) +test('T5238', normal, compile_and_run, ['']) +test('T5866', exit_code(1), compile_and_run, ['']) # ----------------------------------------------------------------------------- # These tests we only do for a full run -def f( opts ): +def f( name, opts ): if config.fast: opts.skip = 1 @@ -89,11 +89,11 @@ test('conc002', normal, compile_and_run, ['']) # Omit GHCi way - it blows up to 0.5G. Something to do with the threaded RTS? test('conc004', omit_ways(['ghci']), compile_and_run, ['']) -test('conc007', compose(only_compiler_types(['ghc']), - extra_run_opts('+RTS -H128M -RTS')), +test('conc007', [only_compiler_types(['ghc']), + extra_run_opts('+RTS -H128M -RTS')], compile_and_run, ['']) test('conc008', only_compiler_types(['ghc']), compile_and_run, ['']) -test('conc009', compose(only_compiler_types(['ghc']), exit_code(1)), +test('conc009', [only_compiler_types(['ghc']), exit_code(1)], compile_and_run, ['']) test('conc010', only_compiler_types(['ghc']), compile_and_run, ['']) @@ -110,8 +110,8 @@ test('conc016', [ omit_ways(['threaded2']), # see comment in conc016.hs test('conc017', only_compiler_types(['ghc']), compile_and_run, ['']) test('conc017a', only_compiler_types(['ghc']), compile_and_run, ['']) test('conc018', only_compiler_types(['ghc']), compile_and_run, ['']) -test('conc019', compose(only_compiler_types(['ghc']), - extra_run_opts('+RTS -K16m -RTS')), +test('conc019', [only_compiler_types(['ghc']), + extra_run_opts('+RTS -K16m -RTS')], compile_and_run, ['']) test('conc020', only_compiler_types(['ghc']), compile_and_run, ['']) test('conc021', [ omit_ways(['ghci']), exit_code(1) ], compile_and_run, ['']) @@ -127,18 +127,18 @@ if config.platform == 'i386-unknown-mingw32': else: conc023_ways = normal -test('conc023', composes([skip_if_fast, - only_compiler_types(['ghc']), - reqlib('random'), - conc023_ways]), compile_and_run, ['']) +test('conc023', [when(fast(), skip), + only_compiler_types(['ghc']), + reqlib('random'), + conc023_ways], compile_and_run, ['']) test('conc024', only_compiler_types(['ghc']), compile_and_run, ['']) test('conc025', normal, compile_and_run, ['']) test('conc026', only_compiler_types(['ghc']), compile_and_run, ['']) test('conc028', normal, compile_and_run, ['']) test('conc029', normal, compile_and_run, ['']) -test('conc030', compose(only_compiler_types(['ghc']), - extra_run_opts('+RTS -K4M -RTS')), +test('conc030', + [only_compiler_types(['ghc']), extra_run_opts('+RTS -K4M -RTS')], compile_and_run, ['']) test('conc031', normal, compile_and_run, ['']) @@ -147,9 +147,9 @@ test('conc032', only_compiler_types(['ghc']), compile_and_run, ['']) test('conc033', normal, compile_and_run, ['']) # Omit for GHCi, because it just sits there waiting for you to press ^C -test('conc034', compose(only_compiler_types(['ghc']), - compose(omit_ways(['ghci']), - extra_run_opts('+RTS -C0 -RTS'))), +test('conc034', [only_compiler_types(['ghc']), + omit_ways(['ghci']), + extra_run_opts('+RTS -C0 -RTS')], compile_and_run, ['']) test('conc035', only_compiler_types(['ghc']), compile_and_run, ['']) @@ -170,8 +170,8 @@ test('conc036', skip, compile_and_run, ['']) # Interrupting foreign calls only makes sense if we are threaded -test('foreignInterruptible', [skip_if_fast, - if_os('mingw32',expect_fail), +test('foreignInterruptible', [when(fast(), skip), + when(opsys('mingw32'),expect_fail), # I don't think we support interrupting Sleep() # on Windows. --SDM only_threaded_ways, @@ -187,9 +187,8 @@ test('conc038', only_ways(['threaded1','threaded2']), compile_and_run, ['']) test('conc039', omit_ways(['ghci','threaded1','threaded2','profthreaded']), compile_and_run, ['']) # Omit for GHCi, uses foreign export -test('conc040', compose(only_compiler_types(['ghc']), - compose(exit_code(1), - omit_ways(['ghci']))), +test('conc040', + [only_compiler_types(['ghc']), exit_code(1), omit_ways(['ghci'])], compile_and_run, ['']) # STM-related tests. @@ -204,7 +203,7 @@ test('conc058', only_compiler_types(['ghc']), compile_and_run, ['']) test('conc059', [only_compiler_types(['ghc']), only_ways(['threaded1','threaded2']), - compile_cmd_prefix('$MAKE conc059_setup && '), + pre_cmd('$MAKE -s --no-print-directory conc059_setup'), extra_clean(['conc059_c.o'])], compile_and_run, ['conc059_c.c -no-hs-main']) diff --git a/tests/concurrent/should_run/conc039.hs b/tests/concurrent/should_run/conc039.hs index dc5d181a31ec1f46aabf795fe0b71458cd94daa3..dc493d4acc204a88c5a6bdaca61216acbba10301 100644 --- a/tests/concurrent/should_run/conc039.hs +++ b/tests/concurrent/should_run/conc039.hs @@ -1,6 +1,7 @@ {-# LANGUAGE ForeignFunctionInterface #-} import Foreign +import System.IO.Unsafe import System.Mem import Control.Concurrent diff --git a/tests/concurrent/should_run/conc040.hs b/tests/concurrent/should_run/conc040.hs index be3bfdb9151263675362ea8704bfabf159741a52..e4acd84eef86eb544019e50a9fd90679729d870e 100644 --- a/tests/concurrent/should_run/conc040.hs +++ b/tests/concurrent/should_run/conc040.hs @@ -4,6 +4,7 @@ import Foreign import Data.IORef import Control.Concurrent import Control.Exception +import System.IO.Unsafe foreign import ccall "wrapper" wrap :: IO () -> IO (FunPtr (IO ())) diff --git a/tests/concurrent/should_run/conc069.hs b/tests/concurrent/should_run/conc069.hs index fd757133a55aa0bd388dafd6caefa593c0844580..5bf619bec126063ddc81ac69a5639d6fc2d0af6f 100644 --- a/tests/concurrent/should_run/conc069.hs +++ b/tests/concurrent/should_run/conc069.hs @@ -6,14 +6,14 @@ main = do m <- newEmptyMVar forkIO (do stat; putMVar m ()) takeMVar m - block $ forkIO (do stat; putMVar m ()) + mask_ $ forkIO (do stat; putMVar m ()) takeMVar m forkOS (do stat; putMVar m ()) takeMVar m - block $ forkOS (do stat; putMVar m ()) + mask_ $ forkOS (do stat; putMVar m ()) takeMVar m stat = do x <- isCurrentThreadBound - y <- blocked + y <- getMaskingState print (x,y) diff --git a/tests/concurrent/should_run/conc069.stdout b/tests/concurrent/should_run/conc069.stdout index 240e16e63f453c56e769eb19d0f3f9a20c416666..0883f133dc7203bbf117746425a89a3d4094aa5b 100644 --- a/tests/concurrent/should_run/conc069.stdout +++ b/tests/concurrent/should_run/conc069.stdout @@ -1,4 +1,4 @@ -(False,False) -(False,True) -(True,False) -(True,True) +(False,Unmasked) +(False,MaskedInterruptible) +(True,Unmasked) +(True,MaskedInterruptible) diff --git a/tests/concurrent/should_run/mask002.hs b/tests/concurrent/should_run/mask002.hs index 264ac1fb70ce4d8d9a9bef364dbbea79ec6f6601..069af8f2fc03cfea59581fd01b5ee1aefaba0d46 100644 --- a/tests/concurrent/should_run/mask002.hs +++ b/tests/concurrent/should_run/mask002.hs @@ -3,7 +3,7 @@ import Control.Concurrent import Text.Printf -- Test combinations of nesting mask/uninterruptibleMask with --- forkIO/forkIOUnmask +-- forkIO/forkIOWithUnmask main = do m <- newEmptyMVar @@ -17,9 +17,11 @@ main = do print (e::SomeException) throwIO e killThread t2 - t3 <- mask_ $ forkIOUnmasked $ do stat 3 Unmasked; putMVar m () + t3 <- mask_ $ forkIOWithUnmask $ \unmask -> + unmask $ do stat 3 Unmasked; putMVar m () takeMVar m - t4 <- uninterruptibleMask_ $ forkIOUnmasked $ do stat 4 Unmasked; putMVar m () + t4 <- uninterruptibleMask_ $ forkIOWithUnmask $ \unmask -> + unmask $ do stat 4 Unmasked; putMVar m () takeMVar m stat :: Int -> MaskingState -> IO () diff --git a/tests/concurrent/should_run/throwto002.hs b/tests/concurrent/should_run/throwto002.hs index db67c24df72cd2742185e07a04ab73744e14bd76..e7fcc36012521d29659b906da579217989df7a9d 100644 --- a/tests/concurrent/should_run/throwto002.hs +++ b/tests/concurrent/should_run/throwto002.hs @@ -11,14 +11,14 @@ import Data.IORef main = do r <- newIORef 0 rec - t1 <- block $ forkIO (thread r t2) - t2 <- block $ forkIO (thread r t1) + t1 <- mask $ \restore -> forkIO (thread restore r t2) + t2 <- mask $ \restore -> forkIO (thread restore r t1) threadDelay 1000000 readIORef r >>= print . (/= 0) -thread r t = run - where - run = (unblock $ forever $ do killThread t +thread restore r t = run + where + run = (restore $ forever $ do killThread t i <- atomicModifyIORef r (\i -> (i + 1, i)) evaluate i) `catch` \(e::SomeException) -> run diff --git a/tests/concurrent/should_run/throwto003.hs b/tests/concurrent/should_run/throwto003.hs index 7a7582f56142d152f124004650c6334016355688..37540cc68a41e0c17a62b295e478f08c11ca2caa 100644 --- a/tests/concurrent/should_run/throwto003.hs +++ b/tests/concurrent/should_run/throwto003.hs @@ -5,12 +5,12 @@ import Control.Monad main = do m <- newMVar 1 - t1 <- forkIO $ thread m + t1 <- mask $ \restore -> forkIO $ thread restore m t2 <- forkIO $ forever $ killThread t1 threadDelay 1000000 takeMVar m -thread m = run +thread restore m = run where - run = (unblock $ forever $ modifyMVar_ m $ \v -> if v `mod` 2 == 1 then return (v*2) else return (v-1)) + run = (restore $ forever $ modifyMVar_ m $ \v -> if v `mod` 2 == 1 then return (v*2) else return (v-1)) `catch` \(e::SomeException) -> run diff --git a/tests/cpranal/should_compile/all.T b/tests/cpranal/should_compile/all.T index 99ffed997fe8b57e2e7a7ee58d06445e62216fd0..2ec0a84e9aa85601aafd17e070110b3138db3efd 100644 --- a/tests/cpranal/should_compile/all.T +++ b/tests/cpranal/should_compile/all.T @@ -1,5 +1,5 @@ # Just do the opt way... -def f( opts ): +def f( name, opts ): opts.only_ways = ['optasm'] setTestOpts(f) diff --git a/tests/deSugar/should_compile/GadtOverlap.stderr b/tests/deSugar/should_compile/GadtOverlap.stderr index 423d69469fed24f755b8e4e1770151335bf6a260..359a352edbc61a965ab31f25fde99ffcac3e0c96 100644 --- a/tests/deSugar/should_compile/GadtOverlap.stderr +++ b/tests/deSugar/should_compile/GadtOverlap.stderr @@ -1,4 +1,4 @@ -GadtOverlap.hs:19:1: - Warning: Pattern match(es) are non-exhaustive - In an equation for `h': Patterns not matched: T3 +GadtOverlap.hs:19:1: Warning: + Pattern match(es) are non-exhaustive + In an equation for ‛h’: Patterns not matched: T3 diff --git a/tests/deSugar/should_compile/T2395.stderr b/tests/deSugar/should_compile/T2395.stderr index 4bfd9d6bb8ec6a621676c63e491efef401802c36..241a767f7cf57fa43e3ee976f35fe379064d30e1 100644 --- a/tests/deSugar/should_compile/T2395.stderr +++ b/tests/deSugar/should_compile/T2395.stderr @@ -1,4 +1,4 @@ -T2395.hs:12:1: - Warning: Pattern match(es) are overlapped - In an equation for `bar': bar _ = ... +T2395.hs:12:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛bar’: bar _ = ... diff --git a/tests/deSugar/should_compile/T2431.stderr b/tests/deSugar/should_compile/T2431.stderr index b3387114035713778b88036b1e2f8aaefbf74ccc..f8c5a0ac9c72bf085fdea446d2e770ccd9f140b4 100644 --- a/tests/deSugar/should_compile/T2431.stderr +++ b/tests/deSugar/should_compile/T2431.stderr @@ -14,7 +14,7 @@ T2431.$WRefl = \ (@ a) -> T2431.Refl @ a @ a @~ <a> T2431.absurd :: forall a. (GHC.Types.Int T2431.:~: GHC.Types.Bool) -> a -[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType Tb] +[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <L,U>b] T2431.absurd = \ (@ a) (x :: GHC.Types.Int T2431.:~: GHC.Types.Bool) -> case x of _ { } diff --git a/tests/deSugar/should_compile/T5117.stderr b/tests/deSugar/should_compile/T5117.stderr index e9ddba143ba429df90b85590faa0bad4b86af0c1..2860940b0c837462e98ef345b7512f25d37daf3f 100644 --- a/tests/deSugar/should_compile/T5117.stderr +++ b/tests/deSugar/should_compile/T5117.stderr @@ -1,4 +1,4 @@ - -T5117.hs:15:1: - Warning: Pattern match(es) are overlapped - In an equation for `f3': f3 (MyString "a") = ... + +T5117.hs:15:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛f3’: f3 (MyString "a") = ... diff --git a/tests/deSugar/should_compile/T7669.hs b/tests/deSugar/should_compile/T7669.hs new file mode 100644 index 0000000000000000000000000000000000000000..b665b6543ff5f014f8a8b45fe8054b62283c280e --- /dev/null +++ b/tests/deSugar/should_compile/T7669.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE EmptyCase #-} +{-# OPTIONS_GHC -fwarn-incomplete-patterns #-} + +module T7669 where + +data Void + +foo :: Void -> () +foo x = case x of {} +-- Should not get incomplete-pattern warning + diff --git a/tests/deSugar/should_compile/all.T b/tests/deSugar/should_compile/all.T index b932a49a0e943e497218273b407bf04612f4ec0c..4551709e6553a48b981ea647b1df08261cac8e45 100644 --- a/tests/deSugar/should_compile/all.T +++ b/tests/deSugar/should_compile/all.T @@ -1,5 +1,5 @@ # Just do the normal way... -def f( opts ): +def f( name, opts ): opts.only_ways = ['normal'] setTestOpts(f) @@ -64,7 +64,6 @@ test('ds057', normal, compile, ['']) test('ds058', normal, compile, ['-W']) test('ds059', normal, compile, ['-W']) test('ds060', expect_broken(322), compile, ['']) -test('ds061', expect_broken(851), compile, ['']) test('ds062', normal, compile, ['']) test('ds063', normal, compile, ['']) @@ -76,7 +75,7 @@ test('GadtOverlap', normal, compile, ['-Wall']) test('T2395', normal, compile, ['']) test('T4371', normal, compile, ['']) test('T4439', normal, compile, ['']) -test('T4488', if_compiler_lt('ghc', '7.1', expect_fail), compile, ['']) +test('T4488', when(compiler_lt('ghc', '7.1'), expect_fail), compile, ['']) test('T4870', [only_ways(['optasm']), only_compiler_types(['ghc']), @@ -102,3 +101,4 @@ test('T5252Take2', run_command, ['$MAKE -s --no-print-directory T5252Take2']) test('T2431', normal, compile, ['-ddump-simpl -dsuppress-uniques']) +test('T7669', normal, compile, ['']) diff --git a/tests/deSugar/should_compile/ds002.stderr-ghc b/tests/deSugar/should_compile/ds002.stderr-ghc index baf7ffde5339da2d59683f20da635281b84065f7..c526e0db48b08f1879ddaf12383d216b686ca3e3 100644 --- a/tests/deSugar/should_compile/ds002.stderr-ghc +++ b/tests/deSugar/should_compile/ds002.stderr-ghc @@ -1,10 +1,10 @@ -ds002.hs:7:1: - Warning: Pattern match(es) are overlapped - In an equation for `f': - f y = ... - f z = ... +ds002.hs:7:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛f’: + f y = ... + f z = ... -ds002.hs:11:1: - Warning: Pattern match(es) are overlapped - In an equation for `g': g x y z = ... +ds002.hs:11:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛g’: g x y z = ... diff --git a/tests/deSugar/should_compile/ds003.stderr-ghc b/tests/deSugar/should_compile/ds003.stderr-ghc index 5b1bd3949f6afd96962da82884d708ba4f133904..f12789da42dae37a389e973ec3941ff078a1b929 100644 --- a/tests/deSugar/should_compile/ds003.stderr-ghc +++ b/tests/deSugar/should_compile/ds003.stderr-ghc @@ -1,6 +1,6 @@ -ds003.hs:5:1: - Warning: Pattern match(es) are overlapped - In an equation for `f': - f (x : x1 : x2 : x3) ~(y, ys) z = ... - f x y True = ... +ds003.hs:5:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛f’: + f (x : x1 : x2 : x3) ~(y, ys) z = ... + f x y True = ... diff --git a/tests/deSugar/should_compile/ds019.stderr-ghc b/tests/deSugar/should_compile/ds019.stderr-ghc index 68816686b1c12091cf268130942c103c26f1bb77..fd13ec7203f6e66fe362051e84c0f4dbccabcc5d 100644 --- a/tests/deSugar/should_compile/ds019.stderr-ghc +++ b/tests/deSugar/should_compile/ds019.stderr-ghc @@ -1,7 +1,7 @@ -ds019.hs:5:1: - Warning: Pattern match(es) are overlapped - In an equation for `f': - f d (j, k) p = ... - f (e, f, g) l q = ... - f h (m, n) r = ... +ds019.hs:5:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛f’: + f d (j, k) p = ... + f (e, f, g) l q = ... + f h (m, n) r = ... diff --git a/tests/deSugar/should_compile/ds020.stderr-ghc b/tests/deSugar/should_compile/ds020.stderr-ghc index 3f9205a729ef14cc8b1c9ec530f5cdd8ce032c81..42323200253b670d46b2f7b993b85b5ce06bd1a9 100644 --- a/tests/deSugar/should_compile/ds020.stderr-ghc +++ b/tests/deSugar/should_compile/ds020.stderr-ghc @@ -1,18 +1,18 @@ -ds020.hs:8:1: - Warning: Pattern match(es) are overlapped - In an equation for `a': a ~(~[], ~[], ~[]) = ... +ds020.hs:8:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛a’: a ~(~[], ~[], ~[]) = ... -ds020.hs:11:1: - Warning: Pattern match(es) are overlapped - In an equation for `b': b ~(~x : ~xs : ~ys) = ... +ds020.hs:11:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛b’: b ~(~x : ~xs : ~ys) = ... -ds020.hs:16:1: - Warning: Pattern match(es) are overlapped - In an equation for `d': - d ~(n+43) = ... - d ~(n+999) = ... +ds020.hs:16:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛d’: + d ~(n+43) = ... + d ~(n+999) = ... -ds020.hs:22:1: - Warning: Pattern match(es) are overlapped - In an equation for `f': f x@(~[]) = ... +ds020.hs:22:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛f’: f x@(~[]) = ... diff --git a/tests/deSugar/should_compile/ds022.stderr-ghc b/tests/deSugar/should_compile/ds022.stderr-ghc index ce6d4a52c112d8372b90de4299831a6986d14172..7dd50a2610d68c98a06f1bd09fd1d8463c8674d1 100644 --- a/tests/deSugar/should_compile/ds022.stderr-ghc +++ b/tests/deSugar/should_compile/ds022.stderr-ghc @@ -1,6 +1,6 @@ -ds022.hs:20:1: - Warning: Pattern match(es) are overlapped - In an equation for `i': - i 1 0.011e2 = ... - i 2 2.20000 = ... +ds022.hs:20:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛i’: + i 1 0.011e2 = ... + i 2 2.20000 = ... diff --git a/tests/deSugar/should_compile/ds041.stderr-ghc b/tests/deSugar/should_compile/ds041.stderr-ghc index acf3e1ae6fb16d0d83d157adc4bb185d8c3be4bb..48129316fe734929e04074bc763c7bd025ad7a71 100644 --- a/tests/deSugar/should_compile/ds041.stderr-ghc +++ b/tests/deSugar/should_compile/ds041.stderr-ghc @@ -1,8 +1,8 @@ -ds041.hs:1:14: - Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. +ds041.hs:1:14: Warning: + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. -ds041.hs:16:7: - Warning: Fields of `Foo' not initialised: x +ds041.hs:16:7: Warning: + Fields of ‛Foo’ not initialised: x In the expression: Foo {} - In an equation for `foo': foo = Foo {} + In an equation for ‛foo’: foo = Foo {} diff --git a/tests/deSugar/should_compile/ds051.stderr-ghc b/tests/deSugar/should_compile/ds051.stderr-ghc index a098efee33447701e4b42dfa9ab22b9c63be23ee..c40c44620eca0f5ea35b9554754737c2924def4a 100644 --- a/tests/deSugar/should_compile/ds051.stderr-ghc +++ b/tests/deSugar/should_compile/ds051.stderr-ghc @@ -1,12 +1,12 @@ -ds051.hs:6:1: - Warning: Pattern match(es) are overlapped - In an equation for `f1': f1 "ab" = ... +ds051.hs:6:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛f1’: f1 "ab" = ... -ds051.hs:11:1: - Warning: Pattern match(es) are overlapped - In an equation for `f2': f2 ('a' : 'b' : []) = ... +ds051.hs:11:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛f2’: f2 ('a' : 'b' : []) = ... -ds051.hs:16:1: - Warning: Pattern match(es) are overlapped - In an equation for `f3': f3 "ab" = ... +ds051.hs:16:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛f3’: f3 "ab" = ... diff --git a/tests/deSugar/should_compile/ds053.stderr-ghc b/tests/deSugar/should_compile/ds053.stderr-ghc index 3bce906869222d2415ea9eddae669cbb8ab50db4..861e66b84797012f136a13a0566553d488935d58 100644 --- a/tests/deSugar/should_compile/ds053.stderr-ghc +++ b/tests/deSugar/should_compile/ds053.stderr-ghc @@ -1,2 +1,2 @@ -ds053.hs:5:1: Warning: Defined but not used: `f' +ds053.hs:5:1: Warning: Defined but not used: ‛f’ diff --git a/tests/deSugar/should_compile/ds056.stderr b/tests/deSugar/should_compile/ds056.stderr index 6e0972bef46bde42995ead6ba89f73c997a8f353..f4d2e81b51681da2e2d98bfec001a58d53cacd1d 100644 --- a/tests/deSugar/should_compile/ds056.stderr +++ b/tests/deSugar/should_compile/ds056.stderr @@ -1,4 +1,4 @@ -ds056.hs:8:1: - Warning: Pattern match(es) are overlapped - In an equation for `g': g _ = ... +ds056.hs:8:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛g’: g _ = ... diff --git a/tests/deSugar/should_compile/ds061.hs b/tests/deSugar/should_compile/ds061.hs deleted file mode 100644 index 271bbbbc6048f18adf8b50ca4154f35c93625196..0000000000000000000000000000000000000000 --- a/tests/deSugar/should_compile/ds061.hs +++ /dev/null @@ -1,14 +0,0 @@ -{-# LANGUAGE NPlusKPatterns #-} -{-# OPTIONS_GHC -fwarn-incomplete-patterns -Wall #-} - --- Test for trac #851 --- Should not give a non-exhaustive pattern warning - -module ShouldCompile where - -import Data.Word - -f :: Word -> Bool -f 0 = True -f (_n + 1) = False - diff --git a/tests/deSugar/should_run/all.T b/tests/deSugar/should_run/all.T index 7f0df9c0ffa056d8e4b5481dac4862630b0f8fe5..352a65239eac59048755c423d5f579292efe66cc 100644 --- a/tests/deSugar/should_run/all.T +++ b/tests/deSugar/should_run/all.T @@ -13,8 +13,8 @@ test('dsrun007', exit_code(1), compile_and_run, ['']) test('dsrun008', exit_code(1), compile_and_run, ['']) test('dsrun009', normal, compile_and_run, ['']) test('dsrun010', normal, compile_and_run, ['']) -test('dsrun011', skip_if_fast, compile_and_run, ['']) -test('dsrun012', skip_if_fast, compile_and_run, ['']) +test('dsrun011', when(fast(), skip), compile_and_run, ['']) +test('dsrun012', when(fast(), skip), compile_and_run, ['']) test('dsrun013', normal, compile_and_run, ['']) test('dsrun014', normal, compile_and_run, ['-fobject-code']) test('dsrun015', normal, compile_and_run, ['']) @@ -38,5 +38,5 @@ test('mc06', normal, compile_and_run, ['']) test('mc07', normal, compile_and_run, ['']) test('mc08', normal, compile_and_run, ['']) test('T5742', normal, compile_and_run, ['']) -test('DsLambdaCase', if_compiler_lt('ghc', '7.5', skip), compile_and_run, ['']) -test('DsMultiWayIf', if_compiler_lt('ghc', '7.5', skip), compile_and_run, ['']) +test('DsLambdaCase', when(compiler_lt('ghc', '7.5'), skip), compile_and_run, ['']) +test('DsMultiWayIf', when(compiler_lt('ghc', '7.5'), skip), compile_and_run, ['']) diff --git a/tests/deriving/should_compile/Makefile b/tests/deriving/should_compile/Makefile index 9101fbd40ada5d47b499a48e62cb4ccd7f67ef71..3ae7d49eb20efd57ee5148b370bd7b0597f320cc 100644 --- a/tests/deriving/should_compile/Makefile +++ b/tests/deriving/should_compile/Makefile @@ -1,3 +1,9 @@ TOP=../../.. include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/test.mk + +.PHONY: T1133 +T1133: + '$(TEST_HC)' $(TEST_HC_OPTS) -c T1133.hs-boot + '$(TEST_HC)' $(TEST_HC_OPTS) -c T1133.hs + diff --git a/tests/deriving/should_compile/T1133.hs b/tests/deriving/should_compile/T1133.hs new file mode 100644 index 0000000000000000000000000000000000000000..5d471d1f7a36b2e56b2fb06696ac3c11249e2bad --- /dev/null +++ b/tests/deriving/should_compile/T1133.hs @@ -0,0 +1,8 @@ + +{-# LANGUAGE GeneralizedNewtypeDeriving #-} + +module T1133 where + +import {-# SOURCE #-} T1133 + +newtype X = X Int deriving Enum diff --git a/tests/deriving/should_compile/T1133.hs-boot b/tests/deriving/should_compile/T1133.hs-boot new file mode 100644 index 0000000000000000000000000000000000000000..520a2c0af3448da163eacb04fb3ad66167659161 --- /dev/null +++ b/tests/deriving/should_compile/T1133.hs-boot @@ -0,0 +1,4 @@ + +module T1133 where + +newtype X = X Int diff --git a/tests/deriving/should_compile/T2378.hs b/tests/deriving/should_compile/T2378.hs index e3118cb863b27eda3e4e16b6777b42d24110dd42..4f12313fc07a98b4b16aeb252044477a4400a881 100644 --- a/tests/deriving/should_compile/T2378.hs +++ b/tests/deriving/should_compile/T2378.hs @@ -7,4 +7,4 @@ import Data.Data newtype T f = MkT Int -deriving instance Typeable1 T +deriving instance Typeable T diff --git a/tests/deriving/should_compile/T3965.hs b/tests/deriving/should_compile/T3965.hs index 2ccaaadfdf3dbb98a0b949c30759ec38332f6859..99217acba61e9460d31a1815f5ec1e7d4d2bf573 100644 --- a/tests/deriving/should_compile/T3965.hs +++ b/tests/deriving/should_compile/T3965.hs @@ -3,16 +3,11 @@ module T3965 where import Data.Data -data T f e = Inl (f e) deriving (Data, Eq) +data T f e = Inl (f e) deriving (Data, Typeable, Eq) -instance (Typeable1 f) => Typeable1 (T f) where - typeOf1 _ = error "urk" +newtype Expr f = In (f (Expr f)) deriving Typeable -newtype Expr f = In (f (Expr f)) -instance Typeable1 f => Typeable (Expr f) where - typeOf _ = error "urk" - -deriving instance (Typeable1 a, Data (a (Expr a))) => Data (Expr a) +deriving instance (Typeable a, Data (a (Expr a))) => Data (Expr a) data Var e = Var String deriving (Data, Eq, Typeable) diff --git a/tests/deriving/should_compile/T4302.hs b/tests/deriving/should_compile/T4302.hs index 50369632f9275b6b9426599597506978436c092a..53035cf595dae0e76a1a62db11c6a785232e4838 100644 --- a/tests/deriving/should_compile/T4302.hs +++ b/tests/deriving/should_compile/T4302.hs @@ -11,7 +11,7 @@ data Test a deriving instance Eq (Test a) deriving instance Ord (Test a) -deriving instance Typeable1 Test +deriving instance Typeable Test deriving instance Data a => Data (Test a) deriving instance Functor Test deriving instance Foldable Test diff --git a/tests/deriving/should_compile/T7710.hs b/tests/deriving/should_compile/T7710.hs new file mode 100644 index 0000000000000000000000000000000000000000..5375c2c0ebd533e2a19c3284cbad38df1c58a159 --- /dev/null +++ b/tests/deriving/should_compile/T7710.hs @@ -0,0 +1,21 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE TypeSynonymInstances #-} +{-# LANGUAGE AutoDeriveTypeable #-} +{-# LANGUAGE TypeFamilies #-} + +module T7710 where + +import Data.Typeable + + +type T = Int +type family F a +type instance F Int = Int +data family D a +data instance D Int = DInt +data instance D Float = DFloat + +test = [ typeRep ([] :: [T]) + , typeRep ([] :: [F Int]) + , typeRep (Proxy :: Proxy D) + , typeRep ([] :: [D Int]) ] diff --git a/tests/deriving/should_compile/all.T b/tests/deriving/should_compile/all.T index 11a10b629cf63242047b91e641d18d1b83de567f..b2355f6ac9ac9b2a51445a7504d07b032fc16ac1 100644 --- a/tests/deriving/should_compile/all.T +++ b/tests/deriving/should_compile/all.T @@ -15,6 +15,7 @@ test('drv014', normal, compile, ['']) test('drv015', normal, compile, ['']) test('drv020', normal, compile, ['']) test('drv021', normal, compile, ['']) +test('drv022', normal, compile, ['']) test('deriving-1935', normal, compile, ['']) test('T2378', normal, compile, ['']) test('T2856', normal, compile, ['']) @@ -31,3 +32,8 @@ test('drv-functor1', normal, compile, ['']) test('drv-functor2', normal, compile, ['']) test('drv-foldable-traversable1', normal, compile, ['']) test('T6031', extra_clean(['T6031a.o', 'T6031a.hi']), multimod_compile, ['T6031', '-v0']) +test('T1133', + extra_clean(['T1133.o-boot', 'T1133.hi-boot']), + run_command, + ['$MAKE --no-print-directory -s T1133']) +test('T7710', normal, compile, ['']) \ No newline at end of file diff --git a/tests/deriving/should_compile/drv021.hs b/tests/deriving/should_compile/drv021.hs index c9800508def7061b21c6f1e7546ccffcc0171aa1..977372a516fe4d580279e06e445955fadc654b47 100644 --- a/tests/deriving/should_compile/drv021.hs +++ b/tests/deriving/should_compile/drv021.hs @@ -6,7 +6,7 @@ module ShouldCompile where -import Data.Typeable +import Data.OldTypeable data T1 a = T1 a data T2 a b = T2 a b diff --git a/tests/deriving/should_compile/drv021.stderr b/tests/deriving/should_compile/drv021.stderr new file mode 100644 index 0000000000000000000000000000000000000000..2071183c5366b08219a403969845c4ee619dd007 --- /dev/null +++ b/tests/deriving/should_compile/drv021.stderr @@ -0,0 +1,13 @@ + +drv021.hs:9:1: Warning: + Module ‛Data.OldTypeable’ is deprecated: Use Data.Typeable instead + +drv021.hs:14:19: Warning: + In the use of type constructor or class ‛Typeable1’ + (imported from Data.OldTypeable, but defined in Data.OldTypeable.Internal): + Deprecated: "Use Data.Typeable.Internal instead" + +drv021.hs:15:19: Warning: + In the use of type constructor or class ‛Typeable2’ + (imported from Data.OldTypeable, but defined in Data.OldTypeable.Internal): + Deprecated: "Use Data.Typeable.Internal instead" diff --git a/tests/deriving/should_fail/drvfail010.hs b/tests/deriving/should_compile/drv022.hs similarity index 70% rename from tests/deriving/should_fail/drvfail010.hs rename to tests/deriving/should_compile/drv022.hs index efecf07cf1e7023bb828c012957c5e7f9890db03..9a3e8dba41d78a73777baba4f86aee8eb1f2b847 100644 --- a/tests/deriving/should_fail/drvfail010.hs +++ b/tests/deriving/should_compile/drv022.hs @@ -1,10 +1,10 @@ {-# LANGUAGE DeriveDataTypeable #-} -module ShouldFail where +module ShouldCompile where import Data.Typeable data A a b c d e f g h i j = A deriving (Typeable) - -- Too many args + -- Many args data B a b = B (a b) deriving (Typeable) - -- Non type-kind args \ No newline at end of file + -- Non type-kind args \ No newline at end of file diff --git a/tests/deriving/should_fail/Makefile b/tests/deriving/should_fail/Makefile index 0f0995d29d2a57a7d475412226cd3967508234b0..629e011255793bc1efa0ef1a4e680a4db23d8f1d 100644 --- a/tests/deriving/should_fail/Makefile +++ b/tests/deriving/should_fail/Makefile @@ -6,3 +6,8 @@ drvfail016: $(RM) -f drvfail016.hi-boot drvfail016.o-boot '$(TEST_HC)' $(TEST_HC_OPTS) -XGeneralizedNewtypeDeriving -c drvfail016.hs-boot; echo $$? +.PHONY: T1133A +T1133A: + '$(TEST_HC)' $(TEST_HC_OPTS) -c T1133A.hs-boot + -'$(TEST_HC)' $(TEST_HC_OPTS) -c T1133A.hs + diff --git a/tests/deriving/should_fail/T1133A.hs b/tests/deriving/should_fail/T1133A.hs new file mode 100644 index 0000000000000000000000000000000000000000..b5950ea1fbcc5d479c5643e81a21474874c63ba5 --- /dev/null +++ b/tests/deriving/should_fail/T1133A.hs @@ -0,0 +1,6 @@ + +module T1133A where + +import {-# SOURCE #-} T1133A + +newtype X = X Int deriving Enum diff --git a/tests/deriving/should_fail/T1133A.hs-boot b/tests/deriving/should_fail/T1133A.hs-boot new file mode 100644 index 0000000000000000000000000000000000000000..da89ec0fe338baf291deab90fc29e270dd835871 --- /dev/null +++ b/tests/deriving/should_fail/T1133A.hs-boot @@ -0,0 +1,4 @@ + +module T1133A where + +newtype X = X Int diff --git a/tests/deriving/should_fail/T1133A.stderr b/tests/deriving/should_fail/T1133A.stderr new file mode 100644 index 0000000000000000000000000000000000000000..c1830b143e75f742aeb88c2314c2d30be6fafe86 --- /dev/null +++ b/tests/deriving/should_fail/T1133A.stderr @@ -0,0 +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 -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension + In the newtype declaration for ‛X’ diff --git a/tests/deriving/should_fail/T2394.stderr b/tests/deriving/should_fail/T2394.stderr index 9972186ed5f54ce5b1b581e77de33e2e23f2e727..f8ccbda848f015a8c6288e528a42f3e3bd17dbe2 100644 --- a/tests/deriving/should_fail/T2394.stderr +++ b/tests/deriving/should_fail/T2394.stderr @@ -1,6 +1,6 @@ - -T2394.hs:9:1: - Can't make a derived instance of `Data (a -> b)': - The last argument of the instance must be a data or newtype application - In the stand-alone deriving instance for - `(Data a, Data b) => Data (a -> b)' + +T2394.hs:9:1: + Can't make a derived instance of ‛Data (a -> b)’: + The last argument of the instance must be a data or newtype application + In the stand-alone deriving instance for + ‛(Data a, Data b) => Data (a -> b)’ diff --git a/tests/deriving/should_fail/T2604.stderr b/tests/deriving/should_fail/T2604.stderr index 6cda6c36c64800547a50e34f05c4a62f48d6d6a6..fc5320030f6579e7d12423c8b27e0547eda2504a 100644 --- a/tests/deriving/should_fail/T2604.stderr +++ b/tests/deriving/should_fail/T2604.stderr @@ -1,10 +1,10 @@ - -T2604.hs:7:35: - Can't make a derived instance of `Typeable (DList a)': - You need -XDeriveDataTypeable to derive an instance for this class - In the data declaration for `DList' - -T2604.hs:9:38: - Can't make a derived instance of `Typeable (NList a)': - You need -XDeriveDataTypeable to derive an instance for this class - In the newtype declaration for `NList' + +T2604.hs:7:35: + Can't make a derived instance of ‛Typeable * (DList a)’: + You need -XDeriveDataTypeable to derive an instance for this class + In the data declaration for ‛DList’ + +T2604.hs:9:38: + Can't make a derived instance of ‛Typeable * (NList a)’: + You need -XDeriveDataTypeable to derive an instance for this class + In the newtype declaration for ‛NList’ diff --git a/tests/deriving/should_fail/T2701.stderr b/tests/deriving/should_fail/T2701.stderr index 150add58c670ff8b1cffcfd08e2730cd0601fb99..722c0c12bf34c616ed3185dd0cdca9928211e602 100644 --- a/tests/deriving/should_fail/T2701.stderr +++ b/tests/deriving/should_fail/T2701.stderr @@ -1,5 +1,5 @@ - -T2701.hs:10:32: - Can't make a derived instance of `Data Foo': - Don't know how to derive `Data' for type `Int#' - In the data declaration for `Foo' + +T2701.hs:10:32: + Can't make a derived instance of ‛Data Foo’: + Don't know how to derive ‛Data’ for type ‛Int#’ + In the data declaration for ‛Foo’ diff --git a/tests/deriving/should_fail/T2721.stderr b/tests/deriving/should_fail/T2721.stderr index 03339d3bfa24c545ed14286d6a434e46d850840a..64e93c3d123387700f5785da8aedfabd9d939528 100644 --- a/tests/deriving/should_fail/T2721.stderr +++ b/tests/deriving/should_fail/T2721.stderr @@ -1,6 +1,6 @@ - -T2721.hs:15:28: - Can't make a derived instance of `C N' - (even with cunning newtype deriving): - the class has associated types - In the newtype declaration for `N' + +T2721.hs:15:28: + Can't make a derived instance of ‛C N’ + (even with cunning newtype deriving): + the class has associated types + In the newtype declaration for ‛N’ diff --git a/tests/deriving/should_fail/T3101.stderr b/tests/deriving/should_fail/T3101.stderr index b4917593811937a8d3f5b7ce3d3224e6bcd9c617..b07e2570afb6523e0f780c27ed63005e54a2fdb7 100644 --- a/tests/deriving/should_fail/T3101.stderr +++ b/tests/deriving/should_fail/T3101.stderr @@ -1,6 +1,6 @@ - -T3101.hs:9:12: - Can't make a derived instance of `Show Boom': - Constructor `Boom' must have a Haskell-98 type - Possible fix: use a standalone deriving declaration instead - In the data declaration for `Boom' + +T3101.hs:9:12: + Can't make a derived instance of ‛Show Boom’: + Constructor ‛Boom’ must have a Haskell-98 type + Possible fix: use a standalone deriving declaration instead + In the data declaration for ‛Boom’ diff --git a/tests/deriving/should_fail/T3833.stderr b/tests/deriving/should_fail/T3833.stderr index 2d31cc13647d991fab81bfd6bb89fd48a054ddc0..3221c355ba75483cc149cda5bd7c0a5e3292c52b 100644 --- a/tests/deriving/should_fail/T3833.stderr +++ b/tests/deriving/should_fail/T3833.stderr @@ -1,6 +1,6 @@ T3833.hs:9:1: - Can't make a derived instance of `Monoid (DecodeMap e)': - `Monoid' is not a derivable class + Can't make a derived instance of ‛Monoid (DecodeMap e)’: + ‛Monoid’ is not a derivable class Try -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension - In the stand-alone deriving instance for `Monoid (DecodeMap e)' + In the stand-alone deriving instance for ‛Monoid (DecodeMap e)’ diff --git a/tests/deriving/should_fail/T3834.stderr b/tests/deriving/should_fail/T3834.stderr index 199b4bb799737bed548fed04f7a8ef061a72f70e..ba51c74d536d2dcbfcd854c0a76d1f89e13d451b 100644 --- a/tests/deriving/should_fail/T3834.stderr +++ b/tests/deriving/should_fail/T3834.stderr @@ -1,6 +1,6 @@ T3834.hs:8:1: - Can't make a derived instance of `C T': - `C' is not a derivable class + Can't make a derived instance of ‛C T’: + ‛C’ is not a derivable class Try -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension - In the stand-alone deriving instance for `C T' + In the stand-alone deriving instance for ‛C T’ diff --git a/tests/deriving/should_fail/T4528.stderr b/tests/deriving/should_fail/T4528.stderr index 8f008e8908d19a5561f364e1ae2c7d4e8cc54020..174623915832066e6f2ba1ceed15248364d8aad8 100644 --- a/tests/deriving/should_fail/T4528.stderr +++ b/tests/deriving/should_fail/T4528.stderr @@ -1,14 +1,14 @@ T4528.hs:9:1: - Can't make a derived instance of `Enum (Foo a)': - `Foo' must be an enumeration type + Can't make a derived instance of ‛Enum (Foo a)’: + ‛Foo’ must be an enumeration type (an enumeration consists of one or more nullary, non-GADT constructors) - In the stand-alone deriving instance for `Enum (Foo a)' + In the stand-alone deriving instance for ‛Enum (Foo a)’ T4528.hs:10:1: - Can't make a derived instance of `Bounded (Foo a)': - `Foo' must be an enumeration type + Can't make a derived instance of ‛Bounded (Foo a)’: + ‛Foo’ must be an enumeration type (an enumeration consists of one or more nullary, non-GADT constructors) or - `Foo' must have precisely one constructor - In the stand-alone deriving instance for `Bounded (Foo a)' + ‛Foo’ must have precisely one constructor + In the stand-alone deriving instance for ‛Bounded (Foo a)’ diff --git a/tests/deriving/should_fail/T5287.stderr b/tests/deriving/should_fail/T5287.stderr index 9de62ef2fc412b313c7d4cb7ac334b5e9309f0a7..8bacf0634b4e98bd61738643096af492d726b5ed 100644 --- a/tests/deriving/should_fail/T5287.stderr +++ b/tests/deriving/should_fail/T5287.stderr @@ -1,10 +1,10 @@ - -T5287.hs:6:10: - Could not deduce (A a oops0) - arising from the ambiguity check for an instance declaration - from the context (A a oops) - bound by an instance declaration: A a oops => Read (D a) - at T5287.hs:6:10-31 - The type variable `oops0' is ambiguous - In the ambiguity check for: forall a oops. A a oops => Read (D a) - In the instance declaration for `Read (D a)' + +T5287.hs:6:10: + Could not deduce (A a oops0) + arising from the ambiguity check for an instance declaration + from the context (A a oops) + bound by an instance declaration: A a oops => Read (D a) + at T5287.hs:6:10-31 + The type variable ‛oops0’ is ambiguous + In the ambiguity check for: forall a oops. A a oops => Read (D a) + In the instance declaration for ‛Read (D a)’ diff --git a/tests/deriving/should_fail/T5478.stderr b/tests/deriving/should_fail/T5478.stderr index a49b188da773068905649d5cd0b7c5c926820574..e3c968f62f215491201e9f7ab08fc0d92a3a7813 100644 --- a/tests/deriving/should_fail/T5478.stderr +++ b/tests/deriving/should_fail/T5478.stderr @@ -1,5 +1,5 @@ - -T5478.hs:6:38: - Can't make a derived instance of `Show Foo': - Don't know how to derive `Show' for type `ByteArray#' - In the data declaration for `Foo' + +T5478.hs:6:38: + Can't make a derived instance of ‛Show Foo’: + Don't know how to derive ‛Show’ for type ‛ByteArray#’ + In the data declaration for ‛Foo’ diff --git a/tests/deriving/should_fail/T5686.stderr b/tests/deriving/should_fail/T5686.stderr index 27f998fe9d01869bbb9c5c5f60327d8fd512c3b7..0bffdf56976b970cd5cc211df946b82b1fb07dfd 100644 --- a/tests/deriving/should_fail/T5686.stderr +++ b/tests/deriving/should_fail/T5686.stderr @@ -1,5 +1,5 @@ - -T5686.hs:4:29: - Can't make a derived instance of `Functor U': - Constructor `U' must use the type variable only as the last argument of a data type - In the data declaration for `U' + +T5686.hs:4:29: + Can't make a derived instance of ‛Functor U’: + Constructor ‛U’ must use the type variable only as the last argument of a data type + In the data declaration for ‛U’ diff --git a/tests/deriving/should_fail/T5922.stderr b/tests/deriving/should_fail/T5922.stderr index 8b8de18d2867e1455166183a04351995413d83d1..1b58511d95ce7cc9d3835fae0f95a98c845904e4 100644 --- a/tests/deriving/should_fail/T5922.stderr +++ b/tests/deriving/should_fail/T5922.stderr @@ -1,4 +1,4 @@ - -T5922.hs:3:42: - Illegal deriving item `show' - In the data declaration for `Proposition' + +T5922.hs:3:42: + Illegal deriving item ‛show’ + In the data declaration for ‛Proposition’ diff --git a/tests/deriving/should_fail/all.T b/tests/deriving/should_fail/all.T index 5ddb2bd37332e2961f832f27b5eb7a92932f3823..e7cb909c2bd66c0fe5f175faa9df185a8496dd2e 100644 --- a/tests/deriving/should_fail/all.T +++ b/tests/deriving/should_fail/all.T @@ -8,7 +8,6 @@ test('drvfail006', reqlib('mtl'), compile_fail, ['']) test('drvfail007', normal, compile_fail, ['']) test('drvfail008', reqlib('mtl'), compile_fail, ['']) test('drvfail009', normal, compile_fail, ['']) -test('drvfail010', normal, compile_fail, ['']) test('drvfail011', normal, compile_fail, ['']) test('drvfail012', normal, compile_fail, ['']) test('drvfail013', normal, compile_fail, ['']) @@ -36,4 +35,7 @@ test('T5287', normal, compile_fail, ['']) test('T5478', normal, compile_fail, ['']) test('T5686', normal, compile_fail, ['']) test('T5922', normal, compile_fail, ['']) - +test('T1133A', + extra_clean(['T1133A.o-boot', 'T1133A.hi-boot']), + run_command, + ['$MAKE --no-print-directory -s T1133A']) diff --git a/tests/deriving/should_fail/drvfail-foldable-traversable1.stderr b/tests/deriving/should_fail/drvfail-foldable-traversable1.stderr index fa5633e7861ce6be04f22b26bba1dcc6ac9f19c4..e4c07b5220fdd8c247356b39fef8494500d8859d 100644 --- a/tests/deriving/should_fail/drvfail-foldable-traversable1.stderr +++ b/tests/deriving/should_fail/drvfail-foldable-traversable1.stderr @@ -16,11 +16,11 @@ drvfail-foldable-traversable1.hs:13:22: When deriving the instance for (Traversable Trivial2) drvfail-foldable-traversable1.hs:17:22: - Can't make a derived instance of `Foldable Infinite': - Constructor `Infinite' must not contain function types - In the data declaration for `Infinite' + Can't make a derived instance of ‛Foldable Infinite’: + Constructor ‛Infinite’ must not contain function types + In the data declaration for ‛Infinite’ drvfail-foldable-traversable1.hs:21:22: - Can't make a derived instance of `Traversable (Cont r)': - Constructor `Cont' must not contain function types - In the data declaration for `Cont' + Can't make a derived instance of ‛Traversable (Cont r)’: + Constructor ‛Cont’ must not contain function types + In the data declaration for ‛Cont’ diff --git a/tests/deriving/should_fail/drvfail-functor1.stderr b/tests/deriving/should_fail/drvfail-functor1.stderr index 54632ba05ed2f59a8adecd1444ece971b15b3573..ec0e79499a650df6c7ebca1cb8cd95e0b82cd425 100644 --- a/tests/deriving/should_fail/drvfail-functor1.stderr +++ b/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 -XDeriveFunctor to derive an instance for this class - In the data declaration for `List' + +drvfail-functor1.hs:6:14: + Can't make a derived instance of ‛Functor List’: + You need -XDeriveFunctor to derive an instance for this class + In the data declaration for ‛List’ diff --git a/tests/deriving/should_fail/drvfail-functor2.stderr b/tests/deriving/should_fail/drvfail-functor2.stderr index 54dc6f7019aaa80f7aec539a524737be8697eb5e..8691b38719bfea49dc4bcfad660fcc6d6e3e2159 100644 --- a/tests/deriving/should_fail/drvfail-functor2.stderr +++ b/tests/deriving/should_fail/drvfail-functor2.stderr @@ -3,24 +3,24 @@ drvfail-functor2.hs:1: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' + 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' + 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' + 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' + 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) diff --git a/tests/deriving/should_fail/drvfail005.stderr b/tests/deriving/should_fail/drvfail005.stderr index 327eb7c3ce742a13071c85cb1af59fbf031ebe94..c77f904dc289c2f04ae398670513db513edac386 100644 --- a/tests/deriving/should_fail/drvfail005.stderr +++ b/tests/deriving/should_fail/drvfail005.stderr @@ -1,5 +1,5 @@ - -drvfail005.hs:4:13: - Can't make a derived instance of `Show a (Test a)': - `Show a' is not a class - In the data declaration for `Test' + +drvfail005.hs:4:13: + Can't make a derived instance of ‛Show a (Test a)’: + ‛Show a’ is not a class + In the data declaration for ‛Test’ diff --git a/tests/deriving/should_fail/drvfail009.stderr b/tests/deriving/should_fail/drvfail009.stderr index 7594baef3988c0ec0b0d1adc6e09779058446c42..d9592c46691e15e6fe5fe4ff2a3ae56fa350f73c 100644 --- a/tests/deriving/should_fail/drvfail009.stderr +++ b/tests/deriving/should_fail/drvfail009.stderr @@ -1,23 +1,23 @@ - -drvfail009.hs:10:31: - Can't make a derived instance of `C T1' - (even with cunning newtype deriving): - `C' does not have arity 1 - In the newtype declaration for `T1' - -drvfail009.hs:13:31: - Cannot derive well-kinded instance of form `Monad (T2 ...)' - Class `Monad' expects an argument of kind `* -> *' - In the newtype declaration for `T2' - -drvfail009.hs:16:33: - Can't make a derived instance of `Monad T3' - (even with cunning newtype deriving): - cannot eta-reduce the representation type enough - In the newtype declaration for `T3' - -drvfail009.hs:19:42: - Can't make a derived instance of `Monad T4' - (even with cunning newtype deriving): - cannot eta-reduce the representation type enough - In the newtype declaration for `T4' + +drvfail009.hs:10:31: + Can't make a derived instance of ‛C T1’ + (even with cunning newtype deriving): + ‛C’ does not have arity 1 + In the newtype declaration for ‛T1’ + +drvfail009.hs:13:31: + Cannot derive well-kinded instance of form ‛Monad (T2 ...)’ + Class ‛Monad’ expects an argument of kind ‛* -> *’ + In the newtype declaration for ‛T2’ + +drvfail009.hs:16:33: + Can't make a derived instance of ‛Monad T3’ + (even with cunning newtype deriving): + cannot eta-reduce the representation type enough + In the newtype declaration for ‛T3’ + +drvfail009.hs:19:42: + Can't make a derived instance of ‛Monad T4’ + (even with cunning newtype deriving): + cannot eta-reduce the representation type enough + In the newtype declaration for ‛T4’ diff --git a/tests/deriving/should_fail/drvfail010.stderr b/tests/deriving/should_fail/drvfail010.stderr deleted file mode 100644 index cf2baa644e32d0cd5bb7c332ce56f54fdc206a3b..0000000000000000000000000000000000000000 --- a/tests/deriving/should_fail/drvfail010.stderr +++ /dev/null @@ -1,11 +0,0 @@ - -drvfail010.hs:6:42: - Can't make a derived instance of - `Typeable (A a b c d e f g h i j)': - `A' must have 7 or fewer arguments - In the data declaration for `A' - -drvfail010.hs:9:32: - Can't make a derived instance of `Typeable (B a b)': - `B' must only have arguments of kind `*' - In the data declaration for `B' diff --git a/tests/deriving/should_fail/drvfail010.stderr-hugs b/tests/deriving/should_fail/drvfail010.stderr-hugs deleted file mode 100644 index f6479975a5488c043a2f63b3314d29360e77578e..0000000000000000000000000000000000000000 --- a/tests/deriving/should_fail/drvfail010.stderr-hugs +++ /dev/null @@ -1 +0,0 @@ -ERROR "drvfail010.hs":6 - Cannot derive instances of class "Typeable" diff --git a/tests/deriving/should_fail/drvfail011.stderr b/tests/deriving/should_fail/drvfail011.stderr index 9bb04bfde7774480e564d795a6a4d6b775f0b58e..f4b27e9d2172f843fc517ca489cc961243791904 100644 --- a/tests/deriving/should_fail/drvfail011.stderr +++ b/tests/deriving/should_fail/drvfail011.stderr @@ -1,10 +1,10 @@ drvfail011.hs:8:1: - No instance for (Eq a) arising from a use of `==' + No instance for (Eq a) arising from a use of ‛==’ Possible fix: add (Eq a) to the context of the instance declaration In the expression: ((a1 == b1)) - In an equation for `==': == (T1 a1) (T1 b1) = ((a1 == b1)) - When typechecking the code for `==' - in a standalone derived instance for `Eq (T a)': + In an equation for ‛==’: (==) (T1 a1) (T1 b1) = ((a1 == b1)) + When typechecking the code for ‛==’ + in a standalone derived instance for ‛Eq (T a)’: To see the code I am typechecking, use -ddump-deriv - In the instance declaration for `Eq (T a)' + In the instance declaration for ‛Eq (T a)’ diff --git a/tests/deriving/should_fail/drvfail014.hs b/tests/deriving/should_fail/drvfail014.hs index 9039332f292df79b819449730b181203c4a8dff8..117b7d54af2290dc2ed87edf7b9cead82882e129 100644 --- a/tests/deriving/should_fail/drvfail014.hs +++ b/tests/deriving/should_fail/drvfail014.hs @@ -3,7 +3,7 @@ -- See Trac #1825 module ShouldFail where -import Data.Typeable +import Data.OldTypeable data T1 a = T1 a deriving( Typeable1 ) diff --git a/tests/deriving/should_fail/drvfail014.stderr b/tests/deriving/should_fail/drvfail014.stderr index 47b4aabf4b6b0068f09c1342afe88d5607ffade8..93a4c781225f46efcdf4924101dcab9f0f735ebd 100644 --- a/tests/deriving/should_fail/drvfail014.stderr +++ b/tests/deriving/should_fail/drvfail014.stderr @@ -1,9 +1,9 @@ - -drvfail014.hs:8:28: - Use deriving( Typeable ) on a data type declaration - In the data declaration for `T1' - -drvfail014.hs:12:1: - Derived typeable instance must be of form (Typeable2 T2) - In the stand-alone deriving instance for - `(Typeable a, Typeable b) => Typeable (T2 a b)' + +drvfail014.hs:8:28: + Use deriving( Typeable ) on a data type declaration + In the data declaration for ‛T1’ + +drvfail014.hs:12:1: + Derived typeable instance must be of form (Typeable2 T2) + In the stand-alone deriving instance for + ‛(Typeable a, Typeable b) => Typeable (T2 a b)’ diff --git a/tests/deriving/should_fail/drvfail015.stderr b/tests/deriving/should_fail/drvfail015.stderr index a7d8ac6cf1702443e7d69a0e7ade1860f392d48d..7a755c697f6d7bcf42b185c63527420e85a3bda5 100644 --- a/tests/deriving/should_fail/drvfail015.stderr +++ b/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 -XTypeSynonymInstances 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: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 -XTypeSynonymInstances 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’ diff --git a/tests/deriving/should_run/all.T b/tests/deriving/should_run/all.T index 480bdbada8951519e4a91c0cfbeb448a3cb4d0d1..af4bd720c9643342a1618b94f562327783ffca2e 100644 --- a/tests/deriving/should_run/all.T +++ b/tests/deriving/should_run/all.T @@ -3,24 +3,24 @@ # extra run flags # expected process return value, if not zero -test('drvrun001', skip_if_fast, compile_and_run, ['']) -test('drvrun002', skip_if_fast, compile_and_run, ['']) -test('drvrun003', skip_if_fast, compile_and_run, ['']) -test('drvrun004', skip_if_fast, compile_and_run, ['']) -test('drvrun005', skip_if_fast, compile_and_run, ['']) +test('drvrun001', when(fast(), skip), compile_and_run, ['']) +test('drvrun002', when(fast(), skip), compile_and_run, ['']) +test('drvrun003', when(fast(), skip), compile_and_run, ['']) +test('drvrun004', when(fast(), skip), compile_and_run, ['']) +test('drvrun005', when(fast(), skip), compile_and_run, ['']) test('drvrun006', normal, compile_and_run, ['']) -test('drvrun007', skip_if_fast, compile_and_run, ['']) -test('drvrun008', skip_if_fast, compile_and_run, ['-funbox-strict-fields']) -test('drvrun009', skip_if_fast, compile_and_run, ['']) -test('drvrun010', skip_if_fast, compile_and_run, ['']) -test('drvrun011', skip_if_fast, compile_and_run, ['']) -test('drvrun012', skip_if_fast, compile_and_run, ['']) -test('drvrun013', skip_if_fast, compile_and_run, ['']) -test('drvrun014', skip_if_fast, compile_and_run, ['']) -test('drvrun015', skip_if_fast, compile_and_run, ['']) -test('drvrun016', skip_if_fast, compile_and_run, ['-funbox-strict-fields']) -test('drvrun017', compose(skip_if_fast, only_compiler_types(['ghc'])), compile_and_run, ['']) -test('drvrun018', skip_if_fast, compile_and_run, ['']) +test('drvrun007', when(fast(), skip), compile_and_run, ['']) +test('drvrun008', when(fast(), skip), compile_and_run, ['-funbox-strict-fields']) +test('drvrun009', when(fast(), skip), compile_and_run, ['']) +test('drvrun010', when(fast(), skip), compile_and_run, ['']) +test('drvrun011', when(fast(), skip), compile_and_run, ['']) +test('drvrun012', when(fast(), skip), compile_and_run, ['']) +test('drvrun013', when(fast(), skip), compile_and_run, ['']) +test('drvrun014', when(fast(), skip), compile_and_run, ['']) +test('drvrun015', when(fast(), skip), compile_and_run, ['']) +test('drvrun016', when(fast(), skip), compile_and_run, ['-funbox-strict-fields']) +test('drvrun017', [when(fast(), skip), only_compiler_types(['ghc'])], compile_and_run, ['']) +test('drvrun018', when(fast(), skip), compile_and_run, ['']) test('drvrun019', normal, compile_and_run, ['']) test('drvrun020', normal, compile_and_run, ['']) test('drvrun021', normal, compile_and_run, ['']) diff --git a/tests/dph/classes/dph-classes.T b/tests/dph/classes/dph-classes.T index 29c520b9a0c37b3731fedcc042e50a31e232e2fb..b493819bd2a2ea575033e8f3378fe880e3af844a 100644 --- a/tests/dph/classes/dph-classes.T +++ b/tests/dph/classes/dph-classes.T @@ -1,5 +1,6 @@ test ('dph-classes-vseg-fast' - , [ extra_clean(['Main.o', 'Main.hi', 'DefsVect.hi', 'DefsVect.o']) + , [ normal + , extra_clean(['Main.o', 'Main.hi', 'DefsVect.hi', 'DefsVect.o']) , reqlib('dph-lifted-vseg') , reqlib('dph-prim-par') , only_ways(['normal', 'threaded1', 'threaded2']) ] diff --git a/tests/dph/diophantine/dph-diophantine.T b/tests/dph/diophantine/dph-diophantine.T index b2b772179a6377e8f6e8d4570ab04574ba900b75..1636f5aaa903abc9e2295900b9ba0f4ae169ee3a 100644 --- a/tests/dph/diophantine/dph-diophantine.T +++ b/tests/dph/diophantine/dph-diophantine.T @@ -1,6 +1,6 @@ test ('dph-diophantine-copy-opt' - , [ skip_if_fast + , [ when(fast(), skip) , outputdir('opt') , reqlib('dph-lifted-copy') , reqlib('dph-prim-par') diff --git a/tests/dph/dotp/dph-dotp.T b/tests/dph/dotp/dph-dotp.T index bfdf7a2c7b15df6e6c4c12bbc57bbc901a805153..8800d8430bebf992f8e2b50d7187d4f67912be32 100644 --- a/tests/dph/dotp/dph-dotp.T +++ b/tests/dph/dotp/dph-dotp.T @@ -1,7 +1,7 @@ test ('dph-dotp-copy-opt' , [ outputdir('copy-opt') - , skip_if_fast + , when(fast(), skip) , reqlib('dph-lifted-copy') , reqlib('dph-prim-par') , only_ways(['normal', 'threaded1', 'threaded2']) ] @@ -11,7 +11,7 @@ test ('dph-dotp-copy-opt' test ('dph-dotp-vseg-opt' , [ outputdir('vseg-opt') - , skip_if_fast + , when(fast(), skip) , reqlib('dph-lifted-vseg') , reqlib('dph-prim-par') , only_ways(['normal', 'threaded1', 'threaded2']) ] diff --git a/tests/dph/modules/ExportList.hs b/tests/dph/modules/ExportList.hs new file mode 100644 index 0000000000000000000000000000000000000000..99011e1a97dfa3886fda2c8174840682694e5a89 --- /dev/null +++ b/tests/dph/modules/ExportList.hs @@ -0,0 +1,33 @@ +-- Explicit export list +-- Produces error +-- > ghc-stage2: panic! (the 'impossible' happened) +-- > (GHC version 7.7.20130109 for x86_64-unknown-linux): +-- > nameModule solveV{v r3Ep} +-- It is something about internal vs external names. + +{-# LANGUAGE ParallelArrays, ParallelListComp #-} +{-# OPTIONS -fvectorise #-} +module ExportList (solvePA) where + +import Data.Array.Parallel hiding ((+), (-), (*), (/)) +import Data.Array.Parallel.PArray +import Data.Array.Parallel.Prelude.Bool as B +import Data.Array.Parallel.Prelude.Double as D +import qualified Data.Array.Parallel.Prelude.Int as I +import qualified Data.Vector as V +import qualified Prelude as P + +data NodeV = NodeV Double Double Double [:NodeV:] + +{-# NOINLINE solvePA #-} +solvePA + :: NodeV -- ^ nodes + -> Double -- ^ time + -> PArray Double +solvePA nodes t = toPArrayP (solveV t) + + +solveV :: Double -> [:Double:] +solveV t + = concatP (mapP solveV [: :]) + diff --git a/tests/rts/5644/Makefile b/tests/dph/modules/Makefile similarity index 100% rename from tests/rts/5644/Makefile rename to tests/dph/modules/Makefile diff --git a/tests/dph/modules/dph-ExportList-vseg-fast.stderr b/tests/dph/modules/dph-ExportList-vseg-fast.stderr new file mode 100644 index 0000000000000000000000000000000000000000..749c3cdfeba33da22351b476075853cadc4f87af --- /dev/null +++ b/tests/dph/modules/dph-ExportList-vseg-fast.stderr @@ -0,0 +1,6 @@ +[1 of 1] Compiling ExportList ( ExportList.hs, ExportList.o ) +Warning: vectorisation failure: identityConvTyCon: type constructor contains parallel arrays [::] + Could NOT call vectorised from original version ExportList.solveV +Warning: vectorisation failure: identityConvTyCon: type constructor contains parallel arrays NodeV + Could NOT call vectorised from original version + ExportList.solvePA diff --git a/tests/dph/modules/dph-modules.T b/tests/dph/modules/dph-modules.T new file mode 100644 index 0000000000000000000000000000000000000000..77db0cdf12119c41e8cc94523769bdb8c9582168 --- /dev/null +++ b/tests/dph/modules/dph-modules.T @@ -0,0 +1,8 @@ +test ('dph-ExportList-vseg-fast' + , [ extra_clean(['ExportList.o', 'ExportList.hi']) + , reqlib('dph-lifted-vseg') + , reqlib('dph-prim-par') + , only_ways(['normal', 'threaded1', 'threaded2']) ] + , multimod_compile + , [ 'ExportList' + , '-O -fno-enable-rewrite-rules -package dph-lifted-vseg']) diff --git a/tests/dph/nbody/dph-nbody.T b/tests/dph/nbody/dph-nbody.T index 6d201606b9fd9bd71bb63adb5974076bb773e72e..9c0031d16aabda4cd80dbdaa2b8714b179a6f03f 100644 --- a/tests/dph/nbody/dph-nbody.T +++ b/tests/dph/nbody/dph-nbody.T @@ -2,7 +2,7 @@ test ('dph-nbody-vseg-opt' , [ high_memory_usage , outputdir('vseg-opt') - , skip_if_fast + , when(fast(), skip) , reqlib('dph-lifted-vseg') , reqlib('dph-prim-par') , only_ways(['normal', 'threaded1', 'threaded2']) ] @@ -14,13 +14,13 @@ test ('dph-nbody-vseg-opt' test ('dph-nbody-copy-opt' , [ high_memory_usage , outputdir('copy-opt') - , skip_if_fast + , when(fast(), skip) , reqlib('dph-lifted-copy') , reqlib('dph-prim-par') , only_ways(['normal', 'threaded1', 'threaded2']) ] , multimod_compile_and_run , [ 'Main' - , '-Odph -fno-liberate-case -package dph-lifted-copy -package dph-prim-par']) + , '-Odph -fno-vectorisation-avoidance -fno-liberate-case -package dph-lifted-copy -package dph-prim-par']) test ('dph-nbody-vseg-fast' @@ -40,4 +40,4 @@ test ('dph-nbody-copy-fast' , only_ways(['normal', 'threaded1', 'threaded2']) ] , multimod_compile_and_run , [ 'Main' - , '-O0 -package dph-lifted-copy -package dph-prim-par']) + , '-O0 -fno-vectorisation-avoidance -package dph-lifted-copy -package dph-prim-par']) diff --git a/tests/dph/primespj/dph-primespj.T b/tests/dph/primespj/dph-primespj.T index 6976974ed065603e306290b74612e44cd682e9f2..84f41f9e2e3973413ff1643a284d5e05a4b1f5bb 100644 --- a/tests/dph/primespj/dph-primespj.T +++ b/tests/dph/primespj/dph-primespj.T @@ -1,7 +1,7 @@ test ('dph-primespj-copy-opt' , [ outputdir('opt') - , skip_if_fast + , when(fast(), skip) , reqlib('dph-lifted-copy') , reqlib('dph-prim-par') , only_ways(['normal', 'threaded1', 'threaded2']) ] diff --git a/tests/dph/quickhull/dph-quickhull.T b/tests/dph/quickhull/dph-quickhull.T index bd10565350c852dee5278413454376ed64e2f256..bae69814a0aac4122a97b526ebe7e2db34c26a9b 100644 --- a/tests/dph/quickhull/dph-quickhull.T +++ b/tests/dph/quickhull/dph-quickhull.T @@ -2,19 +2,19 @@ test ('dph-quickhull-copy-opt' , [ high_memory_usage , outputdir('copy-opt') - , skip_if_fast + , when(fast(), skip) , reqlib('dph-lifted-copy') , reqlib('dph-prim-par') , only_ways(['normal', 'threaded1', 'threaded2']) ] , multimod_compile_and_run , [ 'Main' - , '-Odph -funfolding-use-threshold30 -package dph-lifted-copy -package dph-prim-par']) + , '-Odph -fno-vectorisation-avoidance -funfolding-use-threshold30 -package dph-lifted-copy -package dph-prim-par']) test ('dph-quickhull-vseg-opt' , [ high_memory_usage , outputdir('vseg-opt') - , skip_if_fast + , when(fast(), skip) , reqlib('dph-lifted-vseg') , reqlib('dph-prim-par') , only_ways(['normal', 'threaded1', 'threaded2']) ] @@ -30,7 +30,7 @@ test ('dph-quickhull-copy-fast' , only_ways(['normal', 'threaded1', 'threaded2']) ] , multimod_compile_and_run , [ 'Main' - , '-O0 -package dph-lifted-copy -package dph-prim-par']) + , '-O0 -fno-vectorisation-avoidance -package dph-lifted-copy -package dph-prim-par']) test ('dph-quickhull-vseg-fast' diff --git a/tests/dph/smvm/dph-smvm.T b/tests/dph/smvm/dph-smvm.T index 14705a63884b7093c49c512976f22f946a5c386b..ae01eff83d1a75ba0f372b1bc45b312cc921cb23 100644 --- a/tests/dph/smvm/dph-smvm.T +++ b/tests/dph/smvm/dph-smvm.T @@ -17,7 +17,7 @@ elif config.platform.startswith('sparc-'): if testFile != 'nothing': test ('dph-smvm-copy' , [ outputdir('copy') - , skip_if_fast + , when(fast(), skip) , reqlib('dph-lifted-copy') , reqlib('dph-prim-par') , only_ways(['normal', 'threaded1', 'threaded2']) @@ -29,7 +29,7 @@ if testFile != 'nothing': test ('dph-smvm-vseg' , [ outputdir('vseg') - , skip_if_fast + , when(fast(), skip) , reqlib('dph-lifted-vseg') , reqlib('dph-prim-par') , only_ways(['normal', 'threaded1', 'threaded2']) diff --git a/tests/dph/words/WordsVect.hs b/tests/dph/words/WordsVect.hs index ba4abc5d3935cca75c6fea9d8fd7dafb8e744ace..344442f3fb7bd50a53f5420b7ce529ca2ea6a530 100644 --- a/tests/dph/words/WordsVect.hs +++ b/tests/dph/words/WordsVect.hs @@ -107,6 +107,7 @@ flattenState ss -- | Break up an array of chars into words then flatten it back. wordsOfPArray :: PArray Word8 -> PArray Word8 +{-# NOINLINE wordsOfPArray #-} wordsOfPArray arr = let str = fromPArrayP arr state = stateOfString str @@ -116,6 +117,7 @@ wordsOfPArray arr -- | Count the number of words in an array wordCountOfPArray :: PArray Word8 -> Int +{-# NOINLINE wordCountOfPArray #-} wordCountOfPArray arr = let str = fromPArrayP arr state = stateOfString str diff --git a/tests/dph/words/dph-words.T b/tests/dph/words/dph-words.T index 04cddaee487cecf90f9b97cbe606cbfca0120754..5301f08a9b4342adb3f3158630947c3547c8fb58 100644 --- a/tests/dph/words/dph-words.T +++ b/tests/dph/words/dph-words.T @@ -2,7 +2,7 @@ test ('dph-words-copy-opt' , [ high_memory_usage , outputdir('copy-opt') - , skip_if_fast + , when(fast(), skip) , reqlib('dph-lifted-copy') , reqlib('dph-prim-par') , only_ways(['normal']) ] @@ -14,7 +14,7 @@ test ('dph-words-copy-opt' test ('dph-words-vseg-opt' , [ high_memory_usage , outputdir('vseg-opt') - , skip_if_fast + , when(fast(), skip) , reqlib('dph-lifted-vseg') , reqlib('dph-prim-par') , only_ways(['normal']) ] diff --git a/tests/driver/1372/1372.stderr b/tests/driver/1372/1372.stderr deleted file mode 100644 index f06f294daeb6f1843b0c96c731a46dbb314c670f..0000000000000000000000000000000000000000 --- a/tests/driver/1372/1372.stderr +++ /dev/null @@ -1,2 +0,0 @@ - -Main.hs:5:5: Not in scope: data constructor `T' diff --git a/tests/driver/1372/all.T b/tests/driver/1372/all.T deleted file mode 100644 index cabf3c01f84c9f3bd02c5185ec8336592fa08dff..0000000000000000000000000000000000000000 --- a/tests/driver/1372/all.T +++ /dev/null @@ -1,5 +0,0 @@ -test('1372', - clean_cmd('$MAKE -s clean'), - run_command, - ['$MAKE -s --no-print-directory 1372']) - diff --git a/tests/driver/2499.stderr b/tests/driver/2499.stderr deleted file mode 100644 index 73404befe3cd2256e572e221c829d202881c8a59..0000000000000000000000000000000000000000 --- a/tests/driver/2499.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -2499.hs:1:12: unknown flag in {-# OPTIONS_GHC #-} pragma: -package - -2499.hs:1:12: unknown flag in {-# OPTIONS_GHC #-} pragma: blargh diff --git a/tests/driver/Makefile b/tests/driver/Makefile index e293772f49dd1f8c5483a0e48620e75be50e99d6..2a06257cf4287a0c36ca8deb6e0418fe6b671bd4 100644 --- a/tests/driver/Makefile +++ b/tests/driver/Makefile @@ -17,6 +17,7 @@ OBJSUFFIX = .o # -fforce-recomp makes lots of driver tests trivially pass, so we # filter it out from $(TEST_HC_OPTS). TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS)) +TEST_HC_OPTS_NO_RECOMP_NO_RTSOPTS = $(filter-out -rtsopts,$(TEST_HC_OPTS_NO_RECOMP)) # ----------------------------------------------------------------------------- # One-shot compilations, non-hierarchical modules @@ -411,7 +412,7 @@ test200: # ----------------------------------------------------------------------------- -2566:: +T2566:: if "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c foo2566.bar; then false else true; fi .PHONY: mode001 @@ -435,14 +436,14 @@ mode001: # Test for building DLLs with ghc -shared, see #2745 shared001: $(RM) Shared001.hi Shared001.o HSdll.dll.a HSdll.dll Shared001_stub.* - "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 -shared Shared001.hs + "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP_NO_RTSOPTS) -v0 -shared Shared001.hs # ----------------------------------------------------------------------------- -3674: - $(RM) 3674*.o 3674*.hi 3674_pre - "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --make 3674_pre.hs - "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --make 3674.hs +T3674: + $(RM) T3674*.o T3674*.hi T3674_pre + "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --make T3674_pre.hs + "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --make T3674.hs .PHONY: rtsopts001 rtsopts001: @@ -535,3 +536,11 @@ T7130: T7563: -"$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -C T7563.hs +.PHONY: T6037 +T6037: + -LC_ALL=C "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c T6037.hs + +.PHONY: T2507 +T2507: + -LC_ALL=C "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c T2507.hs + diff --git a/tests/driver/1372/Makefile b/tests/driver/T1372/Makefile similarity index 99% rename from tests/driver/1372/Makefile rename to tests/driver/T1372/Makefile index e0b3873ec62111d3f374e9c1b6ba98d3deb853a3..91ef6d50c7109a568f94677dce706a3d0546ce52 100644 --- a/tests/driver/1372/Makefile +++ b/tests/driver/T1372/Makefile @@ -17,7 +17,7 @@ clean: rm -f p1/A.hs rm -f $(LOCAL_PKGCONF) -1372: +T1372: $(MAKE) clean $(MAKE) prep # This should recompile Main.hs, because A in package p1 has changed diff --git a/tests/driver/T1372/T1372.stderr b/tests/driver/T1372/T1372.stderr new file mode 100644 index 0000000000000000000000000000000000000000..e332c563a3abf896c81ef2b6d092e27de4e1c81a --- /dev/null +++ b/tests/driver/T1372/T1372.stderr @@ -0,0 +1,2 @@ + +Main.hs:5:5: Not in scope: data constructor ‛T’ diff --git a/tests/driver/T1372/all.T b/tests/driver/T1372/all.T new file mode 100644 index 0000000000000000000000000000000000000000..352d66b5d8e75c98b07e6d255e6752b9cfeb51b4 --- /dev/null +++ b/tests/driver/T1372/all.T @@ -0,0 +1,5 @@ +test('T1372', + clean_cmd('$MAKE -s clean'), + run_command, + ['$MAKE -s --no-print-directory T1372']) + diff --git a/tests/driver/1372/p1/A1.hs b/tests/driver/T1372/p1/A1.hs similarity index 100% rename from tests/driver/1372/p1/A1.hs rename to tests/driver/T1372/p1/A1.hs diff --git a/tests/driver/1372/p1/A2.hs b/tests/driver/T1372/p1/A2.hs similarity index 100% rename from tests/driver/1372/p1/A2.hs rename to tests/driver/T1372/p1/A2.hs diff --git a/tests/driver/1372/p1/Setup.hs b/tests/driver/T1372/p1/Setup.hs similarity index 100% rename from tests/driver/1372/p1/Setup.hs rename to tests/driver/T1372/p1/Setup.hs diff --git a/tests/driver/1372/p1/p1.cabal b/tests/driver/T1372/p1/p1.cabal similarity index 100% rename from tests/driver/1372/p1/p1.cabal rename to tests/driver/T1372/p1/p1.cabal diff --git a/tests/driver/1372/p2/Main.hs b/tests/driver/T1372/p2/Main.hs similarity index 100% rename from tests/driver/1372/p2/Main.hs rename to tests/driver/T1372/p2/Main.hs diff --git a/tests/driver/1372/p2/Setup.hs b/tests/driver/T1372/p2/Setup.hs similarity index 100% rename from tests/driver/1372/p2/Setup.hs rename to tests/driver/T1372/p2/Setup.hs diff --git a/tests/driver/1372/p2/p2.cabal b/tests/driver/T1372/p2/p2.cabal similarity index 100% rename from tests/driver/1372/p2/p2.cabal rename to tests/driver/T1372/p2/p2.cabal diff --git a/tests/driver/1959/B.hs b/tests/driver/T1959/B.hs similarity index 100% rename from tests/driver/1959/B.hs rename to tests/driver/T1959/B.hs diff --git a/tests/driver/1959/C.hs b/tests/driver/T1959/C.hs similarity index 100% rename from tests/driver/1959/C.hs rename to tests/driver/T1959/C.hs diff --git a/tests/driver/1959/D.hs b/tests/driver/T1959/D.hs similarity index 100% rename from tests/driver/1959/D.hs rename to tests/driver/T1959/D.hs diff --git a/tests/driver/1959/E1.hs b/tests/driver/T1959/E1.hs similarity index 100% rename from tests/driver/1959/E1.hs rename to tests/driver/T1959/E1.hs diff --git a/tests/driver/1959/E2.hs b/tests/driver/T1959/E2.hs similarity index 100% rename from tests/driver/1959/E2.hs rename to tests/driver/T1959/E2.hs diff --git a/tests/driver/1959/Makefile b/tests/driver/T1959/Makefile similarity index 100% rename from tests/driver/1959/Makefile rename to tests/driver/T1959/Makefile diff --git a/tests/driver/1959/1959.stdout b/tests/driver/T1959/T1959.stdout similarity index 100% rename from tests/driver/1959/1959.stdout rename to tests/driver/T1959/T1959.stdout diff --git a/tests/driver/1959/test.T b/tests/driver/T1959/test.T similarity index 93% rename from tests/driver/1959/test.T rename to tests/driver/T1959/test.T index ff9e8f63a495909203135f20426a1b618a555c02..563206f09b3b8c4b6099a7547e4e678b6ae1ddbc 100644 --- a/tests/driver/1959/test.T +++ b/tests/driver/T1959/test.T @@ -1,4 +1,4 @@ -test('1959', +test('T1959', extra_clean(['E.hi', 'E.o', 'E.hs', 'prog', 'compile.out', 'B.hi', 'B.o', 'C.hi', 'C.o', 'D.hi', 'D.o']), run_command, diff --git a/tests/driver/2464.hs b/tests/driver/T2464.hs similarity index 100% rename from tests/driver/2464.hs rename to tests/driver/T2464.hs diff --git a/tests/driver/2464.stderr b/tests/driver/T2464.stderr similarity index 89% rename from tests/driver/2464.stderr rename to tests/driver/T2464.stderr index 31e794e33c1391b892b5c1b71b58519187ea3433..92e5e640c63c8f6d881ca78609ed7c2d29bbdbae 100644 --- a/tests/driver/2464.stderr +++ b/tests/driver/T2464.stderr @@ -1,3 +1,3 @@ -2464.hs:3:16: +T2464.hs:3:16: Warning: -fffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface #-} instead diff --git a/tests/driver/2499.hs b/tests/driver/T2499.hs similarity index 100% rename from tests/driver/2499.hs rename to tests/driver/T2499.hs diff --git a/tests/driver/T2499.stderr b/tests/driver/T2499.stderr new file mode 100644 index 0000000000000000000000000000000000000000..9a082d34b1d8ebcca05dd75b1b3e74a3b18fd699 --- /dev/null +++ b/tests/driver/T2499.stderr @@ -0,0 +1,4 @@ + +T2499.hs:1:12: unknown flag in {-# OPTIONS_GHC #-} pragma: -package + +T2499.hs:1:12: unknown flag in {-# OPTIONS_GHC #-} pragma: blargh diff --git a/tests/driver/T2507.hs b/tests/driver/T2507.hs new file mode 100644 index 0000000000000000000000000000000000000000..8f6c0c0076ccd62752f9c1a34fb557db2e27a0eb --- /dev/null +++ b/tests/driver/T2507.hs @@ -0,0 +1,5 @@ + +module T2507 where + +foo :: Int +foo = () diff --git a/tests/driver/T2507.stderr b/tests/driver/T2507.stderr new file mode 100644 index 0000000000000000000000000000000000000000..925a8709ddaffaf79ed164306e283eaf4d95198a --- /dev/null +++ b/tests/driver/T2507.stderr @@ -0,0 +1,5 @@ + +T2507.hs:5:7: + Couldn't match expected type `Int' with actual type `()' + In the expression: () + In an equation for `foo': foo = () diff --git a/tests/driver/2566.stderr b/tests/driver/T2566.stderr similarity index 100% rename from tests/driver/2566.stderr rename to tests/driver/T2566.stderr diff --git a/tests/driver/3674.hs b/tests/driver/T3674.hs similarity index 60% rename from tests/driver/3674.hs rename to tests/driver/T3674.hs index 2253ca12cec9c0a714ebdb684f6f80c01a58e2f8..055b2812245698c9f9c7d6e82a7ab6581a5b3b9f 100644 --- a/tests/driver/3674.hs +++ b/tests/driver/T3674.hs @@ -1,4 +1,4 @@ -{-# OPTIONS -F -pgmF ./3674_pre #-} +{-# OPTIONS -F -pgmF ./T3674_pre #-} module Test3674 where diff --git a/tests/driver/3674_pre.hs b/tests/driver/T3674_pre.hs similarity index 100% rename from tests/driver/3674_pre.hs rename to tests/driver/T3674_pre.hs diff --git a/tests/driver/437/Makefile b/tests/driver/T437/Makefile similarity index 98% rename from tests/driver/437/Makefile rename to tests/driver/T437/Makefile index 649d462b1eb483044d29a654bf688bf56eae1eb3..8c18b1c3c37638ad6447f52d7aa7b57c6d9f849b 100644 --- a/tests/driver/437/Makefile +++ b/tests/driver/T437/Makefile @@ -15,7 +15,7 @@ clean: # bug #437 -437: clean +T437: clean '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make -main-is Test.main Test.hs '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make -main-is Test2.main Test2.hs ./Test diff --git a/tests/driver/437/437.stderr b/tests/driver/T437/T437.stderr similarity index 100% rename from tests/driver/437/437.stderr rename to tests/driver/T437/T437.stderr diff --git a/tests/driver/437/437.stdout b/tests/driver/T437/T437.stdout similarity index 100% rename from tests/driver/437/437.stdout rename to tests/driver/T437/T437.stdout diff --git a/tests/driver/437/Test.hs b/tests/driver/T437/Test.hs similarity index 100% rename from tests/driver/437/Test.hs rename to tests/driver/T437/Test.hs diff --git a/tests/driver/437/Test2.hs b/tests/driver/T437/Test2.hs similarity index 100% rename from tests/driver/437/Test2.hs rename to tests/driver/T437/Test2.hs diff --git a/tests/driver/437/all.T b/tests/driver/T437/all.T similarity index 65% rename from tests/driver/437/all.T rename to tests/driver/T437/all.T index 34bb7f88b2320db0f2ab6a506e933bb46feacdee..258873894131650552110afa4e491de0b8a424cf 100644 --- a/tests/driver/437/all.T +++ b/tests/driver/T437/all.T @@ -1,7 +1,7 @@ # Test for #437, a recompilation bug with '-main-is' -test('437', +test('T437', [ clean_cmd('$MAKE -s clean') ], run_command, - ['$MAKE -s --no-print-directory 437']) + ['$MAKE -s --no-print-directory T437']) diff --git a/tests/driver/T4437.hs b/tests/driver/T4437.hs index ca1f149fd073b799c73688d0ce68fa9597e3d8aa..617484c6cdc4edfa95883b4ce4519fcf75441a95 100644 --- a/tests/driver/T4437.hs +++ b/tests/driver/T4437.hs @@ -37,7 +37,9 @@ expectedGhcOnlyExtensions = [ "AlternativeLayoutRuleTransitional", "ExplicitNamespaces", "TypeHoles", - "EmptyCase" ] + "OverloadedLists", + "EmptyCase", + "AutoDeriveTypeable"] expectedCabalOnlyExtensions :: [String] expectedCabalOnlyExtensions = ["Generics", diff --git a/tests/driver/T5147/T5147.stderr b/tests/driver/T5147/T5147.stderr index 6e8427b940ec9094536c948ba814da07d9cbb63d..43f0f935d312dd5b92d935956be1f85575f98c71 100644 --- a/tests/driver/T5147/T5147.stderr +++ b/tests/driver/T5147/T5147.stderr @@ -1,5 +1,5 @@ A.hs:6:15: - No instance for (Show (Fields v)) arising from a use of `show' + No instance for (Show (Fields v)) arising from a use of ‛show’ In the expression: show a - In an equation for `showField': showField a = show a + In an equation for ‛showField’: showField a = show a diff --git a/tests/driver/5313.hs b/tests/driver/T5313.hs similarity index 100% rename from tests/driver/5313.hs rename to tests/driver/T5313.hs diff --git a/tests/driver/T6037.hs b/tests/driver/T6037.hs new file mode 100644 index 0000000000000000000000000000000000000000..56aa03462cc1a517ac64d89bb45e9eb06c28629e --- /dev/null +++ b/tests/driver/T6037.hs @@ -0,0 +1,5 @@ + +module T6037 where + +fóo :: Int +fóo = () diff --git a/tests/driver/T6037.stderr b/tests/driver/T6037.stderr new file mode 100644 index 0000000000000000000000000000000000000000..3059288d10f6fd91c9dd101966cd7f7d72fb55a7 --- /dev/null +++ b/tests/driver/T6037.stderr @@ -0,0 +1,5 @@ + +T6037.hs:5:7: + Couldn't match expected type `Int' with actual type `()' + In the expression: () + In an equation for `f?o': f?o = () diff --git a/tests/driver/all.T b/tests/driver/all.T index f60dc4172b13b0c06de88d038096ce0b4bb0dd03..609e8ea3928aac0f59217106785774cd92a2b583 100644 --- a/tests/driver/all.T +++ b/tests/driver/all.T @@ -282,15 +282,15 @@ test('driver200', run_command, ['$MAKE -s --no-print-directory test200']) -test('2566', +test('T2566', normalise_fun(normalise_errmsg), run_command, - ['$MAKE -s --no-print-directory 2566']) + ['$MAKE -s --no-print-directory T2566']) test('pragma001', normal, compile, ['']) test('pragma002', normal, compile, ['']) -test('2499', normal, compile_fail, ['']) +test('T2499', normal, compile_fail, ['']) test('mode001', normal, run_command, ['$MAKE -s --no-print-directory mode001']) @@ -311,14 +311,14 @@ test('dynHelloWorld', compile_and_run, ['']) -test('5313', extra_run_opts('"' + config.libdir + '"'), compile_and_run, ['-package ghc']) +test('T5313', extra_run_opts('"' + config.libdir + '"'), compile_and_run, ['-package ghc']) -test('2464', normal, compile, ['']) -test('3674', +test('T2464', normal, compile, ['']) +test('T3674', [ignore_output, - extra_clean(['3674_pre.hi', '3674_pre.o', '3674_pre', '3674_pre.exe'])], + extra_clean(['T3674_pre.hi', 'T3674_pre.o', 'T3674_pre', 'T3674_pre.exe'])], run_command, - ['$MAKE -s --no-print-directory 3674']) + ['$MAKE -s --no-print-directory T3674']) test('rtsopts001', extra_clean(['rtsOpts.hi', 'rtsOpts.o', 'rtsOpts', 'rtsOpts.exe']), @@ -362,6 +362,9 @@ test('T7060', run_command, ['$MAKE -s --no-print-directory T7060']) test('T7130', normal, compile_fail, ['-fflul-laziness']) -test('T7563', if_unregisterised(skip), run_command, +test('T7563', when(unregisterised(), skip), run_command, ['$MAKE -s --no-print-directory T7563']) +test('T6037', expect_broken(6037), run_command, + ['$MAKE -s --no-print-directory T6037']) +test('T2507', normal, run_command, ['$MAKE -s --no-print-directory T2507']) diff --git a/tests/driver/bug1677/bug1677.stderr b/tests/driver/bug1677/bug1677.stderr index bc55b86c2fb0a6770f4ca58fa68e62848491b609..9ee41b5cacfdea42b423e4fcff7a4289a27a21c9 100644 --- a/tests/driver/bug1677/bug1677.stderr +++ b/tests/driver/bug1677/bug1677.stderr @@ -1,5 +1,5 @@ Foo.hs:1:1: File name does not match module name: - Saw: `Main' - Expected: `Foo' + Saw: ‛Main’ + Expected: ‛Foo’ diff --git a/tests/driver/driver063.stderr b/tests/driver/driver063.stderr index 0a6801537ed89d6287656da9a1634d091a028723..a50340dc42e070c6e0231a0642df8e84f8de612a 100644 --- a/tests/driver/driver063.stderr +++ b/tests/driver/driver063.stderr @@ -1,4 +1,4 @@ D063.hs:2:8: - Could not find module `A063' + Could not find module ‛A063’ It is not a module in the current program, or in any known package. diff --git a/tests/driver/dynamicToo/all.T b/tests/driver/dynamicToo/all.T index a03c314d94a458883e3c68301bf52e54d5d50664..6465d1e1fbd85c32c53f52e04658b09d83eebbae 100644 --- a/tests/driver/dynamicToo/all.T +++ b/tests/driver/dynamicToo/all.T @@ -6,8 +6,9 @@ test('dynamicToo001', 'A001.dyn_o', 'B001.dyn_o', 'C001.dyn_o', 'A001.dyn_hi', 'B001.dyn_hi', 'C001.dyn_hi', 's001', 'd001']), - unless_have_vanilla(skip), - unless_have_dynamic(skip)], + when(opsys('mingw32'), expect_broken(7665)), + unless(have_vanilla(), skip), + unless(have_dynamic(), skip)], run_command, ['$MAKE -s --no-print-directory dynamicToo001']) diff --git a/tests/driver/dynamic_flags_001/all.T b/tests/driver/dynamic_flags_001/all.T index c487a0cb75f49b07cf3e2ee93cc0fe2a1ab48b02..19ed656e7ff8079d40d26a3ca561a49f1d7dd278 100644 --- a/tests/driver/dynamic_flags_001/all.T +++ b/tests/driver/dynamic_flags_001/all.T @@ -1,5 +1,5 @@ test('dynamic_flags_001', - [skip_if_fast, + [when(fast(), skip), clean_cmd('$MAKE -s clean')], run_command, ['$MAKE -s --no-print-directory dynamic_flags_001']) diff --git a/tests/driver/dynamic_flags_002/all.T b/tests/driver/dynamic_flags_002/all.T index 3b0072ba6bf7cf7d42784c957e9d6c454ef9ae48..e5a4a564fac026286d17c7b2c773b34d695311b6 100644 --- a/tests/driver/dynamic_flags_002/all.T +++ b/tests/driver/dynamic_flags_002/all.T @@ -1,6 +1,12 @@ -test('dynamic_flags_002A', skip_if_fast, multimod_compile, ['A_Main', '-v0']) -test('dynamic_flags_002B', skip_if_fast, multimod_compile, ['B_Main', '-v0']) -test('dynamic_flags_002C', skip_if_fast, multimod_compile, ['C_Main', '-v0']) -test('dynamic_flags_002D', skip_if_fast, multimod_compile, ['D_Main', '-v0']) -test('dynamic_flags_002Many', skip_if_fast, multimod_compile, ['ManyFirst ManySecond ManyThird', '-v0']) +test('dynamic_flags_002A', + when(fast(), skip), multimod_compile, ['A_Main', '-v0']) +test('dynamic_flags_002B', + when(fast(), skip), multimod_compile, ['B_Main', '-v0']) +test('dynamic_flags_002C', + when(fast(), skip), multimod_compile, ['C_Main', '-v0']) +test('dynamic_flags_002D', + when(fast(), skip), multimod_compile, ['D_Main', '-v0']) +test('dynamic_flags_002Many', + when(fast(), skip), multimod_compile, + ['ManyFirst ManySecond ManyThird', '-v0']) diff --git a/tests/driver/recomp001/all.T b/tests/driver/recomp001/all.T index f3672fa2f8e1d1e62c0a97e5579d439cc12108d6..33202d6241a32045470ee659d701037fabd4a6e2 100644 --- a/tests/driver/recomp001/all.T +++ b/tests/driver/recomp001/all.T @@ -1,5 +1,5 @@ test('recomp001', - [skip_if_fast, + [when(fast(), skip), clean_cmd('$MAKE -s clean')], run_command, ['$MAKE -s --no-print-directory recomp001']) diff --git a/tests/driver/recomp001/recomp001.stderr b/tests/driver/recomp001/recomp001.stderr index 4b95415c8995ffb2ef4369092c1b51b37c2ff430..bd75be7bde072b89cb233d9f0fcf53f33f9ef79a 100644 --- a/tests/driver/recomp001/recomp001.stderr +++ b/tests/driver/recomp001/recomp001.stderr @@ -1,2 +1,2 @@ -C.hs:3:11: Module `B' does not export `foo' +C.hs:3:11: Module ‛B’ does not export ‛foo’ diff --git a/tests/driver/recomp002/all.T b/tests/driver/recomp002/all.T index 5f8ddf5f1be1e2d8716529b11a5d9bf1bb27bf86..68f1a7967ea54fb4c55c181b7b3d2c143c123976 100644 --- a/tests/driver/recomp002/all.T +++ b/tests/driver/recomp002/all.T @@ -1,5 +1,5 @@ test('recomp002', - [skip_if_fast, + [when(fast(), skip), clean_cmd('$MAKE -s clean')], run_command, ['$MAKE -s --no-print-directory recomp002']) diff --git a/tests/driver/recomp005/all.T b/tests/driver/recomp005/all.T index d5d89b1712b8686323d390a75485fe13d8461c64..5282c5b68558ffad13a662cdc8037fabd3afd5f5 100644 --- a/tests/driver/recomp005/all.T +++ b/tests/driver/recomp005/all.T @@ -1,5 +1,5 @@ test('recomp005', - [skip_if_fast, + [when(fast(), skip), clean_cmd('$MAKE -s clean')], run_command, ['$MAKE -s --no-print-directory recomp005']) diff --git a/tests/driver/recomp005/recomp005.stderr b/tests/driver/recomp005/recomp005.stderr index 8e4ad938325f2686cdc23568d223581bda510481..130e56249cb7d3ed72d7cc7d6f42f5c42fc78c9e 100644 --- a/tests/driver/recomp005/recomp005.stderr +++ b/tests/driver/recomp005/recomp005.stderr @@ -1,4 +1,4 @@ C.hs:7:11: Warning: - Rule "f/g" may never fire because `f' might inline first - Probable fix: add an INLINE[n] or NOINLINE[n] pragma on `f' + Rule "f/g" may never fire because ‛f’ might inline first + Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‛f’ diff --git a/tests/driver/recomp006/all.T b/tests/driver/recomp006/all.T index bc4f915badf384636ce555fa653d9d0079766f86..f234e58e878d85bae4d4eecfd8bfafdddc7a22a6 100644 --- a/tests/driver/recomp006/all.T +++ b/tests/driver/recomp006/all.T @@ -1,3 +1,4 @@ test('recomp006', - [ skip_if_fast, extra_clean(['A.o','A.hi','B.o','B.hi','err','out']) ], + [ when(fast(), skip), + extra_clean(['A.o','A.hi','B.o','B.hi','err','out']) ], run_command, ['$MAKE -s --no-print-directory recomp006']) diff --git a/tests/driver/recomp007/all.T b/tests/driver/recomp007/all.T index 5a93a12d68a9c759ce65e3e0fed67eff69a4599e..de562b627754fd7cb354befba549f0b3f5adc734 100644 --- a/tests/driver/recomp007/all.T +++ b/tests/driver/recomp007/all.T @@ -3,7 +3,7 @@ # "Fix a recompilation checking bug when a package dependency changes" test('recomp007', - [ skip_if_fast, clean_cmd('$MAKE -s clean'), normalise_slashes ], + [ when(fast(), skip), clean_cmd('$MAKE -s clean'), normalise_slashes ], run_command, ['$MAKE -s --no-print-directory recomp007']) diff --git a/tests/driver/recomp008/all.T b/tests/driver/recomp008/all.T index a59b1512e07ac6c5c9e1a274408c9002f266c715..caf81d5ba9a8cb397e522da6f58ec43bcfc9474c 100644 --- a/tests/driver/recomp008/all.T +++ b/tests/driver/recomp008/all.T @@ -1,7 +1,7 @@ # Test for #4469, a recompilation bug related to instances test('recomp008', - [ skip_if_fast, clean_cmd('$MAKE -s clean'), normalise_slashes ], + [ when(fast(), skip), clean_cmd('$MAKE -s clean'), normalise_slashes ], run_command, ['$MAKE -s --no-print-directory recomp008']) diff --git a/tests/driver/werror.stderr b/tests/driver/werror.stderr index c8e7894085a51c745ed8e7c0d55f802cedf78686..45c00e93ef58363e9c9fc0ddd8316b03bd89cb68 100644 --- a/tests/driver/werror.stderr +++ b/tests/driver/werror.stderr @@ -1,28 +1,28 @@ -werror.hs:6:1: - Warning: Top-level binding with no type signature: main :: IO () +werror.hs:6:1: Warning: + Top-level binding with no type signature: main :: IO () -werror.hs:7:13: - Warning: This binding for `main' shadows the existing binding - defined at werror.hs:6:1 +werror.hs:7:13: Warning: + This binding for ‛main’ shadows the existing binding + defined at werror.hs:6:1 -werror.hs:7:13: Warning: Defined but not used: `main' +werror.hs:7:13: Warning: Defined but not used: ‛main’ werror.hs:8:1: Warning: Tab character -werror.hs:10:1: Warning: Defined but not used: `f' +werror.hs:10:1: Warning: Defined but not used: ‛f’ -werror.hs:10:1: - Warning: Top-level binding with no type signature: - f :: forall t a. [t] -> [a] +werror.hs:10:1: Warning: + Top-level binding with no type signature: + f :: forall t t1. [t] -> [t1] -werror.hs:10:1: - Warning: Pattern match(es) are overlapped - In an equation for `f': f [] = ... +werror.hs:10:1: Warning: + Pattern match(es) are overlapped + In an equation for ‛f’: f [] = ... -werror.hs:10:1: - Warning: Pattern match(es) are non-exhaustive - In an equation for `f': Patterns not matched: _ : _ +werror.hs:10:1: Warning: + Pattern match(es) are non-exhaustive + In an equation for ‛f’: Patterns not matched: _ : _ <no location info>: Failing due to -Werror. diff --git a/tests/dynlibs/all.T b/tests/dynlibs/all.T index 2877c50e19c7238544bec4a3c69f5f6f039a40e2..6a9dfd9655a48fd1e8193597dbf900cfa21e0b9f 100644 --- a/tests/dynlibs/all.T +++ b/tests/dynlibs/all.T @@ -7,7 +7,7 @@ test('T3807', 'T3807-export.o', 'T3807-load.o', 'T3807test.so', 'T3807-load']), - if_os('mingw32', skip)], + when(opsys('mingw32'), skip)], run_command, ['$MAKE --no-print-directory -s T3807']) @@ -16,7 +16,7 @@ test('T4464', extra_clean(['T4464B.o', 'T4464C.o', 'T4464H.hi', 'T4464H.o', 'T4464H_stub.c', 'T4464H_stub.h', 'T4464H_stub.o', 'HS4464.dll', 'HS4464.dll.a', 't4464.exe']), - unless_os('mingw32', skip)], + unless(opsys('mingw32'), skip)], run_command, ['$MAKE --no-print-directory -s T4464']) diff --git a/tests/esc/all.T b/tests/esc/all.T index 55b21ee2a3fdcdcf007cdf63c292fd44f1d610eb..31a4ba5254bb0a908982d47fe96e12aef4361818 100644 --- a/tests/esc/all.T +++ b/tests/esc/all.T @@ -1,4 +1,4 @@ -esc = unless_tag('esc', skip) +esc = unless(tag('esc'), skip) test('TestList', esc, compile, ['-fesc']) test('TestImport', esc, compile, ['-fesc']) diff --git a/tests/ffi/should_compile/1357.hs b/tests/ffi/should_compile/T1357.hs similarity index 100% rename from tests/ffi/should_compile/1357.hs rename to tests/ffi/should_compile/T1357.hs diff --git a/tests/ffi/should_compile/1357.stderr b/tests/ffi/should_compile/T1357.stderr similarity index 81% rename from tests/ffi/should_compile/1357.stderr rename to tests/ffi/should_compile/T1357.stderr index cd1cb7031a91151e0ab8828f0f09403f33406588..6678973fe48fa31ddef568753d314f70ff1c8326 100644 --- a/tests/ffi/should_compile/1357.stderr +++ b/tests/ffi/should_compile/T1357.stderr @@ -1,3 +1,3 @@ -1357.hs:5:1: +T1357.hs:5:1: Warning: possible missing & in foreign import of FunPtr diff --git a/tests/ffi/should_compile/3624.hs b/tests/ffi/should_compile/T3624.hs similarity index 100% rename from tests/ffi/should_compile/3624.hs rename to tests/ffi/should_compile/T3624.hs diff --git a/tests/ffi/should_compile/3742.hs b/tests/ffi/should_compile/T3742.hs similarity index 100% rename from tests/ffi/should_compile/3742.hs rename to tests/ffi/should_compile/T3742.hs diff --git a/tests/ffi/should_compile/all.T b/tests/ffi/should_compile/all.T index f4b4cdd5cbb9dedf9c1306ec0fdc4fe815967b49..a192a7b0cc83c1425f90bc21a8ffc34c4b88564c 100644 --- a/tests/ffi/should_compile/all.T +++ b/tests/ffi/should_compile/all.T @@ -1,5 +1,5 @@ -def ffi( opts ): +def ffi( name, opts ): opts.extra_hc_opts = '-XForeignFunctionInterface -optc-Wno-implicit' setTestOpts(ffi) @@ -33,8 +33,8 @@ test('cc013', normal, compile, ['']) test('cc014', normal, compile, ['']) test('ffi-deriv1', normal, compile, ['']) -test('1357', normal, compile, ['']) -test('3624', normal, compile, ['']) -test('3742', normal, compile, ['']) +test('T1357', normal, compile, ['']) +test('T3624', normal, compile, ['']) +test('T3742', normal, compile, ['']) test('cc015', normal, compile, ['']) test('cc016', normal, compile, ['']) diff --git a/tests/ffi/should_fail/all.T b/tests/ffi/should_fail/all.T index cb6ffe9ea612ccae8d6bdce20ecd6725ab16089e..d1cba3c0d78c2599952f3f57ad23fe332178e6a4 100644 --- a/tests/ffi/should_fail/all.T +++ b/tests/ffi/should_fail/all.T @@ -6,7 +6,11 @@ test('ccfail001', only_compiler_types(['ghc']), compile_fail, ['']) test('ccfail002', only_compiler_types(['ghc']), compile_fail, ['']) test('ccfail003', only_compiler_types(['ghc']), compile_fail, ['']) test('T3066', only_compiler_types(['ghc']), compile_fail, ['']) -test('ccfail004', only_compiler_types(['ghc']), multimod_compile_fail, ['ccfail004', '-v0']) +test('ccfail004', + [only_compiler_types(['ghc']), + extra_clean(['Ccfail004A.hi', 'Ccfail004A.o'])], + multimod_compile_fail, + ['ccfail004', '-v0']) test('ccfail005', only_compiler_types(['ghc']), compile_fail, ['']) test('ccall_value', normal, compile_fail, ['']) test('capi_value_function', normal, compile_fail, ['']) diff --git a/tests/ffi/should_run/7170.stderr b/tests/ffi/should_run/7170.stderr deleted file mode 100644 index 3223f224b716f58e3ef2e97cc8deaf7e3a1f8841..0000000000000000000000000000000000000000 --- a/tests/ffi/should_run/7170.stderr +++ /dev/null @@ -1 +0,0 @@ -7170: thread blocked indefinitely in an MVar operation diff --git a/tests/ffi/should_run/Makefile b/tests/ffi/should_run/Makefile index 80ff28647e928bfa895c8fac508532de10a11556..7f846ce53d176179c216958dfc982bf5af7597b6 100644 --- a/tests/ffi/should_run/Makefile +++ b/tests/ffi/should_run/Makefile @@ -5,20 +5,20 @@ include $(TOP)/mk/test.mk ffi018_ghci_setup : '$(TEST_HC)' $(TEST_HC_OPTS) -c ffi018_ghci_c.c -1288_ghci_setup : - '$(TEST_HC)' $(TEST_HC_OPTS) -c 1288_ghci_c.c +T1288_ghci_setup : + '$(TEST_HC)' $(TEST_HC_OPTS) -c T1288_ghci_c.c -2276_ghci_setup : - '$(TEST_HC)' $(TEST_HC_OPTS) -c 2276_ghci_c.c +T2276_ghci_setup : + '$(TEST_HC)' $(TEST_HC_OPTS) -c T2276_ghci_c.c ffi002_setup : '$(TEST_HC)' $(TEST_HC_OPTS) -c ffi002.hs -5402_setup : - '$(TEST_HC)' $(TEST_HC_OPTS) -c 5402.hs +T5402_setup : + '$(TEST_HC)' $(TEST_HC_OPTS) -c T5402.hs -5594_setup : - '$(TEST_HC)' $(TEST_HC_OPTS) -c 5594.hs +T5594_setup : + '$(TEST_HC)' $(TEST_HC_OPTS) -c T5594.hs .PHONY: Capi_Ctype_001 Capi_Ctype_001: diff --git a/tests/ffi/should_run/1288.hs b/tests/ffi/should_run/T1288.hs similarity index 100% rename from tests/ffi/should_run/1288.hs rename to tests/ffi/should_run/T1288.hs diff --git a/tests/ffi/should_run/1288.stdout b/tests/ffi/should_run/T1288.stdout similarity index 100% rename from tests/ffi/should_run/1288.stdout rename to tests/ffi/should_run/T1288.stdout diff --git a/tests/ffi/should_run/1288_c.c b/tests/ffi/should_run/T1288_c.c similarity index 100% rename from tests/ffi/should_run/1288_c.c rename to tests/ffi/should_run/T1288_c.c diff --git a/tests/ffi/should_run/1288_ghci.hs b/tests/ffi/should_run/T1288_ghci.hs similarity index 100% rename from tests/ffi/should_run/1288_ghci.hs rename to tests/ffi/should_run/T1288_ghci.hs diff --git a/tests/ffi/should_run/1288_ghci.stdout b/tests/ffi/should_run/T1288_ghci.stdout similarity index 100% rename from tests/ffi/should_run/1288_ghci.stdout rename to tests/ffi/should_run/T1288_ghci.stdout diff --git a/tests/ffi/should_run/1288_ghci_c.c b/tests/ffi/should_run/T1288_ghci_c.c similarity index 100% rename from tests/ffi/should_run/1288_ghci_c.c rename to tests/ffi/should_run/T1288_ghci_c.c diff --git a/tests/ffi/should_run/1679.hs b/tests/ffi/should_run/T1679.hs similarity index 100% rename from tests/ffi/should_run/1679.hs rename to tests/ffi/should_run/T1679.hs diff --git a/tests/ffi/should_run/1679.stdout b/tests/ffi/should_run/T1679.stdout similarity index 100% rename from tests/ffi/should_run/1679.stdout rename to tests/ffi/should_run/T1679.stdout diff --git a/tests/ffi/should_run/2276.hs b/tests/ffi/should_run/T2276.hs similarity index 100% rename from tests/ffi/should_run/2276.hs rename to tests/ffi/should_run/T2276.hs diff --git a/tests/ffi/should_run/2276.stdout b/tests/ffi/should_run/T2276.stdout similarity index 100% rename from tests/ffi/should_run/2276.stdout rename to tests/ffi/should_run/T2276.stdout diff --git a/tests/ffi/should_run/2276_c.c b/tests/ffi/should_run/T2276_c.c similarity index 100% rename from tests/ffi/should_run/2276_c.c rename to tests/ffi/should_run/T2276_c.c diff --git a/tests/ffi/should_run/2276_ghci.hs b/tests/ffi/should_run/T2276_ghci.hs similarity index 100% rename from tests/ffi/should_run/2276_ghci.hs rename to tests/ffi/should_run/T2276_ghci.hs diff --git a/tests/ffi/should_run/2276_ghci.stdout b/tests/ffi/should_run/T2276_ghci.stdout similarity index 100% rename from tests/ffi/should_run/2276_ghci.stdout rename to tests/ffi/should_run/T2276_ghci.stdout diff --git a/tests/ffi/should_run/2276_ghci_c.c b/tests/ffi/should_run/T2276_ghci_c.c similarity index 100% rename from tests/ffi/should_run/2276_ghci_c.c rename to tests/ffi/should_run/T2276_ghci_c.c diff --git a/tests/ffi/should_run/2469.hs b/tests/ffi/should_run/T2469.hs similarity index 100% rename from tests/ffi/should_run/2469.hs rename to tests/ffi/should_run/T2469.hs diff --git a/tests/ffi/should_run/2594.hs b/tests/ffi/should_run/T2594.hs similarity index 100% rename from tests/ffi/should_run/2594.hs rename to tests/ffi/should_run/T2594.hs diff --git a/tests/ffi/should_run/2594.stdout b/tests/ffi/should_run/T2594.stdout similarity index 100% rename from tests/ffi/should_run/2594.stdout rename to tests/ffi/should_run/T2594.stdout diff --git a/tests/ffi/should_run/2594_c.c b/tests/ffi/should_run/T2594_c.c similarity index 88% rename from tests/ffi/should_run/2594_c.c rename to tests/ffi/should_run/T2594_c.c index f0dd3007fac1f291bbaed52704232962dfe5b0c7..34d633edb7a7a2edc71f881bbccb1b52b21e70d8 100644 --- a/tests/ffi/should_run/2594_c.c +++ b/tests/ffi/should_run/T2594_c.c @@ -1,5 +1,5 @@ -#include "2594_c.h" +#include "T2594_c.h" void call8 (funtype8 fun) { fun(-1); } void call16(funtype16 fun) { fun(-1); } diff --git a/tests/ffi/should_run/2594_c.h b/tests/ffi/should_run/T2594_c.h similarity index 100% rename from tests/ffi/should_run/2594_c.h rename to tests/ffi/should_run/T2594_c.h diff --git a/tests/ffi/should_run/2917a.hs b/tests/ffi/should_run/T2917a.hs similarity index 100% rename from tests/ffi/should_run/2917a.hs rename to tests/ffi/should_run/T2917a.hs diff --git a/tests/ffi/should_run/4038.hs b/tests/ffi/should_run/T4038.hs similarity index 100% rename from tests/ffi/should_run/4038.hs rename to tests/ffi/should_run/T4038.hs diff --git a/tests/ffi/should_run/4038.stdout b/tests/ffi/should_run/T4038.stdout similarity index 100% rename from tests/ffi/should_run/4038.stdout rename to tests/ffi/should_run/T4038.stdout diff --git a/tests/ffi/should_run/4221.hs b/tests/ffi/should_run/T4221.hs similarity index 100% rename from tests/ffi/should_run/4221.hs rename to tests/ffi/should_run/T4221.hs diff --git a/tests/ffi/should_run/4221.stdout b/tests/ffi/should_run/T4221.stdout similarity index 100% rename from tests/ffi/should_run/4221.stdout rename to tests/ffi/should_run/T4221.stdout diff --git a/tests/ffi/should_run/4221_c.c b/tests/ffi/should_run/T4221_c.c similarity index 100% rename from tests/ffi/should_run/4221_c.c rename to tests/ffi/should_run/T4221_c.c diff --git a/tests/ffi/should_run/5402.hs b/tests/ffi/should_run/T5402.hs similarity index 100% rename from tests/ffi/should_run/5402.hs rename to tests/ffi/should_run/T5402.hs diff --git a/tests/ffi/should_run/5402_main.c b/tests/ffi/should_run/T5402_main.c similarity index 89% rename from tests/ffi/should_run/5402_main.c rename to tests/ffi/should_run/T5402_main.c index 6ef2c651a962fb225b07fbab81d13b2ac042c5ef..efabfbcfa0ce098d8c54cda373c97a72ad111ff0 100644 --- a/tests/ffi/should_run/5402_main.c +++ b/tests/ffi/should_run/T5402_main.c @@ -1,7 +1,7 @@ #include "HsFFI.h" #include <stdio.h> #include <stdlib.h> -#include "5402_stub.h" +#include "T5402_stub.h" int main (int argc, char *argv[]) { diff --git a/tests/ffi/should_run/5594.hs b/tests/ffi/should_run/T5594.hs similarity index 100% rename from tests/ffi/should_run/5594.hs rename to tests/ffi/should_run/T5594.hs diff --git a/tests/ffi/should_run/5594.stdout b/tests/ffi/should_run/T5594.stdout similarity index 100% rename from tests/ffi/should_run/5594.stdout rename to tests/ffi/should_run/T5594.stdout diff --git a/tests/ffi/should_run/5594_c.c b/tests/ffi/should_run/T5594_c.c similarity index 85% rename from tests/ffi/should_run/5594_c.c rename to tests/ffi/should_run/T5594_c.c index 5de1f4d4c651b27136e4ae236d564b7964f38a9b..9ef22e8efdc194b2daac09a2442324b9768b6804 100644 --- a/tests/ffi/should_run/5594_c.c +++ b/tests/ffi/should_run/T5594_c.c @@ -1,5 +1,5 @@ #include <stdio.h> -#include "5594_stub.h" +#include "T5594_stub.h" #include "HsFFI.h" diff --git a/tests/ffi/should_run/7170.hs b/tests/ffi/should_run/T7170.hs similarity index 100% rename from tests/ffi/should_run/7170.hs rename to tests/ffi/should_run/T7170.hs diff --git a/tests/ffi/should_run/T7170.stderr b/tests/ffi/should_run/T7170.stderr new file mode 100644 index 0000000000000000000000000000000000000000..4ea63ebc4e56d667e34fcc72f08592cfacb0d79b --- /dev/null +++ b/tests/ffi/should_run/T7170.stderr @@ -0,0 +1 @@ +T7170: thread blocked indefinitely in an MVar operation diff --git a/tests/ffi/should_run/7170.stdout b/tests/ffi/should_run/T7170.stdout similarity index 100% rename from tests/ffi/should_run/7170.stdout rename to tests/ffi/should_run/T7170.stdout diff --git a/tests/ffi/should_run/all.T b/tests/ffi/should_run/all.T index e170db0dba0ed879c1dca38b84b9d245075d7734..89bb0fb83ebf66cecd6c84655c12b79fa01d46c4 100644 --- a/tests/ffi/should_run/all.T +++ b/tests/ffi/should_run/all.T @@ -5,15 +5,15 @@ # expected process return value, if not zero # Doesn't work with External Core due to __labels -test('fed001', compose(only_compiler_types(['ghc']), - expect_fail_for(['extcore','optextcore'])), +test('fed001', [only_compiler_types(['ghc']), + expect_fail_for(['extcore','optextcore'])], compile_and_run, ['']) # Omit GHCi for these two, as they use foreign export test('ffi001', omit_ways(['ghci']), compile_and_run, ['']) test('ffi002', [ omit_ways(['ghci']), extra_clean(['ffi002_c.o']), - compile_cmd_prefix('$MAKE ffi002_setup && ') ], + pre_cmd('$MAKE -s --no-print-directory ffi002_setup') ], # The ffi002_setup hack is to ensure that we generate # ffi002_stub.h before compiling ffi002_c.c, which # needs it. @@ -32,8 +32,8 @@ test('ffi004', skip, compile_and_run, ['']) # use of 80-bit internal precision when using the native code generator. # test('ffi005', [ omit_ways(prof_ways), - if_arch('i386', skip), - if_platform('i386-apple-darwin', expect_broken(4105)), + when(arch('i386'), skip), + when(platform('i386-apple-darwin'), expect_broken(4105)), exit_code(3) ], compile_and_run, ['']) @@ -48,13 +48,14 @@ test('ffi006', expect_fail_for(['extcore','optextcore']), compile_and_run, ['']) # Sometimes we end up with the wrong exit code, or get an extra # 'interrupted' message from the GHCi thread shutting down. -test('ffi007', compose( omit_ways(['ghci']), - expect_fail_for(['extcore','optextcore']) ), +test('ffi007', + [omit_ways(['ghci']), expect_fail_for(['extcore','optextcore'])], compile_and_run, ['']) -test('ffi008', compose(expect_fail_for(['extcore','optextcore']), - compose(exit_code(1), - omit_ways(['ghci']))), +test('ffi008', + [expect_fail_for(['extcore','optextcore']), + exit_code(1), + omit_ways(['ghci'])], compile_and_run, ['']) # On i386, we need -msse2 to get reliable floating point results @@ -67,7 +68,7 @@ if config.platform.startswith('i386-'): else: maybe_skip = only_ways(['ghci']) -test('ffi009', [skip_if_fast, expect_fail_for(['extcore','optextcore']), +test('ffi009', [when(fast(), skip), expect_fail_for(['extcore','optextcore']), reqlib('random'), maybe_skip] ,compile_and_run, [opts]) @@ -109,47 +110,47 @@ test('ffi018', [ omit_ways(['ghci']), extra_clean(['ffi018_c.o']) ], compile_and_run, ['ffi018_c.c']) test('ffi018_ghci', [ only_ways(['ghci']), - cmd_prefix('$MAKE ffi018_ghci_setup && '), + pre_cmd('$MAKE -s --no-print-directory ffi018_ghci_setup'), extra_clean(['ffi018_ghci_c.o']) ], compile_and_run, ['ffi018_ghci_c.o']) test('ffi019', normal, compile_and_run, ['']) # This one originally failed only GHCi, but doesn't hurt to test all ways. -test('1679', normal, compile_and_run, ['']) - -test('1288', [ omit_ways(['ghci']), - extra_clean(['1288_c.o']) ], - compile_and_run, ['1288_c.c']) -test('1288_ghci', [ only_ways(['ghci']), - cmd_prefix('$MAKE --no-print-directory 1288_ghci_setup && '), - extra_clean(['1288_ghci_c.o']) ], - compile_and_run, ['1288_ghci_c.o']) - -test('2276', [ omit_ways(['ghci']), - extra_clean(['2276_c.o']) ], - compile_and_run, ['2276_c.c']) -test('2276_ghci', [ only_ways(['ghci']), - cmd_prefix('$MAKE --no-print-directory 2276_ghci_setup && '), - extra_clean(['2276_ghci_c.o']) ], - compile_and_run, ['-fobject-code 2276_ghci_c.o']) - -test('2469', normal, compile_and_run, ['-optc-std=gnu99']) - -test('2594', - [extra_clean(['2594_c.o']), omit_ways(['ghci'])], +test('T1679', normal, compile_and_run, ['']) + +test('T1288', [ omit_ways(['ghci']), + extra_clean(['T1288_c.o']) ], + compile_and_run, ['T1288_c.c']) +test('T1288_ghci', [ only_ways(['ghci']), + pre_cmd('$MAKE -s --no-print-directory T1288_ghci_setup'), + extra_clean(['T1288_ghci_c.o']) ], + compile_and_run, ['T1288_ghci_c.o']) + +test('T2276', [ omit_ways(['ghci']), + extra_clean(['T2276_c.o']) ], + compile_and_run, ['T2276_c.c']) +test('T2276_ghci', [ only_ways(['ghci']), + pre_cmd('$MAKE -s --no-print-directory T2276_ghci_setup'), + extra_clean(['T2276_ghci_c.o']) ], + compile_and_run, ['-fobject-code T2276_ghci_c.o']) + +test('T2469', normal, compile_and_run, ['-optc-std=gnu99']) + +test('T2594', + [extra_clean(['T2594_c.o']), omit_ways(['ghci'])], compile_and_run, - ['2594_c.c']) + ['T2594_c.c']) test('fptr01', [ omit_ways(['ghci']), extra_clean(['fptr01_c.o']) ], compile_and_run, ['fptr01_c.c']) test('fptr02', normal, compile_and_run, ['']) -test('fptrfail01', [ compose(omit_ways(['ghci']), exit_code(1)), +test('fptrfail01', [ omit_ways(['ghci']), exit_code(1), extra_clean(['fptrfail01_c.o']) ], compile_and_run, ['fptrfail01_c.c']) -test('2917a', normal, compile_and_run, ['']) +test('T2917a', normal, compile_and_run, ['']) # omit prof ways, because this test causes the RTS to exit (correctly) # without generating profiling information. @@ -163,30 +164,30 @@ test('ffi022', normal, compile_and_run, ['']) if config.os == 'mingw32': # This test needs a larger C stack than we get by default on Windows - flagsFor4038 = ['-optl-Wl,--stack,10485760'] + flagsForT4038 = ['-optl-Wl,--stack,10485760'] else: - flagsFor4038 = [''] -test('4038', normal, compile_and_run, flagsFor4038) - -test('4221', [ omit_ways(['ghci']), extra_clean(['4221_c.o']) ], - compile_and_run, ['4221_c.c']) - -test('5402', [ omit_ways(['ghci']), - exit_code(42), - extra_clean(['5402_main.o']), - # The 5402_setup hack is to ensure that we generate - # 5402_stub.h before compiling 5402_main.c, which - # needs it. - compile_cmd_prefix('$MAKE --no-print-directory 5402_setup && ') ], - compile_and_run, ["-no-hs-main 5402_main.c"]) - -test('5594', [ omit_ways(['ghci']), - extra_clean(['5594_c.o']), - compile_cmd_prefix('$MAKE --no-print-directory 5594_setup && ') ], - # The 5594_setup hack is to ensure that we generate - # 5594_stub.h before compiling 5594_c.c, which - # needs it. - compile_and_run, ['5594_c.c -no-hs-main']) + flagsForT4038 = [''] +test('T4038', normal, compile_and_run, flagsForT4038) + +test('T4221', [ omit_ways(['ghci']), extra_clean(['T4221_c.o']) ], + compile_and_run, ['T4221_c.c']) + +test('T5402', [ omit_ways(['ghci']), + exit_code(42), + extra_clean(['T5402_main.o']), + # The T5402_setup hack is to ensure that we generate + # T5402_stub.h before compiling T5402_main.c, which + # needs it. + pre_cmd('$MAKE -s --no-print-directory T5402_setup') ], + compile_and_run, ["-no-hs-main T5402_main.c"]) + +test('T5594', [ omit_ways(['ghci']), + extra_clean(['T5594_c.o']), + pre_cmd('$MAKE -s --no-print-directory T5594_setup') ], + # The T5594_setup hack is to ensure that we generate + # T5594_stub.h before compiling T5594_c.c, which + # needs it. + compile_and_run, ['T5594_c.c -no-hs-main']) test('Capi_Ctype_001', extra_clean(['Capi_Ctype_A_001.o', 'Capi_Ctype_A_001.hi', @@ -211,7 +212,7 @@ test('capi_value', compile_and_run, ['capi_value_c.c']) -test('7170', exit_code(1), compile_and_run, ['']) +test('T7170', exit_code(1), compile_and_run, ['']) test('T4012', [extra_clean(['T4012_A.hi', 'T4012_A.o', 'T4012_B.hi', 'T4012_B.o']), diff --git a/tests/gadt/T3163.stderr b/tests/gadt/T3163.stderr index b93b523441175c7e71847ed9e55f45acf5ad950c..ce64010857a8b3e61e32ec7d4d51f843cd306861 100644 --- a/tests/gadt/T3163.stderr +++ b/tests/gadt/T3163.stderr @@ -1,5 +1,5 @@ - -T3163.hs:8:5: - Illegal polymorphic or qualified type: forall s. s - In the definition of data constructor `Unreached' - In the data declaration for `Taker' + +T3163.hs:8:5: + Illegal polymorphic or qualified type: forall s. s + In the definition of data constructor ‛Unreached’ + In the data declaration for ‛Taker’ diff --git a/tests/gadt/T3169.stderr b/tests/gadt/T3169.stderr index 62f49d467b333b893810aea59404e4fdebe8159d..292342031a2037469d12c3c35b187e370d4a1e43 100644 --- a/tests/gadt/T3169.stderr +++ b/tests/gadt/T3169.stderr @@ -3,7 +3,7 @@ T3169.hs:13:22: Could not deduce (elt ~ Map b elt) from the context (Key a, Key b) bound by the instance declaration at T3169.hs:10:10-36 - `elt' is a rigid type variable bound by + ‛elt’ is a rigid type variable bound by the type signature for lookup :: (a, b) -> Map (a, b) elt -> Maybe elt at T3169.hs:12:3 @@ -14,7 +14,7 @@ T3169.hs:13:22: (bound at T3169.hs:12:3) b :: b (bound at T3169.hs:12:13) m :: Map (a, b) elt (bound at T3169.hs:12:17) - In the second argument of `lookup', namely `m' + In the second argument of ‛lookup’, namely ‛m’ In the expression: lookup a m :: Maybe (Map b elt) In the expression: case lookup a m :: Maybe (Map b elt) of { diff --git a/tests/gadt/T3651.stderr b/tests/gadt/T3651.stderr index 778fe0febf266149bea39e154562817b02943072..8f53dc05eff2ea0c297a1fe41dc8f96950a3c87a 100644 --- a/tests/gadt/T3651.stderr +++ b/tests/gadt/T3651.stderr @@ -1,35 +1,35 @@ T3651.hs:11:11: - Couldn't match type `Bool' with `()' + Couldn't match type ‛Bool’ with ‛()’ Inaccessible code in - a pattern with constructor U :: Z (), in an equation for `unsafe1' + a pattern with constructor U :: Z (), in an equation for ‛unsafe1’ In the pattern: U - In an equation for `unsafe1': unsafe1 B U = () + In an equation for ‛unsafe1’: unsafe1 B U = () T3651.hs:11:15: - Couldn't match type `Bool' with `()' + Couldn't match type ‛Bool’ with ‛()’ Expected type: a Actual type: () In the expression: () - In an equation for `unsafe1': unsafe1 B U = () + In an equation for ‛unsafe1’: unsafe1 B U = () T3651.hs:14:11: - Couldn't match type `Bool' with `()' + Couldn't match type ‛Bool’ with ‛()’ Inaccessible code in - a pattern with constructor U :: Z (), in an equation for `unsafe2' + a pattern with constructor U :: Z (), in an equation for ‛unsafe2’ In the pattern: U - In an equation for `unsafe2': unsafe2 B U = () + In an equation for ‛unsafe2’: unsafe2 B U = () T3651.hs:14:15: - Couldn't match type `Bool' with `()' + Couldn't match type ‛Bool’ with ‛()’ Expected type: a Actual type: () In the expression: () - In an equation for `unsafe2': unsafe2 B U = () + In an equation for ‛unsafe2’: unsafe2 B U = () T3651.hs:17:11: - Couldn't match type `Bool' with `()' + Couldn't match type ‛Bool’ with ‛()’ Inaccessible code in - a pattern with constructor U :: Z (), in an equation for `unsafe3' + a pattern with constructor U :: Z (), in an equation for ‛unsafe3’ In the pattern: U - In an equation for `unsafe3': unsafe3 B U = True + In an equation for ‛unsafe3’: unsafe3 B U = True diff --git a/tests/gadt/T7293.stderr b/tests/gadt/T7293.stderr index 61cdc25f3727c0f689b0acb835e0ab6ec4a1efd5..98a4fe402a776cdaa8512da6542ad907ef41a9de 100644 --- a/tests/gadt/T7293.stderr +++ b/tests/gadt/T7293.stderr @@ -1,9 +1,9 @@ T7293.hs:24:5: - Couldn't match type 'False with 'True + Couldn't match type ‛'False’ with ‛'True’ Inaccessible code in a pattern with constructor Nil :: forall a. Vec a 'Zero, - in an equation for `nth' + in an equation for ‛nth’ In the pattern: Nil - In an equation for `nth': nth Nil _ = undefined + In an equation for ‛nth’: nth Nil _ = undefined diff --git a/tests/gadt/T7294.stderr b/tests/gadt/T7294.stderr index dc1eef1ca9b25781078cba3ae214d054be962d0c..bfb64966fcda7b8c316a3399504d70da0a4010f7 100644 --- a/tests/gadt/T7294.stderr +++ b/tests/gadt/T7294.stderr @@ -1,9 +1,9 @@ T7294.hs:25:5: Warning: - Couldn't match type 'False with 'True + Couldn't match type ‛'False’ with ‛'True’ Inaccessible code in a pattern with constructor Nil :: forall a. Vec a 'Zero, - in an equation for `nth' + in an equation for ‛nth’ In the pattern: Nil - In an equation for `nth': nth Nil _ = undefined + In an equation for ‛nth’: nth Nil _ = undefined diff --git a/tests/gadt/all.T b/tests/gadt/all.T index 1b46565fd895188b828e0a4432cd7f69c07da342..e5f3c5c34b27a2e15b2f12f4ceb943d480d94bec 100644 --- a/tests/gadt/all.T +++ b/tests/gadt/all.T @@ -6,10 +6,10 @@ setTestOpts(only_compiler_types(['ghc'])) # In fast mode, we omit all the compile_and_run tests except a couple test('gadt1', normal, compile, ['']) -test('gadt2', skip_if_fast, compile_and_run, ['']) +test('gadt2', when(fast(), skip), compile_and_run, ['']) test('gadt3', normal, compile, ['']) -test('gadt4', skip_if_fast, compile_and_run, ['']) -test('gadt5', skip_if_fast, compile_and_run, ['']) +test('gadt4', when(fast(), skip), compile_and_run, ['']) +test('gadt5', when(fast(), skip), compile_and_run, ['']) test('gadt6', normal, compile, ['']) test('gadt7', normal, compile_fail, ['']) test('gadt8', normal, compile, ['']) @@ -40,7 +40,7 @@ test('gadt23', test('gadt24', normal, compile, ['']) test('red-black', normal, compile, ['']) -test('type-rep', skip_if_fast, compile_and_run, ['']) +test('type-rep', when(fast(), skip), compile_and_run, ['']) test('equal', normal, compile, ['']) test('nbe', normal, compile, ['']) test('while', normal, compile_and_run, ['']) @@ -50,13 +50,13 @@ test('lazypatok', expect_fail, compile, ['']) test('tc', normal, compile_and_run, ['']) test('arrow', normal, compile, ['']) test('tdpe', normal, compile, ['']) -test('Nilsson', skip_if_fast, compile, ['']) +test('Nilsson', when(fast(), skip), compile, ['']) if config.fast: test('records', normal, compile, ['']) else: test('records', normal, compile_and_run, ['']) -test('ubx-records', skip_if_fast, compile_and_run, ['']) +test('ubx-records', when(fast(), skip), compile_and_run, ['']) test('records-fail1', normal, compile_fail, ['']) test('doaitse', normal, compile, ['']) @@ -102,10 +102,10 @@ test('gadt25', normal, compile, ['']) test('T3651', normal, compile_fail, ['']) test('T3638', normal, compile, ['']) -test('gadtSyntax001', if_compiler_lt('ghc', '7.1', expect_fail), compile, ['']) -test('gadtSyntaxFail001', if_compiler_lt('ghc', '7.1', expect_fail), compile_fail, ['']) -test('gadtSyntaxFail002', if_compiler_lt('ghc', '7.1', expect_fail), compile_fail, ['']) -test('gadtSyntaxFail003', if_compiler_lt('ghc', '7.1', expect_fail), compile_fail, ['']) +test('gadtSyntax001', when(compiler_lt('ghc', '7.1'), expect_fail), compile, ['']) +test('gadtSyntaxFail001', when(compiler_lt('ghc', '7.1'), expect_fail), compile_fail, ['']) +test('gadtSyntaxFail002', when(compiler_lt('ghc', '7.1'), expect_fail), compile_fail, ['']) +test('gadtSyntaxFail003', when(compiler_lt('ghc', '7.1'), expect_fail), compile_fail, ['']) test('T3169', normal, compile_fail, ['']) test('T5424', extra_clean(['T5424a.hi', 'T5424a.o']), diff --git a/tests/gadt/gadt-escape1.hs b/tests/gadt/gadt-escape1.hs index d90d6a951adaa1b4a30f0a54db466ba522ed5023..05579f9f09b3e2a38bdc73a298330f782f0af4e7 100644 --- a/tests/gadt/gadt-escape1.hs +++ b/tests/gadt/gadt-escape1.hs @@ -10,7 +10,7 @@ data Hidden = forall t . Hidden (ExpGADT t) (ExpGADT t) hval = Hidden (ExpInt 0) (ExpInt 1) -- With the type sig this is ok, but without it maybe --- should be rejected becuase the result type is wobbly +-- should be rejected because the result type is wobbly -- weird1 :: ExpGADT Int -- -- And indeed it is rejected by GHC 7.8 because OutsideIn diff --git a/tests/gadt/gadt-escape1.stderr b/tests/gadt/gadt-escape1.stderr index 53885ffaf219a93860f82c43db9bac7f952ddd35..fbc1b6703aa397db9bd33365f985ab0bc79c2c68 100644 --- a/tests/gadt/gadt-escape1.stderr +++ b/tests/gadt/gadt-escape1.stderr @@ -1,19 +1,19 @@ - -gadt-escape1.hs:19:58: - Couldn't match type `t' with `ExpGADT Int' - `t' is untouchable - inside the constraints (t1 ~ Int) - bound by a pattern with constructor - ExpInt :: Int -> ExpGADT Int, - in a case alternative - at gadt-escape1.hs:19:43-50 - `t' is a rigid type variable bound by - the inferred type of weird1 :: t at gadt-escape1.hs:19:1 - Expected type: t - Actual type: ExpGADT t1 - Relevant bindings include - weird1 :: t (bound at gadt-escape1.hs:19:1) - In the expression: a - In a case alternative: Hidden (ExpInt _) a -> a - In the expression: - case (hval :: Hidden) of { Hidden (ExpInt _) a -> a } + +gadt-escape1.hs:19:58: + Couldn't match type ‛t’ with ‛ExpGADT Int’ + ‛t’ is untouchable + inside the constraints (t1 ~ Int) + bound by a pattern with constructor + ExpInt :: Int -> ExpGADT Int, + in a case alternative + at gadt-escape1.hs:19:43-50 + ‛t’ is a rigid type variable bound by + the inferred type of weird1 :: t at gadt-escape1.hs:19:1 + Expected type: t + Actual type: ExpGADT t1 + Relevant bindings include + weird1 :: t (bound at gadt-escape1.hs:19:1) + In the expression: a + In a case alternative: Hidden (ExpInt _) a -> a + In the expression: + case (hval :: Hidden) of { Hidden (ExpInt _) a -> a } diff --git a/tests/gadt/gadt10.stderr b/tests/gadt/gadt10.stderr index e244eca0566ed0b554f5a90530f6ff8ca5a8ab4d..fa485aade5d65da60a4f35c3a2dbf8cc307fac2c 100644 --- a/tests/gadt/gadt10.stderr +++ b/tests/gadt/gadt10.stderr @@ -1,7 +1,7 @@ - -gadt10.hs:6:24: - Expecting one more argument to `RInt' - Expected kind `*', but `RInt' has kind `k0 -> *' - In the type `RInt' - In the definition of data constructor `R' - In the data declaration for `RInt' + +gadt10.hs:6:24: + Expecting one more argument to ‛RInt’ + Expected kind ‛*’, but ‛RInt’ has kind ‛k0 -> *’ + In the type ‛RInt’ + In the definition of data constructor ‛R’ + In the data declaration for ‛RInt’ diff --git a/tests/gadt/gadt11.stderr b/tests/gadt/gadt11.stderr index bfe38d43b38022f08ada1cd86560bf565d8506db..96f636c0a60674a01a022499337daec58c50503d 100644 --- a/tests/gadt/gadt11.stderr +++ b/tests/gadt/gadt11.stderr @@ -1,6 +1,6 @@ - -gadt11.hs:9:3: - Data constructor `B1' returns type `X []' - instead of an instance of its parent type `B a' - In the definition of data constructor `B1' - In the data declaration for `B' + +gadt11.hs:9:3: + Data constructor ‛B1’ returns type ‛X []’ + instead of an instance of its parent type ‛B a’ + In the definition of data constructor ‛B1’ + In the data declaration for ‛B’ diff --git a/tests/gadt/gadt13.stderr b/tests/gadt/gadt13.stderr index b03ff492facdf01f014e704ded466b1cfe412fa0..3b39f07b8f9efee69090bef2066aebf630c67fb4 100644 --- a/tests/gadt/gadt13.stderr +++ b/tests/gadt/gadt13.stderr @@ -1,16 +1,16 @@ - -gadt13.hs:15:13: - Couldn't match expected type `t' - with actual type `String -> [Char]' - `t' is untouchable - inside the constraints (t1 ~ Int) - bound by a pattern with constructor - I :: Int -> Term Int, - in an equation for `shw' - at gadt13.hs:15:6-8 - `t' is a rigid type variable bound by - the inferred type of shw :: Term t1 -> t at gadt13.hs:15:1 - Relevant bindings include - shw :: Term t1 -> t (bound at gadt13.hs:15:1) - In the expression: ("I " ++) . shows t - In an equation for `shw': shw (I t) = ("I " ++) . shows t + +gadt13.hs:15:13: + Couldn't match expected type ‛t’ + with actual type ‛String -> [Char]’ + ‛t’ is untouchable + inside the constraints (t1 ~ Int) + bound by a pattern with constructor + I :: Int -> Term Int, + in an equation for ‛shw’ + at gadt13.hs:15:6-8 + ‛t’ is a rigid type variable bound by + the inferred type of shw :: Term t1 -> t at gadt13.hs:15:1 + Relevant bindings include + shw :: Term t1 -> t (bound at gadt13.hs:15:1) + In the expression: ("I " ++) . shows t + In an equation for ‛shw’: shw (I t) = ("I " ++) . shows t diff --git a/tests/gadt/gadt21.stderr b/tests/gadt/gadt21.stderr index 061c5634650fc7aaf6d3faf3bf0dbadcaf25c886..0293eaafb81e2ee0dfb0e3d29a4fe435ac5a032b 100644 --- a/tests/gadt/gadt21.stderr +++ b/tests/gadt/gadt21.stderr @@ -1,20 +1,19 @@ gadt21.hs:21:60: - Could not deduce (Ord a1) arising from a use of `f' + Could not deduce (Ord a1) arising from a use of ‛f’ from the context (a ~ Set a1) bound by a pattern with constructor TypeSet :: forall a. Type a -> Type (Set a), - in an equation for `withOrdDynExpr' + in an equation for ‛withOrdDynExpr’ at gadt21.hs:21:35-43 Possible fix: add (Ord a1) to the context of - the data constructor `TypeSet' - or the data constructor `DynExpr' + the data constructor ‛TypeSet’ + or the data constructor ‛DynExpr’ or the type signature for withOrdDynExpr :: DynExpr - -> (forall a. Ord a => Expr a -> b) - -> Maybe b - In the first argument of `Just', namely `(f e)' + -> (forall a. Ord a => Expr a -> b) -> Maybe b + In the first argument of ‛Just’, namely ‛(f e)’ In the expression: Just (f e) - In an equation for `withOrdDynExpr': + In an equation for ‛withOrdDynExpr’: withOrdDynExpr (DynExpr e@(Const (TypeSet _) _)) f = Just (f e) diff --git a/tests/gadt/gadt7.stderr b/tests/gadt/gadt7.stderr index 561b0b52b7b631e8096b471e8a853b359bbd3fe0..186bfd33fb5ddf54ac38a8358dc20d85427f6729 100644 --- a/tests/gadt/gadt7.stderr +++ b/tests/gadt/gadt7.stderr @@ -1,20 +1,20 @@ - -gadt7.hs:16:38: - Couldn't match expected type `t' with actual type `t1' - `t1' is untouchable - inside the constraints (t2 ~ Int) - bound by a pattern with constructor - K :: T Int, - in a case alternative - at gadt7.hs:16:33 - `t1' is a rigid type variable bound by - the inferred type of i1b :: T t2 -> t1 -> t at gadt7.hs:16:1 - `t' is a rigid type variable bound by - the inferred type of i1b :: T t2 -> t1 -> t at gadt7.hs:16:1 - Relevant bindings include - i1b :: T t2 -> t1 -> t (bound at gadt7.hs:16:1) - y :: t1 (bound at gadt7.hs:16:7) - y1 :: t1 (bound at gadt7.hs:16:16) - In the expression: y1 - In a case alternative: K -> y1 - In the expression: case t1 of { K -> y1 } + +gadt7.hs:16:38: + Couldn't match expected type ‛t’ with actual type ‛t1’ + ‛t1’ is untouchable + inside the constraints (t2 ~ Int) + bound by a pattern with constructor + K :: T Int, + in a case alternative + at gadt7.hs:16:33 + ‛t1’ is a rigid type variable bound by + the inferred type of i1b :: T t2 -> t1 -> t at gadt7.hs:16:1 + ‛t’ is a rigid type variable bound by + the inferred type of i1b :: T t2 -> t1 -> t at gadt7.hs:16:1 + Relevant bindings include + i1b :: T t2 -> t1 -> t (bound at gadt7.hs:16:1) + y :: t1 (bound at gadt7.hs:16:7) + y1 :: t1 (bound at gadt7.hs:16:16) + In the expression: y1 + In a case alternative: K -> y1 + In the expression: case t1 of { K -> y1 } diff --git a/tests/gadt/gadtSyntaxFail001.stderr b/tests/gadt/gadtSyntaxFail001.stderr index aa837b7a8919757e61b8db4897f80f39436180d6..53b198a14da4dd10ba28a484083bda57d3126510 100644 --- a/tests/gadt/gadtSyntaxFail001.stderr +++ b/tests/gadt/gadtSyntaxFail001.stderr @@ -1,6 +1,6 @@ - -gadtSyntaxFail001.hs:8:5: - Data constructor `C2' has existential type variables, a context, or a specialised result type - (Use -XExistentialQuantification or -XGADTs to allow this) - In the definition of data constructor `C2' - In the data declaration for `Foo' + +gadtSyntaxFail001.hs:8:5: + Data constructor ‛C2’ has existential type variables, a context, or a specialised result type + (Use -XExistentialQuantification or -XGADTs to allow this) + In the definition of data constructor ‛C2’ + In the data declaration for ‛Foo’ diff --git a/tests/gadt/gadtSyntaxFail002.stderr b/tests/gadt/gadtSyntaxFail002.stderr index a2b101a977d546c2d26b769512026879f0f2a01d..ca1060d8ee8be0f428110bcaab43b29cde262580 100644 --- a/tests/gadt/gadtSyntaxFail002.stderr +++ b/tests/gadt/gadtSyntaxFail002.stderr @@ -1,6 +1,6 @@ - -gadtSyntaxFail002.hs:8:5: - Data constructor `C2' has existential type variables, a context, or a specialised result type - (Use -XExistentialQuantification or -XGADTs to allow this) - In the definition of data constructor `C2' - In the data declaration for `Foo' + +gadtSyntaxFail002.hs:8:5: + Data constructor ‛C2’ has existential type variables, a context, or a specialised result type + (Use -XExistentialQuantification or -XGADTs to allow this) + In the definition of data constructor ‛C2’ + In the data declaration for ‛Foo’ diff --git a/tests/gadt/gadtSyntaxFail003.stderr b/tests/gadt/gadtSyntaxFail003.stderr index 3cd4611cd38a9ebbb6a0b370f34ade121948ba44..eb2e370a6677eeeee30cf676fd631768789b70ed 100644 --- a/tests/gadt/gadtSyntaxFail003.stderr +++ b/tests/gadt/gadtSyntaxFail003.stderr @@ -1,6 +1,6 @@ - -gadtSyntaxFail003.hs:7:5: - Data constructor `C1' has existential type variables, a context, or a specialised result type - (Use -XExistentialQuantification or -XGADTs to allow this) - In the definition of data constructor `C1' - In the data declaration for `Foo' + +gadtSyntaxFail003.hs:7:5: + Data constructor ‛C1’ has existential type variables, a context, or a specialised result type + (Use -XExistentialQuantification or -XGADTs to allow this) + In the definition of data constructor ‛C1’ + In the data declaration for ‛Foo’ diff --git a/tests/gadt/lazypat.stderr b/tests/gadt/lazypat.stderr index d64f40e487b3f65cd43d2acfd56f5b96151489c0..460c600b3580e6a1f2a7c3b5a1b0adb72f765897 100644 --- a/tests/gadt/lazypat.stderr +++ b/tests/gadt/lazypat.stderr @@ -4,4 +4,4 @@ lazypat.hs:7:5: inside a lazy (~) pattern In the pattern: T x f In the pattern: ~(T x f) - In an equation for `f': f ~(T x f) = f x + In an equation for ‛f’: f ~(T x f) = f x diff --git a/tests/gadt/records-fail1.stderr b/tests/gadt/records-fail1.stderr index 829114e51f1814e044329c7ece28d5d97f38e8dc..690649d46bc146bf1084d7a85dfd2b1014346184 100644 --- a/tests/gadt/records-fail1.stderr +++ b/tests/gadt/records-fail1.stderr @@ -1,5 +1,5 @@ - -records-fail1.hs:7:1: - Constructors T1 and T4 have a common field `x', - but have different result types - In the data declaration for `T' + +records-fail1.hs:7:1: + Constructors T1 and T4 have a common field ‛x’, + but have different result types + In the data declaration for ‛T’ diff --git a/tests/gadt/rw.stderr b/tests/gadt/rw.stderr index ef5453ca6fbdd4ed7b972ac14d6998e06da09c9b..584c94475b599430b24d65f01e29f2cccf239438 100644 --- a/tests/gadt/rw.stderr +++ b/tests/gadt/rw.stderr @@ -1,20 +1,20 @@ rw.hs:14:47: - Couldn't match expected type `a' with actual type `Int' - `a' is a rigid type variable bound by + Couldn't match expected type ‛a’ with actual type ‛Int’ + ‛a’ is a rigid type variable bound by the type signature for writeInt :: T a -> IORef a -> IO () at rw.hs:12:12 Relevant bindings include writeInt :: T a -> IORef a -> IO () (bound at rw.hs:13:1) v :: T a (bound at rw.hs:13:10) ref :: IORef a (bound at rw.hs:13:12) - In the second argument of `writeIORef', namely `(1 :: Int)' + In the second argument of ‛writeIORef’, namely ‛(1 :: Int)’ In the expression: writeIORef ref (1 :: Int) In a case alternative: ~(Li x) -> writeIORef ref (1 :: Int) rw.hs:19:51: - Couldn't match type `a' with `Bool' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛Bool’ + ‛a’ is a rigid type variable bound by the type signature for readBool :: T a -> IORef a -> IO () at rw.hs:16:12 Expected type: a -> Bool @@ -23,6 +23,6 @@ rw.hs:19:51: readBool :: T a -> IORef a -> IO () (bound at rw.hs:17:1) v :: T a (bound at rw.hs:17:10) ref :: IORef a (bound at rw.hs:17:12) - In the second argument of `(.)', namely `not' - In the second argument of `(>>=)', namely `(print . not)' + In the second argument of ‛(.)’, namely ‛not’ + In the second argument of ‛(>>=)’, namely ‛(print . not)’ In the expression: readIORef ref >>= (print . not) diff --git a/tests/generics/GenCannotDoRep0.stderr b/tests/generics/GenCannotDoRep0.stderr index 291ab14b5ff655e0e224161713965312a1400801..d216a703b39c527e38a43d4d0c1057b4984e5e99 100644 --- a/tests/generics/GenCannotDoRep0.stderr +++ b/tests/generics/GenCannotDoRep0.stderr @@ -3,21 +3,21 @@ GenCannotDoRep0.hs:6:14: Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. GenCannotDoRep0.hs:13:45: - Can't make a derived instance of `Generic Dynamic': + Can't make a derived instance of ‛Generic Dynamic’: Dynamic must be a vanilla data constructor - In the data declaration for `Dynamic' + In the data declaration for ‛Dynamic’ GenCannotDoRep0.hs:17:1: - Can't make a derived instance of `Generic (P Int)': + Can't make a derived instance of ‛Generic (P Int)’: P must not be instantiated; try deriving `P a' instead - In the stand-alone deriving instance for `Generic (P Int)' + In the stand-alone deriving instance for ‛Generic (P Int)’ GenCannotDoRep0.hs:26:1: - Can't make a derived instance of `Generic (D Char Char)': + Can't make a derived instance of ‛Generic (D Char Char)’: D must not be instantiated; try deriving `D Char b' instead - In the stand-alone deriving instance for `Generic (D Char Char)' + In the stand-alone deriving instance for ‛Generic (D Char Char)’ GenCannotDoRep0.hs:28:1: - Can't make a derived instance of `Generic (D Int a)': + Can't make a derived instance of ‛Generic (D Int a)’: D must not have a datatype context - In the stand-alone deriving instance for `Generic (D Int a)' + In the stand-alone deriving instance for ‛Generic (D Int a)’ diff --git a/tests/generics/GenCannotDoRep1.stderr b/tests/generics/GenCannotDoRep1.stderr index dde1d5b0d8b69f094cc8f8cea265f4eeaa8e69f0..7e0f124b1e5cab109e3dd675df6eb2cc38192383 100644 --- a/tests/generics/GenCannotDoRep1.stderr +++ b/tests/generics/GenCannotDoRep1.stderr @@ -1,8 +1,8 @@ - -GenCannotDoRep1.hs:1:29: Warning: - -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. - -GenCannotDoRep1.hs:8:49: - Can't make a derived instance of `Generic (Context a)': - Context must not have a datatype context - In the data declaration for `Context' + +GenCannotDoRep1.hs:1:29: Warning: + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. + +GenCannotDoRep1.hs:8:49: + Can't make a derived instance of ‛Generic (Context a)’: + Context must not have a datatype context + In the data declaration for ‛Context’ diff --git a/tests/generics/GenCannotDoRep1_0.stderr b/tests/generics/GenCannotDoRep1_0.stderr index 2e602af0e65b82165ee7f01830097c185c0ecd81..c75205a380f26aa1023657f97833c834da112d81 100644 --- a/tests/generics/GenCannotDoRep1_0.stderr +++ b/tests/generics/GenCannotDoRep1_0.stderr @@ -1,5 +1,5 @@ GenCannotDoRep1_0.hs:9:49: - Can't make a derived instance of `Generic1 Dynamic': + Can't make a derived instance of ‛Generic1 Dynamic’: Dynamic must be a vanilla data constructor - In the data declaration for `Dynamic' + In the data declaration for ‛Dynamic’ diff --git a/tests/generics/GenCannotDoRep1_1.stderr b/tests/generics/GenCannotDoRep1_1.stderr index df9f518c67fe13dba56b0bcc153ddd4815ba8ad8..97eeca51a9feb72a32c0b456cab370791339d05e 100644 --- a/tests/generics/GenCannotDoRep1_1.stderr +++ b/tests/generics/GenCannotDoRep1_1.stderr @@ -3,6 +3,6 @@ GenCannotDoRep1_1.hs:1:29: Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. GenCannotDoRep1_1.hs:8:49: - Can't make a derived instance of `Generic1 Context': + Can't make a derived instance of ‛Generic1 Context’: Context must not have a datatype context - In the data declaration for `Context' + In the data declaration for ‛Context’ diff --git a/tests/generics/GenCannotDoRep1_2.stderr b/tests/generics/GenCannotDoRep1_2.stderr index ffda5ffd2c90366bd8647bfeccc61807a062d1e6..32aebb7fc92fd16644bbed2ca660b4ccfcb90aec 100644 --- a/tests/generics/GenCannotDoRep1_2.stderr +++ b/tests/generics/GenCannotDoRep1_2.stderr @@ -1,5 +1,5 @@ GenCannotDoRep1_2.hs:13:1: - Can't make a derived instance of `Generic1 Term': + Can't make a derived instance of ‛Generic1 Term’: Int must be a vanilla data constructor - In the stand-alone deriving instance for `Generic1 Term' + In the stand-alone deriving instance for ‛Generic1 Term’ diff --git a/tests/generics/GenCannotDoRep1_3.stderr b/tests/generics/GenCannotDoRep1_3.stderr index 7312a951582f9772a343b5e65086b745c1652481..7e54463ff5840cb949a1f997995bc40084685c2c 100644 --- a/tests/generics/GenCannotDoRep1_3.stderr +++ b/tests/generics/GenCannotDoRep1_3.stderr @@ -1,5 +1,5 @@ GenCannotDoRep1_3.hs:11:33: - Can't make a derived instance of `Generic1 T': - Constructor `T' must use the last type parameter only as the last argument of a data type, newtype, or (->) - In the data declaration for `T' + Can't make a derived instance of ‛Generic1 T’: + Constructor ‛T’ must use the last type parameter only as the last argument of a data type, newtype, or (->) + In the data declaration for ‛T’ diff --git a/tests/generics/GenCannotDoRep1_4.stderr b/tests/generics/GenCannotDoRep1_4.stderr index 2a8d2a699b3d0aa566a5a70101aa2957920be3b7..e4b39838d6a18a1e2824ca7737f5a2e7d9c50428 100644 --- a/tests/generics/GenCannotDoRep1_4.stderr +++ b/tests/generics/GenCannotDoRep1_4.stderr @@ -1,5 +1,5 @@ GenCannotDoRep1_4.hs:8:34: - Can't make a derived instance of `Generic1 T': - Constructor `T' must use the last type parameter only as the last argument of a data type, newtype, or (->) - In the data declaration for `T' + Can't make a derived instance of ‛Generic1 T’: + Constructor ‛T’ must use the last type parameter only as the last argument of a data type, newtype, or (->) + In the data declaration for ‛T’ diff --git a/tests/generics/GenCannotDoRep1_5.stderr b/tests/generics/GenCannotDoRep1_5.stderr index 13d25089a55f6bb550a7c33d6145a076578e46bd..21e849098cd5ec3e30309ef875d68c077b2b3de9 100644 --- a/tests/generics/GenCannotDoRep1_5.stderr +++ b/tests/generics/GenCannotDoRep1_5.stderr @@ -1,5 +1,5 @@ GenCannotDoRep1_5.hs:9:32: - Can't make a derived instance of `Generic1 T': - Constructor `T' must use the last type parameter only as the last argument of a data type, newtype, or (->) - In the data declaration for `T' + Can't make a derived instance of ‛Generic1 T’: + Constructor ‛T’ must use the last type parameter only as the last argument of a data type, newtype, or (->) + In the data declaration for ‛T’ diff --git a/tests/generics/GenCannotDoRep1_6.stderr b/tests/generics/GenCannotDoRep1_6.stderr index 16b822e1c1a1c079096db45061d30d62b705690e..06d95b223ef1e95ef3bdbc34dbdb63e319c8f49b 100644 --- a/tests/generics/GenCannotDoRep1_6.stderr +++ b/tests/generics/GenCannotDoRep1_6.stderr @@ -1,5 +1,5 @@ GenCannotDoRep1_6.hs:9:43: - Can't make a derived instance of `Generic1 T': - Constructor `T' must use the last type parameter only as the last argument of a data type, newtype, or (->) - In the data declaration for `T' + Can't make a derived instance of ‛Generic1 T’: + Constructor ‛T’ must use the last type parameter only as the last argument of a data type, newtype, or (->) + In the data declaration for ‛T’ diff --git a/tests/generics/GenCannotDoRep1_7.stderr b/tests/generics/GenCannotDoRep1_7.stderr index 3b6af68fb0d85b1bbf05c213d8cca990b15ac4d9..2830a6d77499bfed27b5d665e3927e1aedf82fb5 100644 --- a/tests/generics/GenCannotDoRep1_7.stderr +++ b/tests/generics/GenCannotDoRep1_7.stderr @@ -1,5 +1,5 @@ GenCannotDoRep1_7.hs:11:29: - Can't make a derived instance of `Generic1 T': + Can't make a derived instance of ‛Generic1 T’: must not apply type constructors that cannot be represented with `Rep1' (such as `B') to arguments that involve the last type parameter - In the data declaration for `T' + In the data declaration for ‛T’ diff --git a/tests/generics/GenCannotDoRep1_8.stderr b/tests/generics/GenCannotDoRep1_8.stderr index c0d6929071699625ea562ec1e37acd9b229cc165..305944471f6b9467a2a75509e70db85f32061d94 100644 --- a/tests/generics/GenCannotDoRep1_8.stderr +++ b/tests/generics/GenCannotDoRep1_8.stderr @@ -1,5 +1,5 @@ GenCannotDoRep1_8.hs:12:30: - Can't make a derived instance of `Generic1 T': - Constructor `T' must use the last type parameter only as the last argument of a data type, newtype, or (->) - In the data declaration for `T' + Can't make a derived instance of ‛Generic1 T’: + Constructor ‛T’ must use the last type parameter only as the last argument of a data type, newtype, or (->) + In the data declaration for ‛T’ diff --git a/tests/generics/GenCannotDoRep2.stderr b/tests/generics/GenCannotDoRep2.stderr index 35caf2c3b4a8f8ea150d5437e56220ed142282db..635102310a8a3745b105c20ea2f43f9e1ce1e20a 100644 --- a/tests/generics/GenCannotDoRep2.stderr +++ b/tests/generics/GenCannotDoRep2.stderr @@ -1,5 +1,5 @@ GenCannotDoRep2.hs:13:1: - Can't make a derived instance of `Generic (Term a)': + Can't make a derived instance of ‛Generic (Term a)’: Int must be a vanilla data constructor - In the stand-alone deriving instance for `Generic (Term a)' + In the stand-alone deriving instance for ‛Generic (Term a)’ diff --git a/tests/generics/GenNewtype.hs b/tests/generics/GenNewtype.hs new file mode 100644 index 0000000000000000000000000000000000000000..c1161fe7f94159c151ea3fc197a6cfe6b562a163 --- /dev/null +++ b/tests/generics/GenNewtype.hs @@ -0,0 +1,10 @@ +{-# LANGUAGE DeriveGeneric #-} + +module Main where + +import GHC.Generics + +data X = X deriving Generic +newtype Y = Y X deriving Generic + +main = print [isNewtype (from X), isNewtype (from (Y X))] diff --git a/tests/generics/GenNewtype.stdout b/tests/generics/GenNewtype.stdout new file mode 100644 index 0000000000000000000000000000000000000000..a9896e7d70625653ddbb102d9821b5dd0d803b12 --- /dev/null +++ b/tests/generics/GenNewtype.stdout @@ -0,0 +1 @@ +[False,True] diff --git a/tests/generics/GenShouldFail0.stderr b/tests/generics/GenShouldFail0.stderr index 3685e67784eb108b14a364f24efab265d16906e7..f85cd9289427811bf419b9f0fb5c430eddcee3ce 100644 --- a/tests/generics/GenShouldFail0.stderr +++ b/tests/generics/GenShouldFail0.stderr @@ -1,5 +1,5 @@ GenShouldFail0.hs:9:1: - Can't make a derived instance of `Generic X': + Can't make a derived instance of ‛Generic X’: You need -XDeriveGeneric to derive an instance for this class - In the stand-alone deriving instance for `Generic X' + In the stand-alone deriving instance for ‛Generic X’ diff --git a/tests/generics/GenShouldFail1_0.stderr b/tests/generics/GenShouldFail1_0.stderr index 9b7ba3ef074218ee38ba489709a03c6c7e89c30c..00779d00ea4ebc70897c20bd6b19c561fdd02eea 100644 --- a/tests/generics/GenShouldFail1_0.stderr +++ b/tests/generics/GenShouldFail1_0.stderr @@ -1,5 +1,5 @@ GenShouldFail1_0.hs:9:1: - Can't make a derived instance of `Generic1 X': + Can't make a derived instance of ‛Generic1 X’: You need -XDeriveGeneric to derive an instance for this class - In the stand-alone deriving instance for `Generic1 X' + In the stand-alone deriving instance for ‛Generic1 X’ diff --git a/tests/generics/all.T b/tests/generics/all.T index 1541a4725cfc36eaa410becf49397651e9dbf39d..7a88487fecd79b76b279cbefde738b851e440ac6 100644 --- a/tests/generics/all.T +++ b/tests/generics/all.T @@ -9,6 +9,7 @@ test('GenCannotDoRep0', normal, compile_fail, ['']) test('GenCannotDoRep1', normal, compile_fail, ['']) test('GenCannotDoRep2', normal, compile_fail, ['']) test('T5884', normal, compile, ['']) +test('GenNewtype', normal, compile_and_run, ['']) test('GenCanDoRep1_0', normal, compile, ['']) test('GenDerivOutput1_0', normal, compile, ['-dsuppress-uniques']) diff --git a/tests/ghc-api/T4891/T4891.hs b/tests/ghc-api/T4891/T4891.hs index 02d2dee8c89e3131c25b56782b1a0c4280989db7..ca4aff91c9dbcf059edc5caf7d82261d7d5788c5 100644 --- a/tests/ghc-api/T4891/T4891.hs +++ b/tests/ghc-api/T4891/T4891.hs @@ -52,7 +52,7 @@ chaseConstructor :: (GhcMonad m) => HValue -> m () chaseConstructor !hv = do dflags <- getDynFlags liftIO $ putStrLn "=====" - closure <- liftIO $ getClosureData hv + closure <- liftIO $ getClosureData dflags hv case tipe closure of Indirection _ -> chaseConstructor (ptrs closure ! 0) Constr -> do diff --git a/tests/ghc-api/T4891/all.T b/tests/ghc-api/T4891/all.T index 5217e5371fc3c48dd5dbdb4b5d3d9bc320de8eef..64c25912fa5786162a3edf23724d4b2042c719fa 100644 --- a/tests/ghc-api/T4891/all.T +++ b/tests/ghc-api/T4891/all.T @@ -1,3 +1,3 @@ -test('T4891', [skip_if_fast, extra_clean(['X.hi', 'X.o'])], +test('T4891', [when(fast(), skip), extra_clean(['X.hi', 'X.o'])], run_command, ['$MAKE -s --no-print-directory T4891']) diff --git a/tests/ghc-api/T6145.hs b/tests/ghc-api/T6145.hs index 42fc93bb07a4a80b12cdf7bbcd667163e0b446f3..0332b05a51e629815ddcadd8efb36e6d5f6c5c1e 100644 --- a/tests/ghc-api/T6145.hs +++ b/tests/ghc-api/T6145.hs @@ -35,7 +35,7 @@ main = do getDataCon (L _ (AbsBinds { abs_binds = bs })) = not (isEmptyBag (filterBag getDataCon bs)) getDataCon (L l (f@FunBind {})) - | (MatchGroup (m:_) _)<-fun_matches f, + | (MG (m:_) _ _) <- fun_matches f, (L _ (c@ConPatOut{}):_)<-hsLMatchPats m, (L l _)<-pat_con c = isGoodSrcSpan l -- Check that the source location is a good one diff --git a/tests/ghc-api/all.T b/tests/ghc-api/all.T index 62cd1b50afa1896ec2d7011d189b1f461790c757..9fa7672762a5cc6a7c20194f04ee4273abea3311 100644 --- a/tests/ghc-api/all.T +++ b/tests/ghc-api/all.T @@ -1,3 +1,3 @@ -test('T6145', [skip_if_fast], +test('T6145', when(fast(), skip), run_command, ['$MAKE -s --no-print-directory T6145']) diff --git a/tests/ghc-api/apirecomp001/all.T b/tests/ghc-api/apirecomp001/all.T index 0aa92874dcff46e0c7ed059a4e2b8063ee8aab1f..f8f5abdf0c94f1a9be5a0f96b23174131cfb1669 100644 --- a/tests/ghc-api/apirecomp001/all.T +++ b/tests/ghc-api/apirecomp001/all.T @@ -1 +1,4 @@ -test('apirecomp001', skip_if_fast, run_command, ['$MAKE -s --no-print-directory apirecomp001']) +test('apirecomp001', + when(fast(), skip), + run_command, + ['$MAKE -s --no-print-directory apirecomp001']) diff --git a/tests/ghc-api/apirecomp001/apirecomp001.stderr b/tests/ghc-api/apirecomp001/apirecomp001.stderr index 920a10a79e370a48bb8c8d0161d1d09d779adff1..b7666b7a4f6a2964f34487b84b5b8278308c0445 100644 --- a/tests/ghc-api/apirecomp001/apirecomp001.stderr +++ b/tests/ghc-api/apirecomp001/apirecomp001.stderr @@ -4,12 +4,12 @@ B.hs:4:1: Warning: answer_to_live_the_universe_and_everything :: Int B.hs:5:12: Warning: - Defaulting the following constraint(s) to type `Integer' + Defaulting the following constraint(s) to type ‛Integer’ (Enum a0) - arising from the arithmetic sequence `1 .. 23 * 2' at B.hs:5:12-20 - (Num a0) arising from the literal `1' at B.hs:5:13 - In the first argument of `length', namely `[1 .. 23 * 2]' - In the first argument of `(-)', namely `length [1 .. 23 * 2]' + arising from the arithmetic sequence ‛1 .. 23 * 2’ at B.hs:5:12-20 + (Num a0) arising from the literal ‛1’ at B.hs:5:13 + In the first argument of ‛length’, namely ‛[1 .. 23 * 2]’ + In the first argument of ‛(-)’, namely ‛length [1 .. 23 * 2]’ In the expression: length [1 .. 23 * 2] - 4 A.hs:7:1: Warning: @@ -20,12 +20,12 @@ B.hs:4:1: Warning: answer_to_live_the_universe_and_everything :: Int B.hs:5:12: Warning: - Defaulting the following constraint(s) to type `Integer' + Defaulting the following constraint(s) to type ‛Integer’ (Enum a0) - arising from the arithmetic sequence `1 .. 23 * 2' at B.hs:5:12-20 - (Num a0) arising from the literal `1' at B.hs:5:13 - In the first argument of `length', namely `[1 .. 23 * 2]' - In the first argument of `(-)', namely `length [1 .. 23 * 2]' + arising from the arithmetic sequence ‛1 .. 23 * 2’ at B.hs:5:12-20 + (Num a0) arising from the literal ‛1’ at B.hs:5:13 + In the first argument of ‛length’, namely ‛[1 .. 23 * 2]’ + In the first argument of ‛(-)’, namely ‛length [1 .. 23 * 2]’ In the expression: length [1 .. 23 * 2] - 4 A.hs:7:1: Warning: diff --git a/tests/ghc-api/dynCompileExpr/all.T b/tests/ghc-api/dynCompileExpr/all.T index 108b96407c280e9e62bb890dfbde8631aa45ead0..c6034eab6bad7feb6502be09e0a964716065375f 100644 --- a/tests/ghc-api/dynCompileExpr/all.T +++ b/tests/ghc-api/dynCompileExpr/all.T @@ -1,4 +1,5 @@ test('dynCompileExpr', [ extra_run_opts('"' + config.libdir + '"'), + when(opsys('mingw32'), expect_broken_for(5987, ['dyn'])), omit_ways(prof_ways) ], # cannot run interpreted code with -prof compile_and_run, ['-package ghc']) diff --git a/tests/ghc-e/should_run/2636.stderr b/tests/ghc-e/should_run/2636.stderr deleted file mode 100644 index e69b54b36eb4319df0500f702efe70d60d8bd8e4..0000000000000000000000000000000000000000 --- a/tests/ghc-e/should_run/2636.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -2636.hs:1:8: - Could not find module `MissingModule' - Use -v to see a list of the files searched for. diff --git a/tests/ghc-e/should_run/Makefile b/tests/ghc-e/should_run/Makefile index 2a7fd0a7a8c66d15bfe6b1ad8278e8dd21850506..1971004d4c9a2d0a343eb57bf214aaa05177362e 100644 --- a/tests/ghc-e/should_run/Makefile +++ b/tests/ghc-e/should_run/Makefile @@ -18,12 +18,15 @@ ghc-e004: ghc-e005: '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -main-is foo ghc-e005.hs -e ":set prog ghc-e005-prog" -e ":main [\"the\",\"args\"]"; echo $$? -2228: - '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e ":main" 2228.hs +T2228: + '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e ":main" T2228.hs -2636: - '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e ":main" 2636.hs; if [ "$?" != 0 ]; then true; else false; fi +T2636: + '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e ":main" T2636.hs; if [ "$?" != 0 ]; then true; else false; fi -3890: - '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e ":main" 3890.hs | cat +T3890: + '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e ":main" T3890.hs | cat + +T7299: + '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e "Control.Concurrent.threadDelay (1000 * 1000)" diff --git a/tests/ghc-e/should_run/2228.hs b/tests/ghc-e/should_run/T2228.hs similarity index 100% rename from tests/ghc-e/should_run/2228.hs rename to tests/ghc-e/should_run/T2228.hs diff --git a/tests/ghc-e/should_run/2228.stdout b/tests/ghc-e/should_run/T2228.stdout similarity index 100% rename from tests/ghc-e/should_run/2228.stdout rename to tests/ghc-e/should_run/T2228.stdout diff --git a/tests/ghc-e/should_run/2636.hs b/tests/ghc-e/should_run/T2636.hs similarity index 100% rename from tests/ghc-e/should_run/2636.hs rename to tests/ghc-e/should_run/T2636.hs diff --git a/tests/ghc-e/should_run/T2636.stderr b/tests/ghc-e/should_run/T2636.stderr new file mode 100644 index 0000000000000000000000000000000000000000..dbe70becec9c5fc1774b0aa93c0b15cdcec4c8b7 --- /dev/null +++ b/tests/ghc-e/should_run/T2636.stderr @@ -0,0 +1,4 @@ + +T2636.hs:1:8: + Could not find module ‛MissingModule’ + Use -v to see a list of the files searched for. diff --git a/tests/ghc-e/should_run/3890.hs b/tests/ghc-e/should_run/T3890.hs similarity index 100% rename from tests/ghc-e/should_run/3890.hs rename to tests/ghc-e/should_run/T3890.hs diff --git a/tests/ghc-e/should_run/3890.stdout b/tests/ghc-e/should_run/T3890.stdout similarity index 100% rename from tests/ghc-e/should_run/3890.stdout rename to tests/ghc-e/should_run/T3890.stdout diff --git a/tests/ghc-e/should_run/all.T b/tests/ghc-e/should_run/all.T index 60bafdf73aa4d76078068dbe95e3d6dc4fe128d5..4ab756735810d0d423dbd33f5c7aa35f075e32b5 100644 --- a/tests/ghc-e/should_run/all.T +++ b/tests/ghc-e/should_run/all.T @@ -1,5 +1,5 @@ -setTestOpts(if_compiler_profiled(skip)) +setTestOpts(when(compiler_profiled(), skip)) test('ghc-e001', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e001']) test('ghc-e002', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e002']) @@ -7,9 +7,10 @@ test('ghc-e003', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e0 test('ghc-e004', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e004']) test('ghc-e005', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e005']) -test('2228', - [req_interp, if_ghci_dynamic(expect_broken(7298))], +test('T2228', + [req_interp, when(ghci_dynamic(), expect_broken(7298))], run_command, - ['$MAKE --no-print-directory -s 2228']) -test('2636', req_interp, run_command, ['$MAKE --no-print-directory -s 2636']) -test('3890', req_interp, run_command, ['$MAKE --no-print-directory -s 3890']) + ['$MAKE --no-print-directory -s T2228']) +test('T2636', req_interp, run_command, ['$MAKE --no-print-directory -s T2636']) +test('T3890', req_interp, run_command, ['$MAKE --no-print-directory -s T3890']) +test('T7299', req_interp, run_command, ['$MAKE --no-print-directory -s T7299']) diff --git a/tests/ghci.debugger/HappyTest.hs b/tests/ghci.debugger/HappyTest.hs index 9be54402a9ba4df9fc126fd2018f9e3831a78f0e..ad444f716120e8d066bae3c160f3ca54a32da977 100644 --- a/tests/ghci.debugger/HappyTest.hs +++ b/tests/ghci.debugger/HappyTest.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE CPP #-} +{-# LANGUAGE CPP, MagicHash #-} import Data.Char import Data.Array import GHC.Exts diff --git a/tests/ghci.debugger/scripts/2740.hs b/tests/ghci.debugger/scripts/T2740.hs similarity index 100% rename from tests/ghci.debugger/scripts/2740.hs rename to tests/ghci.debugger/scripts/T2740.hs diff --git a/tests/ghci.debugger/scripts/2740.script b/tests/ghci.debugger/scripts/T2740.script similarity index 88% rename from tests/ghci.debugger/scripts/2740.script rename to tests/ghci.debugger/scripts/T2740.script index ac45616180e1e0aff67ef8cbffdb7669a52edb38..a7bd83369021851a4e7c37c07e9a699a7d69ca08 100644 --- a/tests/ghci.debugger/scripts/2740.script +++ b/tests/ghci.debugger/scripts/T2740.script @@ -1,5 +1,5 @@ :seti -XMonomorphismRestriction -:l 2740.hs +:l T2740.hs :step f 1 2 3 :step :print x diff --git a/tests/ghci.debugger/scripts/2740.stdout b/tests/ghci.debugger/scripts/T2740.stdout similarity index 60% rename from tests/ghci.debugger/scripts/2740.stdout rename to tests/ghci.debugger/scripts/T2740.stdout index 68be6cb07164facb313fb87112923dd4f55f66f3..c6733bca9d71a1b547a467c1c83c45d52411c3f9 100644 --- a/tests/ghci.debugger/scripts/2740.stdout +++ b/tests/ghci.debugger/scripts/T2740.stdout @@ -1,6 +1,6 @@ -Stopped at 2740.hs:(3,1)-(4,25) +Stopped at T2740.hs:(3,1)-(4,25) _result :: a = _ -Stopped at 2740.hs:3:11-13 +Stopped at T2740.hs:3:11-13 _result :: Bool = _ x :: Integer = 1 y :: Integer = 2 diff --git a/tests/ghci.debugger/scripts/all.T b/tests/ghci.debugger/scripts/all.T index a78a6f21a7187107da2504d30da1bd61f3f11325..eaae14f68d2747ed12dd822210217c2dadfffc2d 100644 --- a/tests/ghci.debugger/scripts/all.T +++ b/tests/ghci.debugger/scripts/all.T @@ -1,6 +1,6 @@ -setTestOpts(composes([extra_run_opts('-ignore-dot-ghci'), - if_compiler_profiled(skip), - normalise_slashes])) +setTestOpts([extra_run_opts('-ignore-dot-ghci'), + when(compiler_profiled(), skip), + normalise_slashes]) test('print001', normal, ghci_script, ['print001.script']) test('print002', normal, ghci_script, ['print002.script']) @@ -20,7 +20,7 @@ test('print016', normal, ghci_script, ['print016.script']) test('print017', normal, ghci_script, ['print017.script']) test('print018', normal, ghci_script, ['print018.script']) test('print019', normal, ghci_script, ['print019.script']) -test('print020', expect_broken(2806), ghci_script, ['print020.script']) +test('print020', normal, ghci_script, ['print020.script']) test('print021', normal, ghci_script, ['print021.script']) test('print022', normal, ghci_script, ['print022.script']) test('print023', normal, ghci_script, ['print023.script']) @@ -36,7 +36,8 @@ test('print032', normal, ghci_script, ['print032.script']) test('print033', normal, ghci_script, ['print033.script']) test('print034', normal, ghci_script, ['print034.script']) test('print035', - if_ghci_dynamic(expect_broken(7326)), + [when(ghci_dynamic(), expect_broken(7326)), + extra_clean(['../Unboxed.hi', '../Unboxed.o'])], ghci_script, ['print035.script']) @@ -76,14 +77,14 @@ test('dynbrk007', normal, ghci_script, ['dynbrk007.script']) test('dynbrk008', normal, ghci_script, ['dynbrk008.script']) test('dynbrk009', normal, ghci_script, ['dynbrk009.script']) -test('result001', expect_broken(1531), ghci_script, ['result001.script']) +test('result001', normal, ghci_script, ['result001.script']) test('listCommand001', combined_output, ghci_script, ['listCommand001.script']) test('listCommand002', normal, ghci_script, ['listCommand002.script']) test('hist001', normal, ghci_script, ['hist001.script']) -test('2740', normal, ghci_script, ['2740.script']) +test('T2740', normal, ghci_script, ['T2740.script']) test('getargs', normal, ghci_script, ['getargs.script']) test('T7386', normal, ghci_script, ['T7386.script']) diff --git a/tests/ghci.debugger/scripts/break003.stderr b/tests/ghci.debugger/scripts/break003.stderr index 03dc88bfd816662c15fbd9dec68d1ebbfca4ff15..c1dda071d557c68b4e245b8208f2f18be8319701 100644 --- a/tests/ghci.debugger/scripts/break003.stderr +++ b/tests/ghci.debugger/scripts/break003.stderr @@ -1,4 +1,4 @@ <interactive>:5:1: - No instance for (Show (t -> a)) arising from a use of `print' + No instance for (Show (t -> t1)) arising from a use of ‛print’ In a stmt of an interactive GHCi command: print it diff --git a/tests/ghci.debugger/scripts/break003.stdout b/tests/ghci.debugger/scripts/break003.stdout index ed418836c845aa52d1b573e3f18bb11f7e833305..a48f74c4c325afd55437bcbc062bfc7fef3b6782 100644 --- a/tests/ghci.debugger/scripts/break003.stdout +++ b/tests/ghci.debugger/scripts/break003.stdout @@ -1,6 +1,6 @@ Breakpoint 0 activated at ../Test3.hs:2:18-31 Stopped at ../Test3.hs:2:18-31 -_result :: [a] = _ -f :: t -> a = _ +_result :: [t1] = _ +f :: t -> t1 = _ x :: t = _ xs :: [t] = [_] diff --git a/tests/ghci.debugger/scripts/break005.stdout b/tests/ghci.debugger/scripts/break005.stdout index 82fc681105f661ff2ecce54cf769ca3776500c47..65eeb56cf1c8d511baf4ca5048f1a6b3337bafe4 100644 --- a/tests/ghci.debugger/scripts/break005.stdout +++ b/tests/ghci.debugger/scripts/break005.stdout @@ -1,5 +1,5 @@ Stopped at ../QSort.hs:(4,1)-(6,55) -_result :: [a] = _ +_result :: [t] = _ Stopped at ../QSort.hs:5:16-51 _result :: [Integer] = _ a :: Integer = 1 diff --git a/tests/ghci.debugger/scripts/break006.stderr b/tests/ghci.debugger/scripts/break006.stderr index 45f6f83437119af1cbcfc1162cbd5ca927cd74b9..7e22617185fbbbc25e100d0e5d54aef4f2a0ece8 100644 --- a/tests/ghci.debugger/scripts/break006.stderr +++ b/tests/ghci.debugger/scripts/break006.stderr @@ -1,26 +1,26 @@ <interactive>:6:1: - No instance for (Show a) arising from a use of `print' - Cannot resolve unknown runtime type `a' + No instance for (Show t1) arising from a use of ‛print’ + Cannot resolve unknown runtime type ‛t1’ Use :print or :force to determine these types - Relevant bindings include it :: a (bound at <interactive>:6:1) + Relevant bindings include it :: t1 (bound at <interactive>:6:1) Note: there are several potential instances: - instance Show Double -- Defined in `GHC.Float' - instance Show Float -- Defined in `GHC.Float' + instance Show Double -- Defined in ‛GHC.Float’ + instance Show Float -- Defined in ‛GHC.Float’ instance (Integral a, Show a) => Show (GHC.Real.Ratio a) - -- Defined in `GHC.Real' + -- Defined in ‛GHC.Real’ ...plus 23 others In a stmt of an interactive GHCi command: print it <interactive>:8:1: - No instance for (Show a) arising from a use of `print' - Cannot resolve unknown runtime type `a' + No instance for (Show t1) arising from a use of ‛print’ + Cannot resolve unknown runtime type ‛t1’ Use :print or :force to determine these types - Relevant bindings include it :: a (bound at <interactive>:8:1) + Relevant bindings include it :: t1 (bound at <interactive>:8:1) Note: there are several potential instances: - instance Show Double -- Defined in `GHC.Float' - instance Show Float -- Defined in `GHC.Float' + instance Show Double -- Defined in ‛GHC.Float’ + instance Show Float -- Defined in ‛GHC.Float’ instance (Integral a, Show a) => Show (GHC.Real.Ratio a) - -- Defined in `GHC.Real' + -- Defined in ‛GHC.Real’ ...plus 23 others In a stmt of an interactive GHCi command: print it diff --git a/tests/ghci.debugger/scripts/break006.stdout b/tests/ghci.debugger/scripts/break006.stdout index b78f4f365b363edbccb43bd1611b3d52894d1c93..7e5edbf9d2722029e12b5713cf63ba7c69ea98b6 100644 --- a/tests/ghci.debugger/scripts/break006.stdout +++ b/tests/ghci.debugger/scripts/break006.stdout @@ -1,15 +1,15 @@ Stopped at ../Test3.hs:(1,1)-(2,31) -_result :: [a] = _ +_result :: [t1] = _ Stopped at ../Test3.hs:2:18-31 -_result :: [a] = _ -f :: Integer -> a = _ +_result :: [t1] = _ +f :: Integer -> t1 = _ x :: Integer = 1 xs :: [Integer] = [2,3] xs :: [Integer] = [2,3] x :: Integer = 1 -f :: Integer -> a = _ -_result :: [a] = _ -y = (_t1::a) +f :: Integer -> t1 = _ +_result :: [t1] = _ +y = (_t1::t1) y = 2 xs :: [Integer] = [2,3] x :: Integer = 1 diff --git a/tests/ghci.debugger/scripts/break019.stderr b/tests/ghci.debugger/scripts/break019.stderr index fe27afda19b406bd60e2a3eec9abc93f6a688ef1..41ec1e89e383b771451ec8b1eea311adf0989748 100644 --- a/tests/ghci.debugger/scripts/break019.stderr +++ b/tests/ghci.debugger/scripts/break019.stderr @@ -1,2 +1,2 @@ - -Top level: Not in scope: data constructor `Test2' + +Top level: Not in scope: data constructor ‛Test2’ diff --git a/tests/ghci.debugger/scripts/break022/all.T b/tests/ghci.debugger/scripts/break022/all.T index d8cf081ed20ced2755da65107a5429a8bcb0fb13..497ad7e417ba1e46b03b45dcdcd9c452baae605c 100644 --- a/tests/ghci.debugger/scripts/break022/all.T +++ b/tests/ghci.debugger/scripts/break022/all.T @@ -1,4 +1,4 @@ setTestOpts(extra_run_opts('-ignore-dot-ghci')) -setTestOpts(if_compiler_profiled(skip)) +setTestOpts(when(compiler_profiled(), skip)) test('break022', extra_clean(['A.hs']), ghci_script, ['break022.script']) diff --git a/tests/ghci.debugger/scripts/break023/all.T b/tests/ghci.debugger/scripts/break023/all.T index 0c33302e438740304cf7d01417561fd8b405e1c3..22b608e31706906ab326f957b0d80c39cc51498e 100644 --- a/tests/ghci.debugger/scripts/break023/all.T +++ b/tests/ghci.debugger/scripts/break023/all.T @@ -1,4 +1,4 @@ setTestOpts(extra_run_opts('-ignore-dot-ghci')) -setTestOpts(if_compiler_profiled(skip)) +setTestOpts(when(compiler_profiled(), skip)) test('break023', extra_clean(['A.hs']), ghci_script, ['break023.script']) diff --git a/tests/ghci.debugger/scripts/break027.stdout b/tests/ghci.debugger/scripts/break027.stdout index fdacda8d856ab5e8d120b66a10a59936577bee6d..bac674b9465e387c838117715f50f9af5c0c13d1 100644 --- a/tests/ghci.debugger/scripts/break027.stdout +++ b/tests/ghci.debugger/scripts/break027.stdout @@ -1,6 +1,6 @@ Breakpoint 0 activated at ../QSort.hs:(4,1)-(6,55) Stopped at ../QSort.hs:(4,1)-(6,55) -_result :: [a] = _ +_result :: [t] = _ Stopped at ../QSort.hs:5:16-51 _result :: [Integer] = _ a :: Integer = 3 diff --git a/tests/ghci.debugger/scripts/dynbrk001.stderr b/tests/ghci.debugger/scripts/dynbrk001.stderr index adb8dca6584bba24067200716b59eb8f4d336921..ebc73e5d821ed40406ccdd42c77a4970ed83f473 100644 --- a/tests/ghci.debugger/scripts/dynbrk001.stderr +++ b/tests/ghci.debugger/scripts/dynbrk001.stderr @@ -1,4 +1,4 @@ <no location info>: - Could not find module `NonModule' + Could not find module ‛NonModule’ It is not a module in the current program, or in any known package. diff --git a/tests/ghci.debugger/scripts/dynbrk001.stdout b/tests/ghci.debugger/scripts/dynbrk001.stdout index 3d8780cee7115a0b8a022ab12d107b44306ee708..358f44990cf9ca279051e22f51c86f0f47ae322e 100644 --- a/tests/ghci.debugger/scripts/dynbrk001.stdout +++ b/tests/ghci.debugger/scripts/dynbrk001.stdout @@ -2,4 +2,4 @@ Breakpoint 1 does not exist No breakpoints found at that location. No active breakpoints. [4,8,15,16,23,42] -map :: forall a b. (a -> b) -> [a] -> [b] -- Defined in `GHC.Base' +map :: forall a b. (a -> b) -> [a] -> [b] -- Defined in ‛GHC.Base’ diff --git a/tests/ghci.debugger/scripts/hist001.stdout b/tests/ghci.debugger/scripts/hist001.stdout index 74cb483995f9413df85302798ed96c0d2cb89795..0b58b8fcb7af51bcac07c26a373d9baf266470e3 100644 --- a/tests/ghci.debugger/scripts/hist001.stdout +++ b/tests/ghci.debugger/scripts/hist001.stdout @@ -12,20 +12,20 @@ _result :: [a] = _ -9 : mymap (../Test3.hs:(1,1)-(2,31)) <end of history> Logged breakpoint at ../Test3.hs:(1,1)-(2,31) -_result :: [a] -_result :: [a] = _ +_result :: [t1] +_result :: [t1] = _ Logged breakpoint at ../Test3.hs:2:22-31 -_result :: [a] -f :: t -> a +_result :: [t1] +f :: t -> t1 xs :: [t] xs :: [t] = [] -f :: t -> a = _ -_result :: [a] = _ +f :: t -> t1 = _ +_result :: [t1] = _ *** Ignoring breakpoint _result = [] Logged breakpoint at ../Test3.hs:2:18-20 -_result :: a -f :: Integer -> a +_result :: t1 +f :: Integer -> t1 x :: Integer Logged breakpoint at ../Test3.hs:2:22-31 -_result :: [a] +_result :: [t1] diff --git a/tests/ghci.debugger/scripts/print019.stderr b/tests/ghci.debugger/scripts/print019.stderr index e5bcb7f1c4ad1ca1e3f1c1359696363865b69d0e..3473c99dd940ffc87b8d93cd8c598cf7592f23f8 100644 --- a/tests/ghci.debugger/scripts/print019.stderr +++ b/tests/ghci.debugger/scripts/print019.stderr @@ -1,7 +1,7 @@ <interactive>:11:1: - No instance for (Show a1) arising from a use of `print' - Cannot resolve unknown runtime type `a1' + No instance for (Show a1) arising from a use of ‛print’ + Cannot resolve unknown runtime type ‛a1’ Use :print or :force to determine these types Relevant bindings include it :: a1 (bound at <interactive>:11:1) Note: there are several potential instances: diff --git a/tests/ghci.debugger/scripts/print020.stderr b/tests/ghci.debugger/scripts/print020.stderr new file mode 100644 index 0000000000000000000000000000000000000000..6642bb7baa2783cdf49077f63c2e7e517feca52b --- /dev/null +++ b/tests/ghci.debugger/scripts/print020.stderr @@ -0,0 +1,31 @@ + +GenericTemplate.hs:219:14: Warning: + Pattern bindings containing unlifted types should use an outermost bang pattern: + sts1@((HappyCons (st1@(action)) (_))) + = happyDrop k (HappyCons (st) (sts)) + In an equation for ‛happyMonadReduce’: + happyMonadReduce k nt fn j tk st sts stk + = happyThen1 + (fn stk tk) + (\ r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk)) + where + sts1@((HappyCons (st1@(action)) (_))) + = happyDrop k (HappyCons (st) (sts)) + drop_stk = happyDropStk k stk + +GenericTemplate.hs:226:14: Warning: + Pattern bindings containing unlifted types should use an outermost bang pattern: + sts1@((HappyCons (st1@(action)) (_))) + = happyDrop k (HappyCons (st) (sts)) + In an equation for ‛happyMonad2Reduce’: + happyMonad2Reduce k nt fn j tk st sts stk + = happyThen1 + (fn stk tk) + (\ r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk)) + where + sts1@((HappyCons (st1@(action)) (_))) + = happyDrop k (HappyCons (st) (sts)) + drop_stk = happyDropStk k stk + off = indexShortOffAddr happyGotoOffsets st1 + off_i = (off +# nt) + .... diff --git a/tests/ghci.debugger/scripts/print020.stdout b/tests/ghci.debugger/scripts/print020.stdout index ee10c3a575ce2e4545c4eee02aca2792327af250..452fd064aebc5c864424ddc3866a86db93692c78 100644 --- a/tests/ghci.debugger/scripts/print020.stdout +++ b/tests/ghci.debugger/scripts/print020.stdout @@ -1,5 +1,5 @@ -Breakpoint 0 activated at ../HappyTest.hs:(229,0)-(240,34) -Stopped at ../HappyTest.hs:(229,0)-(240,34) +Breakpoint 0 activated at ../HappyTest.hs:(216,1)-(227,35) +Stopped at ../HappyTest.hs:(216,1)-(227,35) _result :: [Token] = _ *** Ignoring breakpoint *** Ignoring breakpoint diff --git a/tests/ghci.debugger/scripts/result001.stdout b/tests/ghci.debugger/scripts/result001.stdout new file mode 100644 index 0000000000000000000000000000000000000000..0d2173dcd8432236a086bdeff72057416779a95e --- /dev/null +++ b/tests/ghci.debugger/scripts/result001.stdout @@ -0,0 +1,4 @@ +Breakpoint 0 activated at result001.hs:1:13-21 +Stopped at result001.hs:1:13-21 +_result :: [b] = _ +xs :: [b] = _ diff --git a/tests/ghci/linking/all.T b/tests/ghci/linking/all.T index 39be389b5caf7a02b0429d6c3df9886cf00e489c..2360030bae28c1c87ef07974459ce91c6df5fe32 100644 --- a/tests/ghci/linking/all.T +++ b/tests/ghci/linking/all.T @@ -1,38 +1,42 @@ test('ghcilink001', - [if_ghci_dynamic(expect_fail), # dynamic ghci can't load '.a's + [when(ghci_dynamic(), expect_fail), # dynamic ghci can't load '.a's + unless(doing_ghci, skip), extra_clean(['dir001/*','dir001'])], run_command, ['$MAKE -s --no-print-directory ghcilink001']) test('ghcilink002', - extra_clean(['dir002/*','dir002']), + [unless(doing_ghci, skip), extra_clean(['dir002/*','dir002'])], run_command, ['$MAKE -s --no-print-directory ghcilink002']) test('ghcilink003', [ - if_os('mingw32', expect_broken(5289)), # still cannot load libstdc++ - # on Windows. See also #4468. + # still cannot load libstdc++ on Windows. See also #4468. + when(opsys('mingw32'), expect_broken(5289)), + unless(doing_ghci, skip), extra_clean(['dir003/*','dir003']) ], run_command, ['$MAKE -s --no-print-directory ghcilink003']) test('ghcilink004', - [if_ghci_dynamic(expect_fail), # dynamic ghci can't load '.a's + [when(ghci_dynamic(), expect_fail), # dynamic ghci can't load '.a's + unless(doing_ghci, skip), extra_clean(['dir004/*','dir004'])], run_command, ['$MAKE -s --no-print-directory ghcilink004']) test('ghcilink005', - extra_clean(['dir005/*','dir005']), + [unless(doing_ghci, skip), extra_clean(['dir005/*','dir005'])], run_command, ['$MAKE -s --no-print-directory ghcilink005']) test('ghcilink006', [ - if_os('mingw32', expect_broken(5289)), # still cannot load libstdc++ - # on Windows. See also #4468. + # still cannot load libstdc++ on Windows. See also #4468. + when(opsys('mingw32'), expect_broken(5289)), + unless(doing_ghci, skip), extra_clean(['dir006/*','dir006']) ], run_command, diff --git a/tests/ghci/prog004/prog004.T b/tests/ghci/prog004/prog004.T index a67ebf35c816452623249f45b4c999b94defe619..ed17afd088d0525cf310d70761104c3260b30507 100644 --- a/tests/ghci/prog004/prog004.T +++ b/tests/ghci/prog004/prog004.T @@ -1,6 +1,6 @@ setTestOpts(only_compiler_types(['ghc'])) -def f(opts): +def f(name, opts): if not ('ghci' in config.run_ways): opts.skip = 1 setTestOpts(f) diff --git a/tests/ghci/prog006/prog006.stderr b/tests/ghci/prog006/prog006.stderr index 472272a01e154eb62198176b9bd1eb12f4e5088b..53c82d5466e236472231749dffaf76a15a671ef9 100644 --- a/tests/ghci/prog006/prog006.stderr +++ b/tests/ghci/prog006/prog006.stderr @@ -1,4 +1,4 @@ Boot.hs:5:13: - Not a data constructor: `forall' + Not a data constructor: ‛forall’ Perhaps you intended to use -XExistentialQuantification diff --git a/tests/ghci/prog009/ghci.prog009.stderr b/tests/ghci/prog009/ghci.prog009.stderr index e63a322c2deb825ba64aa4c8d33d7fa964597c37..bf608499bbf29d0f8a15148f26f96ad39e8530b0 100644 --- a/tests/ghci/prog009/ghci.prog009.stderr +++ b/tests/ghci/prog009/ghci.prog009.stderr @@ -2,7 +2,7 @@ A.hs:1:16: parse error on input `where' <interactive>:26:1: - Not in scope: `yan' - Perhaps you meant `tan' (imported from Prelude) + Not in scope: ‛yan’ + Perhaps you meant ‛tan’ (imported from Prelude) A.hs:1:16: parse error on input `where' diff --git a/tests/ghci/prog012/prog012.stderr b/tests/ghci/prog012/prog012.stderr index 71f2bbeb01dfd7a77c88123d1af6f8d95296ff0c..db122d9c64dc1b2093d68feef4ac67c1a4540856 100644 --- a/tests/ghci/prog012/prog012.stderr +++ b/tests/ghci/prog012/prog012.stderr @@ -1,2 +1,2 @@ -Bar.hs:3:7: Not in scope: `nonexistent' +Bar.hs:3:7: Not in scope: ‛nonexistent’ diff --git a/tests/ghci/scripts/2452.stderr b/tests/ghci/scripts/2452.stderr deleted file mode 100644 index 2802ee2bdf74ffa054ba2c4d55d97eeb3aed250c..0000000000000000000000000000000000000000 --- a/tests/ghci/scripts/2452.stderr +++ /dev/null @@ -1,2 +0,0 @@ - -<interactive>:1:1: Not in scope: `System.IO.hPutStrLn' diff --git a/tests/ghci/scripts/2816.stderr b/tests/ghci/scripts/2816.stderr deleted file mode 100644 index 3a9e972205e1e0b9507fe1696a65b8b1725f6fc2..0000000000000000000000000000000000000000 --- a/tests/ghci/scripts/2816.stderr +++ /dev/null @@ -1,2 +0,0 @@ - -<interactive>:2:1: Not in scope: `α' diff --git a/tests/ghci/scripts/Defer02.stderr b/tests/ghci/scripts/Defer02.stderr index b0937a7bd3d6ca2ab357151c74e0c8f2c7641dfe..26cac57740f8b36b12f0b89fbd50f81483078247 100644 --- a/tests/ghci/scripts/Defer02.stderr +++ b/tests/ghci/scripts/Defer02.stderr @@ -1,185 +1,185 @@ - -..\..\typecheck\should_run\Defer01.hs:11:40: Warning: - Couldn't match type `Char' with `[Char]' - Expected type: String - Actual type: Char - In the first argument of `putStr', namely ',' - In the second argument of `(>>)', namely putStr ',' - In the expression: putStr "Hello World" >> putStr ',' - -..\..\typecheck\should_run\Defer01.hs:14:5: Warning: - Couldn't match expected type `Int' with actual type `Char' - In the expression: 'p' - In an equation for `a': a = 'p' - -..\..\typecheck\should_run\Defer01.hs:18:9: Warning: - No instance for (Eq B) arising from a use of `==' - In the expression: x == x - In an equation for `b': b x = x == x - -..\..\typecheck\should_run\Defer01.hs:25:4: Warning: - Couldn't match type `Int' with `Bool' - Inaccessible code in - a pattern with constructor - C2 :: Bool -> C Bool, - in an equation for `c' - In the pattern: C2 x - In an equation for `c': c (C2 x) = True - -..\..\typecheck\should_run\Defer01.hs:28:5: Warning: - No instance for (Num (a -> a)) arising from the literal `1' - In the expression: 1 - In an equation for `d': d = 1 - -..\..\typecheck\should_run\Defer01.hs:31:5: Warning: - Couldn't match expected type `Char -> t' with actual type `Char' - Relevant bindings include - f :: t (bound at ..\..\typecheck\should_run\Defer01.hs:31:1) - The function `e' is applied to one argument, - but its type `Char' has none - In the expression: e 'q' - In an equation for `f': f = e 'q' - -..\..\typecheck\should_run\Defer01.hs:34:8: Warning: - Couldn't match expected type `Char' with actual type `a' - `a' is a rigid type variable bound by - the type signature for h :: a -> (Char, Char) - at ..\..\typecheck\should_run\Defer01.hs:33:6 - Relevant bindings include - h :: a -> (Char, Char) - (bound at ..\..\typecheck\should_run\Defer01.hs:34:1) - x :: a (bound at ..\..\typecheck\should_run\Defer01.hs:34:3) - In the expression: x - In the expression: (x, 'c') - In an equation for `h': h x = (x, 'c') - -..\..\typecheck\should_run\Defer01.hs:39:17: Warning: - Couldn't match expected type `Bool' with actual type `T a' - Relevant bindings include - i :: a -> () (bound at ..\..\typecheck\should_run\Defer01.hs:39:1) - a :: a (bound at ..\..\typecheck\should_run\Defer01.hs:39:3) - In the return type of a call of `K' - In the first argument of `not', namely `(K a)' - In the expression: (not (K a)) - -..\..\typecheck\should_run\Defer01.hs:43:5: Warning: - No instance for (MyClass a1) arising from a use of `myOp' - In the expression: myOp 23 - In an equation for `j': j = myOp 23 - -..\..\typecheck\should_run\Defer01.hs:43:10: Warning: - No instance for (Num a1) arising from the literal `23' - The type variable `a1' is ambiguous - Note: there are several potential instances: - instance Num Double -- Defined in `GHC.Float' - instance Num Float -- Defined in `GHC.Float' - instance Integral a => Num (GHC.Real.Ratio a) - -- Defined in `GHC.Real' - ...plus three others - In the first argument of `myOp', namely `23' - In the expression: myOp 23 - In an equation for `j': j = myOp 23 - -..\..\typecheck\should_run\Defer01.hs:45:6: Warning: - Couldn't match type `Int' with `Bool' - Inaccessible code in - the type signature for k :: Int ~ Bool => Int -> Bool - In the ambiguity check for: Int ~ Bool => Int -> Bool - In the type signature for `k': k :: Int ~ Bool => Int -> Bool - -..\..\typecheck\should_run\Defer01.hs:45:6: Warning: - Couldn't match type `Int' with `Bool' - Inaccessible code in - the type signature for k :: Int ~ Bool => Int -> Bool - -..\..\typecheck\should_run\Defer01.hs:46:7: Warning: - Couldn't match expected type `Bool' with actual type `Int' - In the expression: x - In an equation for `k': k x = x - -..\..\typecheck\should_run\Defer01.hs:49:5: Warning: - Couldn't match expected type `IO a0' - with actual type `Char -> IO ()' - In the first argument of `(>>)', namely `putChar' - In the expression: putChar >> putChar 'p' - In an equation for `l': l = putChar >> putChar 'p' -*** Exception: ..\..\typecheck\should_run\Defer01.hs:11:40: - Couldn't match type `Char' with `[Char]' - Expected type: String - Actual type: Char - In the first argument of `putStr', namely ',' - In the second argument of `(>>)', namely putStr ',' - In the expression: putStr "Hello World" >> putStr ',' -(deferred type error) -*** Exception: ..\..\typecheck\should_run\Defer01.hs:14:5: - Couldn't match expected type `Int' with actual type `Char' - In the expression: 'p' - In an equation for `a': a = 'p' -(deferred type error) -*** Exception: ..\..\typecheck\should_run\Defer01.hs:18:9: - No instance for (Eq B) arising from a use of `==' - In the expression: x == x - In an equation for `b': b x = x == x -(deferred type error) - -<interactive>:8:11: - Couldn't match type `Bool' with `Int' - Expected type: C Int - Actual type: C Bool - In the return type of a call of `C2' - In the first argument of `c', namely `(C2 True)' - In the first argument of `print', namely `(c (C2 True))' -*** Exception: ..\..\typecheck\should_run\Defer01.hs:28:5: - No instance for (Num (a -> a)) arising from the literal `1' - In the expression: 1 - In an equation for `d': d = 1 -(deferred type error) -*** Exception: ..\..\typecheck\should_run\Defer01.hs:31:5: - Couldn't match expected type `Char -> t' with actual type `Char' - Relevant bindings include - f :: t (bound at ..\..\typecheck\should_run\Defer01.hs:31:1) - The function `e' is applied to one argument, - but its type `Char' has none - In the expression: e 'q' - In an equation for `f': f = e 'q' -(deferred type error) -*** Exception: ..\..\typecheck\should_run\Defer01.hs:34:8: - Couldn't match expected type `Char' with actual type `a' - `a' is a rigid type variable bound by - the type signature for h :: a -> (Char, Char) - at ..\..\typecheck\should_run\Defer01.hs:33:6 - Relevant bindings include - h :: a -> (Char, Char) - (bound at ..\..\typecheck\should_run\Defer01.hs:34:1) - x :: a (bound at ..\..\typecheck\should_run\Defer01.hs:34:3) - In the expression: x - In the expression: (x, 'c') - In an equation for `h': h x = (x, 'c') -(deferred type error) -*** Exception: ..\..\typecheck\should_run\Defer01.hs:39:17: - Couldn't match expected type `Bool' with actual type `T a' - Relevant bindings include - i :: a -> () (bound at ..\..\typecheck\should_run\Defer01.hs:39:1) - a :: a (bound at ..\..\typecheck\should_run\Defer01.hs:39:3) - In the return type of a call of `K' - In the first argument of `not', namely `(K a)' - In the expression: (not (K a)) -(deferred type error) -*** Exception: ..\..\typecheck\should_run\Defer01.hs:43:5: - No instance for (MyClass a1) arising from a use of `myOp' - In the expression: myOp 23 - In an equation for `j': j = myOp 23 -(deferred type error) - -<interactive>:14:8: - Couldn't match expected type `Bool' with actual type `Int' - In the first argument of `print', namely `(k 2)' - In the expression: print (k 2) - In an equation for `it': it = print (k 2) -*** Exception: ..\..\typecheck\should_run\Defer01.hs:49:5: - Couldn't match expected type `IO a0' - with actual type `Char -> IO ()' - In the first argument of `(>>)', namely `putChar' - In the expression: putChar >> putChar 'p' - In an equation for `l': l = putChar >> putChar 'p' -(deferred type error) + +../../typecheck/should_run/Defer01.hs:11:40: Warning: + Couldn't match type ‛Char’ with ‛[Char]’ + Expected type: String + Actual type: Char + In the first argument of ‛putStr’, namely ‛','’ + In the second argument of ‛(>>)’, namely ‛putStr ','’ + In the expression: putStr "Hello World" >> putStr ',' + +../../typecheck/should_run/Defer01.hs:14:5: Warning: + Couldn't match expected type ‛Int’ with actual type ‛Char’ + In the expression: 'p' + In an equation for ‛a’: a = 'p' + +../../typecheck/should_run/Defer01.hs:18:9: Warning: + No instance for (Eq B) arising from a use of ‛==’ + In the expression: x == x + In an equation for ‛b’: b x = x == x + +../../typecheck/should_run/Defer01.hs:25:4: Warning: + Couldn't match type ‛Int’ with ‛Bool’ + Inaccessible code in + a pattern with constructor + C2 :: Bool -> C Bool, + in an equation for ‛c’ + In the pattern: C2 x + In an equation for ‛c’: c (C2 x) = True + +../../typecheck/should_run/Defer01.hs:28:5: Warning: + No instance for (Num (a -> a)) arising from the literal ‛1’ + In the expression: 1 + In an equation for ‛d’: d = 1 + +../../typecheck/should_run/Defer01.hs:31:5: Warning: + Couldn't match expected type ‛Char -> t’ with actual type ‛Char’ + Relevant bindings include + f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1) + The function ‛e’ is applied to one argument, + but its type ‛Char’ has none + In the expression: e 'q' + In an equation for ‛f’: f = e 'q' + +../../typecheck/should_run/Defer01.hs:34:8: Warning: + Couldn't match expected type ‛Char’ with actual type ‛a’ + ‛a’ is a rigid type variable bound by + the type signature for h :: a -> (Char, Char) + at ../../typecheck/should_run/Defer01.hs:33:6 + Relevant bindings include + h :: a -> (Char, Char) + (bound at ../../typecheck/should_run/Defer01.hs:34:1) + x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3) + In the expression: x + In the expression: (x, 'c') + In an equation for ‛h’: h x = (x, 'c') + +../../typecheck/should_run/Defer01.hs:39:17: Warning: + Couldn't match expected type ‛Bool’ with actual type ‛T a’ + Relevant bindings include + i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1) + a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3) + In the return type of a call of ‛K’ + In the first argument of ‛not’, namely ‛(K a)’ + In the expression: (not (K a)) + +../../typecheck/should_run/Defer01.hs:43:5: Warning: + No instance for (MyClass a1) arising from a use of ‛myOp’ + In the expression: myOp 23 + In an equation for ‛j’: j = myOp 23 + +../../typecheck/should_run/Defer01.hs:43:10: Warning: + No instance for (Num a1) arising from the literal ‛23’ + The type variable ‛a1’ is ambiguous + Note: there are several potential instances: + instance Num Double -- Defined in ‛GHC.Float’ + instance Num Float -- Defined in ‛GHC.Float’ + instance Integral a => Num (GHC.Real.Ratio a) + -- Defined in ‛GHC.Real’ + ...plus three others + In the first argument of ‛myOp’, namely ‛23’ + In the expression: myOp 23 + In an equation for ‛j’: j = myOp 23 + +../../typecheck/should_run/Defer01.hs:45:6: Warning: + Couldn't match type ‛Int’ with ‛Bool’ + Inaccessible code in + the type signature for k :: Int ~ Bool => Int -> Bool + In the ambiguity check for: Int ~ Bool => Int -> Bool + In the type signature for ‛k’: k :: Int ~ Bool => Int -> Bool + +../../typecheck/should_run/Defer01.hs:45:6: Warning: + Couldn't match type ‛Int’ with ‛Bool’ + Inaccessible code in + the type signature for k :: Int ~ Bool => Int -> Bool + +../../typecheck/should_run/Defer01.hs:46:7: Warning: + Couldn't match expected type ‛Bool’ with actual type ‛Int’ + In the expression: x + In an equation for ‛k’: k x = x + +../../typecheck/should_run/Defer01.hs:49:5: Warning: + Couldn't match expected type ‛IO a0’ + with actual type ‛Char -> IO ()’ + In the first argument of ‛(>>)’, namely ‛putChar’ + In the expression: putChar >> putChar 'p' + In an equation for ‛l’: l = putChar >> putChar 'p' +*** Exception: ../../typecheck/should_run/Defer01.hs:11:40: + Couldn't match type ‛Char’ with ‛[Char]’ + Expected type: String + Actual type: Char + In the first argument of ‛putStr’, namely ‛','’ + In the second argument of ‛(>>)’, namely ‛putStr ','’ + In the expression: putStr "Hello World" >> putStr ',' +(deferred type error) +*** Exception: ../../typecheck/should_run/Defer01.hs:14:5: + Couldn't match expected type ‛Int’ with actual type ‛Char’ + In the expression: 'p' + In an equation for ‛a’: a = 'p' +(deferred type error) +*** Exception: ../../typecheck/should_run/Defer01.hs:18:9: + No instance for (Eq B) arising from a use of ‛==’ + In the expression: x == x + In an equation for ‛b’: b x = x == x +(deferred type error) + +<interactive>:8:11: + Couldn't match type ‛Bool’ with ‛Int’ + Expected type: C Int + Actual type: C Bool + In the return type of a call of ‛C2’ + In the first argument of ‛c’, namely ‛(C2 True)’ + In the first argument of ‛print’, namely ‛(c (C2 True))’ +*** Exception: ../../typecheck/should_run/Defer01.hs:28:5: + No instance for (Num (a -> a)) arising from the literal ‛1’ + In the expression: 1 + In an equation for ‛d’: d = 1 +(deferred type error) +*** Exception: ../../typecheck/should_run/Defer01.hs:31:5: + Couldn't match expected type ‛Char -> t’ with actual type ‛Char’ + Relevant bindings include + f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1) + The function ‛e’ is applied to one argument, + but its type ‛Char’ has none + In the expression: e 'q' + In an equation for ‛f’: f = e 'q' +(deferred type error) +*** Exception: ../../typecheck/should_run/Defer01.hs:34:8: + Couldn't match expected type ‛Char’ with actual type ‛a’ + ‛a’ is a rigid type variable bound by + the type signature for h :: a -> (Char, Char) + at ../../typecheck/should_run/Defer01.hs:33:6 + Relevant bindings include + h :: a -> (Char, Char) + (bound at ../../typecheck/should_run/Defer01.hs:34:1) + x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3) + In the expression: x + In the expression: (x, 'c') + In an equation for ‛h’: h x = (x, 'c') +(deferred type error) +*** Exception: ../../typecheck/should_run/Defer01.hs:39:17: + Couldn't match expected type ‛Bool’ with actual type ‛T a’ + Relevant bindings include + i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1) + a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3) + In the return type of a call of ‛K’ + In the first argument of ‛not’, namely ‛(K a)’ + In the expression: (not (K a)) +(deferred type error) +*** Exception: ../../typecheck/should_run/Defer01.hs:43:5: + No instance for (MyClass a1) arising from a use of ‛myOp’ + In the expression: myOp 23 + In an equation for ‛j’: j = myOp 23 +(deferred type error) + +<interactive>:14:8: + Couldn't match expected type ‛Bool’ with actual type ‛Int’ + In the first argument of ‛print’, namely ‛(k 2)’ + In the expression: print (k 2) + In an equation for ‛it’: it = print (k 2) +*** Exception: ../../typecheck/should_run/Defer01.hs:49:5: + Couldn't match expected type ‛IO a0’ + with actual type ‛Char -> IO ()’ + In the first argument of ‛(>>)’, namely ‛putChar’ + In the expression: putChar >> putChar 'p' + In an equation for ‛l’: l = putChar >> putChar 'p' +(deferred type error) diff --git a/tests/ghci/scripts/Makefile b/tests/ghci/scripts/Makefile index 1fe702567f96749b054da11f24aa906cd9611def..73f62036d75ff1312e4a37378dc4b36fe22faaa7 100644 --- a/tests/ghci/scripts/Makefile +++ b/tests/ghci/scripts/Makefile @@ -34,3 +34,8 @@ ghci037: ghci056_setup: '$(TEST_HC)' $(TEST_HC_OPTS) -c ghci056_c.c + +.PHONY: T6106_prep +T6106_prep: + '$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make T6106_preproc + diff --git a/tests/ghci/scripts/1914.script b/tests/ghci/scripts/T1914.script similarity index 100% rename from tests/ghci/scripts/1914.script rename to tests/ghci/scripts/T1914.script diff --git a/tests/ghci/scripts/1914.stderr b/tests/ghci/scripts/T1914.stderr similarity index 100% rename from tests/ghci/scripts/1914.stderr rename to tests/ghci/scripts/T1914.stderr diff --git a/tests/ghci/scripts/1914.stdout b/tests/ghci/scripts/T1914.stdout similarity index 100% rename from tests/ghci/scripts/1914.stdout rename to tests/ghci/scripts/T1914.stdout diff --git a/tests/ghci/scripts/2452.script b/tests/ghci/scripts/T2452.script similarity index 100% rename from tests/ghci/scripts/2452.script rename to tests/ghci/scripts/T2452.script diff --git a/tests/ghci/scripts/T2452.stderr b/tests/ghci/scripts/T2452.stderr new file mode 100644 index 0000000000000000000000000000000000000000..a2fa4fc8a560784cdede2cd150f3dd1edce7e673 --- /dev/null +++ b/tests/ghci/scripts/T2452.stderr @@ -0,0 +1,2 @@ + +<interactive>:1:1: Not in scope: ‛System.IO.hPutStrLn’ diff --git a/tests/ghci/scripts/2816.script b/tests/ghci/scripts/T2816.script similarity index 100% rename from tests/ghci/scripts/2816.script rename to tests/ghci/scripts/T2816.script diff --git a/tests/ghci/scripts/T2816.stderr b/tests/ghci/scripts/T2816.stderr new file mode 100644 index 0000000000000000000000000000000000000000..ba4c1bd955cd9bee1d28544585901d02903cf771 --- /dev/null +++ b/tests/ghci/scripts/T2816.stderr @@ -0,0 +1,2 @@ + +<interactive>:2:1: Not in scope: ‛α’ diff --git a/tests/ghci/scripts/2816.stdout b/tests/ghci/scripts/T2816.stdout similarity index 100% rename from tests/ghci/scripts/2816.stdout rename to tests/ghci/scripts/T2816.stdout diff --git a/tests/ghci/scripts/2976.script b/tests/ghci/scripts/T2976.script similarity index 100% rename from tests/ghci/scripts/2976.script rename to tests/ghci/scripts/T2976.script diff --git a/tests/ghci/scripts/2976.stdout b/tests/ghci/scripts/T2976.stdout similarity index 100% rename from tests/ghci/scripts/2976.stdout rename to tests/ghci/scripts/T2976.stdout diff --git a/tests/ghci/scripts/4051.hs b/tests/ghci/scripts/T4051.hs similarity index 100% rename from tests/ghci/scripts/4051.hs rename to tests/ghci/scripts/T4051.hs diff --git a/tests/ghci/scripts/4051.script b/tests/ghci/scripts/T4051.script similarity index 55% rename from tests/ghci/scripts/4051.script rename to tests/ghci/scripts/T4051.script index 545ce8b4d87d0d11bf2e445b7ce34d4e6933d566..9c4dd1d1b929406af4bc8aee0b1f01dc513fe436 100644 --- a/tests/ghci/scripts/4051.script +++ b/tests/ghci/scripts/T4051.script @@ -1,4 +1,4 @@ -:l 4051.hs +:l T4051.hs :m -X' :m X' x diff --git a/tests/ghci/scripts/4051.stdout b/tests/ghci/scripts/T4051.stdout similarity index 100% rename from tests/ghci/scripts/4051.stdout rename to tests/ghci/scripts/T4051.stdout diff --git a/tests/ghci/scripts/T4127a.stderr b/tests/ghci/scripts/T4127a.stderr index 970b6db0a2eea9bf524c534531b8a8fdae0b947e..cc118a9e20e0233afdadddf7be1fcbe066951b1c 100644 --- a/tests/ghci/scripts/T4127a.stderr +++ b/tests/ghci/scripts/T4127a.stderr @@ -1,5 +1,5 @@ <interactive>:3:68: - Multiple declarations of `f' + Multiple declarations of ‛f’ Declared at: <interactive>:3:32 <interactive>:3:68 diff --git a/tests/ghci/scripts/T5545.stdout b/tests/ghci/scripts/T5545.stdout index 8c7c69ad5892e1189adff520d5ef32f3c543f46c..8ba680a5cb36e9bf68a8bd37f6a3ba4cafb86c0c 100644 --- a/tests/ghci/scripts/T5545.stdout +++ b/tests/ghci/scripts/T5545.stdout @@ -1,2 +1,2 @@ -($!) :: (a -> b) -> a -> b -- Defined in `Prelude' +($!) :: (a -> b) -> a -> b -- Defined in ‛Prelude’ infixr 0 $! diff --git a/tests/ghci/scripts/T5564.stderr b/tests/ghci/scripts/T5564.stderr index d76c4df78886139e1d8bfd31190d22cfd16f472b..6fb94e4f137cbd29d1f4ff430ba2bade91fd4b5f 100644 --- a/tests/ghci/scripts/T5564.stderr +++ b/tests/ghci/scripts/T5564.stderr @@ -1,9 +1,9 @@ <interactive>:3:1: - Not in scope: `git' - Perhaps you meant `it' (line 2) + Not in scope: ‛git’ + Perhaps you meant ‛it’ (line 2) <interactive>:5:1: - Not in scope: `fit' + Not in scope: ‛fit’ Perhaps you meant one of these: - `it' (line 4), `fst' (imported from Prelude) + ‛it’ (line 4), ‛fst’ (imported from Prelude) diff --git a/tests/ghci/scripts/T5836.stderr b/tests/ghci/scripts/T5836.stderr index 9b0cfc65ebfdc6d7c69223737071b2c0279c8bb3..5bd37b5c00e2db553bd419d16b6792f446ea91f8 100644 --- a/tests/ghci/scripts/T5836.stderr +++ b/tests/ghci/scripts/T5836.stderr @@ -1,4 +1,4 @@ <no location info>: - Could not find module `Does.Not.Exist' + Could not find module ‛Does.Not.Exist’ It is not a module in the current program, or in any known package. diff --git a/tests/ghci/scripts/T5979.stderr b/tests/ghci/scripts/T5979.stderr index 84f8c6ba0b9158746f79ffb408d51fb1b0605111..b4cd88492896f495bcbde482de8bf701609f6e7f 100644 --- a/tests/ghci/scripts/T5979.stderr +++ b/tests/ghci/scripts/T5979.stderr @@ -1,4 +1,4 @@ <no location info>: - Could not find module `Control.Monad.Trans.State' + Could not find module ‛Control.Monad.Trans.State’ It is not a module in the current program, or in any known package. diff --git a/tests/ghci/scripts/T6007.stderr b/tests/ghci/scripts/T6007.stderr index b461ef19bf31d7632c52b86e3474fca7be5f76ba..695d25b3adbd4db77f430f38346fd820510dbce7 100644 --- a/tests/ghci/scripts/T6007.stderr +++ b/tests/ghci/scripts/T6007.stderr @@ -1,6 +1,6 @@ <interactive>:1:19: - Module `System.IO' does not export `does_not_exist' + Module ‛System.IO’ does not export ‛does_not_exist’ <interactive>:1:20: - Module `Data.Maybe' does not export `does_not_exist' + Module ‛Data.Maybe’ does not export ‛does_not_exist’ diff --git a/tests/ghci/scripts/T6106.script b/tests/ghci/scripts/T6106.script index 1b071ec604464e3d49e6c49a96dd9c2a0a34defb..be6de463629999e169dc676bda2e7c834df3f9b2 100644 --- a/tests/ghci/scripts/T6106.script +++ b/tests/ghci/scripts/T6106.script @@ -3,7 +3,7 @@ :l :shell rm -f T6106.hs -:shell echo "{-# OPTIONS_GHC -F -pgmF ./T6106_preproc.sh #-}" >T6106.hs +:shell echo "{-# OPTIONS_GHC -F -pgmF ./T6106_preproc #-}" >T6106.hs :shell echo "module T6106 where" >>T6106.hs :load T6106.hs -- second one should fail: diff --git a/tests/ghci/scripts/T6106_preproc.hs b/tests/ghci/scripts/T6106_preproc.hs new file mode 100644 index 0000000000000000000000000000000000000000..fd2a55a646088b04edb3d8cdcd4d125a844cd4f5 --- /dev/null +++ b/tests/ghci/scripts/T6106_preproc.hs @@ -0,0 +1,17 @@ + +import Control.Concurrent +import Data.ByteString as BS +import System.Environment + +main :: IO () +main = do args <- getArgs + case args of + [x, y, z] -> f x y z + _ -> error ("Bad args: " ++ show args) + +f :: String -> String -> String -> IO () +f x y z = do bs <- BS.readFile y + BS.writeFile z bs + threadDelay 1000000 + Prelude.writeFile x "FAIL" + diff --git a/tests/ghci/scripts/T6106_preproc.sh b/tests/ghci/scripts/T6106_preproc.sh deleted file mode 100755 index 56ca6082f6eea0ae8f40099519260b52270918c6..0000000000000000000000000000000000000000 --- a/tests/ghci/scripts/T6106_preproc.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# -# file T6106_preproc.sh -# -cat $2 > $3 -sleep 1 -echo "FAIL" >$1 diff --git a/tests/ghci/scripts/T7587.script b/tests/ghci/scripts/T7587.script new file mode 100644 index 0000000000000000000000000000000000000000..76a7883f7acfc488441901c496e1b025d1612be9 --- /dev/null +++ b/tests/ghci/scripts/T7587.script @@ -0,0 +1,3 @@ +:set -XPolyKinds +data A x y +:k A diff --git a/tests/ghci/scripts/T7587.stdout b/tests/ghci/scripts/T7587.stdout new file mode 100644 index 0000000000000000000000000000000000000000..776eb6d223b7168c2dfbd608a4eb97771c74c935 --- /dev/null +++ b/tests/ghci/scripts/T7587.stdout @@ -0,0 +1 @@ +A :: k -> k1 -> * diff --git a/tests/ghci/scripts/T7627.script b/tests/ghci/scripts/T7627.script new file mode 100644 index 0000000000000000000000000000000000000000..13f52a538e72afffafc84e0f07e2666b24f16041 --- /dev/null +++ b/tests/ghci/scripts/T7627.script @@ -0,0 +1,16 @@ + +:set -XUnboxedTuples + +:i () +:i (##) +:t () +:t (##) +:t ( ) +:t (# #) +:i (,) +:i (#,#) +:t (,) +:t (#,#) +:t ( , ) +:t (# , #) + diff --git a/tests/ghci/scripts/T7627.stdout b/tests/ghci/scripts/T7627.stdout new file mode 100644 index 0000000000000000000000000000000000000000..a23781a9d4a0d44f4906f90bce37e4b694d5d829 --- /dev/null +++ b/tests/ghci/scripts/T7627.stdout @@ -0,0 +1,25 @@ +data () = () -- Defined in ‛GHC.Tuple’ +instance Bounded () -- Defined in ‛GHC.Enum’ +instance Enum () -- Defined in ‛GHC.Enum’ +instance Eq () -- Defined in ‛GHC.Classes’ +instance Ord () -- Defined in ‛GHC.Classes’ +instance Read () -- Defined in ‛GHC.Read’ +instance Show () -- Defined in ‛GHC.Show’ +data (##) = (##) -- Defined in ‛GHC.Prim’ +() :: () +(##) :: (# #) +( ) :: () +(# #) :: (# #) +data (,) a b = (,) a b -- Defined in ‛GHC.Tuple’ +instance (Bounded a, Bounded b) => Bounded (a, b) + -- Defined in ‛GHC.Enum’ +instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‛GHC.Classes’ +instance Functor ((,) a) -- Defined in ‛GHC.Base’ +instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‛GHC.Classes’ +instance (Read a, Read b) => Read (a, b) -- Defined in ‛GHC.Read’ +instance (Show a, Show b) => Show (a, b) -- Defined in ‛GHC.Show’ +data (#,#) a b = (#,#) a b -- Defined in ‛GHC.Prim’ +(,) :: a -> b -> (a, b) +(#,#) :: a -> b -> (# a, b #) +( , ) :: a -> b -> (a, b) +(# , #) :: a -> b -> (# a, b #) diff --git a/tests/ghci/scripts/T7627b.script b/tests/ghci/scripts/T7627b.script new file mode 100644 index 0000000000000000000000000000000000000000..9c0a404fc33ce9530d986c0d5d2b8555d910c199 --- /dev/null +++ b/tests/ghci/scripts/T7627b.script @@ -0,0 +1,8 @@ + +:set -XUnboxedTuples + +:i ( ) +:i (# #) +:i ( , ) +:i (# , #) + diff --git a/tests/ghci/scripts/T7627b.stderr b/tests/ghci/scripts/T7627b.stderr new file mode 100644 index 0000000000000000000000000000000000000000..87997e798842f769beef2ffeb175016320a3ccba --- /dev/null +++ b/tests/ghci/scripts/T7627b.stderr @@ -0,0 +1,12 @@ + +<interactive>:1:2: + parse error (possibly incorrect indentation or mismatched brackets) + +<interactive>:1:3: + parse error (possibly incorrect indentation or mismatched brackets) + +<interactive>:1:2: + parse error (possibly incorrect indentation or mismatched brackets) + +<interactive>:1:3: + parse error (possibly incorrect indentation or mismatched brackets) diff --git a/tests/ghci/scripts/T7688.hs b/tests/ghci/scripts/T7688.hs new file mode 100644 index 0000000000000000000000000000000000000000..7538f2e9abbd2d1c50bbbf0b64bc55bba1c9d2fb --- /dev/null +++ b/tests/ghci/scripts/T7688.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE PolyKinds #-} + +module Tim where + +data Proxy (t:: k) = Proxy diff --git a/tests/ghci/scripts/T7688.script b/tests/ghci/scripts/T7688.script new file mode 100644 index 0000000000000000000000000000000000000000..ee70372839f246753cfa6b28b9e77820d5220cbc --- /dev/null +++ b/tests/ghci/scripts/T7688.script @@ -0,0 +1,4 @@ +:l T7688 +:k Proxy +-- I'm expecting to see a kind-polymorphic answer, +-- even though -XPolyKinds is not set in GHCi diff --git a/tests/ghci/scripts/T7688.stdout b/tests/ghci/scripts/T7688.stdout new file mode 100644 index 0000000000000000000000000000000000000000..3e387ebd1776f34f5c2c0450408f5780d47c55aa --- /dev/null +++ b/tests/ghci/scripts/T7688.stdout @@ -0,0 +1 @@ +Proxy :: k -> * diff --git a/tests/ghci/scripts/all.T b/tests/ghci/scripts/all.T index 880efa312f08146c96134670973e875b5e28a5ee..7af3bf997a7dfc12b901836b1359e0b993360cf5 100755 --- a/tests/ghci/scripts/all.T +++ b/tests/ghci/scripts/all.T @@ -1,6 +1,6 @@ # coding=utf8 -setTestOpts(if_compiler_profiled(skip)) +setTestOpts(when(compiler_profiled(), skip)) test('ghci001', combined_output, ghci_script, ['ghci001.script']) test('ghci002', combined_output, ghci_script, ['ghci002.script']) @@ -12,7 +12,7 @@ test('ghci007', combined_output, ghci_script, ['ghci007.script']) test('ghci008', combined_output, ghci_script, ['ghci008.script']) test('ghci009', combined_output, ghci_script, ['ghci009.script']) -# Skip this test: deadlock can't be detected now, because we wait for +# Skip this test: deadlock cannot be detected now, because we wait for # signals to arrive if there are signal handlers installed, and GHCi # has a ^C handler installed. test('ghci010', skip, ghci_script, ['ghci010.script']) @@ -37,8 +37,7 @@ test('ghci022', normal, ghci_script, ['ghci022.script']) test('ghci023', normal, ghci_script, ['ghci023.script']) test('ghci024', - [skip_if_fast, - if_platform("powerpc-apple-darwin", expect_broken(1845))], + when(fast(), skip), run_command, ['$MAKE -s --no-print-directory ghci024']) test('ghci025', normal, ghci_script, ['ghci025.script']) @@ -76,7 +75,7 @@ test('ghci055', combined_output, ghci_script, ['ghci055.script']) test('ghci056', [ - cmd_prefix('$MAKE --no-print-directory ghci056_setup && '), + pre_cmd('$MAKE -s --no-print-directory ghci056_setup'), extra_run_opts('ghci056_c.o'), extra_clean('ghci056_c.o') ], @@ -84,19 +83,19 @@ test('ghci056', test('ghci057', normal, ghci_script, ['ghci057.script']) -test('2452', normal, ghci_script, ['2452.script']) +test('T2452', normal, ghci_script, ['T2452.script']) test('T2766', normal, ghci_script, ['T2766.script']) -test('1914', +test('T1914', extra_clean(['T1914A.hs', 'T1914B.hs']), ghci_script, - ['1914.script']) + ['T1914.script']) -test('2976', normal, ghci_script, ['2976.script']) -test('2816', normal, ghci_script, ['2816.script']) +test('T2976', normal, ghci_script, ['T2976.script']) +test('T2816', normal, ghci_script, ['T2816.script']) test('T789', normal, ghci_script, ['T789.script']) test('T3263', normal, ghci_script, ['T3263.script']) -test('4051', normal, ghci_script, ['4051.script']) +test('T4051', normal, ghci_script, ['T4051.script']) test('T4087', normal, ghci_script, ['T4087.script']) test('T4015', normal, ghci_script, ['T4015.script']) test('T4127', normal, ghci_script, ['T4127.script']) @@ -128,11 +127,21 @@ test('T6027ghci', normal, ghci_script, ['T6027ghci.script']) test('T6007', normal, ghci_script, ['T6007.script']) test('T6091', normal, ghci_script, ['T6091.script']) -test('T6106', extra_clean(['T6106.hs']), ghci_script, ['T6106.script']) +test('T6106', + [extra_clean(['T6106.hs', + 'T6106_preproc.hi', 'T6106_preproc.o', + 'T6106_preproc', 'T6106_preproc.exe']), + pre_cmd('$MAKE -s --no-print-directory T6106_prep')], + ghci_script, + ['T6106.script']) test('T6105', normal, ghci_script, ['T6105.script']) test('T7117', normal, ghci_script, ['T7117.script']) test('ghci058', extra_clean(['Ghci058.hs', 'Ghci058.hi', 'Ghci058.o']), ghci_script, ['ghci058.script']) +test('T7587', normal, ghci_script, ['T7587.script']) +test('T7688', normal, ghci_script, ['T7688.script']) +test('T7627', normal, ghci_script, ['T7627.script']) +test('T7627b', normal, ghci_script, ['T7627b.script']) diff --git a/tests/ghci/scripts/ghci008.stdout b/tests/ghci/scripts/ghci008.stdout index cac9db2c41ae767b26459432fb6a311a229cf320..9eaf1dc961889cadbf224762a404545817fb8d97 100644 --- a/tests/ghci/scripts/ghci008.stdout +++ b/tests/ghci/scripts/ghci008.stdout @@ -1,18 +1,18 @@ class Num a where (+) :: a -> a -> a ... - -- Defined in `GHC.Num' + -- Defined in ‛GHC.Num’ infixl 6 + class Num a where (+) :: a -> a -> a ... - -- Defined in `GHC.Num' + -- Defined in ‛GHC.Num’ infixl 6 + data Data.Complex.Complex a = !a Data.Complex.:+ !a - -- Defined in `Data.Complex' + -- Defined in ‛Data.Complex’ infix 6 Data.Complex.:+ data Data.Complex.Complex a = !a Data.Complex.:+ !a - -- Defined in `Data.Complex' + -- Defined in ‛Data.Complex’ infix 6 Data.Complex.:+ class (RealFrac a, Floating a) => RealFloat a where floatRadix :: a -> Integer @@ -29,8 +29,8 @@ class (RealFrac a, Floating a) => RealFloat a where isNegativeZero :: a -> Bool isIEEE :: a -> Bool atan2 :: a -> a -> a - -- Defined in `GHC.Float' -instance RealFloat Float -- Defined in `GHC.Float' -instance RealFloat Double -- Defined in `GHC.Float' + -- Defined in ‛GHC.Float’ +instance RealFloat Float -- Defined in ‛GHC.Float’ +instance RealFloat Double -- Defined in ‛GHC.Float’ Data.List.isPrefixOf :: Eq a => [a] -> [a] -> Bool - -- Defined in `Data.List' + -- Defined in ‛Data.List’ diff --git a/tests/ghci/scripts/ghci011.stdout b/tests/ghci/scripts/ghci011.stdout index caed5d0f0c61babea921f06b8778539d1f763413..540572ea810f1f936da3388edd5e6a588c192d0e 100644 --- a/tests/ghci/scripts/ghci011.stdout +++ b/tests/ghci/scripts/ghci011.stdout @@ -1,22 +1,22 @@ -data [] a = [] | a : [a] -- Defined in `GHC.Types' -instance Eq a => Eq [a] -- Defined in `GHC.Classes' -instance Monad [] -- Defined in `GHC.Base' -instance Functor [] -- Defined in `GHC.Base' -instance Ord a => Ord [a] -- Defined in `GHC.Classes' -instance Read a => Read [a] -- Defined in `GHC.Read' -instance Show a => Show [a] -- Defined in `GHC.Show' -data () = () -- Defined in `GHC.Tuple' -instance Bounded () -- Defined in `GHC.Enum' -instance Enum () -- Defined in `GHC.Enum' -instance Eq () -- Defined in `GHC.Classes' -instance Ord () -- Defined in `GHC.Classes' -instance Read () -- Defined in `GHC.Read' -instance Show () -- Defined in `GHC.Show' -data (,) a b = (,) a b -- Defined in `GHC.Tuple' +data [] a = [] | a : [a] -- Defined in ‛GHC.Types’ +instance Eq a => Eq [a] -- Defined in ‛GHC.Classes’ +instance Monad [] -- Defined in ‛GHC.Base’ +instance Functor [] -- Defined in ‛GHC.Base’ +instance Ord a => Ord [a] -- Defined in ‛GHC.Classes’ +instance Read a => Read [a] -- Defined in ‛GHC.Read’ +instance Show a => Show [a] -- Defined in ‛GHC.Show’ +data () = () -- Defined in ‛GHC.Tuple’ +instance Bounded () -- Defined in ‛GHC.Enum’ +instance Enum () -- Defined in ‛GHC.Enum’ +instance Eq () -- Defined in ‛GHC.Classes’ +instance Ord () -- Defined in ‛GHC.Classes’ +instance Read () -- Defined in ‛GHC.Read’ +instance Show () -- Defined in ‛GHC.Show’ +data (,) a b = (,) a b -- Defined in ‛GHC.Tuple’ instance (Bounded a, Bounded b) => Bounded (a, b) - -- Defined in `GHC.Enum' -instance (Eq a, Eq b) => Eq (a, b) -- Defined in `GHC.Classes' -instance Functor ((,) a) -- Defined in `GHC.Base' -instance (Ord a, Ord b) => Ord (a, b) -- Defined in `GHC.Classes' -instance (Read a, Read b) => Read (a, b) -- Defined in `GHC.Read' -instance (Show a, Show b) => Show (a, b) -- Defined in `GHC.Show' + -- Defined in ‛GHC.Enum’ +instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‛GHC.Classes’ +instance Functor ((,) a) -- Defined in ‛GHC.Base’ +instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‛GHC.Classes’ +instance (Read a, Read b) => Read (a, b) -- Defined in ‛GHC.Read’ +instance (Show a, Show b) => Show (a, b) -- Defined in ‛GHC.Show’ diff --git a/tests/ghci/scripts/ghci020.stdout b/tests/ghci/scripts/ghci020.stdout index 333e78570ab5753d63060413446d9f54921147a7..6d621d3c1d34fc4e787de6bb33e0b8406430a3ab 100644 --- a/tests/ghci/scripts/ghci020.stdout +++ b/tests/ghci/scripts/ghci020.stdout @@ -1,3 +1,3 @@ -data (->) a b -- Defined in `GHC.Prim' -instance Monad ((->) r) -- Defined in `GHC.Base' -instance Functor ((->) r) -- Defined in `GHC.Base' +data (->) a b -- Defined in ‛GHC.Prim’ +instance Monad ((->) r) -- Defined in ‛GHC.Base’ +instance Functor ((->) r) -- Defined in ‛GHC.Base’ diff --git a/tests/ghci/scripts/ghci021.stderr b/tests/ghci/scripts/ghci021.stderr index ae7c75b6bb22a9ab1fed2122855f5a4f42d3a703..18216b8f1871f9539ad3147f627d0810967d9fc6 100644 --- a/tests/ghci/scripts/ghci021.stderr +++ b/tests/ghci/scripts/ghci021.stderr @@ -1,2 +1,2 @@ -<no location info>: no such module: `ThisDoesNotExist' +<no location info>: no such module: ‛ThisDoesNotExist’ diff --git a/tests/ghci/scripts/ghci034.stderr b/tests/ghci/scripts/ghci034.stderr index 59501b2443c85371be3fed5b682b2185be3f7094..00bf3dfb67b893285c7605220b1b357abc120d38 100644 --- a/tests/ghci/scripts/ghci034.stderr +++ b/tests/ghci/scripts/ghci034.stderr @@ -1,2 +1,2 @@ -Top level: Not in scope: `thisIsNotDefined' +Top level: Not in scope: ‛thisIsNotDefined’ diff --git a/tests/ghci/scripts/ghci036.stderr b/tests/ghci/scripts/ghci036.stderr index f070bdd9d26a9af88afb4615c2bfb95c1a3cbcf6..5b53b08d293d6655e6826b277aef4da63e7adfe7 100644 --- a/tests/ghci/scripts/ghci036.stderr +++ b/tests/ghci/scripts/ghci036.stderr @@ -1,18 +1,18 @@ -<interactive>:1:1: Not in scope: `nubBy' +<interactive>:1:1: Not in scope: ‛nubBy’ -<interactive>:1:1: Not in scope: `nub' +<interactive>:1:1: Not in scope: ‛nub’ -<interactive>:1:1: Not in scope: `nubBy' +<interactive>:1:1: Not in scope: ‛nubBy’ -<interactive>:1:1: Not in scope: `nub' +<interactive>:1:1: Not in scope: ‛nub’ <interactive>:1:1: - Not in scope: `nub' - Perhaps you meant `L.nub' (imported from Data.List) + Not in scope: ‛nub’ + Perhaps you meant ‛L.nub’ (imported from Data.List) <interactive>:1:1: - Failed to load interface for `L' + Failed to load interface for ‛L’ Use -v to see a list of the files searched for. -<interactive>:1:1: Not in scope: `nub' +<interactive>:1:1: Not in scope: ‛nub’ diff --git a/tests/ghci/scripts/ghci038.stderr b/tests/ghci/scripts/ghci038.stderr index 5b3b85c25bd4c6724d8180a63f0746cd9cd08f33..bb2fb850c8ca073413d084ec4787970a11d0e9b2 100644 --- a/tests/ghci/scripts/ghci038.stderr +++ b/tests/ghci/scripts/ghci038.stderr @@ -1,4 +1,4 @@ -<interactive>:1:1: Not in scope: `map' +<interactive>:1:1: Not in scope: ‛map’ -<interactive>:1:1: Not in scope: `x' +<interactive>:1:1: Not in scope: ‛x’ diff --git a/tests/ghci/scripts/ghci044.stderr b/tests/ghci/scripts/ghci044.stderr index a5e6a543ee62973845112fda48d70dd44ae8462e..c0737d13b5ad043ba2f9a5e0194f8c62ebaecee2 100644 --- a/tests/ghci/scripts/ghci044.stderr +++ b/tests/ghci/scripts/ghci044.stderr @@ -1,11 +1,11 @@ <interactive>:5:10: - Illegal instance declaration for `C [Int]' + Illegal instance declaration for ‛C [Int]’ (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 -XFlexibleInstances if you want to disable this.) - In the instance declaration for `C [Int]' + In the instance declaration for ‛C [Int]’ <interactive>:7:10: Overlapping instance declarations: diff --git a/tests/ghci/scripts/ghci047.stderr b/tests/ghci/scripts/ghci047.stderr index 0051710378b14de7776cec924c1e5cc732827cc5..c888b0492cac14a9fe061f78c171c045d6bb9aec 100644 --- a/tests/ghci/scripts/ghci047.stderr +++ b/tests/ghci/scripts/ghci047.stderr @@ -1,16 +1,16 @@ <interactive>:38:1: - Couldn't match type `HFalse' with `HTrue' + Couldn't match type ‛HFalse’ with ‛HTrue’ Expected type: HTrue Actual type: Or HFalse HFalse In the expression: f In the expression: f $ Baz 'a' - In an equation for `it': it = f $ Baz 'a' + In an equation for ‛it’: it = f $ Baz 'a' <interactive>:39:1: - Couldn't match type `HFalse' with `HTrue' + Couldn't match type ‛HFalse’ with ‛HTrue’ Expected type: HTrue Actual type: Or HFalse HFalse In the expression: f In the expression: f $ Quz - In an equation for `it': it = f $ Quz + In an equation for ‛it’: it = f $ Quz diff --git a/tests/ghci/scripts/ghci048.stderr b/tests/ghci/scripts/ghci048.stderr index 408c1e9ee1c0b24f3b09ef7117fde93131e26da3..3809db88e2df23b19113d169b0549a47069b63cb 100644 --- a/tests/ghci/scripts/ghci048.stderr +++ b/tests/ghci/scripts/ghci048.stderr @@ -1,10 +1,10 @@ <interactive>:4:16: - Multiple declarations of `A' + Multiple declarations of ‛A’ Declared at: <interactive>:4:12 <interactive>:4:16 <interactive>:6:16: - Multiple declarations of `A' + Multiple declarations of ‛A’ Declared at: <interactive>:6:12 <interactive>:6:16 diff --git a/tests/ghci/scripts/ghci050.stderr b/tests/ghci/scripts/ghci050.stderr index b2e11a26ef68da7c022675a78c6f3e84b4668c08..77c552575acc4032e7b4a7a5798af4ca7fa414fa 100644 --- a/tests/ghci/scripts/ghci050.stderr +++ b/tests/ghci/scripts/ghci050.stderr @@ -1,8 +1,8 @@ <interactive>:6:49: - Couldn't match expected type `ListableElem (a, a)' - with actual type `a' - `a' is a rigid type variable bound by + Couldn't match expected type ‛ListableElem (a, a)’ + with actual type ‛a’ + ‛a’ is a rigid type variable bound by the instance declaration at <interactive>:6:10 Relevant bindings include asList :: (a, a) -> [ListableElem (a, a)] @@ -11,4 +11,4 @@ b :: a (bound at <interactive>:6:43) In the expression: a In the expression: [a, b] - In an equation for `asList': asList (a, b) = [a, b] + In an equation for ‛asList’: asList (a, b) = [a, b] diff --git a/tests/ghci/scripts/ghci051.stderr b/tests/ghci/scripts/ghci051.stderr index 130d0012a23cd4bed8f25286bcfa6c688fad5cf5..aec3647664ee35275636063738af5296e27f8dda 100644 --- a/tests/ghci/scripts/ghci051.stderr +++ b/tests/ghci/scripts/ghci051.stderr @@ -1,7 +1,7 @@ <interactive>:7:9: - Couldn't match type `T' with `main::Interactive.T' + Couldn't match type ‛T’ with ‛main::Interactive.T’ Expected type: T' Actual type: T In the expression: C :: T' - In an equation for `c': c = C :: T' + In an equation for ‛c’: c = C :: T' diff --git a/tests/ghci/scripts/ghci052.stderr b/tests/ghci/scripts/ghci052.stderr index c685a2aaaf9f7297ff56e6472394335046f32cb7..2efada5344239c254b41950ca536622371ddd5ce 100644 --- a/tests/ghci/scripts/ghci052.stderr +++ b/tests/ghci/scripts/ghci052.stderr @@ -1,27 +1,27 @@ <interactive>:7:4: - Couldn't match expected type `main::Interactive.Planet' - with actual type `Planet' - In the first argument of `pn', namely `Mercury' + Couldn't match expected type ‛main::Interactive.Planet’ + with actual type ‛Planet’ + In the first argument of ‛pn’, namely ‛Mercury’ In the expression: pn Mercury - In an equation for `it': it = pn Mercury + In an equation for ‛it’: it = pn Mercury <interactive>:8:4: - Couldn't match expected type `main::Interactive.Planet' - with actual type `Planet' - In the first argument of `pn', namely `Venus' + Couldn't match expected type ‛main::Interactive.Planet’ + with actual type ‛Planet’ + In the first argument of ‛pn’, namely ‛Venus’ In the expression: pn Venus - In an equation for `it': it = pn Venus + In an equation for ‛it’: it = pn Venus <interactive>:9:4: - Couldn't match expected type `main::Interactive.Planet' - with actual type `Planet' - In the first argument of `pn', namely `Mars' + Couldn't match expected type ‛main::Interactive.Planet’ + with actual type ‛Planet’ + In the first argument of ‛pn’, namely ‛Mars’ In the expression: pn Mars - In an equation for `it': it = pn Mars + In an equation for ‛it’: it = pn Mars <interactive>:11:44: - Couldn't match expected type `Planet' - with actual type `main::Interactive.Planet' + Couldn't match expected type ‛Planet’ + with actual type ‛main::Interactive.Planet’ In the pattern: Earth - In an equation for `pn': pn Earth = "E" + In an equation for ‛pn’: pn Earth = "E" diff --git a/tests/ghci/scripts/ghci053.stderr b/tests/ghci/scripts/ghci053.stderr index e08ad91e21e9d2ebbf9739d7017833d703e0aabc..f97df8f63cdb3545991072ab53576db33456c8ef 100644 --- a/tests/ghci/scripts/ghci053.stderr +++ b/tests/ghci/scripts/ghci053.stderr @@ -1,14 +1,14 @@ <interactive>:8:12: - Couldn't match expected type `main::Interactive.Planet' - with actual type `Planet' - In the second argument of `(==)', namely `Mercury' + Couldn't match expected type ‛main::Interactive.Planet’ + with actual type ‛Planet’ + In the second argument of ‛(==)’, namely ‛Mercury’ In the expression: mercury == Mercury - In an equation for `it': it = mercury == Mercury + In an equation for ‛it’: it = mercury == Mercury <interactive>:10:10: - Couldn't match expected type `Planet' - with actual type `main::Interactive.Planet' - In the second argument of `(==)', namely `Earth' + Couldn't match expected type ‛Planet’ + with actual type ‛main::Interactive.Planet’ + In the second argument of ‛(==)’, namely ‛Earth’ In the expression: Venus == Earth - In an equation for `it': it = Venus == Earth + In an equation for ‛it’: it = Venus == Earth diff --git a/tests/ghci/scripts/ghci057.stderr b/tests/ghci/scripts/ghci057.stderr index 623bfb3c37cdead5fd504fbd466137f13571a511..22d0514578420f1f4017f6aeeedc319df744ecd0 100644 --- a/tests/ghci/scripts/ghci057.stderr +++ b/tests/ghci/scripts/ghci057.stderr @@ -1,17 +1,17 @@ - -<interactive>:5:1: - Illegal generalised algebraic data declaration for `T' - (Use -XGADTs to allow GADTs) - In the data declaration for `T' - -ghci057.hs:3:3: - Data constructor `C' has existential type variables, a context, or a specialised result type - (Use -XExistentialQuantification or -XGADTs to allow this) - In the definition of data constructor `C' - In the data declaration for `T' - -ghci057.hs:3:3: - Data constructor `C' has existential type variables, a context, or a specialised result type - (Use -XExistentialQuantification or -XGADTs to allow this) - In the definition of data constructor `C' - In the data declaration for `T' + +<interactive>:5:1: + Illegal generalised algebraic data declaration for ‛T’ + (Use -XGADTs to allow GADTs) + In the data declaration for ‛T’ + +ghci057.hs:3:3: + Data constructor ‛C’ has existential type variables, a context, or a specialised result type + (Use -XExistentialQuantification or -XGADTs to allow this) + In the definition of data constructor ‛C’ + In the data declaration for ‛T’ + +ghci057.hs:3:3: + Data constructor ‛C’ has existential type variables, a context, or a specialised result type + (Use -XExistentialQuantification or -XGADTs to allow this) + In the definition of data constructor ‛C’ + In the data declaration for ‛T’ diff --git a/tests/ghci/shell.hs b/tests/ghci/shell.hs index 75f78342a433842b065139eb7d0a26236f4af35e..4c08a8f34987e961373d140b1c073456b47df524 100644 --- a/tests/ghci/shell.hs +++ b/tests/ghci/shell.hs @@ -1,9 +1,9 @@ --- Used to present a consistent shell view for :! commands in GHCi --- scripts. We're assuming that sh is in the path and that it --- is a Bourne-compatible shell. - -import System.Cmd -import System.Exit - -shell :: String -> IO ExitCode -shell s = rawSystem "sh" ["-c", s] +-- Used to present a consistent shell view for :! commands in GHCi +-- scripts. We're assuming that sh is in the path and that it +-- is a Bourne-compatible shell. + +import System.Exit +import System.Process (rawSystem) + +shell :: String -> IO ExitCode +shell s = rawSystem "sh" ["-c", s] diff --git a/tests/ghci/should_run/Makefile b/tests/ghci/should_run/Makefile index c61de978914197489f6f4929b65e12c1a2cdad44..2558b54d0842d67584d099a0b16e1f38103fe89a 100644 --- a/tests/ghci/should_run/Makefile +++ b/tests/ghci/should_run/Makefile @@ -3,7 +3,7 @@ include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/test.mk # Test that threadDelay can be interrupted by ^C. -3171: +T3171: echo "do Control.Concurrent.threadDelay 3000000; putStrLn \"threadDelay was not interrupted\"" | \ "$(TEST_HC)" $(TEST_HC_OPTS) -ignore-dot-ghci -v0 --interactive & \ sleep 2; kill -INT $$!; wait diff --git a/tests/ghci/should_run/2589.hs b/tests/ghci/should_run/T2589.hs similarity index 100% rename from tests/ghci/should_run/2589.hs rename to tests/ghci/should_run/T2589.hs diff --git a/tests/ghci/should_run/2589.stdout b/tests/ghci/should_run/T2589.stdout similarity index 100% rename from tests/ghci/should_run/2589.stdout rename to tests/ghci/should_run/T2589.stdout diff --git a/tests/ghci/should_run/2881.hs b/tests/ghci/should_run/T2881.hs similarity index 100% rename from tests/ghci/should_run/2881.hs rename to tests/ghci/should_run/T2881.hs diff --git a/tests/ghci/should_run/2881.stdout b/tests/ghci/should_run/T2881.stdout similarity index 100% rename from tests/ghci/should_run/2881.stdout rename to tests/ghci/should_run/T2881.stdout diff --git a/tests/ghci/should_run/3171.stdout b/tests/ghci/should_run/T3171.stdout similarity index 100% rename from tests/ghci/should_run/3171.stdout rename to tests/ghci/should_run/T3171.stdout diff --git a/tests/ghci/should_run/all.T b/tests/ghci/should_run/all.T index 527461af2c805ff3b379c1d05a5608e1014659ac..f4d06a6f993579d21af89bd07801780c43cbafbc 100644 --- a/tests/ghci/should_run/all.T +++ b/tests/ghci/should_run/all.T @@ -1,21 +1,21 @@ -setTestOpts(if_compiler_profiled(skip)) +setTestOpts(when(compiler_profiled(), skip)) # We only want to run these tests with GHCi -def just_ghci( opts ): +def just_ghci( name, opts ): opts.only_ways = ['ghci'] test('ghcirun001', just_ghci, compile_and_run, ['']) test('ghcirun002', just_ghci, compile_and_run, ['']) test('ghcirun003', just_ghci, compile_and_run, ['']) -test('2589', just_ghci, compile_and_run, ['']) -test('2881', just_ghci, compile_and_run, ['']) +test('T2589', just_ghci, compile_and_run, ['']) +test('T2881', just_ghci, compile_and_run, ['']) -test('3171', - [if_os('mingw32',skip), +test('T3171', + [when(opsys('mingw32'),skip), req_interp, combined_output], run_command, - ['$MAKE -s --no-print-directory 3171']) + ['$MAKE -s --no-print-directory T3171']) test('ghcirun004', just_ghci, compile_and_run, ['']) diff --git a/tests/haddock/haddock_examples/haddock.Test.stderr b/tests/haddock/haddock_examples/haddock.Test.stderr index 74956de414d070cd37b411416da2761148b0ae97..37a2565a4e55f52ae616443148168ee70e3df212 100644 --- a/tests/haddock/haddock_examples/haddock.Test.stderr +++ b/tests/haddock/haddock_examples/haddock.Test.stderr @@ -157,10 +157,10 @@ m = undefined -Test.hs:32:9: Warning: `p' is exported by `p' and `R(..)' +Test.hs:32:9: Warning: ‛p’ is exported by ‛p’ and ‛R(..)’ -Test.hs:32:12: Warning: `q' is exported by `q' and `R(..)' +Test.hs:32:12: Warning: ‛q’ is exported by ‛q’ and ‛R(..)’ -Test.hs:32:15: Warning: `u' is exported by `u' and `R(..)' +Test.hs:32:15: Warning: ‛u’ is exported by ‛u’ and ‛R(..)’ -Test.hs:38:9: Warning: `a' is exported by `a' and `C(a, b)' +Test.hs:38:9: Warning: ‛a’ is exported by ‛a’ and ‛C(a, b)’ diff --git a/tests/haddock/should_compile_noflag_haddock/haddockSimplUtilsBug.hs b/tests/haddock/should_compile_noflag_haddock/haddockSimplUtilsBug.hs index a62020f508ac628be27313697953c67fcedff067..2f5e9ca68511d6a61fbbfdd2a5767ea83e9d971e 100644 --- a/tests/haddock/should_compile_noflag_haddock/haddockSimplUtilsBug.hs +++ b/tests/haddock/should_compile_noflag_haddock/haddockSimplUtilsBug.hs @@ -4,7 +4,7 @@ postInlineUnconditionally = case Just "Hey" of -- The point of examining occ_info here is that for *non-values* -- that occur outside a lambda, the call-site inliner won't have - -- a chance (becuase it doesn't know that the thing + -- a chance (because it doesn't know that the thing -- only occurs once). The pre-inliner won't have gotten -- it either, if the thing occurs in more than one branch -- So the main target is things like diff --git a/tests/hsc2hs/Makefile b/tests/hsc2hs/Makefile index 9fbd62c9897cd37d0b656215c09756cf34cf1e1b..ec16b1647454eb319f1808bb1f600f0cba77a51b 100644 --- a/tests/hsc2hs/Makefile +++ b/tests/hsc2hs/Makefile @@ -24,7 +24,7 @@ hsc2hs004: '$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make $@ ./$@ -.PHONY: 3837 -3837: +.PHONY: T3837 +T3837: LANG=C '$(HSC2HS)' $@.hsc '$(TEST_HC)' $(TEST_HC_OPTS) -c $@.hs diff --git a/tests/hsc2hs/3837.hsc b/tests/hsc2hs/T3837.hsc similarity index 100% rename from tests/hsc2hs/3837.hsc rename to tests/hsc2hs/T3837.hsc diff --git a/tests/hsc2hs/all.T b/tests/hsc2hs/all.T index b358dc409a18732f39b9316afc87f99ae036b47a..b0957911b62b23ffd1dcef7676d9d0a5895ad5da 100644 --- a/tests/hsc2hs/all.T +++ b/tests/hsc2hs/all.T @@ -20,8 +20,8 @@ test('hsc2hs004', ['$MAKE -s --no-print-directory hsc2hs004']) -test('3837', - [extra_clean(['3837.hs', '3837_hsc_make.c'])], +test('T3837', + [extra_clean(['T3837.hs', 'T3837_hsc_make.c'])], run_command, - ['$MAKE -s --no-print-directory 3837']) + ['$MAKE -s --no-print-directory T3837']) diff --git a/tests/indexed-types/should_compile/Class3.stderr b/tests/indexed-types/should_compile/Class3.stderr index 4c72a425f0a58ceb19f0a1677a02e94c8e784503..6c07460745559495df8022354c5c3a39b10ec07e 100644 --- a/tests/indexed-types/should_compile/Class3.stderr +++ b/tests/indexed-types/should_compile/Class3.stderr @@ -1,4 +1,4 @@ -Class3.hs:7:10: - Warning: No explicit method or default declaration for `foo' - In the instance declaration for `C ()' +Class3.hs:7:10: Warning: + No explicit method or default declaration for ‛foo’ + In the instance declaration for ‛C ()’ diff --git a/tests/indexed-types/should_compile/Gentle.hs b/tests/indexed-types/should_compile/Gentle.hs index a32ac798a047c0fdcf7a720b8a34aee0a2278c8c..6cc1512a1f3cf0eef9c8b1a98a1d8a142f948d20 100644 --- a/tests/indexed-types/should_compile/Gentle.hs +++ b/tests/indexed-types/should_compile/Gentle.hs @@ -10,7 +10,9 @@ module FooModule where class Concrete a b | a -> b where bar :: a -> String -instance (Show a) => Concrete a b where +class Wuggle b | -> b -- To make the Concrete instance work + +instance (Show a, Wuggle b) => Concrete a b where bar = error "urk" wib :: Concrete a b => a -> String diff --git a/tests/indexed-types/should_compile/Simple14.stderr b/tests/indexed-types/should_compile/Simple14.stderr index 1665ccae834bc8bdefe0b4ddb942d1f38c7bc5bd..3c761c302d42d5d0c5fe50f9df343929f767a0e9 100644 --- a/tests/indexed-types/should_compile/Simple14.stderr +++ b/tests/indexed-types/should_compile/Simple14.stderr @@ -1,18 +1,18 @@ Simple14.hs:17:19: - Couldn't match type `z0' with `n' - `z0' is untouchable + Couldn't match type ‛z0’ with ‛n’ + ‛z0’ is untouchable 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:17:12-33 - `n' is a rigid type variable bound by + ‛n’ is a rigid type variable bound by the type signature for foo :: EQ_ (Maybe m) (Maybe n) at Simple14.hs:16:17 Expected type: EQ_ z0 z0 Actual type: EQ_ m n Relevant bindings include foo :: EQ_ (Maybe m) (Maybe n) (bound at Simple14.hs:17:1) - In the second argument of `eqE', namely `(eqI :: EQ_ m n)' - In the first argument of `ntI', namely `(`eqE` (eqI :: EQ_ m n))' + In the second argument of ‛eqE’, namely ‛(eqI :: EQ_ m n)’ + In the first argument of ‛ntI’, namely ‛(`eqE` (eqI :: EQ_ m n))’ In the expression: ntI (`eqE` (eqI :: EQ_ m n)) diff --git a/tests/indexed-types/should_compile/Simple2.stderr b/tests/indexed-types/should_compile/Simple2.stderr index ef05fb3e23e57037ed2305c1b37ab75851ee97a6..e68afd80daece9a5d932a831385975265661acd0 100644 --- a/tests/indexed-types/should_compile/Simple2.stderr +++ b/tests/indexed-types/should_compile/Simple2.stderr @@ -1,40 +1,40 @@ -Simple2.hs:21:1: - Warning: No explicit associated type or default declaration for `S3n' - In the instance declaration for `C3 Char' +Simple2.hs:21:1: Warning: + No explicit associated type or default declaration for ‛S3n’ + In the instance declaration for ‛C3 Char’ -Simple2.hs:21:10: - Warning: No explicit method or default declaration for `foo3n' - In the instance declaration for `C3 Char' +Simple2.hs:21:10: Warning: + No explicit method or default declaration for ‛foo3n’ + In the instance declaration for ‛C3 Char’ -Simple2.hs:21:10: - Warning: No explicit method or default declaration for `bar3n' - In the instance declaration for `C3 Char' +Simple2.hs:21:10: Warning: + No explicit method or default declaration for ‛bar3n’ + In the instance declaration for ‛C3 Char’ -Simple2.hs:29:1: - Warning: No explicit associated type or default declaration for `S3n' - In the instance declaration for `C3 Bool' +Simple2.hs:29:1: Warning: + No explicit associated type or default declaration for ‛S3n’ + In the instance declaration for ‛C3 Bool’ -Simple2.hs:29:10: - Warning: No explicit method or default declaration for `foo3n' - In the instance declaration for `C3 Bool' +Simple2.hs:29:10: Warning: + No explicit method or default declaration for ‛foo3n’ + In the instance declaration for ‛C3 Bool’ -Simple2.hs:29:10: - Warning: No explicit method or default declaration for `bar3n' - In the instance declaration for `C3 Bool' +Simple2.hs:29:10: Warning: + No explicit method or default declaration for ‛bar3n’ + In the instance declaration for ‛C3 Bool’ -Simple2.hs:39:1: - Warning: No explicit associated type or default declaration for `S3' - In the instance declaration for `C3 Float' +Simple2.hs:39:1: Warning: + No explicit associated type or default declaration for ‛S3’ + In the instance declaration for ‛C3 Float’ -Simple2.hs:39:1: - Warning: No explicit associated type or default declaration for `S3n' - In the instance declaration for `C3 Float' +Simple2.hs:39:1: Warning: + No explicit associated type or default declaration for ‛S3n’ + In the instance declaration for ‛C3 Float’ -Simple2.hs:39:10: - Warning: No explicit method or default declaration for `foo3n' - In the instance declaration for `C3 Float' +Simple2.hs:39:10: Warning: + No explicit method or default declaration for ‛foo3n’ + In the instance declaration for ‛C3 Float’ -Simple2.hs:39:10: - Warning: No explicit method or default declaration for `bar3n' - In the instance declaration for `C3 Float' +Simple2.hs:39:10: Warning: + No explicit method or default declaration for ‛bar3n’ + In the instance declaration for ‛C3 Float’ diff --git a/tests/indexed-types/should_compile/T1769.hs b/tests/indexed-types/should_compile/T1769.hs index 57b966051b3d1341b34c71d41d3dcf28becb1ead..7a256e1fd84e4cf03f5d66bc2b086585a7be3739 100644 --- a/tests/indexed-types/should_compile/T1769.hs +++ b/tests/indexed-types/should_compile/T1769.hs @@ -5,7 +5,7 @@ module T1769 where import Data.Typeable data family T a -deriving instance Typeable1 T +deriving instance Typeable T -- deriving instance Functor T data instance T [b] = T1 | T2 b diff --git a/tests/indexed-types/should_compile/T3017.stderr b/tests/indexed-types/should_compile/T3017.stderr index b7bedaea675e5c360779bc0975838d8cb29e5967..a6b44e3ad5851c0f96c1b5f1a3f8aac3a97f0be3 100644 --- a/tests/indexed-types/should_compile/T3017.stderr +++ b/tests/indexed-types/should_compile/T3017.stderr @@ -1,24 +1,24 @@ -TYPE SIGNATURES - emptyL :: forall a. ListColl a - test2 :: - forall c t t1. (Num t, Num t1, Coll c, Elem c ~ (t, t1)) => c -> c -TYPE CONSTRUCTORS - Coll :: * -> Constraint - class Coll c - RecFlag NonRecursive - type family Elem c :: * - empty :: c insert :: Elem c -> c -> c - ListColl :: * -> * - data ListColl a - No C type associated - RecFlag NonRecursive - = L :: forall a. [a] -> ListColl a Stricts: _ - FamilyInstance: none -COERCION AXIOMS - axiom Foo.TFCo:R:ElemListColl :: forall a. Elem (ListColl a) ~# a -INSTANCES - instance Coll (ListColl a) -- Defined at T3017.hs:12:11 -FAMILY INSTANCES - type Elem (ListColl a) -- Defined at T3017.hs:13:9 -Dependent modules: [] -Dependent packages: [base, ghc-prim, integer-gmp] +TYPE SIGNATURES + emptyL :: forall a. ListColl a + test2 :: + forall c t t1. (Num t, Num t1, Coll c, Elem c ~ (t, t1)) => c -> c +TYPE CONSTRUCTORS + Coll :: * -> Constraint + class Coll c + RecFlag NonRecursive + type family Elem c :: * + empty :: c insert :: Elem c -> c -> c + ListColl :: * -> * + data ListColl a + No C type associated + RecFlag NonRecursive, Promotable + = L :: forall a. [a] -> ListColl a Stricts: _ + FamilyInstance: none +COERCION AXIOMS + axiom Foo.TFCo:R:ElemListColl :: Elem (ListColl a) = a +INSTANCES + instance Coll (ListColl a) -- Defined at T3017.hs:12:11 +FAMILY INSTANCES + type Elem (ListColl a) -- Defined at T3017.hs:13:9 +Dependent modules: [] +Dependent packages: [base, ghc-prim, integer-gmp] diff --git a/tests/indexed-types/should_compile/T3208b.stderr b/tests/indexed-types/should_compile/T3208b.stderr index 5eee19a1ae066a00597bcd6d17efe2c57d0baae7..1bf275e85bcdd2f8c30a4e2eb5e8a679ba6e8fc3 100644 --- a/tests/indexed-types/should_compile/T3208b.stderr +++ b/tests/indexed-types/should_compile/T3208b.stderr @@ -1,30 +1,30 @@ - -T3208b.hs:15:10: - Could not deduce (STerm o0 ~ STerm a) - from the context (OTerm a ~ STerm a, OBJECT a, SUBST a) - bound by the type signature for - fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c - at T3208b.hs:14:9-56 - NB: `STerm' is a type function, and may not be injective - The type variable `o0' is ambiguous - Expected type: STerm o0 - Actual type: OTerm o0 - Relevant bindings include - fce' :: a -> c (bound at T3208b.hs:15:1) - f :: a (bound at T3208b.hs:15:6) - In the expression: fce (apply f) - In an equation for fce': fce' f = fce (apply f) - -T3208b.hs:15:15: - Could not deduce (OTerm o0 ~ STerm a) - from the context (OTerm a ~ STerm a, OBJECT a, SUBST a) - bound by the type signature for - fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c - at T3208b.hs:14:9-56 - The type variable `o0' is ambiguous - Relevant bindings include - fce' :: a -> c (bound at T3208b.hs:15:1) - f :: a (bound at T3208b.hs:15:6) - In the first argument of `fce', namely `(apply f)' - In the expression: fce (apply f) - In an equation for fce': fce' f = fce (apply f) + +T3208b.hs:15:10: + Could not deduce (STerm o0 ~ STerm a) + from the context (OTerm a ~ STerm a, OBJECT a, SUBST a) + bound by the type signature for + fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c + at T3208b.hs:14:9-56 + NB: ‛STerm’ is a type function, and may not be injective + The type variable ‛o0’ is ambiguous + Expected type: STerm o0 + Actual type: OTerm o0 + Relevant bindings include + fce' :: a -> c (bound at T3208b.hs:15:1) + f :: a (bound at T3208b.hs:15:6) + In the expression: fce (apply f) + In an equation for ‛fce'’: fce' f = fce (apply f) + +T3208b.hs:15:15: + Could not deduce (OTerm o0 ~ STerm a) + from the context (OTerm a ~ STerm a, OBJECT a, SUBST a) + bound by the type signature for + fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c + at T3208b.hs:14:9-56 + The type variable ‛o0’ is ambiguous + Relevant bindings include + fce' :: a -> c (bound at T3208b.hs:15:1) + f :: a (bound at T3208b.hs:15:6) + In the first argument of ‛fce’, namely ‛(apply f)’ + In the expression: fce (apply f) + In an equation for ‛fce'’: fce' f = fce (apply f) diff --git a/tests/indexed-types/should_compile/T7282.hs b/tests/indexed-types/should_compile/T7282.hs new file mode 100644 index 0000000000000000000000000000000000000000..a357d176477c848b1fa34d91401676612958f644 --- /dev/null +++ b/tests/indexed-types/should_compile/T7282.hs @@ -0,0 +1,9 @@ + {-# OPTIONS -XTypeFamilies -XDataKinds -XPolyKinds #-} + +module T7282 where + +class Foo (xs :: [k]) where + type Bar xs :: * + +instance Foo '[] where + type Bar '[] = Int diff --git a/tests/indexed-types/should_compile/T7585.hs b/tests/indexed-types/should_compile/T7585.hs new file mode 100644 index 0000000000000000000000000000000000000000..475269c851734a8846acf19458f04c9942d6494b --- /dev/null +++ b/tests/indexed-types/should_compile/T7585.hs @@ -0,0 +1,21 @@ +{-# LANGUAGE GADTs, RankNTypes, KindSignatures, PolyKinds, TypeOperators, DataKinds, + TypeFamilies #-} + +module Bug where + +data SBool :: Bool -> * where + SFalse :: SBool False + STrue :: SBool True + +data SList :: [Bool] -> * where + SNil :: SList '[] + SCons :: SBool h -> SList t -> SList (h ': t) + +type family (a :: k) :==: (b :: k) :: Bool +type instance where + '[] :==: '[] = True + (h1 ': t1) :==: (h2 ': t2) = True + a :==: b = False + +(%==%) :: SList ls1 -> SList ls2 -> SBool (ls1 :==: ls2) +SNil %==% (SCons _ _) = SFalse \ No newline at end of file diff --git a/tests/indexed-types/should_compile/all.T b/tests/indexed-types/should_compile/all.T index d785e82b8c1633a28bedec7c88cf0728100f56e5..a73f5fd64c3c51a85407efd8884120093c7371f2 100644 --- a/tests/indexed-types/should_compile/all.T +++ b/tests/indexed-types/should_compile/all.T @@ -159,7 +159,7 @@ test('T4484', normal, compile, ['']) test('T4492', normal, compile, ['']) test('T4494', normal, compile, ['']) test('DataFamDeriv', normal, compile, ['']) -test('T1769', if_compiler_lt('ghc', '7.1', expect_fail), compile, ['']) +test('T1769', when(compiler_lt('ghc', '7.1'), expect_fail), compile, ['']) test('T4497', normal, compile, ['']) test('T3484', normal, compile, ['']) test('T3460', normal, compile, ['']) @@ -206,5 +206,6 @@ test('T5591b', normal, compile, ['']) test('T7280', normal, compile, ['']) test('T7474', normal, compile, ['']) test('T7489', normal, compile, ['']) - +test('T7585', normal, compile, ['']) +test('T7282', normal, compile, ['']) diff --git a/tests/indexed-types/should_fail/DerivUnsatFam.stderr b/tests/indexed-types/should_fail/DerivUnsatFam.stderr index 63c1262147354e2ac9a8e47cbf18f4cf0e00bcdb..dbcb4f03c85285b11aab54b5e7e8691c1d520eb8 100644 --- a/tests/indexed-types/should_fail/DerivUnsatFam.stderr +++ b/tests/indexed-types/should_fail/DerivUnsatFam.stderr @@ -1,5 +1,5 @@ - -DerivUnsatFam.hs:8:1: - Can't make a derived instance of `Functor T': - Unsaturated data family application - In the stand-alone deriving instance for `Functor T' + +DerivUnsatFam.hs:8:1: + Can't make a derived instance of ‛Functor T’: + Unsaturated data family application + In the stand-alone deriving instance for ‛Functor T’ diff --git a/tests/indexed-types/should_fail/ExtraTcsUntch.stderr b/tests/indexed-types/should_fail/ExtraTcsUntch.stderr index 428d4b968d3106f3351e5ee47d213a65278bec7e..4b7532c962702efc3e142f0bdafc92030d0ffa31 100644 --- a/tests/indexed-types/should_fail/ExtraTcsUntch.stderr +++ b/tests/indexed-types/should_fail/ExtraTcsUntch.stderr @@ -1,6 +1,6 @@ ExtraTcsUntch.hs:24:53: - Could not deduce (C [t] [a]) arising from a use of `op' + Could not deduce (C [t] [a]) arising from a use of ‛op’ from the context (F Int ~ [[t]]) bound by the inferred type of f :: F Int ~ [[t]] => [t] -> ((), ((), ())) diff --git a/tests/indexed-types/should_fail/GADTwrong1.stderr b/tests/indexed-types/should_fail/GADTwrong1.stderr index b61af24a620caafe3589188885e68388d3c584e2..aa6eedc88cc3660b7fe636110a0308ccab1bc057 100644 --- a/tests/indexed-types/should_fail/GADTwrong1.stderr +++ b/tests/indexed-types/should_fail/GADTwrong1.stderr @@ -1,21 +1,21 @@ - -GADTwrong1.hs:12:19: - Could not deduce (a1 ~ b) - from the context (() ~ Const a1) - bound by a pattern with constructor - T :: forall a. a -> T (Const a), - in a case alternative - at GADTwrong1.hs:12:12-14 - `a1' is a rigid type variable bound by - a pattern with constructor - T :: forall a. a -> T (Const a), - in a case alternative - at GADTwrong1.hs:12:12 - `b' is a rigid type variable bound by - the type signature for coerce :: a -> b at GADTwrong1.hs:10:20 - Relevant bindings include - coerce :: a -> b (bound at GADTwrong1.hs:11:1) - y :: a1 (bound at GADTwrong1.hs:12:14) - In the expression: y - In a case alternative: T y -> y - In the expression: case T x :: T (Const b) of { T y -> y } + +GADTwrong1.hs:12:19: + Could not deduce (a1 ~ b) + from the context (() ~ Const a1) + bound by a pattern with constructor + T :: forall a. a -> T (Const a), + in a case alternative + at GADTwrong1.hs:12:12-14 + ‛a1’ is a rigid type variable bound by + a pattern with constructor + T :: forall a. a -> T (Const a), + in a case alternative + at GADTwrong1.hs:12:12 + ‛b’ is a rigid type variable bound by + the type signature for coerce :: a -> b at GADTwrong1.hs:10:20 + Relevant bindings include + coerce :: a -> b (bound at GADTwrong1.hs:11:1) + y :: a1 (bound at GADTwrong1.hs:12:14) + In the expression: y + In a case alternative: T y -> y + In the expression: case T x :: T (Const b) of { T y -> y } diff --git a/tests/indexed-types/should_fail/NoMatchErr.stderr b/tests/indexed-types/should_fail/NoMatchErr.stderr index 0176ffe2ec857ad5d1357cfe7f8ad1f277321721..7f43b5db4e775c6fa2205cc972153cd1ebeff080 100644 --- a/tests/indexed-types/should_fail/NoMatchErr.stderr +++ b/tests/indexed-types/should_fail/NoMatchErr.stderr @@ -1,13 +1,13 @@ - -NoMatchErr.hs:19:7: - Could not deduce (Memo d0 ~ Memo d) - from the context (Fun d) - bound by the type signature for f :: Fun d => Memo d a -> Memo d a - at NoMatchErr.hs:19:7-37 - NB: `Memo' is a type function, and may not be injective - The type variable `d0' is ambiguous - Expected type: Memo d a -> Memo d a - Actual type: Memo d0 a -> Memo d0 a - In the ambiguity check for: - forall d a. Fun d => Memo d a -> Memo d a - In the type signature for `f': f :: Fun d => Memo d a -> Memo d a + +NoMatchErr.hs:19:7: + Could not deduce (Memo d0 ~ Memo d) + from the context (Fun d) + bound by the type signature for f :: Fun d => Memo d a -> Memo d a + at NoMatchErr.hs:19:7-37 + NB: ‛Memo’ is a type function, and may not be injective + The type variable ‛d0’ is ambiguous + Expected type: Memo d a -> Memo d a + Actual type: Memo d0 a -> Memo d0 a + In the ambiguity check for: + forall d a. Fun d => Memo d a -> Memo d a + In the type signature for ‛f’: f :: Fun d => Memo d a -> Memo d a diff --git a/tests/indexed-types/should_fail/NotRelaxedExamples.stderr b/tests/indexed-types/should_fail/NotRelaxedExamples.stderr index d08570a06b5b2afe9299c5154bafd4178d04ed39..e56025a908913e45d3bdcfa0a5cbab1aa43c79da 100644 --- a/tests/indexed-types/should_fail/NotRelaxedExamples.stderr +++ b/tests/indexed-types/should_fail/NotRelaxedExamples.stderr @@ -1,18 +1,18 @@ - -NotRelaxedExamples.hs:9:15: - Nested type family application - in the type family application: F1 (F1 Char) - (Use -XUndecidableInstances to permit this) - In the type instance declaration for `F1' - -NotRelaxedExamples.hs:10:15: - Application is no smaller than the instance head - in the type family application: F2 [x] - (Use -XUndecidableInstances to permit this) - In the type instance declaration for `F2' - -NotRelaxedExamples.hs:11:15: - Application is no smaller than the instance head - in the type family application: F3 [Char] - (Use -XUndecidableInstances to permit this) - In the type instance declaration for `F3' + +NotRelaxedExamples.hs:9:15: + Nested type family application + in the type family application: F1 (F1 Char) + (Use -XUndecidableInstances to permit this) + In the type instance declaration for ‛F1’ + +NotRelaxedExamples.hs:10:15: + Application is no smaller than the instance head + in the type family application: F2 [x] + (Use -XUndecidableInstances to permit this) + In the type instance declaration for ‛F2’ + +NotRelaxedExamples.hs:11:15: + Application is no smaller than the instance head + in the type family application: F3 [Char] + (Use -XUndecidableInstances to permit this) + In the type instance declaration for ‛F3’ diff --git a/tests/indexed-types/should_fail/Overlap10.stderr b/tests/indexed-types/should_fail/Overlap10.stderr index 63fa4d9c38a668148f6e20405e39078105282bcf..342cbe4bca9fa18eebc7d9d5f86b9ef2b7d8c0de 100644 --- a/tests/indexed-types/should_fail/Overlap10.stderr +++ b/tests/indexed-types/should_fail/Overlap10.stderr @@ -1,8 +1,8 @@ - -Overlap10.hs:11:7: - Couldn't match expected type `F a Bool' with actual type `Bool' - Relevant bindings include - g :: a -> F a Bool (bound at Overlap10.hs:11:1) - x :: a (bound at Overlap10.hs:11:3) - In the expression: False - In an equation for `g': g x = False + +Overlap10.hs:11:7: + Couldn't match expected type ‛F a Bool’ with actual type ‛Bool’ + Relevant bindings include + g :: a -> F a Bool (bound at Overlap10.hs:11:1) + x :: a (bound at Overlap10.hs:11:3) + In the expression: False + In an equation for ‛g’: g x = False diff --git a/tests/indexed-types/should_fail/Overlap11.stderr b/tests/indexed-types/should_fail/Overlap11.stderr index 929ce34603aa009553295c85bfaaaedbf1106f1c..476ae6c2fbc35f227fa89088a2803f0ccc2b3a86 100644 --- a/tests/indexed-types/should_fail/Overlap11.stderr +++ b/tests/indexed-types/should_fail/Overlap11.stderr @@ -1,8 +1,8 @@ - -Overlap11.hs:11:8: - Couldn't match expected type `F a Int' with actual type `Int' - Relevant bindings include - g :: a -> F a Int (bound at Overlap11.hs:11:1) - x :: a (bound at Overlap11.hs:11:3) - In the expression: (5 :: Int) - In an equation for `g': g x = (5 :: Int) + +Overlap11.hs:11:8: + Couldn't match expected type ‛F a Int’ with actual type ‛Int’ + Relevant bindings include + g :: a -> F a Int (bound at Overlap11.hs:11:1) + x :: a (bound at Overlap11.hs:11:3) + In the expression: (5 :: Int) + In an equation for ‛g’: g x = (5 :: Int) diff --git a/tests/indexed-types/should_fail/Overlap5.stderr b/tests/indexed-types/should_fail/Overlap5.stderr index 329d410fdb85a56a2dd72fc95a475e2884c0f040..0413002ab521195aa36895dd198985cc009931c5 100644 --- a/tests/indexed-types/should_fail/Overlap5.stderr +++ b/tests/indexed-types/should_fail/Overlap5.stderr @@ -1,7 +1,7 @@ Overlap5.hs:16:7: - Couldn't match type `x' with `And x 'True' - `x' is a rigid type variable bound by + Couldn't match type ‛x’ with ‛And x 'True’ + ‛x’ is a rigid type variable bound by the type signature for g :: Proxy Bool x -> Proxy Bool (And x 'True) at Overlap5.hs:15:6 @@ -12,11 +12,11 @@ Overlap5.hs:16:7: (bound at Overlap5.hs:16:1) x :: Proxy Bool x (bound at Overlap5.hs:16:3) In the expression: x - In an equation for `g': g x = x + In an equation for ‛g’: g x = x Overlap5.hs:19:7: - Couldn't match type `x' with `And x x' - `x' is a rigid type variable bound by + Couldn't match type ‛x’ with ‛And x x’ + ‛x’ is a rigid type variable bound by the type signature for h :: Proxy Bool x -> Proxy Bool (And x x) at Overlap5.hs:18:6 Expected type: Proxy Bool (And x x) @@ -26,4 +26,4 @@ Overlap5.hs:19:7: (bound at Overlap5.hs:19:1) x :: Proxy Bool x (bound at Overlap5.hs:19:3) In the expression: x - In an equation for `h': h x = x + In an equation for ‛h’: h x = x diff --git a/tests/indexed-types/should_fail/Overlap6.stderr b/tests/indexed-types/should_fail/Overlap6.stderr index 8149e2d9234e74ae85e295c54527edb1f5cb2841..c59a1ab72d13908b4124eed8865ef320b486041b 100644 --- a/tests/indexed-types/should_fail/Overlap6.stderr +++ b/tests/indexed-types/should_fail/Overlap6.stderr @@ -1,7 +1,7 @@ Overlap6.hs:16:7: - Couldn't match type `x' with `And x 'True' - `x' is a rigid type variable bound by + Couldn't match type ‛x’ with ‛And x 'True’ + ‛x’ is a rigid type variable bound by the type signature for g :: Proxy Bool x -> Proxy Bool (And x 'True) at Overlap6.hs:15:6 @@ -12,4 +12,4 @@ Overlap6.hs:16:7: (bound at Overlap6.hs:16:1) x :: Proxy Bool x (bound at Overlap6.hs:16:3) In the expression: x - In an equation for `g': g x = x + In an equation for ‛g’: g x = x diff --git a/tests/indexed-types/should_fail/Overlap9.stderr b/tests/indexed-types/should_fail/Overlap9.stderr index d70a76c8ef62dc7e5255c470299a0388f5fd0e46..97c59c2a876235fee0daf5e7f463576c029e9c6c 100644 --- a/tests/indexed-types/should_fail/Overlap9.stderr +++ b/tests/indexed-types/should_fail/Overlap9.stderr @@ -7,6 +7,6 @@ Overlap9.hs:11:7: Relevant bindings include g :: a -> F a (bound at Overlap9.hs:11:1) x :: a (bound at Overlap9.hs:11:3) - In the return type of a call of `length' + In the return type of a call of ‛length’ In the expression: length (show x) - In an equation for `g': g x = length (show x) + In an equation for ‛g’: g x = length (show x) diff --git a/tests/indexed-types/should_fail/SimpleFail12.stderr b/tests/indexed-types/should_fail/SimpleFail12.stderr index 93eabd618a7c6326751483c0facee907b9ac6867..e93b4f4d1ef50db9887fcbbd19b7562175a1ac84 100644 --- a/tests/indexed-types/should_fail/SimpleFail12.stderr +++ b/tests/indexed-types/should_fail/SimpleFail12.stderr @@ -1,4 +1,4 @@ - -SimpleFail12.hs:8:15: - Illegal polymorphic or qualified type: forall a. [a] - In the type instance declaration for `C' + +SimpleFail12.hs:8:15: + Illegal polymorphic or qualified type: forall a. [a] + In the type instance declaration for ‛C’ diff --git a/tests/indexed-types/should_fail/SimpleFail13.stderr b/tests/indexed-types/should_fail/SimpleFail13.stderr index a927fec6f5e05c7f0c86bd9e19940e2114e0dd7f..a31dda6b8ba1d6071675d63cad94a728cfa002e6 100644 --- a/tests/indexed-types/should_fail/SimpleFail13.stderr +++ b/tests/indexed-types/should_fail/SimpleFail13.stderr @@ -1,8 +1,8 @@ - -SimpleFail13.hs:9:1: - Illegal type synonym family application in instance: [C a] - In the data instance declaration for `D' - -SimpleFail13.hs:13:15: - Illegal type synonym family application in instance: [C a] - In the type instance declaration for `E' + +SimpleFail13.hs:9:1: + Illegal type synonym family application in instance: [C a] + In the data instance declaration for ‛D’ + +SimpleFail13.hs:13:15: + Illegal type synonym family application in instance: [C a] + In the type instance declaration for ‛E’ diff --git a/tests/indexed-types/should_fail/SimpleFail14.stderr b/tests/indexed-types/should_fail/SimpleFail14.stderr index 14f078d59a5ac8f68b7b5f6245c282ddcd469951..b6015046f70d037ce7d565be6cbd8883585a6ec3 100644 --- a/tests/indexed-types/should_fail/SimpleFail14.stderr +++ b/tests/indexed-types/should_fail/SimpleFail14.stderr @@ -1,6 +1,6 @@ - -SimpleFail14.hs:5:15: - Expected a type, but `a ~ a' has kind `Constraint' - In the type `a ~ a' - In the definition of data constructor `T' - In the data declaration for `T' + +SimpleFail14.hs:5:15: + Expected a type, but ‛a ~ a’ has kind ‛Constraint’ + In the type ‛a ~ a’ + In the definition of data constructor ‛T’ + In the data declaration for ‛T’ diff --git a/tests/indexed-types/should_fail/SimpleFail15.stderr b/tests/indexed-types/should_fail/SimpleFail15.stderr index e2b7bba314505a2d91416ee2daf6df0a992ced21..d5c1c7fb540f0438fa5cd9178302744e64d49aaa 100644 --- a/tests/indexed-types/should_fail/SimpleFail15.stderr +++ b/tests/indexed-types/should_fail/SimpleFail15.stderr @@ -2,5 +2,5 @@ SimpleFail15.hs:5:8: Illegal polymorphic or qualified type: a ~ b => t Perhaps you intended to use -XRankNTypes or -XRank2Types - In the type signature for `foo': + In the type signature for ‛foo’: foo :: (a, b) -> (a ~ b => t) -> (a, b) diff --git a/tests/indexed-types/should_fail/SimpleFail16.stderr b/tests/indexed-types/should_fail/SimpleFail16.stderr index 3ad3cc770705350407bc5ac9309f764928a6fc9e..1e50ae1c3c968c63aa2959919e5dcae4737f05de 100644 --- a/tests/indexed-types/should_fail/SimpleFail16.stderr +++ b/tests/indexed-types/should_fail/SimpleFail16.stderr @@ -1,9 +1,9 @@ - -SimpleFail16.hs:10:12: - Couldn't match expected type `p0 a0' with actual type `F ()' - The type variables `p0', `a0' are ambiguous - Relevant bindings include - bar :: p0 a0 (bound at SimpleFail16.hs:10:1) - In the first argument of `foo', namely `(undefined :: F ())' - In the expression: foo (undefined :: F ()) - In an equation for `bar': bar = foo (undefined :: F ()) + +SimpleFail16.hs:10:12: + Couldn't match expected type ‛p0 a0’ with actual type ‛F ()’ + The type variables ‛p0’, ‛a0’ are ambiguous + Relevant bindings include + bar :: p0 a0 (bound at SimpleFail16.hs:10:1) + In the first argument of ‛foo’, namely ‛(undefined :: F ())’ + In the expression: foo (undefined :: F ()) + In an equation for ‛bar’: bar = foo (undefined :: F ()) diff --git a/tests/indexed-types/should_fail/SimpleFail1a.stderr b/tests/indexed-types/should_fail/SimpleFail1a.stderr index ba950b41f14189c3dd1976a66445d98454c4f0ca..7108a5ba732bc451bf09d4fd216b202fe9b7d4a7 100644 --- a/tests/indexed-types/should_fail/SimpleFail1a.stderr +++ b/tests/indexed-types/should_fail/SimpleFail1a.stderr @@ -1,4 +1,4 @@ - -SimpleFail1a.hs:4:1: - Number of parameters must match family declaration; expected 2 - In the data instance declaration for `T1' + +SimpleFail1a.hs:4:1: + Number of parameters must match family declaration; expected 2 + In the data instance declaration for ‛T1’ diff --git a/tests/indexed-types/should_fail/SimpleFail1b.stderr b/tests/indexed-types/should_fail/SimpleFail1b.stderr index 8becc3e8fc948888abdf6831a6c2036cd40275f9..a65a50d2c2e9b227de15fcf017dade54d41b7427 100644 --- a/tests/indexed-types/should_fail/SimpleFail1b.stderr +++ b/tests/indexed-types/should_fail/SimpleFail1b.stderr @@ -1,4 +1,4 @@ - -SimpleFail1b.hs:4:1: - Number of parameters must match family declaration; expected 2 - In the data instance declaration for `T1' + +SimpleFail1b.hs:4:1: + Number of parameters must match family declaration; expected 2 + In the data instance declaration for ‛T1’ diff --git a/tests/indexed-types/should_fail/SimpleFail2a.stderr b/tests/indexed-types/should_fail/SimpleFail2a.stderr index 9c1f1c9047b9766f360242b7480b81c811500d13..5d058756a308db99560e51075c0e8b89f60e1aa1 100644 --- a/tests/indexed-types/should_fail/SimpleFail2a.stderr +++ b/tests/indexed-types/should_fail/SimpleFail2a.stderr @@ -1,7 +1,6 @@ SimpleFail2a.hs:11:3: Type indexes must match class instance head - Found `a' but expected `Int' - In the data declaration for `Sd' - In the data instance declaration for `Sd' - In the instance declaration for `C Int' + Found ‛a’ but expected ‛Int’ + In the data instance declaration for ‛Sd’ + In the instance declaration for ‛C Int’ diff --git a/tests/indexed-types/should_fail/SimpleFail3a.stderr b/tests/indexed-types/should_fail/SimpleFail3a.stderr index 164351a01f02df317d8e9a361bbf6230198f87d9..cdf425131860e23f819dff77301155b8aa05a047 100644 --- a/tests/indexed-types/should_fail/SimpleFail3a.stderr +++ b/tests/indexed-types/should_fail/SimpleFail3a.stderr @@ -1,5 +1,5 @@ - -SimpleFail3a.hs:10:3: - Wrong category of family instance; declaration was for a data type - In the type instance declaration for `S1' - In the instance declaration for `C1 Int' + +SimpleFail3a.hs:10:3: + Wrong category of family instance; declaration was for a data type + In the type instance declaration for ‛S1’ + In the instance declaration for ‛C1 Int’ diff --git a/tests/indexed-types/should_fail/SimpleFail4.stderr b/tests/indexed-types/should_fail/SimpleFail4.stderr index 1eca808bd9cf9f47b2a64c3810616725de66985a..b9d99df243818fe413e2d9ad4ba8f947ffa6bb34 100644 --- a/tests/indexed-types/should_fail/SimpleFail4.stderr +++ b/tests/indexed-types/should_fail/SimpleFail4.stderr @@ -1,6 +1,6 @@ SimpleFail4.hs:8:8: Type indexes must match class instance head - Found `Int' but expected `a' - In the type synonym instance default declaration for `S2' - In the class declaration for `C2' + Found ‛Int’ but expected ‛a’ + In the type synonym instance default declaration for ‛S2’ + In the class declaration for ‛C2’ diff --git a/tests/indexed-types/should_fail/SimpleFail5a.stderr b/tests/indexed-types/should_fail/SimpleFail5a.stderr index 124eb7948e26f133eac786567104eb7c3312353e..8cadf52b497e5fb49fe38799999e4e4e0c3cc07e 100644 --- a/tests/indexed-types/should_fail/SimpleFail5a.stderr +++ b/tests/indexed-types/should_fail/SimpleFail5a.stderr @@ -1,7 +1,7 @@ SimpleFail5a.hs:31:11: - Couldn't match type `a' with `Int' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛Int’ + ‛a’ is a rigid type variable bound by the type signature for bar3wrong :: S3 a -> a at SimpleFail5a.hs:30:14 Expected type: S3 a @@ -9,4 +9,4 @@ SimpleFail5a.hs:31:11: Relevant bindings include bar3wrong :: S3 a -> a (bound at SimpleFail5a.hs:31:1) In the pattern: D3Int - In an equation for `bar3wrong': bar3wrong D3Int = 1 + In an equation for ‛bar3wrong’: bar3wrong D3Int = 1 diff --git a/tests/indexed-types/should_fail/SimpleFail5b.stderr b/tests/indexed-types/should_fail/SimpleFail5b.stderr index bd28918f150d95ca2b4c879d0cc5f40b1157c81e..2861582d973d081f9367b57d3d1601bfe9f7daaa 100644 --- a/tests/indexed-types/should_fail/SimpleFail5b.stderr +++ b/tests/indexed-types/should_fail/SimpleFail5b.stderr @@ -1,7 +1,7 @@ SimpleFail5b.hs:31:12: - Couldn't match type `Char' with `Int' + Couldn't match type ‛Char’ with ‛Int’ Expected type: S3 Int Actual type: S3 Char In the pattern: D3Char - In an equation for bar3wrong': bar3wrong' D3Char = 'a' + In an equation for ‛bar3wrong'’: bar3wrong' D3Char = 'a' diff --git a/tests/indexed-types/should_fail/SimpleFail6.stderr b/tests/indexed-types/should_fail/SimpleFail6.stderr index 679aaf872227ce70bc748df65fe47d658fd23f18..71e9e566680f067f76e30e367e2aa0ebfa769bfa 100644 --- a/tests/indexed-types/should_fail/SimpleFail6.stderr +++ b/tests/indexed-types/should_fail/SimpleFail6.stderr @@ -1,5 +1,5 @@ SimpleFail6.hs:7:11: - Conflicting definitions for `a' + Conflicting definitions for ‛a’ Bound at: SimpleFail6.hs:7:11 SimpleFail6.hs:7:13 diff --git a/tests/indexed-types/should_fail/SimpleFail7.stderr b/tests/indexed-types/should_fail/SimpleFail7.stderr index 59d2413441f696f4105fe1f7d211b124e4968a77..4778f0dcc31929c6441b569c3eb68871d03c0b28 100644 --- a/tests/indexed-types/should_fail/SimpleFail7.stderr +++ b/tests/indexed-types/should_fail/SimpleFail7.stderr @@ -1,4 +1,4 @@ - -SimpleFail7.hs:8:1: - Associated type `S5' must be inside a class instance - In the data instance declaration for `S5' + +SimpleFail7.hs:8:1: + Associated type ‛S5’ must be inside a class instance + In the data instance declaration for ‛S5’ diff --git a/tests/indexed-types/should_fail/SimpleFail8.stderr b/tests/indexed-types/should_fail/SimpleFail8.stderr index 421bd53b25af626088f209ea9021b4c221489590..ae25f9da5668637a42e243bcd58b325273e21985 100644 --- a/tests/indexed-types/should_fail/SimpleFail8.stderr +++ b/tests/indexed-types/should_fail/SimpleFail8.stderr @@ -1,6 +1,6 @@ - -SimpleFail8.hs:9:8: - `Map' is not a (visible) associated type of class `C6' - -SimpleFail8.hs:10:8: - `S3' is not a (visible) associated type of class `C6' + +SimpleFail8.hs:9:8: + ‛Map’ is not a (visible) associated type of class ‛C6’ + +SimpleFail8.hs:10:8: + ‛S3’ is not a (visible) associated type of class ‛C6’ diff --git a/tests/indexed-types/should_fail/SimpleFail9.hs b/tests/indexed-types/should_fail/SimpleFail9.hs index d45c9830a4c7c266cc1f12d1edea484a25e305f0..927c60caf0d7990271ede35a7f708b0a93d4cfe7 100644 --- a/tests/indexed-types/should_fail/SimpleFail9.hs +++ b/tests/indexed-types/should_fail/SimpleFail9.hs @@ -8,6 +8,8 @@ class C7 a b where instance C7 Char (a, Bool) where data S7 (a, Bool) = S7_1 --- must fail: type indexes don't match the instance types +-- Used to fail, but now passes: +-- type indexes don't match the instance types by name +-- but do by structure instance C7 Char (a, Int) where data S7 (b, Int) = S7_2 diff --git a/tests/indexed-types/should_fail/SimpleFail9.stderr b/tests/indexed-types/should_fail/SimpleFail9.stderr deleted file mode 100644 index 4d6ea1c94ff9b4e849f12d3eead1877307264ed4..0000000000000000000000000000000000000000 --- a/tests/indexed-types/should_fail/SimpleFail9.stderr +++ /dev/null @@ -1,7 +0,0 @@ - -SimpleFail9.hs:13:3: - Type indexes must match class instance head - Found `(b, Int)' but expected `(a, Int)' - In the data declaration for `S7' - In the data instance declaration for `S7' - In the instance declaration for `C7 Char (a, Int)' diff --git a/tests/indexed-types/should_fail/T1897b.stderr b/tests/indexed-types/should_fail/T1897b.stderr index 32bb3cff9fbf4bf485c851ee4d42ac6262b16c72..5bb6ef1650feb8286bd3c4ba8fed45e22a6d66f2 100644 --- a/tests/indexed-types/should_fail/T1897b.stderr +++ b/tests/indexed-types/should_fail/T1897b.stderr @@ -1,14 +1,14 @@ - -T1897b.hs:16:1: - Could not deduce (Depend a0 ~ Depend a) - from the context (Bug a) - bound by the inferred type for `isValid': - Bug a => [Depend a] -> Bool - at T1897b.hs:16:1-41 - NB: `Depend' is a type function, and may not be injective - The type variable `a0' is ambiguous - Expected type: [Depend a] -> Bool - Actual type: [Depend a0] -> Bool - When checking that `isValid' - has the inferred type `forall a. Bug a => [Depend a] -> Bool' - Probable cause: the inferred type is ambiguous + +T1897b.hs:16:1: + Could not deduce (Depend a0 ~ Depend a) + from the context (Bug a) + bound by the inferred type for ‛isValid’: + Bug a => [Depend a] -> Bool + at T1897b.hs:16:1-41 + NB: ‛Depend’ is a type function, and may not be injective + The type variable ‛a0’ is ambiguous + Expected type: [Depend a] -> Bool + Actual type: [Depend a0] -> Bool + When checking that ‛isValid’ + has the inferred type ‛forall a. Bug a => [Depend a] -> Bool’ + Probable cause: the inferred type is ambiguous diff --git a/tests/indexed-types/should_fail/T1900.stderr b/tests/indexed-types/should_fail/T1900.stderr index 6d7eb62e3072e19bfbe11a7e8599c57bb3dc27df..08218a2cafd542223b6bb9ee9d61abe854fbe243 100644 --- a/tests/indexed-types/should_fail/T1900.stderr +++ b/tests/indexed-types/should_fail/T1900.stderr @@ -1,13 +1,13 @@ - -T1900.hs:13:10: - Could not deduce (Depend s0 ~ Depend s) - from the context (Bug s) - bound by the type signature for check :: Bug s => Depend s -> Bool - at T1900.hs:13:10-36 - NB: `Depend' is a type function, and may not be injective - The type variable `s0' is ambiguous - Expected type: Depend s -> Bool - Actual type: Depend s0 -> Bool - In the ambiguity check for: forall s. Bug s => Depend s -> Bool - In the type signature for `check': - check :: Bug s => Depend s -> Bool + +T1900.hs:13:10: + Could not deduce (Depend s0 ~ Depend s) + from the context (Bug s) + bound by the type signature for check :: Bug s => Depend s -> Bool + at T1900.hs:13:10-36 + NB: ‛Depend’ is a type function, and may not be injective + The type variable ‛s0’ is ambiguous + Expected type: Depend s -> Bool + Actual type: Depend s0 -> Bool + In the ambiguity check for: forall s. Bug s => Depend s -> Bool + In the type signature for ‛check’: + check :: Bug s => Depend s -> Bool diff --git a/tests/indexed-types/should_fail/T2157.stderr b/tests/indexed-types/should_fail/T2157.stderr index 44f0a2436f8c1e1b432b3e26670246f9d9e567b9..0f6f272de979b02758cef2fc956b4d757c8318c7 100644 --- a/tests/indexed-types/should_fail/T2157.stderr +++ b/tests/indexed-types/should_fail/T2157.stderr @@ -1,4 +1,4 @@ - -T2157.hs:7:15: - Type synonym `S' should have 2 arguments, but has been given 1 - In the type instance declaration for `F' + +T2157.hs:7:15: + Type synonym ‛S’ should have 2 arguments, but has been given 1 + In the type instance declaration for ‛F’ diff --git a/tests/indexed-types/should_fail/T2203a.stderr b/tests/indexed-types/should_fail/T2203a.stderr index cd12f6a7beda2013ec1599c09a288065938704c5..67390f298f194db9c27b77d79f6d9c7ffdd21f07 100644 --- a/tests/indexed-types/should_fail/T2203a.stderr +++ b/tests/indexed-types/should_fail/T2203a.stderr @@ -1,5 +1,5 @@ T2203a.hs:13:19: Illegal type synonym family application in instance: - Either a (TheFoo a) - In the instance declaration for `Bar (Either a (TheFoo a))' + Either a (TheFoo a) + In the instance declaration for ‛Bar (Either a (TheFoo a))’ diff --git a/tests/indexed-types/should_fail/T2239.stderr b/tests/indexed-types/should_fail/T2239.stderr index 5c0403c6f0759a7a96d7bb57f28001b9b55b319d..b322d9f06d3c0bc0f8f36bfa4d1de9691ed3654a 100644 --- a/tests/indexed-types/should_fail/T2239.stderr +++ b/tests/indexed-types/should_fail/T2239.stderr @@ -1,28 +1,28 @@ - -T2239.hs:47:13: - Couldn't match type `b -> b' - with `forall b1. MyEq b1 Bool => b1 -> b1' - Expected type: (forall b1. MyEq b1 Bool => b1 -> b1) -> b -> b - Actual type: (b -> b) -> b -> b - In the expression: - id :: - (forall b. MyEq b Bool => b -> b) - -> (forall b. MyEq b Bool => b -> b) - In an equation for `complexFD': - complexFD - = id :: - (forall b. MyEq b Bool => b -> b) - -> (forall b. MyEq b Bool => b -> b) - -T2239.hs:50:13: - Couldn't match type `Bool -> Bool' - with `forall b1. b1 ~ Bool => b1 -> b1' - Expected type: (forall b1. b1 ~ Bool => b1 -> b1) -> b -> b - Actual type: (b -> b) -> b -> b - In the expression: - id :: - (forall b. b ~ Bool => b -> b) -> (forall b. b ~ Bool => b -> b) - In an equation for `complexTF': - complexTF - = id :: - (forall b. b ~ Bool => b -> b) -> (forall b. b ~ Bool => b -> b) + +T2239.hs:47:13: + Couldn't match type ‛b -> b’ + with ‛forall b1. MyEq b1 Bool => b1 -> b1’ + Expected type: (forall b1. MyEq b1 Bool => b1 -> b1) -> b -> b + Actual type: (b -> b) -> b -> b + In the expression: + id :: + (forall b. MyEq b Bool => b -> b) + -> (forall b. MyEq b Bool => b -> b) + In an equation for ‛complexFD’: + complexFD + = id :: + (forall b. MyEq b Bool => b -> b) + -> (forall b. MyEq b Bool => b -> b) + +T2239.hs:50:13: + Couldn't match type ‛Bool -> Bool’ + with ‛forall b1. b1 ~ Bool => b1 -> b1’ + Expected type: (forall b1. b1 ~ Bool => b1 -> b1) -> b -> b + Actual type: (b -> b) -> b -> b + In the expression: + id :: + (forall b. b ~ Bool => b -> b) -> (forall b. b ~ Bool => b -> b) + In an equation for ‛complexTF’: + complexTF + = id :: + (forall b. b ~ Bool => b -> b) -> (forall b. b ~ Bool => b -> b) diff --git a/tests/indexed-types/should_fail/T2334.stderr b/tests/indexed-types/should_fail/T2334.stderr deleted file mode 100644 index b8efc593833cc51a70d4513691b848c7e0bfa10c..0000000000000000000000000000000000000000 --- a/tests/indexed-types/should_fail/T2334.stderr +++ /dev/null @@ -1,17 +0,0 @@ - -T2334.hs:9:26: - The constructor of a newtype must have exactly one field - but `F' has two - In the definition of data constructor `F' - In the newtype instance declaration for `F' - -T2334.hs:10:27: - The constructor of a newtype must have exactly one field - but `H' has none - In the definition of data constructor `H' - In the newtype instance declaration for `F' - -T2334.hs:12:15: - Conflicting family instance declarations: - F Bool -- Defined at T2334.hs:12:15 - F Bool -- Defined at T2334.hs:13:15 diff --git a/tests/indexed-types/should_fail/T2334.hs b/tests/indexed-types/should_fail/T2334A.hs similarity index 100% rename from tests/indexed-types/should_fail/T2334.hs rename to tests/indexed-types/should_fail/T2334A.hs diff --git a/tests/indexed-types/should_fail/T2334A.stderr b/tests/indexed-types/should_fail/T2334A.stderr new file mode 100644 index 0000000000000000000000000000000000000000..ff4e35206f45b5e30d465bd34910101fcc1e4ce8 --- /dev/null +++ b/tests/indexed-types/should_fail/T2334A.stderr @@ -0,0 +1,17 @@ + +T2334A.hs:9:26: + The constructor of a newtype must have exactly one field + but ‛F’ has two + In the definition of data constructor ‛F’ + In the newtype instance declaration for ‛F’ + +T2334A.hs:10:27: + The constructor of a newtype must have exactly one field + but ‛H’ has none + In the definition of data constructor ‛H’ + In the newtype instance declaration for ‛F’ + +T2334A.hs:12:15: + Conflicting family instance declarations: + F Bool -- Defined at T2334A.hs:12:15 + F Bool -- Defined at T2334A.hs:13:15 diff --git a/tests/indexed-types/should_fail/T2544.stderr b/tests/indexed-types/should_fail/T2544.stderr index fae7cbf2849fe97446cb92a614cd82b47109fe1b..33e36a0aa594275ae82a4da95a62062c62f245d1 100644 --- a/tests/indexed-types/should_fail/T2544.stderr +++ b/tests/indexed-types/should_fail/T2544.stderr @@ -1,28 +1,28 @@ - -T2544.hs:15:18: - Could not deduce (IxMap i0 ~ IxMap l) - from the context (Ix l, Ix r) - bound by the instance declaration at T2544.hs:13:10-37 - NB: `IxMap' is a type function, and may not be injective - The type variable `i0' is ambiguous - Expected type: IxMap l [Int] - Actual type: IxMap i0 [Int] - Relevant bindings include - empty :: IxMap (l :|: r) [Int] (bound at T2544.hs:15:4) - In the first argument of `BiApp', namely `empty' - In the expression: BiApp empty empty - In an equation for `empty': empty = BiApp empty empty - -T2544.hs:15:24: - Could not deduce (IxMap i1 ~ IxMap r) - from the context (Ix l, Ix r) - bound by the instance declaration at T2544.hs:13:10-37 - NB: `IxMap' is a type function, and may not be injective - The type variable `i1' is ambiguous - Expected type: IxMap r [Int] - Actual type: IxMap i1 [Int] - Relevant bindings include - empty :: IxMap (l :|: r) [Int] (bound at T2544.hs:15:4) - In the second argument of `BiApp', namely `empty' - In the expression: BiApp empty empty - In an equation for `empty': empty = BiApp empty empty + +T2544.hs:15:18: + Could not deduce (IxMap i0 ~ IxMap l) + from the context (Ix l, Ix r) + bound by the instance declaration at T2544.hs:13:10-37 + NB: ‛IxMap’ is a type function, and may not be injective + The type variable ‛i0’ is ambiguous + Expected type: IxMap l [Int] + Actual type: IxMap i0 [Int] + Relevant bindings include + empty :: IxMap (l :|: r) [Int] (bound at T2544.hs:15:4) + In the first argument of ‛BiApp’, namely ‛empty’ + In the expression: BiApp empty empty + In an equation for ‛empty’: empty = BiApp empty empty + +T2544.hs:15:24: + Could not deduce (IxMap i1 ~ IxMap r) + from the context (Ix l, Ix r) + bound by the instance declaration at T2544.hs:13:10-37 + NB: ‛IxMap’ is a type function, and may not be injective + The type variable ‛i1’ is ambiguous + Expected type: IxMap r [Int] + Actual type: IxMap i1 [Int] + Relevant bindings include + empty :: IxMap (l :|: r) [Int] (bound at T2544.hs:15:4) + In the second argument of ‛BiApp’, namely ‛empty’ + In the expression: BiApp empty empty + In an equation for ‛empty’: empty = BiApp empty empty diff --git a/tests/indexed-types/should_fail/T2627b.stderr b/tests/indexed-types/should_fail/T2627b.stderr index 871d455ea8c93f8f5e3d2917cedbc0c26d0cd5f9..61399d02ddf2e0d314153934b1d60858d44a1988 100644 --- a/tests/indexed-types/should_fail/T2627b.stderr +++ b/tests/indexed-types/should_fail/T2627b.stderr @@ -1,8 +1,8 @@ - -T2627b.hs:20:24: - Occurs check: cannot construct the infinite type: - a0 ~ Dual (Dual a0) - The type variable `a0' is ambiguous - In the expression: conn undefined undefined - In an equation for `conn': - conn (Rd k) (Wr a r) = conn undefined undefined + +T2627b.hs:20:24: + Occurs check: cannot construct the infinite type: + a0 ~ Dual (Dual a0) + The type variable ‛a0’ is ambiguous + In the expression: conn undefined undefined + In an equation for ‛conn’: + conn (Rd k) (Wr a r) = conn undefined undefined diff --git a/tests/indexed-types/should_fail/T2664.stderr b/tests/indexed-types/should_fail/T2664.stderr index f3996d9146498b72335e56cae52e1d3469d3f245..4982410ca919950451f1f4af4cf8545325f0c66b 100644 --- a/tests/indexed-types/should_fail/T2664.stderr +++ b/tests/indexed-types/should_fail/T2664.stderr @@ -1,23 +1,23 @@ - -T2664.hs:31:52: - Could not deduce (b ~ a) - from the context (Connect a, Connect b) - bound by the instance declaration at T2664.hs:22:10-52 - or from ((a :*: b) ~ Dual c, c ~ Dual (a :*: b)) - bound by the type signature for - newPChan :: ((a :*: b) ~ Dual c, c ~ Dual (a :*: b)) => - IO (PChan (a :*: b), PChan c) - at T2664.hs:23:5-12 - `b' is a rigid type variable bound by - the instance declaration at T2664.hs:22:10 - `a' is a rigid type variable bound by - the instance declaration at T2664.hs:22:10 - Expected type: Dual (Dual a) - Actual type: b - Relevant bindings include - newPChan :: IO (PChan (a :*: b), PChan c) (bound at T2664.hs:23:5) - v :: MVar (Either (PChan a) (PChan b)) (bound at T2664.hs:24:9) - 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) + +T2664.hs:31:52: + Could not deduce (b ~ a) + from the context (Connect a, Connect b) + bound by the instance declaration at T2664.hs:22:10-52 + or from ((a :*: b) ~ Dual c, c ~ Dual (a :*: b)) + bound by the type signature for + newPChan :: ((a :*: b) ~ Dual c, c ~ Dual (a :*: b)) => + IO (PChan (a :*: b), PChan c) + at T2664.hs:23:5-12 + ‛b’ is a rigid type variable bound by + the instance declaration at T2664.hs:22:10 + ‛a’ is a rigid type variable bound by + the instance declaration at T2664.hs:22:10 + Expected type: Dual (Dual a) + Actual type: b + Relevant bindings include + newPChan :: IO (PChan (a :*: b), PChan c) (bound at T2664.hs:23:5) + v :: MVar (Either (PChan a) (PChan b)) (bound at T2664.hs:24:9) + 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) diff --git a/tests/indexed-types/should_fail/T2693.stderr b/tests/indexed-types/should_fail/T2693.stderr index 4427018fd044ad0355bedaed80a6ae4cd17eeace..8c02ea263de97aec1b709806635ea3b83fc38d11 100644 --- a/tests/indexed-types/should_fail/T2693.stderr +++ b/tests/indexed-types/should_fail/T2693.stderr @@ -1,43 +1,43 @@ - -T2693.hs:11:7: - Couldn't match expected type `TFn a' with actual type `TFn a0' - NB: `TFn' is a type function, and may not be injective - The type variable `a0' is ambiguous - When checking that `x' has the inferred type `forall a. TFn a' - Probable cause: the inferred type is ambiguous - In the expression: - do { let Just x = ...; - let n = fst x + fst x; - return () } - In an equation for `f': - f = do { let Just x = ...; - let n = ...; - return () } - -T2693.hs:19:15: - Couldn't match expected type `(a2, b0)' with actual type `TFn a3' - The type variables `a2', `b0', `a3' are ambiguous - Relevant bindings include n :: a2 (bound at T2693.hs:19:7) - In the first argument of `fst', namely `x' - In the first argument of `(+)', namely `fst x' - In the expression: fst x + snd x - -T2693.hs:19:23: - Couldn't match expected type `(a4, a2)' with actual type `TFn a5' - The type variables `a2', `a4', `a5' are ambiguous - Relevant bindings include n :: a2 (bound at T2693.hs:19:7) - In the first argument of `snd', namely `x' - In the second argument of `(+)', namely `snd x' - In the expression: fst x + snd x - -T2693.hs:29:20: - Couldn't match type `TFn a0' with `PVR a1' - The type variables `a0', `a1' are ambiguous - Expected type: () -> Maybe (PVR a1) - Actual type: () -> Maybe (TFn a0) - In the first argument of `mapM', namely `g' - In a stmt of a 'do' block: pvs <- mapM g undefined - In the expression: - do { pvs <- mapM g undefined; - let n = (map pvrX pvs) `min` (map pvrX pvs); - undefined } + +T2693.hs:11:7: + Couldn't match expected type ‛TFn a’ with actual type ‛TFn a0’ + NB: ‛TFn’ is a type function, and may not be injective + The type variable ‛a0’ is ambiguous + When checking that ‛x’ has the inferred type ‛forall a. TFn a’ + Probable cause: the inferred type is ambiguous + In the expression: + do { let Just x = ...; + let n = fst x + fst x; + return () } + In an equation for ‛f’: + f = do { let Just x = ...; + let n = ...; + return () } + +T2693.hs:19:15: + Couldn't match expected type ‛(a2, b0)’ with actual type ‛TFn a3’ + The type variables ‛a2’, ‛b0’, ‛a3’ are ambiguous + Relevant bindings include n :: a2 (bound at T2693.hs:19:7) + In the first argument of ‛fst’, namely ‛x’ + In the first argument of ‛(+)’, namely ‛fst x’ + In the expression: fst x + snd x + +T2693.hs:19:23: + Couldn't match expected type ‛(a4, a2)’ with actual type ‛TFn a5’ + The type variables ‛a2’, ‛a4’, ‛a5’ are ambiguous + Relevant bindings include n :: a2 (bound at T2693.hs:19:7) + In the first argument of ‛snd’, namely ‛x’ + In the second argument of ‛(+)’, namely ‛snd x’ + In the expression: fst x + snd x + +T2693.hs:29:20: + Couldn't match type ‛TFn a0’ with ‛PVR a1’ + The type variables ‛a0’, ‛a1’ are ambiguous + Expected type: () -> Maybe (PVR a1) + Actual type: () -> Maybe (TFn a0) + In the first argument of ‛mapM’, namely ‛g’ + In a stmt of a 'do' block: pvs <- mapM g undefined + In the expression: + do { pvs <- mapM g undefined; + let n = (map pvrX pvs) `min` (map pvrX pvs); + undefined } diff --git a/tests/indexed-types/should_fail/T3092.stderr b/tests/indexed-types/should_fail/T3092.stderr index f45e35580ad2e6485ba533c2f76650d54f8c92bf..436db19f818354defc5bc9da493c6e71319da50e 100644 --- a/tests/indexed-types/should_fail/T3092.stderr +++ b/tests/indexed-types/should_fail/T3092.stderr @@ -1,10 +1,10 @@ - -T3092.hs:5:1: - Illegal family instance for `T' - (T is not an indexed type family) - In the data instance declaration for `T' - -T3092.hs:8:1: - Illegal family instance for `S' - (S is not an indexed type family) - In the type instance declaration for `S' + +T3092.hs:5:1: + Illegal family instance for ‛T’ + (T is not an indexed type family) + In the data instance declaration for ‛T’ + +T3092.hs:8:1: + Illegal family instance for ‛S’ + (S is not an indexed type family) + In the type instance declaration for ‛S’ diff --git a/tests/indexed-types/should_fail/T3330a.stderr b/tests/indexed-types/should_fail/T3330a.stderr index e44ab4d6f70c29eef84414d440b639d550b6655a..9c4fedfa45deb343c04d32942a5aa4c67f47bd1f 100644 --- a/tests/indexed-types/should_fail/T3330a.stderr +++ b/tests/indexed-types/should_fail/T3330a.stderr @@ -1,8 +1,8 @@ T3330a.hs:19:34: - Couldn't match type `ix' - with `r ix1 -> Writer [AnyF ((->) (s0 ix0 -> ix1))] (r'0 ix1)' - `ix' is a rigid type variable bound by + Couldn't match type ‛ix’ + with ‛r ix1 -> Writer [AnyF ((->) (s0 ix0 -> ix1))] (r'0 ix1)’ + ‛ix’ is a rigid type variable bound by the type signature for children :: s ix -> PF s r ix -> [AnyF s] at T3330a.hs:18:13 Expected type: (s0 ix0 -> ix1) @@ -12,13 +12,13 @@ T3330a.hs:19:34: children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1) p :: s ix (bound at T3330a.hs:19:10) x :: PF s r ix (bound at T3330a.hs:19:12) - In the first argument of `hmapM', namely `p' - In the first argument of `execWriter', namely `(hmapM p collect x)' + In the first argument of ‛hmapM’, namely ‛p’ + In the first argument of ‛execWriter’, namely ‛(hmapM p collect x)’ In the expression: execWriter (hmapM p collect x) T3330a.hs:19:34: - Couldn't match type `s' with `(->) (s0 ix0 -> ix1)' - `s' is a rigid type variable bound by + Couldn't match type ‛s’ with ‛(->) (s0 ix0 -> ix1)’ + ‛s’ is a rigid type variable bound by the type signature for children :: s ix -> PF s r ix -> [AnyF s] at T3330a.hs:18:13 Expected type: (s0 ix0 -> ix1) @@ -28,13 +28,13 @@ T3330a.hs:19:34: children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1) p :: s ix (bound at T3330a.hs:19:10) x :: PF s r ix (bound at T3330a.hs:19:12) - In the first argument of `hmapM', namely `p' - In the first argument of `execWriter', namely `(hmapM p collect x)' + In the first argument of ‛hmapM’, namely ‛p’ + In the first argument of ‛execWriter’, namely ‛(hmapM p collect x)’ In the expression: execWriter (hmapM p collect x) T3330a.hs:19:44: - Couldn't match type `ix' with `r0 ix0 -> Writer [AnyF s0] (r0 ix0)' - `ix' is a rigid type variable bound by + Couldn't match type ‛ix’ with ‛r0 ix0 -> Writer [AnyF s0] (r0 ix0)’ + ‛ix’ is a rigid type variable bound by the type signature for children :: s ix -> PF s r ix -> [AnyF s] at T3330a.hs:18:13 Expected type: PF s r (r0 ix0 -> Writer [AnyF s0] (r0 ix0)) @@ -43,6 +43,6 @@ T3330a.hs:19:44: children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1) p :: s ix (bound at T3330a.hs:19:10) x :: PF s r ix (bound at T3330a.hs:19:12) - In the third argument of `hmapM', namely `x' - In the first argument of `execWriter', namely `(hmapM p collect x)' + In the third argument of ‛hmapM’, namely ‛x’ + In the first argument of ‛execWriter’, namely ‛(hmapM p collect x)’ In the expression: execWriter (hmapM p collect x) diff --git a/tests/indexed-types/should_fail/T3330c.stderr b/tests/indexed-types/should_fail/T3330c.stderr index 8c657c8116462cf422c13d5b5cf9b9b904b621d1..52d6afe3e7ec5daae42624e4cb8129fc39553eca 100644 --- a/tests/indexed-types/should_fail/T3330c.stderr +++ b/tests/indexed-types/should_fail/T3330c.stderr @@ -1,11 +1,11 @@ T3330c.hs:23:43: - Couldn't match kind `*' with `* -> *' + Couldn't match kind ‛*’ with ‛* -> *’ When matching types Der ((->) x) :: * -> * R :: (* -> *) -> * Expected type: Der ((->) x) (f1 x) Actual type: R f1 - In the first argument of `plug', namely `rf' - In the first argument of `Inl', namely `(plug rf df x)' + In the first argument of ‛plug’, namely ‛rf’ + In the first argument of ‛Inl’, namely ‛(plug rf df x)’ In the expression: Inl (plug rf df x) diff --git a/tests/indexed-types/should_fail/T3440.stderr b/tests/indexed-types/should_fail/T3440.stderr index b9f49fa0b941acd168d33e86560b933d70183ccb..af8b90fd74c3b3659d10cc1adc3bf4a2d14f0677 100644 --- a/tests/indexed-types/should_fail/T3440.stderr +++ b/tests/indexed-types/should_fail/T3440.stderr @@ -4,14 +4,14 @@ T3440.hs:11:22: from the context (Fam a ~ Fam a1) bound by a pattern with constructor GADT :: forall a. a -> Fam a -> GADT (Fam a), - in an equation for `unwrap' + in an equation for ‛unwrap’ at T3440.hs:11:9-16 - `a1' is a rigid type variable bound by + ‛a1’ is a rigid type variable bound by a pattern with constructor GADT :: forall a. a -> Fam a -> GADT (Fam a), - in an equation for `unwrap' + in an equation for ‛unwrap’ at T3440.hs:11:9 - `a' is a rigid type variable bound by + ‛a’ is a rigid type variable bound by the type signature for unwrap :: GADT (Fam a) -> (a, Fam a) at T3440.hs:10:11 Relevant bindings include @@ -20,4 +20,4 @@ T3440.hs:11:22: y :: Fam a1 (bound at T3440.hs:11:16) In the expression: x In the expression: (x, y) - In an equation for `unwrap': unwrap (GADT x y) = (x, y) + In an equation for ‛unwrap’: unwrap (GADT x y) = (x, y) diff --git a/tests/indexed-types/should_fail/T4093a.stderr b/tests/indexed-types/should_fail/T4093a.stderr index 5a5ce0826d0c030ba330fdb7ebe77b4a6cc9315b..83578248ae43f97660846992ce904d2a5f889973 100644 --- a/tests/indexed-types/should_fail/T4093a.stderr +++ b/tests/indexed-types/should_fail/T4093a.stderr @@ -4,12 +4,12 @@ T4093a.hs:8:8: from the context (Foo e ~ Maybe e) bound by the type signature for hang :: Foo e ~ Maybe e => Foo e at T4093a.hs:7:9-34 - `e' is a rigid type variable bound by + ‛e’ is a rigid type variable bound by the type signature for hang :: Foo e ~ Maybe e => Foo e at T4093a.hs:7:9 Expected type: Foo e Actual type: Maybe () Relevant bindings include hang :: Foo e (bound at T4093a.hs:8:1) - In the return type of a call of `Just' + In the return type of a call of ‛Just’ In the expression: Just () - In an equation for `hang': hang = Just () + In an equation for ‛hang’: hang = Just () diff --git a/tests/indexed-types/should_fail/T4093b.stderr b/tests/indexed-types/should_fail/T4093b.stderr index 67f9b7d924d5f32b6cfc41d724378621c9d97472..b80cf634a8bb01a61ef2d3d3f79ced4528a8b906 100644 --- a/tests/indexed-types/should_fail/T4093b.stderr +++ b/tests/indexed-types/should_fail/T4093b.stderr @@ -8,7 +8,7 @@ T4093b.hs:31:13: EitherCO x (A C C n) (A C O n) ~ A C x n) => Block n e x -> A e x n at T4093b.hs:(20,3)-(22,26) - `e' is a rigid type variable bound by + ‛e’ is a rigid type variable bound by the type signature for blockToNodeList :: (EitherCO e (A C O n) (A O O n) ~ A e O n, EitherCO x (A C C n) (A C O n) ~ A C x n) => @@ -26,8 +26,8 @@ T4093b.hs:31:13: -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C O n) (A O O n) (bound at T4093b.hs:31:5) In the expression: (JustC n, NothingC) - In an equation for `f': f n _ = (JustC n, NothingC) - In an equation for `blockToNodeList': + In an equation for ‛f’: f n _ = (JustC n, NothingC) + In an equation for ‛blockToNodeList’: blockToNodeList b = foldBlockNodesF (f, l) b z where diff --git a/tests/indexed-types/should_fail/T4099.stderr b/tests/indexed-types/should_fail/T4099.stderr index 60e379525a6b667007a9b8e90a9063ce15171c01..312b0b64439ea1b6e84e91a07faa4000846635ee 100644 --- a/tests/indexed-types/should_fail/T4099.stderr +++ b/tests/indexed-types/should_fail/T4099.stderr @@ -1,23 +1,23 @@ - -T4099.hs:11:30: - Couldn't match expected type `T a0' with actual type `T b' - NB: `T' is a type function, and may not be injective - The type variable `a0' is ambiguous - Relevant bindings include - bar1 :: b -> T b -> Int (bound at T4099.hs:11:1) - a :: b (bound at T4099.hs:11:6) - x :: T b (bound at T4099.hs:11:8) - In the second argument of `foo', namely `x' - In the expression: foo (error "urk") x - In an equation for `bar1': bar1 a x = foo (error "urk") x - -T4099.hs:14:30: - Couldn't match expected type `T a1' with actual type `Maybe b' - The type variable `a1' is ambiguous - Relevant bindings include - bar2 :: b -> Maybe b -> Int (bound at T4099.hs:14:1) - a :: b (bound at T4099.hs:14:6) - x :: Maybe b (bound at T4099.hs:14:8) - In the second argument of `foo', namely `x' - In the expression: foo (error "urk") x - In an equation for `bar2': bar2 a x = foo (error "urk") x + +T4099.hs:11:30: + Couldn't match expected type ‛T a0’ with actual type ‛T b’ + NB: ‛T’ is a type function, and may not be injective + The type variable ‛a0’ is ambiguous + Relevant bindings include + bar1 :: b -> T b -> Int (bound at T4099.hs:11:1) + a :: b (bound at T4099.hs:11:6) + x :: T b (bound at T4099.hs:11:8) + In the second argument of ‛foo’, namely ‛x’ + In the expression: foo (error "urk") x + In an equation for ‛bar1’: bar1 a x = foo (error "urk") x + +T4099.hs:14:30: + Couldn't match expected type ‛T a1’ with actual type ‛Maybe b’ + The type variable ‛a1’ is ambiguous + Relevant bindings include + bar2 :: b -> Maybe b -> Int (bound at T4099.hs:14:1) + a :: b (bound at T4099.hs:14:6) + x :: Maybe b (bound at T4099.hs:14:8) + In the second argument of ‛foo’, namely ‛x’ + In the expression: foo (error "urk") x + In an equation for ‛bar2’: bar2 a x = foo (error "urk") x diff --git a/tests/indexed-types/should_fail/T4174.stderr b/tests/indexed-types/should_fail/T4174.stderr index 81fb603dd8a6c56eae210bb3ec052a3d9ee1cd1d..5547b259796d93de941233f652e0aa37c7f42ee9 100644 --- a/tests/indexed-types/should_fail/T4174.stderr +++ b/tests/indexed-types/should_fail/T4174.stderr @@ -1,7 +1,7 @@ T4174.hs:42:12: - Couldn't match type `False' with `True' + Couldn't match type ‛False’ with ‛True’ Expected type: True Actual type: GHCVersion (WayOf m) :>=: GHC6'10 Minor1 In the expression: sync_large_objects - In an equation for `testcase': testcase = sync_large_objects + In an equation for ‛testcase’: testcase = sync_large_objects diff --git a/tests/indexed-types/should_fail/T4179.stderr b/tests/indexed-types/should_fail/T4179.stderr index 7236a50c88119c2b247c8e3ba48235fe8869f5d5..8f5ded1ffe4d5b8c6598690dab52cb8b68eb467c 100644 --- a/tests/indexed-types/should_fail/T4179.stderr +++ b/tests/indexed-types/should_fail/T4179.stderr @@ -7,7 +7,7 @@ T4179.hs:26:16: fCon :: (Functor x, DoC (FCon x)) => Con x -> A2 (FCon x) -> A3 (FCon x) at T4179.hs:25:9-72 - NB: `A3' is a type function, and may not be injective + NB: ‛A3’ is a type function, and may not be injective Expected type: x (A2 (FCon x) -> A3 (FCon x)) -> A2 (FCon x) -> A3 (FCon x) Actual type: x (A2 (FCon x) -> A3 (FCon x)) @@ -16,6 +16,6 @@ T4179.hs:26:16: Relevant bindings include fCon :: Con x -> A2 (FCon x) -> A3 (FCon x) (bound at T4179.hs:26:1) - In the first argument of `foldDoC', namely `op' + In the first argument of ‛foldDoC’, namely ‛op’ In the expression: foldDoC op - In an equation for `fCon': fCon = foldDoC op + In an equation for ‛fCon’: fCon = foldDoC op diff --git a/tests/indexed-types/should_fail/T4272.stderr b/tests/indexed-types/should_fail/T4272.stderr index a4e952556b197976247d96d60ed03c5164210455..f3dcdbc13d2deed67b93981ddd23989db86b02f5 100644 --- a/tests/indexed-types/should_fail/T4272.stderr +++ b/tests/indexed-types/should_fail/T4272.stderr @@ -5,7 +5,7 @@ T4272.hs:15:26: bound by the type signature for laws :: TermLike a => TermFamily a a -> b at T4272.hs:14:9-53 - `a' is a rigid type variable bound by + ‛a’ is a rigid type variable bound by the type signature for laws :: TermLike a => TermFamily a a -> b at T4272.hs:14:16 Expected type: TermFamily a (TermFamily a a) @@ -13,8 +13,8 @@ T4272.hs:15:26: Relevant bindings include laws :: TermFamily a a -> b (bound at T4272.hs:15:1) t :: TermFamily a a (bound at T4272.hs:15:6) - In the first argument of `terms', namely - `(undefined :: TermFamily a a)' - In the second argument of `prune', namely - `(terms (undefined :: TermFamily a a))' + In the first argument of ‛terms’, namely + ‛(undefined :: TermFamily a a)’ + In the second argument of ‛prune’, namely + ‛(terms (undefined :: TermFamily a a))’ In the expression: prune t (terms (undefined :: TermFamily a a)) diff --git a/tests/indexed-types/should_fail/T4485.stderr b/tests/indexed-types/should_fail/T4485.stderr index 3588869520165c6745ffadb2cb8b1fd402ce00c0..bd408824bf8e2fadd8f5da6b56c3f8b3e4b974f0 100644 --- a/tests/indexed-types/should_fail/T4485.stderr +++ b/tests/indexed-types/should_fail/T4485.stderr @@ -1,30 +1,30 @@ - -T4485.hs:47:15: - Overlapping instances for EmbedAsChild - (IdentityT IO) (XMLGenT m0 (XML m0)) - arising from a use of `asChild' - Matching instances: - instance [overlap ok] (EmbedAsChild m c, m1 ~ m) => - EmbedAsChild m (XMLGenT m1 c) - -- Defined at T4485.hs:29:10 - instance [overlap ok] EmbedAsChild - (IdentityT IO) (XMLGenT Identity ()) - -- Defined at T4485.hs:42:10 - (The choice depends on the instantiation of `m0' - To pick the first instance above, use -XIncoherentInstances - when compiling the other instance declarations) - In the expression: asChild - In the expression: asChild $ (genElement "foo") - In an equation for `asChild': - asChild b = asChild $ (genElement "foo") - -T4485.hs:47:26: - No instance for (XMLGen m0) arising from a use of `genElement' - The type variable `m0' is ambiguous - Note: there is a potential instance available: - instance [overlap ok] XMLGen (IdentityT m) - -- Defined at T4485.hs:36:10 - In the second argument of `($)', namely `(genElement "foo")' - In the expression: asChild $ (genElement "foo") - In an equation for `asChild': - asChild b = asChild $ (genElement "foo") + +T4485.hs:47:15: + Overlapping instances for EmbedAsChild + (IdentityT IO) (XMLGenT m0 (XML m0)) + arising from a use of ‛asChild’ + Matching instances: + instance [overlap ok] (EmbedAsChild m c, m1 ~ m) => + EmbedAsChild m (XMLGenT m1 c) + -- Defined at T4485.hs:29:10 + instance [overlap ok] EmbedAsChild + (IdentityT IO) (XMLGenT Identity ()) + -- Defined at T4485.hs:42:10 + (The choice depends on the instantiation of ‛m0’ + To pick the first instance above, use -XIncoherentInstances + when compiling the other instance declarations) + In the expression: asChild + In the expression: asChild $ (genElement "foo") + In an equation for ‛asChild’: + asChild b = asChild $ (genElement "foo") + +T4485.hs:47:26: + No instance for (XMLGen m0) arising from a use of ‛genElement’ + The type variable ‛m0’ is ambiguous + Note: there is a potential instance available: + instance [overlap ok] XMLGen (IdentityT m) + -- Defined at T4485.hs:36:10 + In the second argument of ‛($)’, namely ‛(genElement "foo")’ + In the expression: asChild $ (genElement "foo") + In an equation for ‛asChild’: + asChild b = asChild $ (genElement "foo") diff --git a/tests/indexed-types/should_fail/T5439.stderr b/tests/indexed-types/should_fail/T5439.stderr index 7115f3026d834c9ecd55617849b21fe82fb1c609..4f8340481f8baaa023b9ef1f8b3b8623b16c7089 100644 --- a/tests/indexed-types/should_fail/T5439.stderr +++ b/tests/indexed-types/should_fail/T5439.stderr @@ -1,28 +1,28 @@ - -T5439.hs:83:28: - Couldn't match type `Attempt t0 -> Attempt (HElemOf l0)' - with `Attempt (HElemOf rs)' - Expected type: f (Attempt (HNth n0 l0) -> Attempt (HElemOf l0)) - Actual type: f (Attempt (WaitOpResult (WaitOps rs))) - Relevant bindings include - registerWaitOp :: WaitOps rs - -> f (Attempt (WaitOpResult (WaitOps rs))) -> IO Bool - (bound at T5439.hs:62:3) - ops :: WaitOps rs (bound at T5439.hs:62:18) - ev :: f (Attempt (WaitOpResult (WaitOps rs))) - (bound at T5439.hs:62:22) - register :: Bool -> Peano n -> WaitOps (HDrop n rs) -> IO Bool - (bound at T5439.hs:65:9) - In the first argument of `complete', namely `ev' - In the expression: complete ev - In a stmt of a 'do' block: - c <- complete ev $ inj $ Failure (e :: SomeException) - -T5439.hs:83:39: - Couldn't match expected type `Peano n0' - with actual type `Attempt α0' - In the return type of a call of `Failure' - In the second argument of `($)', namely - `Failure (e :: SomeException)' - In the second argument of `($)', namely - `inj $ Failure (e :: SomeException)' + +T5439.hs:83:28: + Couldn't match type ‛Attempt t0 -> Attempt (HElemOf l0)’ + with ‛Attempt (HElemOf rs)’ + Expected type: f (Attempt (HNth n0 l0) -> Attempt (HElemOf l0)) + Actual type: f (Attempt (WaitOpResult (WaitOps rs))) + Relevant bindings include + registerWaitOp :: WaitOps rs + -> f (Attempt (WaitOpResult (WaitOps rs))) -> IO Bool + (bound at T5439.hs:62:3) + ops :: WaitOps rs (bound at T5439.hs:62:18) + ev :: f (Attempt (WaitOpResult (WaitOps rs))) + (bound at T5439.hs:62:22) + register :: Bool -> Peano n -> WaitOps (HDrop n rs) -> IO Bool + (bound at T5439.hs:65:9) + In the first argument of ‛complete’, namely ‛ev’ + In the expression: complete ev + In a stmt of a 'do' block: + c <- complete ev $ inj $ Failure (e :: SomeException) + +T5439.hs:83:39: + Couldn't match expected type ‛Peano n0’ + with actual type ‛Attempt α0’ + In the return type of a call of ‛Failure’ + In the second argument of ‛($)’, namely + ‛Failure (e :: SomeException)’ + In the second argument of ‛($)’, namely + ‛inj $ Failure (e :: SomeException)’ diff --git a/tests/indexed-types/should_fail/T5515.stderr b/tests/indexed-types/should_fail/T5515.stderr index 535048d88baa96b1be35f52f2df1888bcaa12c14..c3d6b9f66419042d9987cc7bfcc01ab5fc58051f 100644 --- a/tests/indexed-types/should_fail/T5515.stderr +++ b/tests/indexed-types/should_fail/T5515.stderr @@ -1,8 +1,8 @@ T5515.hs:9:8: - The RHS of an associated type declaration mentions type variable `a' + The RHS of an associated type declaration mentions type variable ‛a’ All such variables must be bound on the LHS T5515.hs:15:8: - The RHS of an associated type declaration mentions type variable `a' + The RHS of an associated type declaration mentions type variable ‛a’ All such variables must be bound on the LHS diff --git a/tests/indexed-types/should_fail/T5934.stderr b/tests/indexed-types/should_fail/T5934.stderr index 8925899346af52e526e5a4483af056388c134ecc..d036467603c5cfb6d6a2101de9ddab5d6372bc96 100644 --- a/tests/indexed-types/should_fail/T5934.stderr +++ b/tests/indexed-types/should_fail/T5934.stderr @@ -1,7 +1,7 @@ - -T5934.hs:12:7: - Cannot instantiate unification variable `a0' - with a type involving foralls: (forall s. GenST s) -> Int - Perhaps you want -XImpredicativeTypes - In the expression: 0 - In an equation for `run': run = 0 + +T5934.hs:12:7: + Cannot instantiate unification variable ‛a0’ + with a type involving foralls: (forall s. GenST s) -> Int + Perhaps you want -XImpredicativeTypes + In the expression: 0 + In an equation for ‛run’: run = 0 diff --git a/tests/indexed-types/should_fail/T6123.stderr b/tests/indexed-types/should_fail/T6123.stderr index cf8eedda06184430395ca8d0ecef5f9af8f0db66..4fbdf9bf4bc9d50898a8655809290100f7f0948b 100644 --- a/tests/indexed-types/should_fail/T6123.stderr +++ b/tests/indexed-types/should_fail/T6123.stderr @@ -1,7 +1,7 @@ - -T6123.hs:10:14: - Occurs check: cannot construct the infinite type: a0 ~ Id a0 - The type variable `a0' is ambiguous - Relevant bindings include cundefined :: a0 (bound at T6123.hs:10:1) - In the expression: cid undefined - In an equation for `cundefined': cundefined = cid undefined + +T6123.hs:10:14: + Occurs check: cannot construct the infinite type: a0 ~ Id a0 + The type variable ‛a0’ is ambiguous + Relevant bindings include cundefined :: a0 (bound at T6123.hs:10:1) + In the expression: cid undefined + In an equation for ‛cundefined’: cundefined = cid undefined diff --git a/tests/indexed-types/should_fail/T7010.stderr b/tests/indexed-types/should_fail/T7010.stderr index 3d059736f13b8bcc7826931392e8328fd76634c6..50c4bd0fd04681203445631951bb3d497840889f 100644 --- a/tests/indexed-types/should_fail/T7010.stderr +++ b/tests/indexed-types/should_fail/T7010.stderr @@ -1,8 +1,8 @@ T7010.hs:53:27: - Couldn't match type `Serial (IO Float)' with `IO Float' + Couldn't match type ‛Serial (IO Float)’ with ‛IO Float’ Expected type: (Float, ValueTuple Vector) Actual type: (Float, ValueTuple Float) - In the first argument of `withArgs', namely `plug' + In the first argument of ‛withArgs’, namely ‛plug’ In the expression: withArgs plug - In an equation for `filterFormants': filterFormants = withArgs plug + In an equation for ‛filterFormants’: filterFormants = withArgs plug diff --git a/tests/indexed-types/should_fail/T7194.stderr b/tests/indexed-types/should_fail/T7194.stderr index 385765df6febc492deb53f141c717168e422940b..a575dde330d3ac232177ed623597c20b522e4ee5 100644 --- a/tests/indexed-types/should_fail/T7194.stderr +++ b/tests/indexed-types/should_fail/T7194.stderr @@ -1,7 +1,7 @@ T7194.hs:18:35: - Couldn't match expected type `b0' with actual type `F a' - because type variable `a' would escape its scope + Couldn't match expected type ‛b0’ with actual type ‛F a’ + because type variable ‛a’ would escape its scope This (rigid, skolem) type variable is bound by the type signature for g :: C (F a) => a -> Int at T7194.hs:17:23-41 @@ -9,6 +9,6 @@ T7194.hs:18:35: x :: b0 (bound at T7194.hs:17:9) g :: a -> Int (bound at T7194.hs:18:18) y :: a (bound at T7194.hs:18:20) - In the return type of a call of `foo' + In the return type of a call of ‛foo’ In the expression: foo y - In the first argument of `length', namely `[x, foo y]' + In the first argument of ‛length’, namely ‛[x, foo y]’ diff --git a/tests/indexed-types/should_fail/T7354.stderr b/tests/indexed-types/should_fail/T7354.stderr index d5c0f1ce56d60a19be5a363772b1eb7fc84752c4..1fb91e4dad2f47bbfcb301d78b00340c28effcd1 100644 --- a/tests/indexed-types/should_fail/T7354.stderr +++ b/tests/indexed-types/should_fail/T7354.stderr @@ -6,6 +6,6 @@ T7354.hs:28:11: Actual type: Prim [a] a -> a Relevant bindings include foo :: Prim [a] a -> t (bound at T7354.hs:28:1) - In the first argument of `ana', namely `alg' + In the first argument of ‛ana’, namely ‛alg’ In the expression: ana alg - In an equation for `foo': foo = ana alg + In an equation for ‛foo’: foo = ana alg diff --git a/tests/indexed-types/should_fail/T7354a.stderr b/tests/indexed-types/should_fail/T7354a.stderr index 1b66b8797055b8670e74583a97c1202c32a8573f..d05b0f9b68dd0a156704d4f73afcc2baf06477c1 100644 --- a/tests/indexed-types/should_fail/T7354a.stderr +++ b/tests/indexed-types/should_fail/T7354a.stderr @@ -1,7 +1,7 @@ T7354a.hs:5:13: - Couldn't match expected type `Base t t' with actual type `()' + Couldn't match expected type ‛Base t t’ with actual type ‛()’ Relevant bindings include foo :: t (bound at T7354a.hs:5:1) - In the first argument of `embed', namely `()' + In the first argument of ‛embed’, namely ‛()’ In the expression: embed () - In an equation for `foo': foo = embed () + In an equation for ‛foo’: foo = embed () diff --git a/tests/indexed-types/should_fail/T7536.stderr b/tests/indexed-types/should_fail/T7536.stderr index faea85e91eae507394a3c246f1f029b47052b027..0c242a90299ddd7c711cd4231c943d719588c718 100644 --- a/tests/indexed-types/should_fail/T7536.stderr +++ b/tests/indexed-types/should_fail/T7536.stderr @@ -1,5 +1,5 @@ T7536.hs:8:15: - Family instance purports to bind type variable `a' + Family instance purports to bind type variable ‛a’ but the real LHS (expanding synonyms) is: TF Int = ... - In the type instance declaration for `TF' + In the type instance declaration for ‛TF’ diff --git a/tests/indexed-types/should_fail/T7729.hs b/tests/indexed-types/should_fail/T7729.hs new file mode 100644 index 0000000000000000000000000000000000000000..c542cf0550dba01a45d2dc775a6bb55bd6fdfaa3 --- /dev/null +++ b/tests/indexed-types/should_fail/T7729.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE FlexibleContexts, TypeFamilies #-} +module T7729 where + +class Monad m => PrimMonad m where + type PrimState m + +class MonadTrans t where + lift :: Monad m => m a -> t m a + +class (PrimMonad (BasePrimMonad m), Monad m) => MonadPrim m where + type BasePrimMonad m :: * -> * + liftPrim :: BasePrimMonad m a -> m a + + +newtype Rand m a = Rand { + runRand :: Maybe (m ()) -> m a + } + +instance (Monad m) => Monad (Rand m) where + return = Rand . const . return + (Rand rnd) >>= f = Rand $ \g -> (\x -> runRand (f x) g) =<< rnd g + +instance MonadTrans Rand where + lift = Rand . const + +instance MonadPrim m => MonadPrim (Rand m) where + type BasePrimMonad (Rand m) = BasePrimMonad m + liftPrim = liftPrim . lift \ No newline at end of file diff --git a/tests/indexed-types/should_fail/T7729.stderr b/tests/indexed-types/should_fail/T7729.stderr new file mode 100644 index 0000000000000000000000000000000000000000..4b12b29d96ca847a7180647545cec1196075be67 --- /dev/null +++ b/tests/indexed-types/should_fail/T7729.stderr @@ -0,0 +1,17 @@ + +T7729.hs:28:14: + Could not deduce (BasePrimMonad (Rand m) + ~ t0 (BasePrimMonad (Rand m))) + from the context (PrimMonad (BasePrimMonad (Rand m)), + Monad (Rand m), + MonadPrim m) + bound by the instance declaration at T7729.hs:26:10-42 + The type variable ‛t0’ is ambiguous + Expected type: t0 (BasePrimMonad (Rand m)) a -> Rand m a + Actual type: BasePrimMonad (Rand m) a -> Rand m a + Relevant bindings include + liftPrim :: BasePrimMonad (Rand m) a -> Rand m a + (bound at T7729.hs:28:3) + In the first argument of ‛(.)’, namely ‛liftPrim’ + In the expression: liftPrim . lift + In an equation for ‛liftPrim’: liftPrim = liftPrim . lift diff --git a/tests/indexed-types/should_fail/T7729a.hs b/tests/indexed-types/should_fail/T7729a.hs new file mode 100644 index 0000000000000000000000000000000000000000..53c163992b412c32591c25d9e820dcaa6961e41b --- /dev/null +++ b/tests/indexed-types/should_fail/T7729a.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE FlexibleContexts, TypeFamilies #-} +module T7729a where + +class Monad m => PrimMonad m where + type PrimState m + +class MonadTrans t where + lift :: Monad m => m a -> t m a + +class (PrimMonad (BasePrimMonad m), Monad m) => MonadPrim m where + type BasePrimMonad m :: * -> * + liftPrim :: BasePrimMonad m a -> m a + + +newtype Rand m a = Rand { + runRand :: Maybe (m ()) -> m a + } + +instance (Monad m) => Monad (Rand m) where + return = Rand . const . return + (Rand rnd) >>= f = Rand $ \g -> (\x -> runRand (f x) g) =<< rnd g + +instance MonadTrans Rand where + lift = Rand . const + +instance MonadPrim m => MonadPrim (Rand m) where + type BasePrimMonad (Rand m) = BasePrimMonad m + liftPrim x = liftPrim (lift x) -- This line changed from T7729 \ No newline at end of file diff --git a/tests/indexed-types/should_fail/T7729a.stderr b/tests/indexed-types/should_fail/T7729a.stderr new file mode 100644 index 0000000000000000000000000000000000000000..54eeea02f470b88faaf801916cdcb174bcb84a52 --- /dev/null +++ b/tests/indexed-types/should_fail/T7729a.stderr @@ -0,0 +1,8 @@ + +T7729a.hs:28:31: + Occurs check: cannot construct the infinite type: m0 ~ t0 m0 + Expected type: m0 a + Actual type: BasePrimMonad (Rand m) a + In the first argument of ‛lift’, namely ‛x’ + In the first argument of ‛liftPrim’, namely ‛(lift x)’ + In the expression: liftPrim (lift x) diff --git a/tests/indexed-types/should_fail/TyFamArity1.stderr b/tests/indexed-types/should_fail/TyFamArity1.stderr index b0076287f60469ae8a184ccc3422cb92205b8676..adfcc37a004505bb9a52d1445c066a767cb7fd3e 100644 --- a/tests/indexed-types/should_fail/TyFamArity1.stderr +++ b/tests/indexed-types/should_fail/TyFamArity1.stderr @@ -1,4 +1,4 @@ - -TyFamArity1.hs:4:15: - Number of parameters must match family declaration; expected 2 - In the type instance declaration for `T' + +TyFamArity1.hs:4:15: + Number of parameters must match family declaration; expected 2 + In the type instance declaration for ‛T’ diff --git a/tests/indexed-types/should_fail/TyFamArity2.stderr b/tests/indexed-types/should_fail/TyFamArity2.stderr index ad71adc7d356aa1decc1120d707884be167c1fdd..d602a2d5e0ef9e7b9e18f2903f3197cc0db06fa5 100644 --- a/tests/indexed-types/should_fail/TyFamArity2.stderr +++ b/tests/indexed-types/should_fail/TyFamArity2.stderr @@ -1,4 +1,4 @@ - -TyFamArity2.hs:4:15: - Number of parameters must match family declaration; expected 1 - In the type instance declaration for `T' + +TyFamArity2.hs:4:15: + Number of parameters must match family declaration; expected 1 + In the type instance declaration for ‛T’ diff --git a/tests/indexed-types/should_fail/TyFamUndec.stderr b/tests/indexed-types/should_fail/TyFamUndec.stderr index 6bb2af771c81634dfdb97d0661d12958ff81aea1..fef47b534a864ab34e041a93b47d4207174ca628 100644 --- a/tests/indexed-types/should_fail/TyFamUndec.stderr +++ b/tests/indexed-types/should_fail/TyFamUndec.stderr @@ -1,18 +1,18 @@ - -TyFamUndec.hs:6:15: - Variable `b' occurs more often than in the instance head - in the type family application: T (b, b) - (Use -XUndecidableInstances to permit this) - In the type instance declaration for `T' - -TyFamUndec.hs:7:15: - Application is no smaller than the instance head - in the type family application: T (a, Maybe b) - (Use -XUndecidableInstances to permit this) - In the type instance declaration for `T' - -TyFamUndec.hs:8:15: - Nested type family application - in the type family application: T (a, T b) - (Use -XUndecidableInstances to permit this) - In the type instance declaration for `T' + +TyFamUndec.hs:6:15: + Variable ‛b’ occurs more often than in the instance head + in the type family application: T (b, b) + (Use -XUndecidableInstances to permit this) + In the type instance declaration for ‛T’ + +TyFamUndec.hs:7:15: + Application is no smaller than the instance head + in the type family application: T (a, Maybe b) + (Use -XUndecidableInstances to permit this) + In the type instance declaration for ‛T’ + +TyFamUndec.hs:8:15: + Nested type family application + in the type family application: T (a, T b) + (Use -XUndecidableInstances to permit this) + In the type instance declaration for ‛T’ diff --git a/tests/indexed-types/should_fail/all.T b/tests/indexed-types/should_fail/all.T index 316e1ff0fc0490cd1b5eb127b4da164d1de15e3f..2b608f21a6bc9c9803b9cfbf3022dcb6cddf00f3 100644 --- a/tests/indexed-types/should_fail/all.T +++ b/tests/indexed-types/should_fail/all.T @@ -12,7 +12,7 @@ test('SimpleFail5b', normal, compile_fail, ['']) test('SimpleFail6', normal, compile_fail, ['']) test('SimpleFail7', normal, compile_fail, ['']) test('SimpleFail8', normal, compile_fail, ['']) -test('SimpleFail9', normal, compile_fail, ['']) +test('SimpleFail9', normal, compile, ['']) test('SimpleFail10', normal, compile, ['']) test('SimpleFail11a', normal, compile_fail, ['']) test('SimpleFail11b', normal, compile_fail, ['']) @@ -41,7 +41,7 @@ test('Over', test('SkolemOccursLoop', expect_fail, compile_fail, ['']) -test('T2334', normal, compile_fail, ['']) +test('T2334A', normal, compile_fail, ['']) test('T1900', normal, compile_fail, ['']) test('T2157', normal, compile_fail, ['']) test('T2203a', normal, compile_fail, ['']) @@ -65,14 +65,13 @@ test('T2239', normal, compile_fail, ['']) test('T3440', normal, compile_fail, ['']) test('T4485', normal, compile_fail, ['']) test('T4174', normal, compile_fail, ['']) -test('DerivUnsatFam', if_compiler_lt('ghc', '7.1', expect_fail), compile_fail, ['']) +test('DerivUnsatFam', when(compiler_lt('ghc', '7.1'), expect_fail), compile_fail, ['']) test('T2664', normal, compile_fail, ['']) test('T2664a', normal, compile, ['']) test('T2544', normal, compile_fail, ['']) test('T1897b', normal, compile_fail, ['']) test('T5439', normal, compile_fail, ['']) test('T5515', normal, compile_fail, ['']) -test('T5763', expect_broken(5673), compile_fail, ['']) test('T5934', normal, compile_fail, ['']) test('T6123', normal, compile_fail, ['']) test('ExtraTcsUntch', normal, compile_fail, ['']) @@ -95,4 +94,6 @@ test('T7354a', ['$MAKE -s --no-print-directory T7354a']) test('T7536', normal, compile_fail, ['']) -test('T7560', normal, compile_fail, ['']) \ No newline at end of file +test('T7560', normal, compile_fail, ['']) +test('T7729', normal, compile_fail, ['']) +test('T7729a', normal, compile_fail, ['']) diff --git a/tests/layout/all.T b/tests/layout/all.T index 026ad465a0d9403dcd8447d2383926e8da83308f..e8ed2fe5bc11e189fcfa5cdc5536239807679dc1 100644 --- a/tests/layout/all.T +++ b/tests/layout/all.T @@ -39,7 +39,7 @@ test('layout007', [req_interp, extra_clean(['layout007.hi', 'layout007.o']), only_compiler_types(['ghc']), - if_compiler_profiled(skip)], + when(compiler_profiled(), skip)], run_command, ['$MAKE -s --no-print-directory layout007']) diff --git a/tests/llvm/should_compile/5054.hs b/tests/llvm/should_compile/T5054.hs similarity index 100% rename from tests/llvm/should_compile/5054.hs rename to tests/llvm/should_compile/T5054.hs diff --git a/tests/llvm/should_compile/5054_2.hs b/tests/llvm/should_compile/T5054_2.hs similarity index 100% rename from tests/llvm/should_compile/5054_2.hs rename to tests/llvm/should_compile/T5054_2.hs diff --git a/tests/llvm/should_compile/5486.hs b/tests/llvm/should_compile/T5486.hs similarity index 100% rename from tests/llvm/should_compile/5486.hs rename to tests/llvm/should_compile/T5486.hs diff --git a/tests/llvm/should_compile/5681.hs b/tests/llvm/should_compile/T5681.hs similarity index 100% rename from tests/llvm/should_compile/5681.hs rename to tests/llvm/should_compile/T5681.hs diff --git a/tests/llvm/should_compile/6158.hs b/tests/llvm/should_compile/T6158.hs similarity index 100% rename from tests/llvm/should_compile/6158.hs rename to tests/llvm/should_compile/T6158.hs diff --git a/tests/llvm/should_compile/T7571.cmm b/tests/llvm/should_compile/T7571.cmm new file mode 100644 index 0000000000000000000000000000000000000000..d4e89d5ad69071bb310ace8fadc8a1e7b09be9ce --- /dev/null +++ b/tests/llvm/should_compile/T7571.cmm @@ -0,0 +1,11 @@ +#include "Cmm.h" + +testLiteralBranch (W_ dst, W_ src) +{ + if (1) { + prim %memcpy(dst, src, 1024, 4); + } else { + prim %memcpy(dst, src, 512, 8); + } + return (); +} diff --git a/tests/llvm/should_compile/T7575.hs b/tests/llvm/should_compile/T7575.hs new file mode 100644 index 0000000000000000000000000000000000000000..78b0bd29a8012b964fb8525d1ca897a15bef0ed1 --- /dev/null +++ b/tests/llvm/should_compile/T7575.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE MagicHash, UnliftedFFITypes #-} +module T7575 where + +import GHC.Prim +import GHC.Word +import GHC.Types + +foreign import ccall unsafe "hs_eqWord64" dummy_eqWord64# :: Word64# -> Word64# -> Bool + +check :: Word64 -> Word64 -> Bool +check (W64# x#) (W64# y#) = dummy_eqWord64# x# y# + +check2 :: Word64 -> Bool +check2 x = check x 0 + diff --git a/tests/llvm/should_compile/all.T b/tests/llvm/should_compile/all.T index 29e5ae101277d21e9a6e84b6e7ca7dfa32b57993..448e8e00973d34c3f74a5c68dd5ff2f59144c94f 100644 --- a/tests/llvm/should_compile/all.T +++ b/tests/llvm/should_compile/all.T @@ -1,13 +1,14 @@ # Tests for LLVM code generator -def f( opts ): +def f( name, opts ): opts.only_ways = ['optllvm', 'llvm', 'debugllvm'] setTestOpts(f) -test('5054', reqlib('hmatrix'), compile, ['-package hmatrix']) -test('5054_2', reqlib('hmatrix'), compile, ['-package hmatrix']) -test('5486', normal, compile, ['']) -test('5681', normal, compile, ['']) -test('6158', [reqlib('vector'), reqlib('primitive')], compile, ['-package vector -package primitive']) - +test('T5054', reqlib('hmatrix'), compile, ['-package hmatrix']) +test('T5054_2', reqlib('hmatrix'), compile, ['-package hmatrix']) +test('T5486', normal, compile, ['']) +test('T5681', normal, compile, ['']) +test('T6158', [reqlib('vector'), reqlib('primitive')], compile, ['-package vector -package primitive']) +test('T7571', cmm_src, compile, ['']) +test('T7575', unless(wordsize(32), skip), compile, ['']) diff --git a/tests/mdo/should_fail/mdofail001.stderr b/tests/mdo/should_fail/mdofail001.stderr index 67929e58ed45f9e3397bbcdd8c77a79a72684d48..8d6d86bc977258c64ddbc50a1e1ec54029d784d4 100644 --- a/tests/mdo/should_fail/mdofail001.stderr +++ b/tests/mdo/should_fail/mdofail001.stderr @@ -1,6 +1,6 @@ mdofail001.hs:10:32: - No instance for (Num Char) arising from the literal `1' + No instance for (Num Char) arising from the literal ‛1’ In the expression: 1 - In the first argument of `l', namely `[1, 2, 3]' + In the first argument of ‛l’, namely ‛[1, 2, 3]’ In the expression: l [1, 2, 3] diff --git a/tests/mdo/should_fail/mdofail002.stderr b/tests/mdo/should_fail/mdofail002.stderr index a1327c6dfdf3485e5a6ab4f3828a1d5c584d0215..badd7383e7a585bc71de483635375b420c436cba 100644 --- a/tests/mdo/should_fail/mdofail002.stderr +++ b/tests/mdo/should_fail/mdofail002.stderr @@ -1,5 +1,5 @@ mdofail002.hs:10:9: - Conflicting definitions for `x' + Conflicting definitions for ‛x’ Bound at: mdofail002.hs:10:9 mdofail002.hs:11:9 diff --git a/tests/mdo/should_fail/mdofail003.stderr b/tests/mdo/should_fail/mdofail003.stderr index e093fe0a75d901538489a407893cfaf8a9941ff2..ccb10dfb80f7e203cdb4c851016619437ef594ec 100644 --- a/tests/mdo/should_fail/mdofail003.stderr +++ b/tests/mdo/should_fail/mdofail003.stderr @@ -1,5 +1,5 @@ mdofail003.hs:10:9: - Conflicting definitions for `x' + Conflicting definitions for ‛x’ Bound at: mdofail003.hs:10:9 mdofail003.hs:11:13 diff --git a/tests/module/T414.stderr b/tests/module/T414.stderr index a5052fb76da9dc3870317b24c22ed7ad082a8bcf..b9af6935f50b1690efdf53697ec0e335fa74d5ae 100644 --- a/tests/module/T414.stderr +++ b/tests/module/T414.stderr @@ -1,3 +1,3 @@ T414.hs:1:1: - The main function `main' is not exported by module `Main' + The main function ‛main’ is not exported by module ‛Main’ diff --git a/tests/module/all.T b/tests/module/all.T index b8a5355a972f7d483fc65d2f708e45bae52cf17b..8eaa1d5217bfc90ac90c8c7f34faaceb277871e1 100644 --- a/tests/module/all.T +++ b/tests/module/all.T @@ -251,7 +251,7 @@ test('mod150', normal, compile_fail, ['']) test('mod151', normal, compile_fail, ['']) test('mod152', normal, compile_fail, ['']) test('mod153', normal, compile_fail, ['']) -test('mod154', if_compiler_type('hugs', expect_fail), compile, ['']) +test('mod154', when(compiler_type('hugs'), expect_fail), compile, ['']) test('mod155', normal, compile_fail, ['']) test('mod156', normal, compile, ['']) test('mod157', diff --git a/tests/module/base01/all.T b/tests/module/base01/all.T index d0dbb2960d56dd0808060d711ce923be9e7d19c3..6fa3e5c3776df4dd3c0dc42c227d90ed4d553db5 100644 --- a/tests/module/base01/all.T +++ b/tests/module/base01/all.T @@ -1,7 +1,7 @@ setTestOpts(only_compiler_types(['ghc'])) test('base01', - [if_compiler_lt('ghc', '7.1', expect_fail), + [when(compiler_lt('ghc', '7.1'), expect_fail), normalise_slashes, clean_cmd('$MAKE -s clean')], run_command, diff --git a/tests/module/mod1.stderr b/tests/module/mod1.stderr index e665f8468eba04a9b10dd7ee89487d870a48d666..51d9e07b1deedf4dbf2b2144912256d68a71ebe3 100644 --- a/tests/module/mod1.stderr +++ b/tests/module/mod1.stderr @@ -1,4 +1,4 @@ mod1.hs:3:1: - Failed to load interface for `N' + Failed to load interface for ‛N’ Use -v to see a list of the files searched for. diff --git a/tests/module/mod10.stderr b/tests/module/mod10.stderr index 5369fa0f8b451beebcbcae2499bebff86a593bc9..6cc2caf59e8216fa6c3cafe79cce8a598f6a1fce 100644 --- a/tests/module/mod10.stderr +++ b/tests/module/mod10.stderr @@ -1,2 +1,2 @@ -mod10.hs:2:10: Not in scope: type constructor or class `T' +mod10.hs:2:10: Not in scope: type constructor or class ‛T’ diff --git a/tests/module/mod101.stderr b/tests/module/mod101.stderr index 662c38e89a1de234ce63a5c38b4b106133fefdd6..306884fa8f93460ab89c7e524eeda5619ccee4b3 100644 --- a/tests/module/mod101.stderr +++ b/tests/module/mod101.stderr @@ -1,4 +1,4 @@ mod101.hs:8:5: - Not in scope: data constructor `ConB' - Perhaps you meant `ConA' (imported from Mod101_AuxB) + Not in scope: data constructor ‛ConB’ + Perhaps you meant ‛ConA’ (imported from Mod101_AuxB) diff --git a/tests/module/mod102.stderr b/tests/module/mod102.stderr index 60f7b28ab2e65bece81d65a679e1124eb0f7a376..a33246f12c651e645e4eae632addd29f310cd657 100644 --- a/tests/module/mod102.stderr +++ b/tests/module/mod102.stderr @@ -1,4 +1,4 @@ mod102.hs:8:5: - Not in scope: `methB' - Perhaps you meant `methA' (imported from Mod102_AuxB) + Not in scope: ‛methB’ + Perhaps you meant ‛methA’ (imported from Mod102_AuxB) diff --git a/tests/module/mod110.stderr b/tests/module/mod110.stderr index e1c2eb1b0b0230cdc4f0811638bd6fb7ece399a5..f394f562143e380374be1f708b0a45de84f5c0ea 100644 --- a/tests/module/mod110.stderr +++ b/tests/module/mod110.stderr @@ -1,7 +1,7 @@ mod110.hs:11:10: - Ambiguous occurrence `Eq' - It could refer to either `M.Eq', defined at mod110.hs:7:7 - or `Prelude.Eq', - imported from `Prelude' at mod110.hs:4:1-14 - (and originally defined in `GHC.Classes') + Ambiguous occurrence ‛Eq’ + It could refer to either ‛M.Eq’, defined at mod110.hs:7:7 + or ‛Prelude.Eq’, + imported from ‛Prelude’ at mod110.hs:4:1-14 + (and originally defined in ‛GHC.Classes’) diff --git a/tests/module/mod114.stderr b/tests/module/mod114.stderr index be7202ce0195a88ec2684054e47681272f694c37..84131b47f53d8de832984be0e6a0f0a57cd93131 100644 --- a/tests/module/mod114.stderr +++ b/tests/module/mod114.stderr @@ -1,2 +1,2 @@ -mod114.hs:3:16: Not in scope: type constructor or class `Stuff' +mod114.hs:3:16: Not in scope: type constructor or class ‛Stuff’ diff --git a/tests/module/mod116.stderr b/tests/module/mod116.stderr index c9fb1ded5f070d2cae533758c8d3d432ff096e8b..c46059c5d62e2eedd0e51276afba0d0233d6c4a5 100644 --- a/tests/module/mod116.stderr +++ b/tests/module/mod116.stderr @@ -1,2 +1,2 @@ -mod116.hs:2:18: Not in scope: type constructor or class `M2' +mod116.hs:2:18: Not in scope: type constructor or class ‛M2’ diff --git a/tests/module/mod120.stderr b/tests/module/mod120.stderr index 0d6181e61a1f4dddea6667832dab876fa3e36557..2643f9258f8c0057faa28430cf08470d977ae4b8 100644 --- a/tests/module/mod120.stderr +++ b/tests/module/mod120.stderr @@ -1,2 +1,2 @@ -mod120.hs:5:5: Not in scope: data constructor `Foo' +mod120.hs:5:5: Not in scope: data constructor ‛Foo’ diff --git a/tests/module/mod121.stderr b/tests/module/mod121.stderr index 7c2cf2cc9da4db60e510fffc18798cc939c8fc04..16ea4bf627633e7787eac3638b880dc787ab1ee3 100644 --- a/tests/module/mod121.stderr +++ b/tests/module/mod121.stderr @@ -1,4 +1,4 @@ mod121.hs:5:5: - Not in scope: `m2' - Perhaps you meant `m1' (imported from Mod121_A) + Not in scope: ‛m2’ + Perhaps you meant ‛m1’ (imported from Mod121_A) diff --git a/tests/module/mod122.stderr b/tests/module/mod122.stderr index b65f8e996406c2bf4bd52fddaa22ca154619e40b..45e4f1699c53f15d333057cbdcb8227b85d01e57 100644 --- a/tests/module/mod122.stderr +++ b/tests/module/mod122.stderr @@ -1,2 +1,2 @@ -mod122.hs:5:6: Not in scope: type constructor or class `C' +mod122.hs:5:6: Not in scope: type constructor or class ‛C’ diff --git a/tests/module/mod123.stderr b/tests/module/mod123.stderr index 91f75483d33303e67fe96e584371998b5d7310ba..b631454857af0ec9c192dc6fb1f5d0a1e000fede 100644 --- a/tests/module/mod123.stderr +++ b/tests/module/mod123.stderr @@ -1,2 +1,2 @@ -mod123.hs:5:6: Not in scope: type constructor or class `T' +mod123.hs:5:6: Not in scope: type constructor or class ‛T’ diff --git a/tests/module/mod124.stderr b/tests/module/mod124.stderr index 22644aa07b9732c11440c3d80d66d81b52b43387..66cad7ee3697177144a68a775bdae45299fbef32 100644 --- a/tests/module/mod124.stderr +++ b/tests/module/mod124.stderr @@ -1,2 +1,2 @@ -mod124.hs:6:6: Not in scope: type constructor or class `T' +mod124.hs:6:6: Not in scope: type constructor or class ‛T’ diff --git a/tests/module/mod125.stderr b/tests/module/mod125.stderr index b2f7fa4503cb1cabe9c7c9708d5150862f86be8d..9fa21e7875d7ea9658ac0d970472fcbca6e4c6da 100644 --- a/tests/module/mod125.stderr +++ b/tests/module/mod125.stderr @@ -1,2 +1,2 @@ -mod125.hs:7:5: Not in scope: data constructor `T' +mod125.hs:7:5: Not in scope: data constructor ‛T’ diff --git a/tests/module/mod126.stderr b/tests/module/mod126.stderr index 22243759ca26834e65b282abd3a36855dcd9ec06..474e6eb490c8a85fc763632531c14bc8cdd727c1 100644 --- a/tests/module/mod126.stderr +++ b/tests/module/mod126.stderr @@ -1,2 +1,2 @@ -mod126.hs:7:5: Not in scope: data constructor `T' +mod126.hs:7:5: Not in scope: data constructor ‛T’ diff --git a/tests/module/mod127.stderr b/tests/module/mod127.stderr index 5ffb1b71b69682a6a98b92953e0fa583f7654320..b208503368aedaff128679d82300ca00f1228fda 100644 --- a/tests/module/mod127.stderr +++ b/tests/module/mod127.stderr @@ -1,2 +1,2 @@ -mod127.hs:6:6: Not in scope: type constructor or class `T' +mod127.hs:6:6: Not in scope: type constructor or class ‛T’ diff --git a/tests/module/mod128.stderr-ghc b/tests/module/mod128.stderr-ghc index 18c7864048a17830561771f03890bc716192f76d..4363290fb3b82787269726a130e58289f9b5fb57 100644 --- a/tests/module/mod128.stderr-ghc +++ b/tests/module/mod128.stderr-ghc @@ -1,2 +1,2 @@ -Mod128_A.hs:2:19: Warning: `T' is exported by `T(Con)' and `T' +Mod128_A.hs:2:19: Warning: ‛T’ is exported by ‛T(Con)’ and ‛T’ diff --git a/tests/module/mod130.stderr b/tests/module/mod130.stderr index 27d3f8470e85929da70556ffb8bdde2adc48de7d..bb1aff176b9b87796d38a38fe5296a5cb5a0cf59 100644 --- a/tests/module/mod130.stderr +++ b/tests/module/mod130.stderr @@ -1,2 +1,2 @@ -mod130.hs:7:5: Not in scope: `<' +mod130.hs:7:5: Not in scope: ‛<’ diff --git a/tests/module/mod131.stderr b/tests/module/mod131.stderr index 15d919046422ba77db408410c686f8e575c1d1c5..2b877aaae36e5336364e8964cabb8a6ae1b43bf2 100644 --- a/tests/module/mod131.stderr +++ b/tests/module/mod131.stderr @@ -1,9 +1,9 @@ mod131.hs:2:27: - Conflicting exports for `f': - `module Mod131_B' exports `f' - imported from `Mod131_B' at mod131.hs:3:17 + Conflicting exports for ‛f’: + ‛module Mod131_B’ exports ‛f’ + imported from ‛Mod131_B’ at mod131.hs:3:17 (and originally defined at Mod131_B.hs:3:1) - `Mod131_A.f' exports `Mod131_A.f' - imported qualified from `Mod131_A' at mod131.hs:4:27 + ‛Mod131_A.f’ exports ‛Mod131_A.f’ + imported qualified from ‛Mod131_A’ at mod131.hs:4:27 (and originally defined at Mod131_A.hs:3:1) diff --git a/tests/module/mod132.stderr b/tests/module/mod132.stderr index 8dbf51014cd98cd3d344dd9877461cb3dd7ea24b..4afecd8f874a78e6a53fb7f068245a736fdfae47 100644 --- a/tests/module/mod132.stderr +++ b/tests/module/mod132.stderr @@ -1,2 +1,2 @@ -mod132.hs:6:7: Not in scope: data constructor `Foo' +mod132.hs:6:7: Not in scope: data constructor ‛Foo’ diff --git a/tests/module/mod134.stderr b/tests/module/mod134.stderr index ed8382db637d737ffb954c53613cff3970ff9d0f..3270f93b68e92932bfddf9e879fa5e1c1cb1652b 100644 --- a/tests/module/mod134.stderr +++ b/tests/module/mod134.stderr @@ -1,7 +1,7 @@ mod134.hs:6:19: - Not in scope: `Prelude.head' + Not in scope: ‛Prelude.head’ Perhaps you meant one of these: - `Prelude.read' (imported from Prelude), - `Prelude.reads' (imported from Prelude), - `Prelude.snd' (imported from Prelude) + ‛Prelude.read’ (imported from Prelude), + ‛Prelude.reads’ (imported from Prelude), + ‛Prelude.snd’ (imported from Prelude) diff --git a/tests/module/mod136.stderr b/tests/module/mod136.stderr index 242d20b3dedb5c6ea07fd63c651a8ffe805086c2..2a0feed97e240f0a36989027801a11cfc5d4c253 100644 --- a/tests/module/mod136.stderr +++ b/tests/module/mod136.stderr @@ -1,6 +1,6 @@ mod136.hs:6:5: - Not in scope: `zipWith5' + Not in scope: ‛zipWith5’ Perhaps you meant one of these: - `zipWith' (imported from Mod136_A), - `zipWith3' (imported from Mod136_A) + ‛zipWith’ (imported from Mod136_A), + ‛zipWith3’ (imported from Mod136_A) diff --git a/tests/module/mod138.stderr b/tests/module/mod138.stderr index 2e8a5190d6ed9a211576be67e4698e303a991c0f..5b006ee3264f3b64323a20b8272904afd78bf7ac 100644 --- a/tests/module/mod138.stderr +++ b/tests/module/mod138.stderr @@ -1,2 +1,2 @@ -mod138.hs:7:5: Not in scope: `isLatin1' +mod138.hs:7:5: Not in scope: ‛isLatin1’ diff --git a/tests/module/mod14.stderr-ghc b/tests/module/mod14.stderr-ghc index be838c38869e0dbaa3e7587432513802c779caa6..9eec91d71556a5e5e0b5715a7cc51e7cf0f89960 100644 --- a/tests/module/mod14.stderr-ghc +++ b/tests/module/mod14.stderr-ghc @@ -1,4 +1,3 @@ -mod14.hs:2:10: - Warning: `m2' is exported by `C(m1, m2, m2, m3)' and `C(m1, m2, m2, - m3)' +mod14.hs:2:10: Warning: + ‛m2’ is exported by ‛C(m1, m2, m2, m3)’ and ‛C(m1, m2, m2, m3)’ diff --git a/tests/module/mod142.stderr b/tests/module/mod142.stderr index fcd7665aaa7aa48a0cc951f54080bede0a2808aa..f31723d0209ac25d03f4eadbe0b2a676de534ecc 100644 --- a/tests/module/mod142.stderr +++ b/tests/module/mod142.stderr @@ -1,7 +1,7 @@ mod142.hs:2:21: - Conflicting exports for `x': - `module Mod142_A' exports `Mod142_A.x' - imported from `Mod142_A' at mod142.hs:4:1-15 + Conflicting exports for ‛x’: + ‛module Mod142_A’ exports ‛Mod142_A.x’ + imported from ‛Mod142_A’ at mod142.hs:4:1-15 (and originally defined at Mod142_A.hs:3:1) - `module M' exports `M.x' defined at mod142.hs:6:1 + ‛module M’ exports ‛M.x’ defined at mod142.hs:6:1 diff --git a/tests/module/mod143.stderr b/tests/module/mod143.stderr index 15042a21d8e298bd6efe73dba197291653f0c5cb..cdec14c83e06fb68a8e942d29ea5adedabf2cba2 100644 --- a/tests/module/mod143.stderr +++ b/tests/module/mod143.stderr @@ -1,7 +1,7 @@ mod143.hs:2:21: - Conflicting exports for `Foo': - `module Mod143_A' exports `Mod143_A.Foo' - imported from `Mod143_A' at mod143.hs:4:1-15 + Conflicting exports for ‛Foo’: + ‛module Mod143_A’ exports ‛Mod143_A.Foo’ + imported from ‛Mod143_A’ at mod143.hs:4:1-15 (and originally defined at Mod143_A.hs:3:6-8) - `module M' exports `M.Foo' defined at mod143.hs:6:6 + ‛module M’ exports ‛M.Foo’ defined at mod143.hs:6:6 diff --git a/tests/module/mod144.stderr b/tests/module/mod144.stderr index 87c49abde1d53b842a0b7edd0680e14f5414e585..9742a7611124c8c7728ed2c18281fd77192bd4c3 100644 --- a/tests/module/mod144.stderr +++ b/tests/module/mod144.stderr @@ -1,7 +1,7 @@ mod144.hs:2:27: - Conflicting exports for `Bar': - `module Mod144_A' exports `Mod144_A.Bar' - imported from `Mod144_A' at mod144.hs:4:1-15 - `module M' exports `M.Bar' defined at mod144.hs:6:13 + Conflicting exports for ‛Bar’: + ‛module Mod144_A’ exports ‛Mod144_A.Bar’ + imported from ‛Mod144_A’ at mod144.hs:4:1-15 + ‛module M’ exports ‛M.Bar’ defined at mod144.hs:6:13 exit(1) diff --git a/tests/module/mod145.stderr b/tests/module/mod145.stderr index fcbf0b6731bca4222ba33d6d2ee77a344b36b93a..37109b395351425f14be77707b744cdd01004de6 100644 --- a/tests/module/mod145.stderr +++ b/tests/module/mod145.stderr @@ -1,7 +1,7 @@ mod145.hs:2:30: - Conflicting exports for `m1': - `module Mod145_A' exports `Mod145_A.m1' - imported from `Mod145_A' at mod145.hs:4:1-15 + Conflicting exports for ‛m1’: + ‛module Mod145_A’ exports ‛Mod145_A.m1’ + imported from ‛Mod145_A’ at mod145.hs:4:1-15 (and originally defined at Mod145_A.hs:4:3-4) - `module Mod145' exports `Mod145.m1' defined at mod145.hs:7:3 + ‛module Mod145’ exports ‛Mod145.m1’ defined at mod145.hs:7:3 diff --git a/tests/module/mod146.stderr b/tests/module/mod146.stderr index ef99dc3ca53ee062bcddd4212041210286d9800f..160c76c116f0a9a0a02bf1cf19e4b25ce9736aa7 100644 --- a/tests/module/mod146.stderr +++ b/tests/module/mod146.stderr @@ -1,7 +1,7 @@ mod146.hs:2:30: - Conflicting exports for `m1': - `module Mod145_A' exports `Mod145_A.m1' - imported from `Mod145_A' at mod146.hs:4:1-15 - `module Mod146' exports `Mod146.m1' defined at mod146.hs:7:3 + Conflicting exports for ‛m1’: + ‛module Mod145_A’ exports ‛Mod145_A.m1’ + imported from ‛Mod145_A’ at mod146.hs:4:1-15 + ‛module Mod146’ exports ‛Mod146.m1’ defined at mod146.hs:7:3 exit(1) diff --git a/tests/module/mod147.stderr b/tests/module/mod147.stderr index b3bbf76612acd6a8fe5d98da2c139948567e0b9f..f57f2d8ad48608a145ded10cf0fbd4347a811da4 100644 --- a/tests/module/mod147.stderr +++ b/tests/module/mod147.stderr @@ -1,2 +1,2 @@ -mod147.hs:6:5: Not in scope: data constructor `D' +mod147.hs:6:5: Not in scope: data constructor ‛D’ diff --git a/tests/module/mod150.stderr b/tests/module/mod150.stderr index 8ddd6869401d2aaeb3033199e20ecb045da7a95f..e1748d7725f0ce022e5de573497fedf1c917e3a8 100644 --- a/tests/module/mod150.stderr +++ b/tests/module/mod150.stderr @@ -1,7 +1,7 @@ mod150.hs:2:20: - Conflicting exports for `id': - `module Prelude' exports `Prelude.id' - imported from `Prelude' at mod150.hs:2:8 - (and originally defined in `GHC.Base') - `module M' exports `M.id' defined at mod150.hs:2:42 + Conflicting exports for ‛id’: + ‛module Prelude’ exports ‛Prelude.id’ + imported from ‛Prelude’ at mod150.hs:2:8 + (and originally defined in ‛GHC.Base’) + ‛module M’ exports ‛M.id’ defined at mod150.hs:2:42 diff --git a/tests/module/mod151.stderr b/tests/module/mod151.stderr index 3206da9de0ad757107b1b9f649e1b535193c10cb..505fdb8c4c9dea5096900549ecd91da8bb06cdc8 100644 --- a/tests/module/mod151.stderr +++ b/tests/module/mod151.stderr @@ -1,7 +1,7 @@ mod151.hs:2:20: - Ambiguous occurrence `id' - It could refer to either `M.id', defined at mod151.hs:2:30 - or `Prelude.id', - imported from `Prelude' at mod151.hs:2:8 - (and originally defined in `GHC.Base') + Ambiguous occurrence ‛id’ + It could refer to either ‛M.id’, defined at mod151.hs:2:30 + or ‛Prelude.id’, + imported from ‛Prelude’ at mod151.hs:2:8 + (and originally defined in ‛GHC.Base’) diff --git a/tests/module/mod152.stderr b/tests/module/mod152.stderr index 1ad302287f829e70f5ab9622ba2ea6cadd2a223c..e385e1e6e4bf0ff8f100f7b7f7d874f4b2936006 100644 --- a/tests/module/mod152.stderr +++ b/tests/module/mod152.stderr @@ -1,14 +1,14 @@ mod152.hs:2:26: - Ambiguous occurrence `id' - It could refer to either `M.id', defined at mod152.hs:2:36 - or `Prelude.id', - imported from `Prelude' at mod152.hs:2:8 - (and originally defined in `GHC.Base') + Ambiguous occurrence ‛id’ + It could refer to either ‛M.id’, defined at mod152.hs:2:36 + or ‛Prelude.id’, + imported from ‛Prelude’ at mod152.hs:2:8 + (and originally defined in ‛GHC.Base’) mod152.hs:2:26: - Conflicting exports for `id': - `module Prelude' exports `Prelude.id' - imported from `Prelude' at mod152.hs:2:8 - (and originally defined in `GHC.Base') - `id' exports `M.id' defined at mod152.hs:2:36 + Conflicting exports for ‛id’: + ‛module Prelude’ exports ‛Prelude.id’ + imported from ‛Prelude’ at mod152.hs:2:8 + (and originally defined in ‛GHC.Base’) + ‛id’ exports ‛M.id’ defined at mod152.hs:2:36 diff --git a/tests/module/mod153.stderr b/tests/module/mod153.stderr index da4751b7b41cf7ac5cd0088574a851d67587ac54..79532da8462086c5eef5f00a305a537773e9ba7f 100644 --- a/tests/module/mod153.stderr +++ b/tests/module/mod153.stderr @@ -1,7 +1,7 @@ mod153.hs:2:11: - Ambiguous occurrence `id' - It could refer to either `M.id', defined at mod153.hs:2:21 - or `Prelude.id', - imported from `Prelude' at mod153.hs:2:8 - (and originally defined in `GHC.Base') + Ambiguous occurrence ‛id’ + It could refer to either ‛M.id’, defined at mod153.hs:2:21 + or ‛Prelude.id’, + imported from ‛Prelude’ at mod153.hs:2:8 + (and originally defined in ‛GHC.Base’) diff --git a/tests/module/mod155.stderr b/tests/module/mod155.stderr index 889e9772c9d9aa6a90e3523dd7583c82c26fc3b2..8c026629784a1c1604b5775d9ad1f7c79dbb146f 100644 --- a/tests/module/mod155.stderr +++ b/tests/module/mod155.stderr @@ -1,7 +1,7 @@ mod155.hs:2:10: - Conflicting exports for `id': - `module M' exports `M.id' - imported from `Prelude' at mod155.hs:4:1-19 - (and originally defined in `GHC.Base') - `module M' exports `M.id' defined at mod155.hs:5:1 + Conflicting exports for ‛id’: + ‛module M’ exports ‛M.id’ + imported from ‛Prelude’ at mod155.hs:4:1-19 + (and originally defined in ‛GHC.Base’) + ‛module M’ exports ‛M.id’ defined at mod155.hs:5:1 diff --git a/tests/module/mod158.stderr b/tests/module/mod158.stderr index 7f6c7d7e859ad59523e37601995436f56aab0d51..412c05c1b770949773c2d3053357d22e665c6c48 100644 --- a/tests/module/mod158.stderr +++ b/tests/module/mod158.stderr @@ -1,3 +1,3 @@ -mod158.hs:12:5: Not in scope: data constructor `C' +mod158.hs:12:5: Not in scope: data constructor ‛C’ exit(1) diff --git a/tests/module/mod160.stderr b/tests/module/mod160.stderr index c2dbd5647a026647e64888cd3c9d44b7756789ec..1a27420f61286e0a1febb8b0d41b805fb941b88f 100644 --- a/tests/module/mod160.stderr +++ b/tests/module/mod160.stderr @@ -1,6 +1,6 @@ mod160.hs:12:5: - Not in scope: `m3' + Not in scope: ‛m3’ Perhaps you meant one of these: - `m1' (imported from Mod159_D), `m2' (imported from Mod159_D) + ‛m1’ (imported from Mod159_D), ‛m2’ (imported from Mod159_D) exit(1) diff --git a/tests/module/mod161.stderr b/tests/module/mod161.stderr index 1272093eaae62ee3d9fc2e15d3621af737f37dcb..f5dc9fd3789e4eafe1e4d06646c471b5cf50e2aa 100644 --- a/tests/module/mod161.stderr +++ b/tests/module/mod161.stderr @@ -1,2 +1,2 @@ -mod161.hs:2:12: Not in scope: `bar' +mod161.hs:2:12: Not in scope: ‛bar’ diff --git a/tests/module/mod164.stderr b/tests/module/mod164.stderr index 5f18adc025bd57052d0e6fcc82dcf6ac535ea11c..e6ebc70bcafcbd785d10143ac936ff165da8f458 100644 --- a/tests/module/mod164.stderr +++ b/tests/module/mod164.stderr @@ -1,9 +1,9 @@ mod164.hs:9:5: - Ambiguous occurrence `D1' - It could refer to either `Mod164_A.D1', - imported from `Mod164_A' at mod164.hs:4:1-15 + Ambiguous occurrence ‛D1’ + It could refer to either ‛Mod164_A.D1’, + imported from ‛Mod164_A’ at mod164.hs:4:1-15 (and originally defined at Mod164_A.hs:3:10-11) - or `Mod164_B.D1', - imported from `Mod164_B' at mod164.hs:5:1-15 + or ‛Mod164_B.D1’, + imported from ‛Mod164_B’ at mod164.hs:5:1-15 (and originally defined at Mod164_B.hs:3:10-11) diff --git a/tests/module/mod165.stderr b/tests/module/mod165.stderr index 293eb993cce0c64dd1252d448d87db9062cac2be..334ad0c7f81bcf5cf5a3c56b694ab6ce6a41d918 100644 --- a/tests/module/mod165.stderr +++ b/tests/module/mod165.stderr @@ -1,7 +1,7 @@ mod165.hs:9:5: - Ambiguous occurrence `A.D1' - It could refer to either `A.D1', - imported from `Mod164_A' at mod165.hs:4:1-20 - or `A.D1', imported from `Mod164_B' at mod165.hs:5:1-20 + Ambiguous occurrence ‛A.D1’ + It could refer to either ‛A.D1’, + imported from ‛Mod164_A’ at mod165.hs:4:1-20 + or ‛A.D1’, imported from ‛Mod164_B’ at mod165.hs:5:1-20 exit(1) diff --git a/tests/module/mod17.stderr b/tests/module/mod17.stderr index 1192637967deb88b8dce8a5fab57af13432eb25b..3a911609dd56c16830b2ed7ea9b8531cba60673d 100644 --- a/tests/module/mod17.stderr +++ b/tests/module/mod17.stderr @@ -1,4 +1,4 @@ mod17.hs:2:10: - The export item `C(m1, m2, m3, Left)' + The export item ‛C(m1, m2, m3, Left)’ attempts to export constructors or class methods that are not visible here diff --git a/tests/module/mod174.stderr b/tests/module/mod174.stderr index 6ef2e753d0275b1bbcfd66c421fd5f97babc546b..020f942087f449e57e797adf8aa191abe9f929d1 100644 --- a/tests/module/mod174.stderr +++ b/tests/module/mod174.stderr @@ -1,3 +1,3 @@ mod174.hs:1:1: - The main function `main' is not exported by module `Main' + The main function ‛main’ is not exported by module ‛Main’ diff --git a/tests/module/mod176.stderr b/tests/module/mod176.stderr index 7301324a91c892ff9aa1d8586b985739cf42e14e..4dcd689a8a8d9bd837345ccd29b535a69f6dd4d4 100644 --- a/tests/module/mod176.stderr +++ b/tests/module/mod176.stderr @@ -1,4 +1,4 @@ -mod176.hs:4:1: - Warning: The import of `return, Monad' - from module `Control.Monad' is redundant +mod176.hs:4:1: Warning: + The import of ‛return, Monad’ + from module ‛Control.Monad’ is redundant diff --git a/tests/module/mod177.stderr b/tests/module/mod177.stderr index 1dc7c5c6ae1c6e6374257010ed2ef1155d7693bf..fe82c64569b1f2b0cb524f3bc1ee184161526e86 100644 --- a/tests/module/mod177.stderr +++ b/tests/module/mod177.stderr @@ -1,5 +1,5 @@ -mod177.hs:4:1: - Warning: The import of `Data.Maybe' is redundant - except perhaps to import instances from `Data.Maybe' - To import instances alone, use: import Data.Maybe() +mod177.hs:4:1: Warning: + The import of ‛Data.Maybe’ is redundant + except perhaps to import instances from ‛Data.Maybe’ + To import instances alone, use: import Data.Maybe() diff --git a/tests/module/mod178.stderr b/tests/module/mod178.stderr index 3edd9a40668cdf9262865db42639de2dfc40eab4..755324b58c418f4028c731011639008074d6a3aa 100644 --- a/tests/module/mod178.stderr +++ b/tests/module/mod178.stderr @@ -1,5 +1,5 @@ Mod178_2.hs:1:1: File name does not match module name: - Saw: `Main' - Expected: `Mod178_2' + Saw: ‛Main’ + Expected: ‛Mod178_2’ diff --git a/tests/module/mod18.stderr b/tests/module/mod18.stderr index 5f8ba3457b1b689770c0d19f2828783db450244b..1ef381f90e5c4208ade1eb5e1bc1e615de1422b8 100644 --- a/tests/module/mod18.stderr +++ b/tests/module/mod18.stderr @@ -1,5 +1,5 @@ mod18.hs:3:6: - Multiple declarations of `T' + Multiple declarations of ‛T’ Declared at: mod18.hs:2:6 mod18.hs:3:6 diff --git a/tests/module/mod180.stderr b/tests/module/mod180.stderr index 2790d92a33e008a80457b038b749c593fdbbcc19..2647f2ada7badc69f7532bad8a6cc2722fb3aef2 100644 --- a/tests/module/mod180.stderr +++ b/tests/module/mod180.stderr @@ -1,5 +1,5 @@ mod180.hs:8:5: - Couldn't match expected type `T' with actual type `main:Mod180_A.T' + Couldn't match expected type ‛T’ with actual type ‛main:Mod180_A.T’ In the expression: x - In an equation for `z': z = x + In an equation for ‛z’: z = x diff --git a/tests/module/mod19.stderr b/tests/module/mod19.stderr index 9178ceba402464309ba0864fe9b977181956acfd..fd2f5f3192e1f9c4273c612f6a0808d0c54340a9 100644 --- a/tests/module/mod19.stderr +++ b/tests/module/mod19.stderr @@ -1,10 +1,10 @@ mod19.hs:3:7: - Multiple declarations of `C' + Multiple declarations of ‛C’ Declared at: mod19.hs:2:7 mod19.hs:3:7 mod19.hs:3:17: - Multiple declarations of `m' + Multiple declarations of ‛m’ Declared at: mod19.hs:2:17 mod19.hs:3:17 diff --git a/tests/module/mod2.stderr b/tests/module/mod2.stderr index e928ab3b1919c02119e4e27d406f9f262e53bdd7..c98e3f5ce69e763f9965c2eeeeada82740456a8a 100644 --- a/tests/module/mod2.stderr +++ b/tests/module/mod2.stderr @@ -1,4 +1,4 @@ mod2.hs:3:1: - Failed to load interface for `N' + Failed to load interface for ‛N’ Use -v to see a list of the files searched for. diff --git a/tests/module/mod20.stderr b/tests/module/mod20.stderr index 123564201aacb2c23ab9038b195c61c974316c61..eb92e4a021d8917372a4b4d402b3345e2a267c1f 100644 --- a/tests/module/mod20.stderr +++ b/tests/module/mod20.stderr @@ -1,5 +1,5 @@ mod20.hs:3:18: - Multiple declarations of `m' + Multiple declarations of ‛m’ Declared at: mod20.hs:2:18 mod20.hs:3:18 diff --git a/tests/module/mod21.stderr b/tests/module/mod21.stderr index b5a86c0749cbcbd7345867767e86427b1a932095..34620a6bd4d5269c4ce9646d2d0f1394aca59852 100644 --- a/tests/module/mod21.stderr +++ b/tests/module/mod21.stderr @@ -1,5 +1,5 @@ mod21.hs:3:6: - Multiple declarations of `T' + Multiple declarations of ‛T’ Declared at: mod21.hs:2:6 mod21.hs:3:6 diff --git a/tests/module/mod22.stderr b/tests/module/mod22.stderr index 786043d4f24115fd7807ec93767b78df51efc18d..0e05809361b260960acdb1bf91d8fabd5dea5bce 100644 --- a/tests/module/mod22.stderr +++ b/tests/module/mod22.stderr @@ -1,5 +1,5 @@ mod22.hs:3:11: - Multiple declarations of `K' + Multiple declarations of ‛K’ Declared at: mod22.hs:2:11 mod22.hs:3:11 diff --git a/tests/module/mod23.stderr b/tests/module/mod23.stderr index 3085cfff37f1248e3daef588433b99f38b997876..77f37d3c221fe99267be8025d304ce34fa409672 100644 --- a/tests/module/mod23.stderr +++ b/tests/module/mod23.stderr @@ -1,5 +1,5 @@ mod23.hs:3:8: - Conflicting definitions for `a' + Conflicting definitions for ‛a’ Bound at: mod23.hs:3:8 mod23.hs:3:10 diff --git a/tests/module/mod24.stderr b/tests/module/mod24.stderr index 12ed89e59adec070e2a3b6ffa682d83450ebb1d2..9f2bb5479876b99ea854cb08e3038be2460b72b6 100644 --- a/tests/module/mod24.stderr +++ b/tests/module/mod24.stderr @@ -1,5 +1,5 @@ mod24.hs:3:8: - Conflicting definitions for `a' + Conflicting definitions for ‛a’ Bound at: mod24.hs:3:8 mod24.hs:3:10 diff --git a/tests/module/mod25.stderr b/tests/module/mod25.stderr index 49a15454aaeb0f4fc05c35067e04d530b63ad60c..6d8fd0349dce09f9825a375084546516ad3e9f1a 100644 --- a/tests/module/mod25.stderr +++ b/tests/module/mod25.stderr @@ -1,2 +1,2 @@ -mod25.hs:3:16: Not in scope: type variable `b' +mod25.hs:3:16: Not in scope: type variable ‛b’ diff --git a/tests/module/mod26.stderr b/tests/module/mod26.stderr index 914f879d61cc01214263f6997432ddfe47058928..0ee82dc57fe40570024647170ff58d13137879fa 100644 --- a/tests/module/mod26.stderr +++ b/tests/module/mod26.stderr @@ -1,2 +1,2 @@ -mod26.hs:3:21: Not in scope: type variable `b' +mod26.hs:3:21: Not in scope: type variable ‛b’ diff --git a/tests/module/mod29.stderr b/tests/module/mod29.stderr index ba62a734f086d7951f6529a8d5d91b73e155a99d..2abdd7d1de6b50c2249c1df8c709f615492dbca4 100644 --- a/tests/module/mod29.stderr +++ b/tests/module/mod29.stderr @@ -1,2 +1,2 @@ -mod29.hs:6:12: Not in scope: type constructor or class `Char' +mod29.hs:6:12: Not in scope: type constructor or class ‛Char’ diff --git a/tests/module/mod3.stderr b/tests/module/mod3.stderr index 2b0cae95fafc1187a2c4be89fe0fb14db9fb34b8..f07a431b451385b1d4b3fe6b10c09bc285be818e 100644 --- a/tests/module/mod3.stderr +++ b/tests/module/mod3.stderr @@ -1,4 +1,4 @@ mod3.hs:2:10: - The export item `T(K1)' + The export item ‛T(K1)’ attempts to export constructors or class methods that are not visible here diff --git a/tests/module/mod36.stderr b/tests/module/mod36.stderr index 9d6b97bfa9a692eff3101ade85394a6a5502e58a..6ec42d92b0f182e98112da94f1b72a7d59db77f3 100644 --- a/tests/module/mod36.stderr +++ b/tests/module/mod36.stderr @@ -1,2 +1,2 @@ -mod36.hs:5:5: Not in scope: `const' +mod36.hs:5:5: Not in scope: ‛const’ diff --git a/tests/module/mod38.stderr b/tests/module/mod38.stderr index b04dd77f4bc85a0faeb0a0a29082374d4155bbf5..7c5f277048f9642cae30e6cf8510f4b7678f4d38 100644 --- a/tests/module/mod38.stderr +++ b/tests/module/mod38.stderr @@ -1,5 +1,5 @@ mod38.hs:4:7: - Multiple declarations of `C' + Multiple declarations of ‛C’ Declared at: mod38.hs:3:6 mod38.hs:4:7 diff --git a/tests/module/mod4.stderr b/tests/module/mod4.stderr index 84d7cfa19e39356ca7337a4b4feda6acc552b86a..38ea462fde7469fd461e5146f59330f995f174ed 100644 --- a/tests/module/mod4.stderr +++ b/tests/module/mod4.stderr @@ -1,4 +1,4 @@ mod4.hs:2:10: - The export item `T(K1, K2)' + The export item ‛T(K1, K2)’ attempts to export constructors or class methods that are not visible here diff --git a/tests/module/mod40.stderr b/tests/module/mod40.stderr index ed77e80f82b4378890bdf8357a503fbe5f95bcca..aa641e4d8a4488dacd8eb1e62801bee5f935dda3 100644 --- a/tests/module/mod40.stderr +++ b/tests/module/mod40.stderr @@ -1,8 +1,8 @@ mod40.hs:3:1: Cycle in class declaration (via superclasses): C1 -> C2 -> C1 - In the class declaration for `C1' + In the class declaration for ‛C1’ mod40.hs:4:1: Cycle in class declaration (via superclasses): C2 -> C1 -> C2 - In the class declaration for `C2' + In the class declaration for ‛C2’ diff --git a/tests/module/mod41.stderr b/tests/module/mod41.stderr index 5ec4355fbe2a160b8446e5b5052654dacde896b5..921fc959425f4018e610192a230380c91aa32ee1 100644 --- a/tests/module/mod41.stderr +++ b/tests/module/mod41.stderr @@ -1,8 +1,8 @@ mod41.hs:3:18: - Illegal instance declaration for `Eq (Either a a)' + 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 -XFlexibleInstances if you want to disable this.) - In the instance declaration for `Eq (Either a a)' + In the instance declaration for ‛Eq (Either a a)’ diff --git a/tests/module/mod42.stderr b/tests/module/mod42.stderr index 319f42ba0501f37223008864c4f361f4a1d36934..8fd553febda56566f03493bb8300696aafab9cb1 100644 --- a/tests/module/mod42.stderr +++ b/tests/module/mod42.stderr @@ -1,8 +1,8 @@ mod42.hs:3:10: - Illegal instance declaration for `Eq a' + 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 -XFlexibleInstances if you want to disable this.) - In the instance declaration for `Eq a' + In the instance declaration for ‛Eq a’ diff --git a/tests/module/mod43.stderr b/tests/module/mod43.stderr index 7fc4da0b8b1966481148845781a77602238e5799..5630a4ae584d8c762683a2a12d0ee8ddab98f38e 100644 --- a/tests/module/mod43.stderr +++ b/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 -XTypeSynonymInstances if you want to disable this.) - In the instance declaration for `Eq String' + Illegal instance declaration for ‛Eq String’ + (All instance types must be of the form (T t1 ... tn) + where T is not a synonym. + Use -XTypeSynonymInstances if you want to disable this.) + In the instance declaration for ‛Eq String’ diff --git a/tests/module/mod45.stderr b/tests/module/mod45.stderr index 8aadf22b1011d155b473a80b8589bb89b7b05413..2673763cb07b53cb31122a0ea47bf6eabe17d593 100644 --- a/tests/module/mod45.stderr +++ b/tests/module/mod45.stderr @@ -3,4 +3,4 @@ mod45.hs:5:11: Illegal type signature in instance declaration: (==) :: T -> T -> Bool (Use -XInstanceSigs to allow this) - In the instance declaration for `Eq T' + In the instance declaration for ‛Eq T’ diff --git a/tests/module/mod46.stderr b/tests/module/mod46.stderr index c4c82032668a174e6ba45db4f9081d8dea2c38c9..516215c6791e3a0662f72fddfafcf6c0342e9438 100644 --- a/tests/module/mod46.stderr +++ b/tests/module/mod46.stderr @@ -2,4 +2,4 @@ mod46.hs:4:10: No instance for (Eq T) arising from the superclasses of an instance declaration - In the instance declaration for `Ord T' + In the instance declaration for ‛Ord T’ diff --git a/tests/module/mod47.stderr b/tests/module/mod47.stderr index 1b8fd0b4113a137912a14f153ae2aacd1ee846aa..44aba92178a0faf93d5e8bb2696bf93041db4d22 100644 --- a/tests/module/mod47.stderr +++ b/tests/module/mod47.stderr @@ -6,4 +6,4 @@ mod47.hs:6:10: bound by the instance declaration at mod47.hs:6:10-34 Possible fix: add (Num a) to the context of the instance declaration - In the instance declaration for `Bar [a]' + In the instance declaration for ‛Bar [a]’ diff --git a/tests/module/mod49.stderr b/tests/module/mod49.stderr index f08b36e0c41758bb97bd022a83ea6e308613d519..f0fca3e7addbe1e4d078a13002b1ca06f64f92f5 100644 --- a/tests/module/mod49.stderr +++ b/tests/module/mod49.stderr @@ -1,2 +1,2 @@ -mod49.hs:5:3: `y' is not a (visible) method of class `C' +mod49.hs:5:3: ‛y’ is not a (visible) method of class ‛C’ diff --git a/tests/module/mod5.stderr-ghc b/tests/module/mod5.stderr-ghc index 7992560ca3e31e2c79c37f83203699122a2b4a81..b48307ab373260156b8d144ec63ecfaf1950d287 100644 --- a/tests/module/mod5.stderr-ghc +++ b/tests/module/mod5.stderr-ghc @@ -1,3 +1,3 @@ -mod5.hs:2:10: - Warning: `K1' is exported by `T(K1, K1)' and `T(K1, K1)' +mod5.hs:2:10: Warning: + ‛K1’ is exported by ‛T(K1, K1)’ and ‛T(K1, K1)’ diff --git a/tests/module/mod50.stderr b/tests/module/mod50.stderr index 9357f7a2d81363e7ccc90ba661e3c1bf839ac170..453f2f2da38f7501b03535c38dbc0520d451a87d 100644 --- a/tests/module/mod50.stderr +++ b/tests/module/mod50.stderr @@ -1,2 +1,2 @@ -mod50.hs:3:22: Not in scope: type constructor or class `Foo' +mod50.hs:3:22: Not in scope: type constructor or class ‛Foo’ diff --git a/tests/module/mod53.stderr b/tests/module/mod53.stderr index 2e142a5bfbf3938a3279b97ab55542e6ae799d37..4129d3995959c580d6eeac2f4dfcf63983206625 100644 --- a/tests/module/mod53.stderr +++ b/tests/module/mod53.stderr @@ -1,5 +1,5 @@ - -mod53.hs:4:22: - Can't make a derived instance of `C T': - `C' is not a derivable class - In the data declaration for `T' + +mod53.hs:4:22: + Can't make a derived instance of ‛C T’: + ‛C’ is not a derivable class + In the data declaration for ‛T’ diff --git a/tests/module/mod55.stderr b/tests/module/mod55.stderr index 9db5ea55cc29a315fb91fa21857c65410821e16b..a1f388f339e4ef7643a9b591521691d1f40f73c8 100644 --- a/tests/module/mod55.stderr +++ b/tests/module/mod55.stderr @@ -1,6 +1,6 @@ - -mod55.hs:3:26: - Can't make a derived instance of `Enum T': - `T' must be an enumeration type - (an enumeration consists of one or more nullary, non-GADT constructors) - In the data declaration for `T' + +mod55.hs:3:26: + Can't make a derived instance of ‛Enum T’: + ‛T’ must be an enumeration type + (an enumeration consists of one or more nullary, non-GADT constructors) + In the data declaration for ‛T’ diff --git a/tests/module/mod56.stderr b/tests/module/mod56.stderr index db194406edaa65f3428e891a9d45b768652c6584..44560cb76429332a8a679df37d78c7061bc96a40 100644 --- a/tests/module/mod56.stderr +++ b/tests/module/mod56.stderr @@ -1,8 +1,8 @@ - -mod56.hs:4:39: - Can't make a derived instance of `Ix T': - `T' must be an enumeration type - (an enumeration consists of one or more nullary, non-GADT constructors) - or - `T' must have precisely one constructor - In the data declaration for `T' + +mod56.hs:4:39: + Can't make a derived instance of ‛Ix T’: + ‛T’ must be an enumeration type + (an enumeration consists of one or more nullary, non-GADT constructors) + or + ‛T’ must have precisely one constructor + In the data declaration for ‛T’ diff --git a/tests/module/mod59.stderr b/tests/module/mod59.stderr index c08db2a55fdb1c8b0eb79fb0b08c1fea9f020f69..26e74034ca892f559d1cbd93017387222382e7b5 100644 --- a/tests/module/mod59.stderr +++ b/tests/module/mod59.stderr @@ -1,2 +1,2 @@ -mod59.hs:3:3: Not in scope: data constructor `K' +mod59.hs:3:3: Not in scope: data constructor ‛K’ diff --git a/tests/module/mod60.stderr b/tests/module/mod60.stderr index f363cb933bcebf6ea6f2c0096aa3c98d9ac43907..b25ee48b16a14755d9e86c8b6ad1186fd338cb49 100644 --- a/tests/module/mod60.stderr +++ b/tests/module/mod60.stderr @@ -1,5 +1,5 @@ mod60.hs:3:4: - Constructor `Left' should have 1 argument, but has been given none + Constructor ‛Left’ should have 1 argument, but has been given none In the pattern: Left - In an equation for `f': f (Left) = error "foo" + In an equation for ‛f’: f (Left) = error "foo" diff --git a/tests/module/mod61.stderr b/tests/module/mod61.stderr index 3ac4937437ac7b26019b85e8f499ce49d11fd907..e96817f659d95a0c1790735cacc261eaa076253b 100644 --- a/tests/module/mod61.stderr +++ b/tests/module/mod61.stderr @@ -1,4 +1,4 @@ mod61.hs:3:11: Precedence parsing error - cannot mix `==' [infix 4] and `==' [infix 4] in the same infix expression + cannot mix ‛==’ [infix 4] and ‛==’ [infix 4] in the same infix expression diff --git a/tests/module/mod62.stderr b/tests/module/mod62.stderr index d435dbd6b91e435ddf5ea4bd06775e88a4d0278f..cac9a6f32c1e50373c0978a25e957eeafb1bf94d 100644 --- a/tests/module/mod62.stderr +++ b/tests/module/mod62.stderr @@ -2,5 +2,5 @@ mod62.hs:3:9: Qualified name in binding position: M.y mod62.hs:3:22: - Not in scope: `M.y' - Perhaps you meant `M.x' (line 3) + Not in scope: ‛M.y’ + Perhaps you meant ‛M.x’ (line 3) diff --git a/tests/module/mod63.stderr b/tests/module/mod63.stderr index a4745b2e49ba6301c120b062ef973daa5ff87e87..3a60973366d3a5778cdf3eba11f2f2f364009882 100644 --- a/tests/module/mod63.stderr +++ b/tests/module/mod63.stderr @@ -1,5 +1,5 @@ mod63.hs:3:1: - Equations for `f' have different numbers of arguments + Equations for ‛f’ have different numbers of arguments mod63.hs:3:1-8 mod63.hs:4:1-11 diff --git a/tests/module/mod66.stderr b/tests/module/mod66.stderr index a1bf5a2af7cf3ff9cee5b62cdd26d61ab9158d85..b5fc83fa571dc6b228925ae45a503d9e55e5a842 100644 --- a/tests/module/mod66.stderr +++ b/tests/module/mod66.stderr @@ -1,5 +1,5 @@ mod66.hs:5:1: - Multiple declarations of `f' + Multiple declarations of ‛f’ Declared at: mod66.hs:3:1 mod66.hs:5:1 diff --git a/tests/module/mod67.stderr b/tests/module/mod67.stderr index 2c2323b83f2ea97b023e2a99c7fc97af26e1b652..a46c8ab03a94f7c24b62838c77cd26ccd498b3c9 100644 --- a/tests/module/mod67.stderr +++ b/tests/module/mod67.stderr @@ -1,3 +1,3 @@ mod67.hs:3:1: - The type signature for `f' lacks an accompanying binding + The type signature for ‛f’ lacks an accompanying binding diff --git a/tests/module/mod68.stderr b/tests/module/mod68.stderr index f8490a06b6fdd855651d7d3df57401d45ff94500..0d46be073b70116a3c9a5194948ce034b3552b3a 100644 --- a/tests/module/mod68.stderr +++ b/tests/module/mod68.stderr @@ -1,5 +1,5 @@ - -mod68.hs:4:1: - Duplicate type signatures for `f' - at mod68.hs:3:1 - mod68.hs:4:1 + +mod68.hs:4:1: + Duplicate type signatures for ‛f’ + at mod68.hs:3:1 + mod68.hs:4:1 diff --git a/tests/module/mod7.stderr b/tests/module/mod7.stderr index f9119cd786660e02fc4a3439e10a496764ab8791..5a446d38772f91557ca4e4f7368fa0349196cde5 100644 --- a/tests/module/mod7.stderr +++ b/tests/module/mod7.stderr @@ -1,2 +1,2 @@ -mod7.hs:2:10: Not in scope: type constructor or class `T' +mod7.hs:2:10: Not in scope: type constructor or class ‛T’ diff --git a/tests/module/mod72.stderr b/tests/module/mod72.stderr index 7f047d80233e410fc82d3691aa882f76f4e3fa31..b3ff8a9b3e8afefd081a7bd9ae08052fe5498053 100644 --- a/tests/module/mod72.stderr +++ b/tests/module/mod72.stderr @@ -1,2 +1,2 @@ -mod72.hs:3:7: Not in scope: `g' +mod72.hs:3:7: Not in scope: ‛g’ diff --git a/tests/module/mod73.stderr b/tests/module/mod73.stderr index f1234514b40b5b6514997365879abadae25230e8..de239763831d5f1a59724f61f8de01cade707793 100644 --- a/tests/module/mod73.stderr +++ b/tests/module/mod73.stderr @@ -1,7 +1,7 @@ mod73.hs:3:7: - Not in scope: `Prelude.g' + Not in scope: ‛Prelude.g’ Perhaps you meant one of these: - `Prelude.id' (imported from Prelude), - `Prelude.log' (imported from Prelude), - `Prelude.pi' (imported from Prelude) + ‛Prelude.id’ (imported from Prelude), + ‛Prelude.log’ (imported from Prelude), + ‛Prelude.pi’ (imported from Prelude) diff --git a/tests/module/mod74.stderr b/tests/module/mod74.stderr index b4d417bac21ca8ba332c3b82df220395c0de9fd7..89d12d495c94f5917ad55bd06e14f99d8b043f21 100644 --- a/tests/module/mod74.stderr +++ b/tests/module/mod74.stderr @@ -1,2 +1,2 @@ -mod74.hs:3:7: Not in scope: `N.g' +mod74.hs:3:7: Not in scope: ‛N.g’ diff --git a/tests/module/mod77.stderr b/tests/module/mod77.stderr index 0cb4920e31f649342dc6c2a75e7a6b07dc2ca9f6..1d05d71a07800621c6569733395630fc9288f556 100644 --- a/tests/module/mod77.stderr +++ b/tests/module/mod77.stderr @@ -1,3 +1,3 @@ mod77.hs:3:7: - The fixity signature for `$$$' lacks an accompanying binding + The fixity signature for ‛$$$’ lacks an accompanying binding diff --git a/tests/module/mod79.stderr b/tests/module/mod79.stderr index f8a185725e28ada89d1ae4a76bd477e2fd19b191..329e47625f8045fe35edd2efdd0e6404962f2ad1 100644 --- a/tests/module/mod79.stderr +++ b/tests/module/mod79.stderr @@ -1,2 +1,2 @@ -mod79.hs:3:16: Module `Prelude' does not export `C' +mod79.hs:3:16: Module ‛Prelude’ does not export ‛C’ diff --git a/tests/module/mod80.stderr b/tests/module/mod80.stderr index c56caf0ae6ed93403655d39ccb0648485a119d01..7908ede6ee230242ff6394cca8acc9562864c778 100644 --- a/tests/module/mod80.stderr +++ b/tests/module/mod80.stderr @@ -1,2 +1,2 @@ -mod80.hs:3:16: Module `Prelude' does not export `f' +mod80.hs:3:16: Module ‛Prelude’ does not export ‛f’ diff --git a/tests/module/mod81.stderr b/tests/module/mod81.stderr index d3f0d5c4275313fdcf64fbb4510af5290407f1a9..b3c31ddd386c351e8299e8cdbd7eb178be6ea65e 100644 --- a/tests/module/mod81.stderr +++ b/tests/module/mod81.stderr @@ -1,3 +1,3 @@ mod81.hs:3:16: - Module `Prelude' does not export `Either(Left, Right, Foo)' + Module ‛Prelude’ does not export ‛Either(Left, Right, Foo)’ diff --git a/tests/module/mod87.stderr b/tests/module/mod87.stderr index 1536679aa69a2931cacacae02e2a2b262d5fbaea..99ad6bf351c9caf9369e70ec98a4031af5f2f806 100644 --- a/tests/module/mod87.stderr +++ b/tests/module/mod87.stderr @@ -1,2 +1,2 @@ -mod87.hs:4:5: Not in scope: data constructor `Left' +mod87.hs:4:5: Not in scope: data constructor ‛Left’ diff --git a/tests/module/mod88.stderr b/tests/module/mod88.stderr index f166c864c7da8deaf147c04cf031d5cc09fd9647..707ad693e2589b0f0a73520d5d6091a3f8d385e1 100644 --- a/tests/module/mod88.stderr +++ b/tests/module/mod88.stderr @@ -1,2 +1,2 @@ -mod88.hs:5:5: Not in scope: data constructor `Prelude.Left' +mod88.hs:5:5: Not in scope: data constructor ‛Prelude.Left’ diff --git a/tests/module/mod89.stderr b/tests/module/mod89.stderr index c4eb78e428106dea40b16e8d7cc7cf99bd89472c..653c93a810c9c0a408377b5740e22be5fbcfcc9d 100644 --- a/tests/module/mod89.stderr +++ b/tests/module/mod89.stderr @@ -1,2 +1,2 @@ -mod89.hs:3:16: Module `Prelude' does not export `map(..)' +mod89.hs:3:16: Module ‛Prelude’ does not export ‛map(..)’ diff --git a/tests/module/mod9.stderr b/tests/module/mod9.stderr index 19bec80bb294bcba23a1e64fe7a712ae5fa2108b..deee729ba966e0a031417152d5cd25a7223a4af3 100644 --- a/tests/module/mod9.stderr +++ b/tests/module/mod9.stderr @@ -1,2 +1,2 @@ -mod9.hs:2:10: Not in scope: type constructor or class `T' +mod9.hs:2:10: Not in scope: type constructor or class ‛T’ diff --git a/tests/module/mod90.stderr b/tests/module/mod90.stderr index 7cc0b108ed247caa68f3551703c6225960af4339..050b53c02e621aa6b5e313c7b85979bce12d7dfb 100644 --- a/tests/module/mod90.stderr +++ b/tests/module/mod90.stderr @@ -1,8 +1,8 @@ mod90.hs:3:16: - In module `Prelude': - `Left' is a data constructor of `Either' + In module ‛Prelude’: + ‛Left’ is a data constructor of ‛Either’ To import it use - `import' Prelude( Either( Left ) ) + ‛import’ Prelude( Either( Left ) ) or - `import' Prelude( Either(..) ) + ‛import’ Prelude( Either(..) ) diff --git a/tests/module/mod91.stderr b/tests/module/mod91.stderr index 5d7d6e1df6329dcdae8f1eb31fd013fde8a3888d..0324f48a013f75152b2211293aad91844bfc3474 100644 --- a/tests/module/mod91.stderr +++ b/tests/module/mod91.stderr @@ -1,3 +1,3 @@ mod91.hs:3:16: - Module `Prelude' does not export `Eq((==), (/=), eq)' + Module ‛Prelude’ does not export ‛Eq((==), (/=), eq)’ diff --git a/tests/module/mod97.stderr b/tests/module/mod97.stderr index fea2306c192dd1a10ac26d43b4b9b1899782b397..03891bc178ce32a133a49d35a6ca97f13d885d91 100644 --- a/tests/module/mod97.stderr +++ b/tests/module/mod97.stderr @@ -1,2 +1,2 @@ -mod97.hs:4:9: Not in scope: `==' +mod97.hs:4:9: Not in scope: ‛==’ diff --git a/tests/numeric/should_run/1603.hs b/tests/numeric/should_run/T1603.hs similarity index 100% rename from tests/numeric/should_run/1603.hs rename to tests/numeric/should_run/T1603.hs diff --git a/tests/numeric/should_run/1603.stdout b/tests/numeric/should_run/T1603.stdout similarity index 100% rename from tests/numeric/should_run/1603.stdout rename to tests/numeric/should_run/T1603.stdout diff --git a/tests/numeric/should_run/3676.hs b/tests/numeric/should_run/T3676.hs similarity index 100% rename from tests/numeric/should_run/3676.hs rename to tests/numeric/should_run/T3676.hs diff --git a/tests/numeric/should_run/3676.stdout b/tests/numeric/should_run/T3676.stdout similarity index 100% rename from tests/numeric/should_run/3676.stdout rename to tests/numeric/should_run/T3676.stdout diff --git a/tests/numeric/should_run/4381.hs b/tests/numeric/should_run/T4381.hs similarity index 100% rename from tests/numeric/should_run/4381.hs rename to tests/numeric/should_run/T4381.hs diff --git a/tests/numeric/should_run/4381.stdout b/tests/numeric/should_run/T4381.stdout similarity index 100% rename from tests/numeric/should_run/4381.stdout rename to tests/numeric/should_run/T4381.stdout diff --git a/tests/numeric/should_run/4383.hs b/tests/numeric/should_run/T4383.hs similarity index 100% rename from tests/numeric/should_run/4383.hs rename to tests/numeric/should_run/T4383.hs diff --git a/tests/numeric/should_run/4383.stdout b/tests/numeric/should_run/T4383.stdout similarity index 100% rename from tests/numeric/should_run/4383.stdout rename to tests/numeric/should_run/T4383.stdout diff --git a/tests/numeric/should_run/T7689.hs b/tests/numeric/should_run/T7689.hs new file mode 100644 index 0000000000000000000000000000000000000000..4f0d8e43946f858205531fa50e39970433884e11 --- /dev/null +++ b/tests/numeric/should_run/T7689.hs @@ -0,0 +1,78 @@ +{-# LANGUAGE BangPatterns, MagicHash #-} +module Main where + +import Data.Bits (finiteBitSize) +import GHC.Exts + +main :: IO () +main = do + -- 0 is the annihilator of andI# + print (I# (maxI# `andI#` 0#) == 0) + print (I# (minI# `andI#` 0#) == 0) + print (I# (0# `andI#` maxI#) == 0) + print (I# (0# `andI#` minI#) == 0) + print (I# (0# `andI#` 0#) == 0) + -- integer with all bits set to 1 is the neutral element of orI#, + -- in two's complement this is -1 + print (I# (maxI# `andI#` -1#) == maxI) + print (I# (minI# `andI#` -1#) == minI) + print (I# (-1# `andI#` maxI#) == maxI) + print (I# (-1# `andI#` minI#) == minI) + print (I# (-1# `andI#` -1#) == -1) + -- these two numbers have every other bit set, they should give 0 + print (I# (magicInt1# `andI#` magicInt2#) == 0) + + -- integer with all bits set to 1 is the annihilator of orI#, + print (I# (maxI# `orI#` -1#) == -1) + print (I# (minI# `orI#` -1#) == -1) + print (I# (-1# `orI#` maxI#) == -1) + print (I# (-1# `orI#` minI#) == -1) + print (I# (-1# `orI#` -1#) == -1) + -- 0 is the neutral element of orI# + print (I# (maxI# `orI#` 0#) == maxI) + print (I# (minI# `orI#` 0#) == minI) + print (I# (0# `orI#` maxI#) == maxI) + print (I# (0# `orI#` minI#) == minI) + print (I# (0# `orI#` 0#) == 0) + -- this time we should get an integer with all bits set, that is -1 + print (I# (magicInt1# `orI#` magicInt2#) == -1) + + -- suprising as the first two tests may look, this is what we expect from + -- bitwise negation in two's complement enccoding + print (I# (notI# 0#) == -1) + print (I# (notI# -1#) == 0) + -- magic int numbers are bitwise complementary + print (I# (notI# magicInt1#) == magicInt2) + print (I# (notI# magicInt2#) == magicInt1) + + -- 0 is the identity of xor + print (I# (minI# `xorI#` 0#) == minI) + print (I# (maxI# `xorI#` 0#) == maxI) + print (I# (0# `xorI#` minI#) == minI) + print (I# (0# `xorI#` maxI#) == maxI) + -- anything xored with itself is 0 + print (I# (maxI# `xorI#` maxI#) == 0) + print (I# (minI# `xorI#` minI#) == 0) + -- xoring with -1 is like bitwise negation (becuse -1 has all bits set to 1) + print (I# (minI# `xorI#` -1#) == maxI) + print (I# (maxI# `xorI#` -1#) == minI) + print (I# (-1# `xorI#` minI#) == maxI) + print (I# (-1# `xorI#` maxI#) == minI) + -- since these two have exactly the opposite bits turned on they should + -- give an int with all bits set, and that is -1 as you probably already + -- remember by now + print (I# (magicInt1# `xorI#` magicInt2#) == -1) + where + intBitSize = finiteBitSize (undefined :: Int) + minI = minBound :: Int + maxI = maxBound :: Int + minI# = x + where !(I# x) = minBound + maxI# = x + where !(I# x) = maxBound + magicInt1 = sum $ map (2^) [0,2..intBitSize] :: Int + magicInt2 = sum $ map (2^) [1,3..intBitSize] :: Int + magicInt1# = x + where !(I# x) = magicInt1 + magicInt2# = x + where !(I# x) = magicInt2 diff --git a/tests/numeric/should_run/T7689.stdout b/tests/numeric/should_run/T7689.stdout new file mode 100644 index 0000000000000000000000000000000000000000..1a97da1700bc59832e4c6da39fef4eddd3ef5fda --- /dev/null +++ b/tests/numeric/should_run/T7689.stdout @@ -0,0 +1,37 @@ +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True +True diff --git a/tests/numeric/should_run/all.T b/tests/numeric/should_run/all.T index ff19507ab098d9f2ac85c32748227da3daf8d918..747b37f75400f9f9357e51d2ec0a571faab1eec0 100644 --- a/tests/numeric/should_run/all.T +++ b/tests/numeric/should_run/all.T @@ -7,7 +7,7 @@ test('arith001', normal, compile_and_run, ['']) test('arith002', normal, compile_and_run, ['']) test('arith003', normal, compile_and_run, ['']) test('arith004', normal, compile_and_run, ['']) -test('arith005', normal, compile_and_run, ['']) +test('arith005', when(platform('i386-apple-darwin'), expect_broken_for(7043, 'ghci')), compile_and_run, ['']) test('arith006', normal, compile_and_run, ['']) test('arith007', normal, compile_and_run, ['']) @@ -29,30 +29,25 @@ test('arith011', normal, compile_and_run, ['']) test('arith012', ways, compile_and_run, [opts]) -test('arith013', compose(normal,only_compiler_types(['ghc'])), compile_and_run, ['']) +test('arith013', only_compiler_types(['ghc']), compile_and_run, ['']) test('arith014', normal, compile_and_run, ['']) test('arith015', normal, compile_and_run, ['']) test('numrun009', normal, compile_and_run, ['']) test('numrun010', normal, compile_and_run, ['']) test('numrun011', normal, compile_and_run, ['']) -test('numrun012', - if_os('mingw32',expect_fail_for('ghci')), - # on Windows, GHCi says that "logBase 2 (2^31)" is "31.0", but - # other platforms (and compiled on Windows) reports 31.000000000000004 - # I have no idea where the discrepancy comes from. --SDM - compile_and_run, ['']) +test('numrun012', normal, compile_and_run, ['']) test('numrun013', normal, compile_and_run, ['']) test('numrun014', normal, compile_and_run, ['']) -test('arith016', compose(normal,only_compiler_types(['ghc'])), compile_and_run, ['']) +test('arith016', [normal,only_compiler_types(['ghc'])], compile_and_run, ['']) test('arith017', normal, compile_and_run, ['']) test('arith018', normal, compile_and_run, ['']) test('arith019', normal, compile_and_run, ['']) test('expfloat', normal, compile_and_run, ['']) -test('1603', skip, compile_and_run, ['']) -test('3676', expect_broken(3676), compile_and_run, ['']) -test('4381', normal, compile_and_run, ['']) -test('4383', normal, compile_and_run, ['']) +test('T1603', skip, compile_and_run, ['']) +test('T3676', expect_broken(3676), compile_and_run, ['']) +test('T4381', normal, compile_and_run, ['']) +test('T4383', normal, compile_and_run, ['']) test('add2', normal, compile_and_run, ['-fobject-code']) test('mul2', normal, compile_and_run, ['-fobject-code']) @@ -65,3 +60,5 @@ test('T7014', ['$MAKE -s --no-print-directory T7014']) test('T7233', normal, compile_and_run, ['']) + +test('T7689', normal, compile_and_run, ['']) diff --git a/tests/overloadedlists/Makefile b/tests/overloadedlists/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..9a36a1c5fee5849898f7c20c59672b9268409e4a --- /dev/null +++ b/tests/overloadedlists/Makefile @@ -0,0 +1,3 @@ +TOP=../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/tests/overloadedlists/should_fail/Makefile b/tests/overloadedlists/should_fail/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..9101fbd40ada5d47b499a48e62cb4ccd7f67ef71 --- /dev/null +++ b/tests/overloadedlists/should_fail/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/tests/overloadedlists/should_fail/all.T b/tests/overloadedlists/should_fail/all.T new file mode 100644 index 0000000000000000000000000000000000000000..771035d07150167af6248dabaa20beb513959bf0 --- /dev/null +++ b/tests/overloadedlists/should_fail/all.T @@ -0,0 +1,6 @@ +test('overloadedlistsfail01', normal, compile_fail, ['']) +test('overloadedlistsfail02', normal, compile_fail, ['']) +test('overloadedlistsfail03', normal, compile_fail, ['']) +test('overloadedlistsfail04', normal, compile_fail, ['']) +test('overloadedlistsfail05', normal, compile_fail, ['']) +test('overloadedlistsfail06', normal, compile_fail, ['']) diff --git a/tests/overloadedlists/should_fail/overloadedlistsfail01.hs b/tests/overloadedlists/should_fail/overloadedlistsfail01.hs new file mode 100644 index 0000000000000000000000000000000000000000..ec49accf102813c7c164898ecdd6bc7522d0ea6f --- /dev/null +++ b/tests/overloadedlists/should_fail/overloadedlistsfail01.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE OverloadedLists #-} + +-- This will fail because there is no type defaulting implemented as of yet. + +main = print [1] diff --git a/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr b/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr new file mode 100644 index 0000000000000000000000000000000000000000..cc1082c7de2ca60f64ec0d053b0decfff5de404e --- /dev/null +++ b/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr @@ -0,0 +1,36 @@ + +overloadedlistsfail01.hs:5:8: + No instance for (Show a0) arising from a use of ‛print’ + The type variable ‛a0’ is ambiguous + Note: there are several potential instances: + instance Show Double -- Defined in ‛GHC.Float’ + instance Show Float -- Defined in ‛GHC.Float’ + instance (Integral a, Show a) => Show (GHC.Real.Ratio a) + -- Defined in ‛GHC.Real’ + ...plus 23 others + In the expression: print [1] + In an equation for ‛main’: main = print [1] + +overloadedlistsfail01.hs:5:14: + No instance for (GHC.Exts.IsList a0) + arising from an overloaded list + The type variable ‛a0’ is ambiguous + Note: there is a potential instance available: + instance GHC.Exts.IsList [a] -- Defined in ‛GHC.Exts’ + In the first argument of ‛print’, namely ‛[1]’ + In the expression: print [1] + In an equation for ‛main’: main = print [1] + +overloadedlistsfail01.hs:5:15: + No instance for (Num (GHC.Exts.Item a0)) + arising from the literal ‛1’ + The type variable ‛a0’ is ambiguous + Note: there are several potential instances: + instance Num Double -- Defined in ‛GHC.Float’ + instance Num Float -- Defined in ‛GHC.Float’ + instance Integral a => Num (GHC.Real.Ratio a) + -- Defined in ‛GHC.Real’ + ...plus three others + In the expression: 1 + In the first argument of ‛print’, namely ‛[1]’ + In the expression: print [1] diff --git a/tests/overloadedlists/should_fail/overloadedlistsfail02.hs b/tests/overloadedlists/should_fail/overloadedlistsfail02.hs new file mode 100644 index 0000000000000000000000000000000000000000..54ca2db9f61b9a9a8da165a36e5af66f25fa039f --- /dev/null +++ b/tests/overloadedlists/should_fail/overloadedlistsfail02.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE OverloadedLists #-} + +data Foo = Foo + +test :: Foo +test = [7] + +main = return () \ No newline at end of file diff --git a/tests/overloadedlists/should_fail/overloadedlistsfail02.stderr b/tests/overloadedlists/should_fail/overloadedlistsfail02.stderr new file mode 100644 index 0000000000000000000000000000000000000000..62f8a0e0bd938199497e66cb31588444d2db2212 --- /dev/null +++ b/tests/overloadedlists/should_fail/overloadedlistsfail02.stderr @@ -0,0 +1,13 @@ + +overloadedlistsfail02.hs:6:8: + No instance for (GHC.Exts.IsList Foo) + arising from an overloaded list + In the expression: [7] + In an equation for ‛test’: test = [7] + +overloadedlistsfail02.hs:6:9: + No instance for (Num (GHC.Exts.Item Foo)) + arising from the literal ‛7’ + In the expression: 7 + In the expression: [7] + In an equation for ‛test’: test = [7] diff --git a/tests/overloadedlists/should_fail/overloadedlistsfail03.hs b/tests/overloadedlists/should_fail/overloadedlistsfail03.hs new file mode 100644 index 0000000000000000000000000000000000000000..d1981846dfab92d9c330be0d15df441f54ef0739 --- /dev/null +++ b/tests/overloadedlists/should_fail/overloadedlistsfail03.hs @@ -0,0 +1,3 @@ +{-# LANGUAGE OverloadedLists #-} + +main = print (length ['a',"b"]) diff --git a/tests/overloadedlists/should_fail/overloadedlistsfail03.stderr b/tests/overloadedlists/should_fail/overloadedlistsfail03.stderr new file mode 100644 index 0000000000000000000000000000000000000000..cd8cbff032393a9a9ad56f20a43358791064e18c --- /dev/null +++ b/tests/overloadedlists/should_fail/overloadedlistsfail03.stderr @@ -0,0 +1,6 @@ + +overloadedlistsfail03.hs:3:27: + Couldn't match expected type ‛Char’ with actual type ‛[Char]’ + In the expression: "b" + In the first argument of ‛length’, namely ‛['a', "b"]’ + In the first argument of ‛print’, namely ‛(length ['a', "b"])’ diff --git a/tests/overloadedlists/should_fail/overloadedlistsfail04.hs b/tests/overloadedlists/should_fail/overloadedlistsfail04.hs new file mode 100644 index 0000000000000000000000000000000000000000..811c0511fc5dd91ec68313e8bd40b1b525796ae3 --- /dev/null +++ b/tests/overloadedlists/should_fail/overloadedlistsfail04.hs @@ -0,0 +1,3 @@ +{-# LANGUAGE OverloadedLists #-} + +main = print (["a".."b"] :: [String]) diff --git a/tests/overloadedlists/should_fail/overloadedlistsfail04.stderr b/tests/overloadedlists/should_fail/overloadedlistsfail04.stderr new file mode 100644 index 0000000000000000000000000000000000000000..145c6cd1feee97326be6470d3da19a969fafa4c9 --- /dev/null +++ b/tests/overloadedlists/should_fail/overloadedlistsfail04.stderr @@ -0,0 +1,8 @@ + +overloadedlistsfail04.hs:3:15: + No instance for (Enum [Char]) + arising from the arithmetic sequence ‛"a" .. "b"’ + In the first argument of ‛print’, namely + ‛(["a" .. "b"] :: [String])’ + In the expression: print (["a" .. "b"] :: [String]) + In an equation for ‛main’: main = print (["a" .. "b"] :: [String]) diff --git a/tests/overloadedlists/should_fail/overloadedlistsfail05.hs b/tests/overloadedlists/should_fail/overloadedlistsfail05.hs new file mode 100644 index 0000000000000000000000000000000000000000..3601c6e2f152c13a56f3b6ae59a444c09a074d25 --- /dev/null +++ b/tests/overloadedlists/should_fail/overloadedlistsfail05.hs @@ -0,0 +1,3 @@ +{-# LANGUAGE OverloadedLists #-} + +main = print (length ['a'..(10 :: Int)]) diff --git a/tests/overloadedlists/should_fail/overloadedlistsfail05.stderr b/tests/overloadedlists/should_fail/overloadedlistsfail05.stderr new file mode 100644 index 0000000000000000000000000000000000000000..131294b138eefdad5f21ad492bd875fcdca74b8e --- /dev/null +++ b/tests/overloadedlists/should_fail/overloadedlistsfail05.stderr @@ -0,0 +1,7 @@ + +overloadedlistsfail05.hs:3:29: + Couldn't match expected type ‛Char’ with actual type ‛Int’ + In the expression: (10 :: Int) + In the first argument of ‛length’, namely ‛['a' .. (10 :: Int)]’ + In the first argument of ‛print’, namely + ‛(length ['a' .. (10 :: Int)])’ diff --git a/tests/overloadedlists/should_fail/overloadedlistsfail06.hs b/tests/overloadedlists/should_fail/overloadedlistsfail06.hs new file mode 100644 index 0000000000000000000000000000000000000000..c8cf5aea23f3eb5ed913047b22674d28a334d202 --- /dev/null +++ b/tests/overloadedlists/should_fail/overloadedlistsfail06.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE OverloadedLists, RebindableSyntax #-} + +f [] = [] +f x = x diff --git a/tests/overloadedlists/should_fail/overloadedlistsfail06.stderr b/tests/overloadedlists/should_fail/overloadedlistsfail06.stderr new file mode 100644 index 0000000000000000000000000000000000000000..239465670fdfb256a17a037d10560899bb3666a2 --- /dev/null +++ b/tests/overloadedlists/should_fail/overloadedlistsfail06.stderr @@ -0,0 +1,4 @@ + +overloadedlistsfail06.hs:3:3: Not in scope: ‛toList’ + +overloadedlistsfail06.hs:3:8: Not in scope: ‛fromListN’ diff --git a/tests/overloadedlists/should_run/Makefile b/tests/overloadedlists/should_run/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..9101fbd40ada5d47b499a48e62cb4ccd7f67ef71 --- /dev/null +++ b/tests/overloadedlists/should_run/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/tests/overloadedlists/should_run/all.T b/tests/overloadedlists/should_run/all.T new file mode 100644 index 0000000000000000000000000000000000000000..be654e3ca5afb1eae440576279ea9ceba9989951 --- /dev/null +++ b/tests/overloadedlists/should_run/all.T @@ -0,0 +1,5 @@ +test('overloadedlistsrun01', normal, compile_and_run, ['']) +test('overloadedlistsrun02', normal, compile_and_run, ['']) +test('overloadedlistsrun03', normal, compile_and_run, ['']) +test('overloadedlistsrun04', normal, compile_and_run, ['']) +test('overloadedlistsrun05', normal, compile_and_run, ['']) diff --git a/tests/overloadedlists/should_run/overloadedlistsrun01.hs b/tests/overloadedlists/should_run/overloadedlistsrun01.hs new file mode 100644 index 0000000000000000000000000000000000000000..00852b92c2c0f3e25b8fe9c26be3831031a7c4a7 --- /dev/null +++ b/tests/overloadedlists/should_run/overloadedlistsrun01.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE OverloadedLists #-} + +main = do print ([] :: [Int]) + print ([1,2,3] :: [Int]) + print ((take 10 [1..]) :: [Int]) + print (['a'..'e'] :: [Char]) diff --git a/tests/overloadedlists/should_run/overloadedlistsrun01.stdout b/tests/overloadedlists/should_run/overloadedlistsrun01.stdout new file mode 100644 index 0000000000000000000000000000000000000000..4a75bae7df303524c1f5543be0c0313f8af1f366 --- /dev/null +++ b/tests/overloadedlists/should_run/overloadedlistsrun01.stdout @@ -0,0 +1,4 @@ +[] +[1,2,3] +[1,2,3,4,5,6,7,8,9,10] +"abcde" diff --git a/tests/overloadedlists/should_run/overloadedlistsrun02.hs b/tests/overloadedlists/should_run/overloadedlistsrun02.hs new file mode 100644 index 0000000000000000000000000000000000000000..8567db3566a4410a603c9c708f2ec32aaa7fae63 --- /dev/null +++ b/tests/overloadedlists/should_run/overloadedlistsrun02.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE OverloadedLists, TypeFamilies #-} + +import qualified Data.Set as S +import GHC.Exts + +main = do print ([] :: (S.Set Int)) + print (['a','b','c'] :: (S.Set Char)) + print (['a','c'..'g'] :: (S.Set Char)) + +instance Ord a => IsList (S.Set a) where + type (Item (S.Set a)) = a + fromList = S.fromList + toList = S.toList diff --git a/tests/overloadedlists/should_run/overloadedlistsrun02.stdout b/tests/overloadedlists/should_run/overloadedlistsrun02.stdout new file mode 100644 index 0000000000000000000000000000000000000000..08fffbfc1d033b8ae5df02107d169d74912ea121 --- /dev/null +++ b/tests/overloadedlists/should_run/overloadedlistsrun02.stdout @@ -0,0 +1,3 @@ +fromList [] +fromList "abc" +fromList "aceg" diff --git a/tests/overloadedlists/should_run/overloadedlistsrun03.hs b/tests/overloadedlists/should_run/overloadedlistsrun03.hs new file mode 100644 index 0000000000000000000000000000000000000000..7d5b7d945c832befc5f25bd8593a349edaf5b63b --- /dev/null +++ b/tests/overloadedlists/should_run/overloadedlistsrun03.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE OverloadedLists, TypeFamilies #-} + +import GHC.Exts + +-- This nonsensical instance is used to test if fromListN is used properly in +-- desugaring of explicit lists. + +instance IsList Int where + type Item Int = Int + fromList _ = 0 + toList _ = [] + fromListN n _ = n + +main = do print ([] :: Int) + print ([1,2,3,4,5] :: Int) + print ([1..3] :: Int) + print ([7] :: Int) + print ([1,3..] :: Int) diff --git a/tests/overloadedlists/should_run/overloadedlistsrun03.stdout b/tests/overloadedlists/should_run/overloadedlistsrun03.stdout new file mode 100644 index 0000000000000000000000000000000000000000..ff973f8f130178bc53237f9d035b60288465296c --- /dev/null +++ b/tests/overloadedlists/should_run/overloadedlistsrun03.stdout @@ -0,0 +1,5 @@ +0 +5 +0 +1 +0 diff --git a/tests/overloadedlists/should_run/overloadedlistsrun04.hs b/tests/overloadedlists/should_run/overloadedlistsrun04.hs new file mode 100644 index 0000000000000000000000000000000000000000..478d8d2c2268f52a2e25d5587822021aecda14fa --- /dev/null +++ b/tests/overloadedlists/should_run/overloadedlistsrun04.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE OverloadedLists, TypeFamilies #-} + +import qualified Data.Set as S +import GHC.Exts + +main = do putStrLn (f []) + putStrLn (f [1,2]) + putStrLn (f [2,0]) + putStrLn (f [3,2]) + putStrLn (f [2,7]) + putStrLn (f [2,2]) + putStrLn (f [1..7]) + + +f :: S.Set Int -> String +f [] = "empty" +f [_] = "one element" +f [2,_] = "two elements, the smaller one is 2" +f [_,2] = "two elements, the bigger one is 2" +f _ = "else" + + +instance Ord a => IsList (S.Set a) where + type (Item (S.Set a)) = a + fromList = S.fromList + toList = S.toList + + diff --git a/tests/overloadedlists/should_run/overloadedlistsrun04.stdout b/tests/overloadedlists/should_run/overloadedlistsrun04.stdout new file mode 100644 index 0000000000000000000000000000000000000000..0f50db5550479d9a2ef34d21cfbb48a266ee9d86 --- /dev/null +++ b/tests/overloadedlists/should_run/overloadedlistsrun04.stdout @@ -0,0 +1,7 @@ +empty +two elements, the bigger one is 2 +two elements, the bigger one is 2 +two elements, the smaller one is 2 +two elements, the smaller one is 2 +one element +else diff --git a/tests/overloadedlists/should_run/overloadedlistsrun05.hs b/tests/overloadedlists/should_run/overloadedlistsrun05.hs new file mode 100644 index 0000000000000000000000000000000000000000..18d8cc1d0166baba4e96d59dd425562dca368855 --- /dev/null +++ b/tests/overloadedlists/should_run/overloadedlistsrun05.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE OverloadedLists, TypeFamilies, RebindableSyntax #-} + +import Prelude +import Data.List + +main = do print [] + print [0,3..20] + print [3] + print [2..7] + print [20,2] + print [1,2,37] + +fromListN _ = length +fromList = length + + diff --git a/tests/overloadedlists/should_run/overloadedlistsrun05.stdout b/tests/overloadedlists/should_run/overloadedlistsrun05.stdout new file mode 100644 index 0000000000000000000000000000000000000000..e0777cd8e28e46d55f5b8443f3fdbd962511e1e4 --- /dev/null +++ b/tests/overloadedlists/should_run/overloadedlistsrun05.stdout @@ -0,0 +1,6 @@ +0 +7 +1 +6 +2 +3 diff --git a/tests/parser/should_compile/T2245.stderr b/tests/parser/should_compile/T2245.stderr index 527957a935aa9c3df598e269a3fbecd845f4f803..edfa53333b2ae453a5718a0779d84e245bbe375d 100644 --- a/tests/parser/should_compile/T2245.stderr +++ b/tests/parser/should_compile/T2245.stderr @@ -1,34 +1,34 @@ -T2245.hs:4:10: - Warning: No explicit method or default declaration for `+' - In the instance declaration for `Num T' +T2245.hs:4:10: Warning: + No explicit method or default declaration for ‛+’ + In the instance declaration for ‛Num T’ -T2245.hs:4:10: - Warning: No explicit method or default declaration for `*' - In the instance declaration for `Num T' +T2245.hs:4:10: Warning: + No explicit method or default declaration for ‛*’ + In the instance declaration for ‛Num T’ -T2245.hs:4:10: - Warning: No explicit method or default declaration for `abs' - In the instance declaration for `Num T' +T2245.hs:4:10: Warning: + No explicit method or default declaration for ‛abs’ + In the instance declaration for ‛Num T’ -T2245.hs:4:10: - Warning: No explicit method or default declaration for `signum' - In the instance declaration for `Num T' +T2245.hs:4:10: Warning: + No explicit method or default declaration for ‛signum’ + In the instance declaration for ‛Num T’ -T2245.hs:4:10: - Warning: No explicit method or default declaration for `fromInteger' - In the instance declaration for `Num T' +T2245.hs:4:10: Warning: + No explicit method or default declaration for ‛fromInteger’ + In the instance declaration for ‛Num T’ -T2245.hs:5:10: - Warning: No explicit method or default declaration for `fromRational' - In the instance declaration for `Fractional T' +T2245.hs:5:10: Warning: + No explicit method or default declaration for ‛fromRational’ + In the instance declaration for ‛Fractional T’ -T2245.hs:7:29: - Warning: Defaulting the following constraint(s) to type `T' - (Fractional b0) - arising from the literal `1e400' at T2245.hs:7:29-33 - (Ord b0) arising from a use of `<' at T2245.hs:7:27 - (Read b0) arising from a use of `read' at T2245.hs:7:38-41 - In the second argument of `(<)', namely `1e400' - In the first argument of `(.)', namely `(< 1e400)' - In the second argument of `(.)', namely `(< 1e400) . read' +T2245.hs:7:29: Warning: + Defaulting the following constraint(s) to type ‛T’ + (Fractional b0) + arising from the literal ‛1e400’ at T2245.hs:7:29-33 + (Ord b0) arising from a use of ‛<’ at T2245.hs:7:27 + (Read b0) arising from a use of ‛read’ at T2245.hs:7:38-41 + In the second argument of ‛(<)’, namely ‛1e400’ + In the first argument of ‛(.)’, namely ‛(< 1e400)’ + In the second argument of ‛(.)’, namely ‛(< 1e400) . read’ diff --git a/tests/parser/should_compile/T3303.stderr b/tests/parser/should_compile/T3303.stderr index c2ae0c60f904e98aebdae69904c202426fec7f40..685448f2cc75f68058ec1fb57bc2ad5f8b36e899 100644 --- a/tests/parser/should_compile/T3303.stderr +++ b/tests/parser/should_compile/T3303.stderr @@ -1,6 +1,6 @@ T3303.hs:7:7: Warning: - In the use of `foo' (imported from T3303A): + In the use of ‛foo’ (imported from T3303A): Deprecated: "This is a multi-line deprecation message for foo" diff --git a/tests/parser/should_compile/all.T b/tests/parser/should_compile/all.T index 9d3b4e698adbadeb26935dfdf8bff1026fc44283..b10cd2ccfa452ac0c374730b48aa8b77cf07a78e 100644 --- a/tests/parser/should_compile/all.T +++ b/tests/parser/should_compile/all.T @@ -45,8 +45,8 @@ test('read029', normal, compile, ['']) test('read030', normal, compile, ['']) test('read031', normal, compile, ['']) test('read032', normal, compile, ['']) -test('read033', if_compiler_type('hugs', expect_fail), compile, ['']) -test('read034', if_compiler_type('hugs', expect_fail), compile, ['']) +test('read033', when(compiler_type('hugs'), expect_fail), compile, ['']) +test('read034', when(compiler_type('hugs'), expect_fail), compile, ['']) test('read036', normal, compile, ['']) test('read037', normal, compile, ['']) test('read038', normal, compile, ['']) @@ -90,7 +90,7 @@ test('NondecreasingIndentation', normal, compile, ['']) test('mc15', normal, compile, ['']) test('mc16', normal, compile, ['']) test('EmptyDecls', normal, compile, ['']) -test('ParserLambdaCase', if_compiler_lt('ghc', '7.5', skip), compile, ['']) +test('ParserLambdaCase', when(compiler_lt('ghc', '7.5'), skip), compile, ['']) test('T5243', extra_clean(['T5243A.hi', 'T5243A.o']), multimod_compile, ['T5243','']) diff --git a/tests/parser/should_compile/read014.stderr-ghc b/tests/parser/should_compile/read014.stderr-ghc index b1d9b81256c1bc4a40ae5b1e614ba2a387760a39..9b49aaf5608bf9bd9c47f996c225db62c788de16 100644 --- a/tests/parser/should_compile/read014.stderr-ghc +++ b/tests/parser/should_compile/read014.stderr-ghc @@ -1,28 +1,28 @@ -read014.hs:4:1: - Warning: Top-level binding with no type signature: - ng1 :: forall t a. Num a => t -> a -> a +read014.hs:4:1: Warning: + Top-level binding with no type signature: + ng1 :: forall t a. Num a => t -> a -> a -read014.hs:4:5: Warning: Defined but not used: `x' +read014.hs:4:5: Warning: Defined but not used: ‛x’ -read014.hs:6:10: - Warning: No explicit method or default declaration for `+' - In the instance declaration for `Num (a, b)' +read014.hs:6:10: Warning: + No explicit method or default declaration for ‛+’ + In the instance declaration for ‛Num (a, b)’ -read014.hs:6:10: - Warning: No explicit method or default declaration for `*' - In the instance declaration for `Num (a, b)' +read014.hs:6:10: Warning: + No explicit method or default declaration for ‛*’ + In the instance declaration for ‛Num (a, b)’ -read014.hs:6:10: - Warning: No explicit method or default declaration for `abs' - In the instance declaration for `Num (a, b)' +read014.hs:6:10: Warning: + No explicit method or default declaration for ‛abs’ + In the instance declaration for ‛Num (a, b)’ -read014.hs:6:10: - Warning: No explicit method or default declaration for `signum' - In the instance declaration for `Num (a, b)' +read014.hs:6:10: Warning: + No explicit method or default declaration for ‛signum’ + In the instance declaration for ‛Num (a, b)’ -read014.hs:6:10: - Warning: No explicit method or default declaration for `fromInteger' - In the instance declaration for `Num (a, b)' +read014.hs:6:10: Warning: + No explicit method or default declaration for ‛fromInteger’ + In the instance declaration for ‛Num (a, b)’ -read014.hs:8:53: Warning: Defined but not used: `x' +read014.hs:8:53: Warning: Defined but not used: ‛x’ diff --git a/tests/parser/should_fail/T3811d.stderr b/tests/parser/should_fail/T3811d.stderr index 28d08548c12cc089112b38a0ad50f4315531db29..ddffea00f8ac4785e7e0866114d49a34fbfee0bd 100644 --- a/tests/parser/should_fail/T3811d.stderr +++ b/tests/parser/should_fail/T3811d.stderr @@ -1,4 +1,4 @@ - -T3811d.hs:6:11: - Unexpected type `D Char' where type variable expected - In the declaration of `C b (D Char) b' + +T3811d.hs:6:11: + Unexpected type ‛D Char’ where type variable expected + In the declaration of ‛C b (D Char) b’ diff --git a/tests/parser/should_fail/T984.hs b/tests/parser/should_fail/T984.hs new file mode 100644 index 0000000000000000000000000000000000000000..ba2e282d5a3fb2eac5360c7a5769f27834e6f4c0 --- /dev/null +++ b/tests/parser/should_fail/T984.hs @@ -0,0 +1,9 @@ + +module T984 where + +f _ = do + x <- computation + case () of + _ -> + result <- computation + case () of () -> undefined diff --git a/tests/parser/should_fail/T984.stderr b/tests/parser/should_fail/T984.stderr new file mode 100644 index 0000000000000000000000000000000000000000..4c723a7869ae494c49784d9ca91cf4a6209ba06a --- /dev/null +++ b/tests/parser/should_fail/T984.stderr @@ -0,0 +1,4 @@ + +T984.hs:6:9: + Parse error in pattern: case () of { _ -> result } + Possibly caused by a missing 'do'? diff --git a/tests/parser/should_fail/all.T b/tests/parser/should_fail/all.T index 355961dd4fa9f5b56a5048e03b9b9f694dd1cec1..a09b76df18acdb70ea723fd39b9928e86a52868b 100644 --- a/tests/parser/should_fail/all.T +++ b/tests/parser/should_fail/all.T @@ -23,7 +23,7 @@ test('readFail020', normal, compile_fail, ['']) # empty file (length zero) is not a legal Haskell module. It fails to compile # because it doesn't contain a definition of Main.main. GHC 5.02 crashed # on this example. -test('readFail021', if_compiler_type('hugs', expect_fail), compile_fail, ['']) +test('readFail021', when(compiler_type('hugs'), expect_fail), compile_fail, ['']) test('readFail022', normal, compile_fail, ['']) test('readFail023', normal, compile_fail, ['']) @@ -72,7 +72,8 @@ test('NondecreasingIndentationFail', normal, compile_fail, ['']) test('readFailTraditionalRecords1', normal, compile_fail, ['']) test('readFailTraditionalRecords2', normal, compile_fail, ['']) test('readFailTraditionalRecords3', normal, compile_fail, ['']) -test('ParserNoLambdaCase', if_compiler_lt('ghc', '7.5', skip), compile_fail, ['']) -test('ParserNoMultiWayIf', if_compiler_lt('ghc', '7.5', skip), compile_fail, ['']) +test('ParserNoLambdaCase', when(compiler_lt('ghc', '7.5'), skip), compile_fail, ['']) +test('ParserNoMultiWayIf', when(compiler_lt('ghc', '7.5'), skip), compile_fail, ['']) test('T5425', normal, compile_fail, ['']) +test('T984', normal, compile_fail, ['']) diff --git a/tests/parser/should_fail/readFail001.stderr b/tests/parser/should_fail/readFail001.stderr index f146ae5625ae71c3b4ad154d8a98010e23b1710c..aba4ec239dd453955b3e711d7909ffd32ab5f4dc 100644 --- a/tests/parser/should_fail/readFail001.stderr +++ b/tests/parser/should_fail/readFail001.stderr @@ -1,26 +1,26 @@ readFail001.hs:25:11: - The fixity signature for `+#' lacks an accompanying binding + The fixity signature for ‛+#’ lacks an accompanying binding readFail001.hs:38:32: - Not in scope: type constructor or class `Leaf' + Not in scope: type constructor or class ‛Leaf’ A data constructor of that name is in scope; did you mean -XDataKinds? readFail001.hs:38:41: - Not in scope: type constructor or class `Leaf' + Not in scope: type constructor or class ‛Leaf’ A data constructor of that name is in scope; did you mean -XDataKinds? -readFail001.hs:87:11: Not in scope: `x' +readFail001.hs:87:11: Not in scope: ‛x’ -readFail001.hs:88:19: Not in scope: `x' +readFail001.hs:88:19: Not in scope: ‛x’ -readFail001.hs:94:19: Not in scope: `isSpace' +readFail001.hs:94:19: Not in scope: ‛isSpace’ -readFail001.hs:95:13: Not in scope: `foo' +readFail001.hs:95:13: Not in scope: ‛foo’ -readFail001.hs:107:30: Not in scope: data constructor `Foo' +readFail001.hs:107:30: Not in scope: data constructor ‛Foo’ -readFail001.hs:107:42: Not in scope: data constructor `Bar' +readFail001.hs:107:42: Not in scope: data constructor ‛Bar’ readFail001.hs:112:23: - Not in scope: type constructor or class `Foo' + Not in scope: type constructor or class ‛Foo’ diff --git a/tests/parser/should_fail/readFail007.stderr b/tests/parser/should_fail/readFail007.stderr index 3236824a7806202297d07f95f321d637ac691c7d..bd6d92ed5863163f8893d77f3df41847b5dca51c 100644 --- a/tests/parser/should_fail/readFail007.stderr +++ b/tests/parser/should_fail/readFail007.stderr @@ -1,2 +1,4 @@ -readFail007.hs:6:4: Parse error in pattern: 2 + 2 +readFail007.hs:6:4: + Parse error in pattern: 2 + 2 + Possibly caused by a missing 'do'? diff --git a/tests/parser/should_fail/readFail008.stderr b/tests/parser/should_fail/readFail008.stderr index a40ce01da007bafd72df503faa1670e1b8b02449..a2701740b0737273ce162d662295531b55b77d25 100644 --- a/tests/parser/should_fail/readFail008.stderr +++ b/tests/parser/should_fail/readFail008.stderr @@ -1,6 +1,6 @@ readFail008.hs:5:15: A newtype constructor cannot have a strictness annotation, - but `T' does - In the definition of data constructor `T' - In the newtype declaration for `N' + but ‛T’ does + In the definition of data constructor ‛T’ + In the newtype declaration for ‛N’ diff --git a/tests/parser/should_fail/readFail016.stderr b/tests/parser/should_fail/readFail016.stderr index 620d8505a262dd0560141d978c8a9e4fb2a00c4a..87f3d2c65759e3e0b3f1fd694f51d0817ca5bae9 100644 --- a/tests/parser/should_fail/readFail016.stderr +++ b/tests/parser/should_fail/readFail016.stderr @@ -1,4 +1,4 @@ readFail016.hs:7:1: Precedence parsing error - cannot mix `|-' [infix 6] and `:' [infixr 5] in the same infix expression + cannot mix ‛|-’ [infix 6] and ‛:’ [infixr 5] in the same infix expression diff --git a/tests/parser/should_fail/readFail021.stderr b/tests/parser/should_fail/readFail021.stderr index a3f5e7b3f0194ad18b906d4819a1ea9bf8a69251..ed55c0df7f05aac2abbd862f09352f4274187111 100644 --- a/tests/parser/should_fail/readFail021.stderr +++ b/tests/parser/should_fail/readFail021.stderr @@ -1,2 +1,3 @@ -readFail021.hs:1:1: The function `main' is not defined in module `Main' +readFail021.hs:1:1: + The function ‛main’ is not defined in module ‛Main’ diff --git a/tests/parser/should_fail/readFail023.stderr b/tests/parser/should_fail/readFail023.stderr index e1b6ceb83c5367e8bcd0839d1ec2907843de53aa..c31dc4e9934cf7f6a7f486daadbffca2a2857938 100644 --- a/tests/parser/should_fail/readFail023.stderr +++ b/tests/parser/should_fail/readFail023.stderr @@ -1,6 +1,6 @@ readFail023.hs:9:5: - The operator `**' [infixl 7] of a section + The operator ‛**’ [infixl 7] of a section must have lower precedence than that of the operand, namely prefix `-' [infixl 6] - in the section: `- 3 **' + in the section: ‛- 3 **’ diff --git a/tests/parser/should_fail/readFail025.stderr b/tests/parser/should_fail/readFail025.stderr index 24e83e712aba18bf7a798195a44dad957f9a6cf5..0d74f86338eb3a15b4a6b43d6d929bb72cb2ea2b 100644 --- a/tests/parser/should_fail/readFail025.stderr +++ b/tests/parser/should_fail/readFail025.stderr @@ -1,4 +1,4 @@ - -readFail025.hs:5:8: - Unexpected type `String' where type variable expected - In the declaration of `T String' + +readFail025.hs:5:8: + Unexpected type ‛String’ where type variable expected + In the declaration of ‛T String’ diff --git a/tests/parser/should_fail/readFail035.stderr b/tests/parser/should_fail/readFail035.stderr index f0489b45eb1f90e8c0d08725c3a371a00ef9e0a9..9e3a64a06c47bed7a98a3e5a9f74e7f5a6c66a5c 100644 --- a/tests/parser/should_fail/readFail035.stderr +++ b/tests/parser/should_fail/readFail035.stderr @@ -1,4 +1,4 @@ - -readFail035.hs:6:1: - `Foo' has no constructors (-XEmptyDataDecls permits this) - In the data declaration for `Foo' + +readFail035.hs:6:1: + ‛Foo’ has no constructors (-XEmptyDataDecls permits this) + In the data declaration for ‛Foo’ diff --git a/tests/parser/should_fail/readFail036.stderr b/tests/parser/should_fail/readFail036.stderr index 088f0a9975729d65c72afc7adcfdf854ad1e6097..9360e6242f78edd98d88f0fdf339c0b5e5d5f02c 100644 --- a/tests/parser/should_fail/readFail036.stderr +++ b/tests/parser/should_fail/readFail036.stderr @@ -1,5 +1,5 @@ readFail036.hs:4:16: - Illegal kind signature: `*' + Illegal kind signature: ‛*’ Perhaps you intended to use -XKindSignatures - In the data type declaration for `Foo' + In the data type declaration for ‛Foo’ diff --git a/tests/parser/should_fail/readFail037.stderr b/tests/parser/should_fail/readFail037.stderr index 4c900d66b1052f85d9009eb6ac28ad0d7fdbce7a..a9c9ff7ad01e687354a99c62a073332e594cae87 100644 --- a/tests/parser/should_fail/readFail037.stderr +++ b/tests/parser/should_fail/readFail037.stderr @@ -1,5 +1,5 @@ readFail037.hs:4:1: - Too many parameters for class `Foo' + Too many parameters for class ‛Foo’ (Use -XMultiParamTypeClasses to allow multi-parameter classes) - In the class declaration for `Foo' + In the class declaration for ‛Foo’ diff --git a/tests/parser/should_fail/readFail039.stderr b/tests/parser/should_fail/readFail039.stderr index 1c7cb6b9750037afcba4f8b966006336fd48e464..d0e27526fccdcf4fcecb165c2fbe0a95fd25f0e1 100644 --- a/tests/parser/should_fail/readFail039.stderr +++ b/tests/parser/should_fail/readFail039.stderr @@ -1,6 +1,6 @@ - -readFail039.hs:8:14: - Can't make a derived instance of `C Foo': - `C' is not a derivable class - Try -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension - In the newtype declaration for `Foo' + +readFail039.hs:8:14: + Can't make a derived instance of ‛C Foo’: + ‛C’ is not a derivable class + Try -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension + In the newtype declaration for ‛Foo’ diff --git a/tests/parser/should_fail/readFail041.stderr b/tests/parser/should_fail/readFail041.stderr index fbe49b1153fcd72d0f9294fad81399bd2958552e..14903b5b28e7d3340bb98782629bdca861090852 100644 --- a/tests/parser/should_fail/readFail041.stderr +++ b/tests/parser/should_fail/readFail041.stderr @@ -1,5 +1,5 @@ readFail041.hs:6:1: - Fundeps in class `Foo' + Fundeps in class ‛Foo’ (Use -XFunctionalDependencies to allow fundeps) - In the class declaration for `Foo' + In the class declaration for ‛Foo’ diff --git a/tests/parser/should_fail/readFail042.stderr b/tests/parser/should_fail/readFail042.stderr index 8fbb9bf1f77fb81ae156ecf017118689d2818c78..9941cb633c0cbd962862d6a973ef1dd6aa0e97a3 100644 --- a/tests/parser/should_fail/readFail042.stderr +++ b/tests/parser/should_fail/readFail042.stderr @@ -7,6 +7,6 @@ readFail042.hs:11:9: Unexpected transform statement in a list comprehension Use -XTransformListComp -readFail042.hs:11:23: Not in scope: `by' +readFail042.hs:11:23: Not in scope: ‛by’ -readFail042.hs:11:26: Not in scope: `x' +readFail042.hs:11:26: Not in scope: ‛x’ diff --git a/tests/parser/should_fail/readFail043.stderr b/tests/parser/should_fail/readFail043.stderr index b132bef95780d189629eedaa48f84c9f53f75c1b..72981ed3f8e5fa6ab940d6225ce7ad02cef2a435 100644 --- a/tests/parser/should_fail/readFail043.stderr +++ b/tests/parser/should_fail/readFail043.stderr @@ -3,24 +3,24 @@ readFail043.hs:10:9: Unexpected transform statement in a list comprehension Use -XTransformListComp -readFail043.hs:10:20: Not in scope: `by' +readFail043.hs:10:20: Not in scope: ‛by’ -readFail043.hs:10:23: Not in scope: `x' +readFail043.hs:10:23: Not in scope: ‛x’ -readFail043.hs:10:25: Not in scope: `using' +readFail043.hs:10:25: Not in scope: ‛using’ readFail043.hs:11:9: Unexpected transform statement in a list comprehension Use -XTransformListComp -readFail043.hs:11:20: Not in scope: `by' +readFail043.hs:11:20: Not in scope: ‛by’ -readFail043.hs:11:23: Not in scope: `x' +readFail043.hs:11:23: Not in scope: ‛x’ -readFail043.hs:11:25: Not in scope: `using' +readFail043.hs:11:25: Not in scope: ‛using’ readFail043.hs:12:9: Unexpected transform statement in a list comprehension Use -XTransformListComp -readFail043.hs:12:20: Not in scope: `using' +readFail043.hs:12:20: Not in scope: ‛using’ diff --git a/tests/parser/should_fail/readFail046.stderr b/tests/parser/should_fail/readFail046.stderr index a303d7798ed1b8e3f9b268052e69331da78fd3a8..072fe530f9ece5a5c3ab934af31f0627905dd17c 100644 --- a/tests/parser/should_fail/readFail046.stderr +++ b/tests/parser/should_fail/readFail046.stderr @@ -1,4 +1,4 @@ readFail046.hs:1:14: Unsupported extension: ExistientialQuantification - Perhaps you meant `ExistentialQuantification' or `NoExistentialQuantification' + Perhaps you meant ‛ExistentialQuantification’ or ‛NoExistentialQuantification’ diff --git a/tests/parser/should_run/all.T b/tests/parser/should_run/all.T index 03951a1edbf2eb25fca8b37c060dc9d3831bcb3c..eee0330e5ea485950626a48544877aea682a6456 100644 --- a/tests/parser/should_run/all.T +++ b/tests/parser/should_run/all.T @@ -5,4 +5,4 @@ test('readRun004', normal, compile_and_run, ['-fobject-code']) test('T1344', normal, compile_and_run, ['']) test('operator', normal, compile_and_run, ['']) test('operator2', normal, compile_and_run, ['']) -test('ParserMultiWayIf', if_compiler_lt('ghc', '7.5', skip), compile_and_run, ['']) +test('ParserMultiWayIf', when(compiler_lt('ghc', '7.5'), skip), compile_and_run, ['']) diff --git a/tests/parser/unicode/2302.stderr b/tests/parser/unicode/2302.stderr deleted file mode 100644 index 608c9ef0bde24b459a4071abc35a4d3a06fcf7d5..0000000000000000000000000000000000000000 --- a/tests/parser/unicode/2302.stderr +++ /dev/null @@ -1,2 +0,0 @@ - -2302.hs:1:5: Not in scope: data constructor `À' diff --git a/tests/parser/unicode/1103.hs b/tests/parser/unicode/T1103.hs similarity index 100% rename from tests/parser/unicode/1103.hs rename to tests/parser/unicode/T1103.hs diff --git a/tests/parser/unicode/1744.hs b/tests/parser/unicode/T1744.hs similarity index 100% rename from tests/parser/unicode/1744.hs rename to tests/parser/unicode/T1744.hs diff --git a/tests/parser/unicode/1744.stdout b/tests/parser/unicode/T1744.stdout similarity index 100% rename from tests/parser/unicode/1744.stdout rename to tests/parser/unicode/T1744.stdout diff --git a/tests/parser/unicode/2302.hs b/tests/parser/unicode/T2302.hs similarity index 100% rename from tests/parser/unicode/2302.hs rename to tests/parser/unicode/T2302.hs diff --git a/tests/parser/unicode/T2302.stderr b/tests/parser/unicode/T2302.stderr new file mode 100644 index 0000000000000000000000000000000000000000..0557a731db6a77469f4a9b9dee0453f7be9cf67e --- /dev/null +++ b/tests/parser/unicode/T2302.stderr @@ -0,0 +1,2 @@ + +T2302.hs:1:5: Not in scope: data constructor ‛À’ diff --git a/tests/parser/unicode/4373.hs b/tests/parser/unicode/T4373.hs similarity index 100% rename from tests/parser/unicode/4373.hs rename to tests/parser/unicode/T4373.hs diff --git a/tests/parser/unicode/T7671.hs b/tests/parser/unicode/T7671.hs new file mode 100644 index 0000000000000000000000000000000000000000..4eb6a4b50171070f3ac602f58a5fe70fbc07efe4 --- /dev/null +++ b/tests/parser/unicode/T7671.hs @@ -0,0 +1,8 @@ + +{-# LANGUAGE EmptyDataDecls #-} +-- ^ a U+00A0 no-break space +module Foo where + +v = 5 + 3 +-- ^ a U+00A0 no-break space + diff --git a/tests/parser/unicode/all.T b/tests/parser/unicode/all.T index e5375a361e724acf356f9fbf4489c633a164a6f7..a8e19ebec996bbc6986163781fef9d520d2355e3 100644 --- a/tests/parser/unicode/all.T +++ b/tests/parser/unicode/all.T @@ -16,7 +16,8 @@ test('utf8_022', normal, compile_fail, ['']) test('utf8_024', normal, compile_and_run, ['']) -test('1744', normal, compile_and_run, ['']) -test('1103', normal, compile, ['']) -test('2302', only_ways(['normal']), compile_fail, ['']) -test('4373', normal, compile, ['']) +test('T1744', normal, compile_and_run, ['']) +test('T1103', normal, compile, ['']) +test('T2302', only_ways(['normal']), compile_fail, ['']) +test('T4373', normal, compile, ['']) +test('T7671', normal, compile, ['']) diff --git a/tests/perf/compiler/all.T b/tests/perf/compiler/all.T index 3ff9f60d0044393a61d78979f15ba805cb45bd9b..973e5ef95cf2c630f24cab663331c00331d09af3 100644 --- a/tests/perf/compiler/all.T +++ b/tests/perf/compiler/all.T @@ -1,4 +1,4 @@ -def no_lint(opts): +def no_lint(name, opts): opts.compiler_always_flags = \ filter(lambda opt: opt != '-dcore-lint' and opt != '-dcmm-lint', opts.compiler_always_flags) @@ -6,57 +6,63 @@ setTestOpts(no_lint) test('T1969', - [if_wordsize(32, - compiler_stats_num_field('peak_megabytes_allocated', 13, - 19)), - # expected value: 14 (x86/Windows 17/05/10) - # 15 (x86/OS X) - # 19 (x86/OS X) - if_wordsize(64, - compiler_stats_num_field('peak_megabytes_allocated', 22, - 28)), - # expected value: 28 (amd64/Linux) - # expected value: 34 (amd64/Linux) - # 2012-09-20 23 (amd64/Linux) - # 2012-10-03 25 (amd64/Linux if .hi exists) - if_wordsize(32, - compiler_stats_num_field('max_bytes_used', 4000000, - 7000000)), - # expected value: 6707308 (x86/OS X) - # 5717704 (x86/Windows 17/05/10) - # 6149572 (x86/Linux, 31/12/09) - if_wordsize(64, - compiler_stats_range_field('max_bytes_used', 9000000, 20)), - # looks like the peak is around 10M, but we're - # unlikely to GC exactly on the peak. - # varies quite a lot with CLEANUP and BINDIST, - # hence 10% range. - if_wordsize(32, - compiler_stats_range_field('bytes allocated', 303930948, 5)), - # expected value: 215582916 (x86/Windows) - # 221667908 (x86/OS X) - # 274932264 (x86/Linux) - # 2012-10-08: 303930948 (x86/Linux, new codegen) - # 2012-10-29: 298921816 (x86/Windows; increased range to 5% - if_wordsize(64, - compiler_stats_range_field('bytes allocated', 658786936, 1)), - # 17/11/2009: 434,845,560 (amd64/Linux) - # 08/12/2009: 459,776,680 (amd64/Linux) - # 17/05/2010: 519,377,728 (amd64/Linux) - # 05/08/2011: 561,382,568 (amd64/OS X) - # 16/07/2012: 589,168,872 (amd64/Linux) - # 20/07/2012: 595,936,240 (amd64/Linux) - # 23/08/2012: 606,230,880 (amd64/Linux) - # 29/08/2012: 633,334,184 (amd64/Linux) - # (^ new codegen) - # 18/09/2012: 641,959,976 (amd64/Linux) - # 19/10/2012: 661,832,592 (amd64/Linux) - # (^ -fPIC turned on) - # 23/10/2012: 642,594,312 (amd64/Linux) - # (^ -fPIC turned off again) - # 12/11/2012: 658,786,936 (amd64/Linux) - # ( UNKNOWN REASON ) + [compiler_stats_num_field('peak_megabytes_allocated', + [(wordsize(32), 14, 1), + # 2010-05-17 14 (x86/Windows) + # 15 (x86/OS X) + # 19 (x86/OS X) + # 2013-02-10 13 (x86/Windows) + # 2013-02-10 14 (x86/OSX) + (wordsize(64), 23, 10)]), + # 28 (amd64/Linux) + # 34 (amd64/Linux) + # 2012-09-20 23 (amd64/Linux) + # 2012-10-03 25 (amd64/Linux if .hi exists) + # 2013-02-13 23, but unstable so increased to 10% range + compiler_stats_num_field('max_bytes_used', + [(platform('i386-unknown-mingw32'), 5094914, 2), + # 2010-05-17 5717704 (x86/Windows) + # 2013-02-10 5159748 (x86/Windows) + # 2013-02-10 5030080 (x86/Windows) + (wordsize(32), 6149572, 1), + # 6707308 (x86/OS X) + # 2009-12-31 6149572 (x86/Linux) + (wordsize(64), 9000000, 20)]), + # looks like the peak is around 10M, but we're + # unlikely to GC exactly on the peak. + # varies quite a lot with CLEANUP and BINDIST, + # hence 10% range. + compiler_stats_num_field('bytes allocated', + [(platform('i386-unknown-mingw32'), 310633884, 1), + # 215582916 (x86/Windows) + # 2012-10-29 298921816 (x86/Windows) + # 2013-02-10 310633884 (x86/Windows) + (wordsize(32), 322937684, 1), + # 221667908 (x86/OS X) + # 274932264 (x86/Linux) + # 2012-10-08 303930948 (x86/Linux, new codegen) + # 2013-02-10 322937684 (x86/OSX) + (wordsize(64), 658786936, 5)]), + # 17/11/2009 434845560 (amd64/Linux) + # 08/12/2009 459776680 (amd64/Linux) + # 17/05/2010 519377728 (amd64/Linux) + # 05/08/2011 561382568 (amd64/OS X) + # 16/07/2012 589168872 (amd64/Linux) + # 20/07/2012 595936240 (amd64/Linux) + # 23/08/2012 606230880 (amd64/Linux) + # 29/08/2012 633334184 (amd64/Linux) + # (^ new codegen) + # 18/09/2012 641959976 (amd64/Linux) + # 19/10/2012 661832592 (amd64/Linux) + # (^ -fPIC turned on) + # 23/10/2012 642594312 (amd64/Linux) + # (^ -fPIC turned off again) + # 12/11/2012 658786936 (amd64/Linux) + # (^ UNKNOWN REASON ) + # 17/1/13: 667160192 (x86_64/Linux) + # (^ new demand analyser) only_ways(['normal']), + extra_hc_opts('-dcore-lint -static') # Leave -dcore-lint on for this one test, so that we have something # that will catch a regression in -dcore-lint performance. @@ -77,29 +83,29 @@ else: conf_3294 = skip test('T3294', - [if_wordsize(32, - compiler_stats_num_field('max_bytes_used', 12000000, - 20000000)), - # expected value: 17725476 (x86/OS X) - # 14593500 (Windows) - if_wordsize(64, - compiler_stats_range_field('max_bytes_used', 44894544, 15)), - # prev: 25753192 (amd64/Linux) - # 29/08/2012: 37724352 (amd64/Linux) - # (increase due to new codegen, see #7198) - # 13/13/2012: 44894544 (amd64/Linux) - # (reason for increase unknown) - if_wordsize(32, - compiler_stats_range_field('bytes allocated', 1373514844, 5)), - # previous: 815479800 (x86/Linux) - # (^ increase due to new codegen, see #7198) - # 2012-10-08: 1373514844 (x86/Linux) - if_wordsize(64, - compiler_stats_range_field('bytes allocated', 2717327208, 5)), - # old: 1,357,587,088 (amd64/Linux) - # 29/08/2012: 2,961,778,696 (amd64/Linux) - # (^ increase due to new codegen, see #7198) - # 18/09/2012: 2,717,327,208 (amd64/Linux) + [ + compiler_stats_num_field('max_bytes_used', + [(wordsize(32), 20712280, 1), + # 17725476 (x86/OS X) + # 14593500 (Windows) + # 2013-02-10 20651576 (x86/Windows) + # 2013-02-10 20772984 (x86/OSX) + (wordsize(64), 44894544, 15)]), + # prev: 25753192 (amd64/Linux) + # 29/08/2012: 37724352 (amd64/Linux) + # (increase due to new codegen, see #7198) + # 13/13/2012: 44894544 (amd64/Linux) + # (reason for increase unknown) + compiler_stats_num_field('bytes allocated', + [(wordsize(32), 1373514844, 5), + # previous: 815479800 (x86/Linux) + # (^ increase due to new codegen, see #7198) + # 2012-10-08: 1373514844 (x86/Linux) + (wordsize(64), 2717327208, 5)]), + # old: 1357587088 (amd64/Linux) + # 29/08/2012: 2961778696 (amd64/Linux) + # (^ increase due to new codegen, see #7198) + # 18/09/2012: 2717327208 (amd64/Linux) conf_3294 ], compile, @@ -108,48 +114,42 @@ test('T3294', test('T4801', [ # expect_broken(5224), # temporarily unbroken (#5227) - if_wordsize(32, - compiler_stats_range_field('peak_megabytes_allocated', 30, 20)), - - if_wordsize(64, - compiler_stats_range_field('peak_megabytes_allocated', 49, 20)), - # prev: 50 (amd64/Linux) - # 19/10/2012: 64 (amd64/Linux) (REASON UNKNOWN!) - # 12/11/2012: 49 (amd64/Linux) (REASON UNKNOWN!) + compiler_stats_num_field('peak_megabytes_allocated', + [(platform('x86_64-apple-darwin'), 58, 1), + # expected value: 58 (amd64/OS X) + (wordsize(32), 30, 20), + (wordsize(64), 49, 20)]), + # prev: 50 (amd64/Linux) + # 19/10/2012: 64 (amd64/Linux) + # (^ REASON UNKNOWN!) + # 12/11/2012: 49 (amd64/Linux) + # (^ REASON UNKNOWN!) - # expected value: 58 (amd64/OS X): - if_platform('x86_64-apple-darwin', - compiler_stats_num_field('peak_megabytes_allocated', 56, 60)), - # expected value: 228286660 (x86/OS X) - if_wordsize(32, - compiler_stats_range_field('bytes allocated', 185669232, 10)), + compiler_stats_num_field('bytes allocated', + [(platform('x86_64-apple-darwin'), 510938976, 5), + # expected value: 510938976 (amd64/OS X): - if_wordsize(64, - compiler_stats_range_field('bytes allocated', 392409984, 10)), - # prev: 360243576 (amd64/Linux) - # 19/10/2012: 447190832 (amd64/Linux) (-fPIC turned on) - # 19/10/2012: 392409984 (amd64/Linux) (-fPIC turned off) + (wordsize(32), 185669232, 10), + # expected value: 228286660 (x86/OS X) - # expected value: 510938976 (amd64/OS X): - if_platform('x86_64-apple-darwin', - compiler_stats_num_field('bytes allocated', 490000000, - 530000000)), + (wordsize(64), 392409984, 10)]), + # prev: 360243576 (amd64/Linux) + # 19/10/2012: 447190832 (amd64/Linux) (-fPIC turned on) + # 19/10/2012: 392409984 (amd64/Linux) (-fPIC turned off) - if_wordsize(32, - # expected value: x86/OS X: 9651948 - compiler_stats_num_field('max_bytes_used', 8000000, - 12000000)), - # expected value: 10290952 (windows) - if_wordsize(64, - compiler_stats_range_field('max_bytes_used', 21657520, 15)), + compiler_stats_num_field('max_bytes_used', + [(platform('x86_64-apple-darwin'), 21657520, 5), + (wordsize(32), 11139444, 1), + # 9651948 (x86/OSX) + # 10290952 (windows) + # 2013-02-10 11071060 (x86/Windows) + # 2013-02-10 11207828 (x86/OSX) + (wordsize(64), 21657520, 15)]), # prev: 20486256 (amd64/OS X) # 30/08/2012: 17305600--20391920 (varies a lot) # 19/10/2012: 26882576 (-fPIC turned on) # 19/10/2012: 18619912 (-fPIC turned off) # 24/12/2012: 21657520 (perhaps gc sampling time wibbles?) - if_platform('x86_64-apple-darwin', - compiler_stats_num_field('max_bytes_used', 20000000, - 23000000)), only_ways(['normal']), extra_hc_opts('-static') ], @@ -158,33 +158,30 @@ test('T4801', test('T3064', [# expect_broken( 3064 ), - # expected value: 14 (x86/Linux 28-06-2012): - if_wordsize(32, - compiler_stats_range_field('peak_megabytes_allocated', 14, 30)), - - # expected value: 18 (amd64/Linux): - if_wordsize(64, - compiler_stats_num_field('peak_megabytes_allocated', 20, 28)), - - # expected value: 56380288 (x86/Linux) (28/6/2011) - # 111189536 (x86/Windows) (30/10/12) - if_wordsize(32, - compiler_stats_range_field('bytes allocated', 111189536, 10)), + compiler_stats_num_field('peak_megabytes_allocated', + [(wordsize(32), 14, 1), + # expected value: 14 (x86/Linux 28-06-2012): + (wordsize(64), 23, 10)]), + # (amd64/Linux): 18 + # (amd64/Linux) 2012-02-07: 26 + # (amd64/Linux) 2013-02-12: 23; increased range to 10% + compiler_stats_num_field('bytes allocated', + [(wordsize(32), 111189536, 10), + # expected value: 56380288 (x86/Linux) (28/6/2011) + # 111189536 (x86/Windows) (30/10/12) + (wordsize(64), 224798696, 5)]), + # (amd64/Linux) (28/06/2011): 73259544 + # (amd64/Linux) (07/02/2013): 224798696 - # expected value: 73259544 (amd64/Linux) (28/6/2011): - if_wordsize(64, - compiler_stats_num_field('bytes allocated', 200000000, - 280000000)), - - # expected value: 2247016 (x86/Linux) (28/6/2011): - if_wordsize(32, - compiler_stats_range_field('max_bytes_used', 5511604, 20)), - - # expected value: 4032024 (amd64/Linux, intree) (28/6/2011): - if_wordsize(64, - compiler_stats_num_field('max_bytes_used', 8000000, - 14000000)), + compiler_stats_num_field('max_bytes_used', + [(wordsize(32), 5511604, 20), + # expected value: 2247016 (x86/Linux) (28/6/2011): + (wordsize(64), 9397488, 10)]), + # (amd64/Linux, intree) (28/06/2011): 4032024 + # (amd64/Linux, intree) (07/02/2013): 9819288 + # (amd64/Linux) (14/02/2013): 8687360 + # (amd64/Linux) (18/02/2013): 9397488 only_ways(['normal']) ], compile, @@ -196,39 +193,36 @@ test('T4007', ['$MAKE -s --no-print-directory T4007']) test('T5030', - [ - if_wordsize(32, - compiler_stats_range_field('bytes allocated', 259547660, 10)), - # previous: 196457520 - # 2012-10-08: 259547660 (x86/Linux, new codegen) - # expected value: 346750856 (amd64/Linux): - if_wordsize(64, - compiler_stats_range_field('bytes allocated', 530000000, 10)), + [compiler_stats_num_field('bytes allocated', + [(wordsize(32), 259547660, 10), + # previous: 196457520 + # 2012-10-08: 259547660 (x86/Linux, new codegen) + (wordsize(64), 602993184, 10)]), + # Previously 530000000 (+/- 10%) + # 17/1/13: 602993184 (x86_64/Linux) + # (new demand analyser) + only_ways(['normal']) ], compile, ['-fcontext-stack=300']) test('T5631', - [if_wordsize(32, # sample from x86/Linux - compiler_stats_range_field('bytes allocated', 392904228, 10)), - # expected value: 774,595,008 (amd64/Linux): - if_wordsize(64, - compiler_stats_num_field('bytes allocated', 600000000, - 900000000)), + [compiler_stats_num_field('bytes allocated', + [(wordsize(32), 392904228, 10), + # expected value: 392904228 (x86/Linux) + (wordsize(64), 774595008, 5)]), + # expected value: 774595008 (amd64/Linux): only_ways(['normal']) ], compile, ['']) test('parsing001', - [# expected value: ? - if_wordsize(32, - compiler_stats_range_field('bytes allocated', 274000576, 10)), - # expected value: 587079016 (amd64/Linux): - if_wordsize(64, - compiler_stats_num_field('bytes allocated', 540000000, - 620000000)), + [compiler_stats_num_field('bytes allocated', + [(wordsize(32), 274000576, 10), + (wordsize(64), 587079016, 5)]), + # expected value: 587079016 (amd64/Linux) only_ways(['normal']), ], compile_fail, ['']) @@ -237,82 +231,78 @@ test('parsing001', test('T783', [ only_ways(['normal']), # no optimisation for this one # expected value: 175,569,928 (x86/Linux) - if_wordsize(32, - compiler_stats_range_field('bytes allocated', 226907420, 10)), - # 2012-10-08: 226907420 (x86/Linux) - if_wordsize(64, - compiler_stats_range_field('bytes allocated', 640324528, 10)), - # prev: 349,263,216 (amd64/Linux) - # 07/08/2012: 384,479,856 (amd64/Linux) - # 29/08/2012: 436,927,840 (amd64/Linux) - # 12/11/2012: 640,324,528 (amd64/Linux) - # (OldCmm removed: not sure why this got worse, the - # other perf tests remained about the same) + compiler_stats_num_field('bytes allocated', + [(wordsize(32), 333833658, 2), + # 2012-10-08: 226907420 (x86/Linux) + # 2013-02-10: 329202116 (x86/Windows) + # 2013-02-10: 338465200 (x86/OSX) + (wordsize(64), 640324528, 10)]), + # prev: 349263216 (amd64/Linux) + # 07/08/2012: 384479856 (amd64/Linux) + # 29/08/2012: 436927840 (amd64/Linux) + # 12/11/2012: 640324528 (amd64/Linux) + # (OldCmm removed: not sure why this got worse, the + # other perf tests remained about the same) extra_hc_opts('-static') ], compile,['']) test('T5321Fun', [ only_ways(['normal']), # no optimisation for this one - # sample from x86/Linux - if_wordsize(32, - compiler_stats_range_field('bytes allocated', 344416344, 10)), - # prev: 300000000 - # 2012-10-08: 344416344 - # (increase due to new codegen) - if_wordsize(64, - compiler_stats_range_field('bytes allocated', 713385808, 10)) - # prev: 585,521,080 - # 29/08/2012: 713,385,808 - # (increase due to new codegen) + compiler_stats_num_field('bytes allocated', + [(wordsize(32), 344416344, 10), + # prev: 300000000 + # 2012-10-08: 344416344 x86/Linux + # (increase due to new codegen) + (wordsize(64), 713385808, 10)]) + # prev: 585521080 + # 29/08/2012: 713385808 + # (increase due to new codegen) ], compile,['']) test('T5321FD', [ only_ways(['normal']), # no optimisation for this one - if_wordsize(32, - compiler_stats_range_field('bytes allocated', 240302920, 10)), - # prev: 213380256 - # 2012-10-08: 240302920 (x86/Linux) - # (increase due to new codegen) - if_wordsize(64, - compiler_stats_range_field('bytes allocated', 492905640, 10)) - # prev: 418,306,336 - # 29/08/2012: 492,905,640 - # (increase due to new codegen) + compiler_stats_num_field('bytes allocated', + [(wordsize(32), 240302920, 10), + # prev: 213380256 + # 2012-10-08: 240302920 (x86/Linux) + # (increase due to new codegen) + (wordsize(64), 492905640, 10)]) + # prev: 418306336 + # 29/08/2012: 492905640 + # (increase due to new codegen) ], compile,['']) test('T5642', [ only_ways(['normal']), - if_wordsize(32, # sample from x86/Linux - compiler_stats_range_field('bytes allocated', 650000000, 10)), - if_wordsize(64, - compiler_stats_range_field('bytes allocated', 1300000000, 10)) + compiler_stats_num_field('bytes allocated', + [(wordsize(32), 650000000, 10), + # sample from x86/Linux + (wordsize(64), 1300000000, 10)]) ], compile,['-O']) test('T5837', [ only_ways(['normal']), - if_wordsize(32, # sample from x86/Linux - compiler_stats_range_field('bytes allocated', 40000000, 10)), - - # sample: 3926235424 (amd64/Linux, 15/2/2012) - if_wordsize(64, - compiler_stats_range_field('bytes allocated', 81879216, 10)) - # 2012-10-02 81879216 - # 2012-09-20 87254264 amd64/Linux + compiler_stats_num_field('bytes allocated', + [(wordsize(32), 40000000, 10), + # sample from x86/Linux + (wordsize(64), 81879216, 10)]) + # sample: 3926235424 (amd64/Linux, 15/2/2012) + # 2012-10-02 81879216 + # 2012-09-20 87254264 amd64/Linux ], compile_fail,['-fcontext-stack=50']) test('T6048', [ only_ways(['optasm']), - if_wordsize(32, # sample from x86/Linux - compiler_stats_range_field('bytes allocated', 48887164, 10)), - # prev: 38000000 - # 2012-10-08: 48887164 (x86/Linux) - if_wordsize(64, - compiler_stats_range_field('bytes allocated', 97247032, 10)) - # 18/09/2012 97247032 amd64/Linux + compiler_stats_num_field('bytes allocated', + [(wordsize(32), 48887164, 10), + # prev: 38000000 (x86/Linux) + # 2012-10-08: 48887164 (x86/Linux) + (wordsize(64), 97247032, 10)]) + # 18/09/2012 97247032 amd64/Linux ], compile,['']) diff --git a/tests/perf/compiler/parsing001.stderr b/tests/perf/compiler/parsing001.stderr index b42ab6cb22b03f0d498281547333bae4c2d9e97c..fe5939628cbdb1c09cefb9ec0d3562af9923e5be 100644 --- a/tests/perf/compiler/parsing001.stderr +++ b/tests/perf/compiler/parsing001.stderr @@ -1,4 +1,4 @@ parsing001.hs:3:1: - Failed to load interface for `Wibble' + Failed to load interface for ‛Wibble’ Use -v to see a list of the files searched for. diff --git a/tests/perf/haddock/all.T b/tests/perf/haddock/all.T index e432342cfbecff00b2d9ec06991324826dc9c178..ba25e146b5fb988b8b0d4c50ff068664d45b5316 100644 --- a/tests/perf/haddock/all.T +++ b/tests/perf/haddock/all.T @@ -1,107 +1,122 @@ test('haddock.base', - [unless_in_tree_compiler(skip) - ,if_wordsize(64, - stats_range_field('peak_megabytes_allocated', 249, 10)) - # 2012-08-14: 240 (amd64/Linux) - # 2012-09-18: 237 (amd64/Linux) - # 2012-11-12: 249 (amd64/Linux) - ,if_wordsize(32, - stats_num_field('peak_megabytes_allocated', 110, - 115)) - # 2012-08-14: 144 (x86/OSX) - # 2012-10-30: 113 (x86/Windows) - ,if_wordsize(64, - stats_range_field('max_bytes_used', 87265136, 10)) - # 2012-08-14: 87374568 (amd64/Linux) - # 2012-08-21: 86428216 (amd64/Linux) - # 2012-09-20: 84794136 (amd64/Linux) - # 2012-11-12: 87265136 (amd64/Linux) - ,if_wordsize(32, - stats_range_field('max_bytes_used', 45574928, 1)) - # 2012-08-14: 45574928 (x86/OSX) - ,if_wordsize(64, - stats_range_field('bytes allocated', 5902601224, 2)) - # 2012-08-14: 5920822352 (amd64/Linux) - # 2012-09-20: 5829972376 (amd64/Linux) - # 2012-10-08: 5902601224 (amd64/Linux) - ,if_wordsize(32, - stats_range_field('bytes allocated', 2955470952, 1)) - # 2012-08-14: 3046487920 (x86/OSX) - # 2012-10-30: 2955470952 (x86/Windows) + [unless(in_tree_compiler(), skip) + ,stats_num_field('peak_megabytes_allocated', + [(wordsize(64), 274, 10) + # 2012-08-14: 240 (amd64/Linux) + # 2012-09-18: 237 (amd64/Linux) + # 2012-11-12: 249 (amd64/Linux) + # 2013-01-29: 274 (amd64/Linux) + ,(platform('i386-unknown-mingw32'), 133, 1) + # 2013-02-10: 133 (x86/Windows) + ,(wordsize(32), 139, 1)]) + # 2012-08-14: 144 (x86/OSX) + # 2012-10-30: 113 (x86/Windows) + # 2013-02-10: 139 (x86/OSX) + ,stats_num_field('max_bytes_used', + [(wordsize(64), 96022312, 10) + # 2012-08-14: 87374568 (amd64/Linux) + # 2012-08-21: 86428216 (amd64/Linux) + # 2012-09-20: 84794136 (amd64/Linux) + # 2012-11-12: 87265136 (amd64/Linux) + # 2013-01-29: 96022312 (amd64/Linux) + ,(platform('i386-unknown-mingw32'), 47988488, 1) + # 2013-02-10: 47988488 (x86/Windows) + ,(wordsize(32), 52237984, 1)]) + # 2013-02-10: 52237984 (x86/OSX) + ,stats_num_field('bytes allocated', + [(wordsize(64), 6282746976, 5) + # 2012-08-14: 5920822352 (amd64/Linux) + # 2012-09-20: 5829972376 (amd64/Linux) + # 2012-10-08: 5902601224 (amd64/Linux) + # 2013-01-17: 6064874536 (x86_64/Linux) + # 2013-02-10: 6282746976 (x86_64/Linux) + ,(platform('i386-unknown-mingw32'), 3358693084, 1) + # 2013-02-10: 3358693084 (x86/Windows) + ,(wordsize(32), 3146596848, 1)]) + # 2012-08-14: 3046487920 (x86/OSX) + # 2012-10-30: 2955470952 (x86/Windows) + # 2013-02-10: 3146596848 (x86/OSX) ], stats, ['../../../../libraries/base/dist-install/doc/html/base/base.haddock.t']) test('haddock.Cabal', - [unless_in_tree_compiler(skip) - ,if_wordsize(64, - stats_range_field('peak_megabytes_allocated', 217, 10)) - # 2012-08-14: 202 (amd64/Linux) - # 2012-08-29: 211 (amd64/Linux, new codegen) - # 2012-09-20: 227 (amd64/Linux) - # 2012-10-08: 217 (amd64/Linux) - ,if_wordsize(32, - stats_num_field('peak_megabytes_allocated', 80, - 85)) - # 2012-08-14: 116 (x86/OSX) - # 2012-10-30: 83 (x86/Windows) - ,if_wordsize(64, - stats_range_field('max_bytes_used', 80590280, 15)) - # 2012-08-14: 74119424 (amd64/Linux) - # 2012-08-29: 77992512 (amd64/Linux, new codegen) - # 2012-10-02: 91341568 (amd64/Linux) - # 2012-10-08: 80590280 (amd64/Linux) - ,if_wordsize(32, - stats_range_field('max_bytes_used', 44224896, 5)) - # 2012-08-14: 47461532 (x86/OSX) - # 2012-10-30: 44224896 (x86/Windows insreased range to 5%) - ,if_wordsize(64, - stats_range_field('bytes allocated', 3373401360, 2)) - # 2012-08-14: 3255435248 (amd64/Linux) - # 2012-08-29: 3324606664 (amd64/Linux, new codegen) - # 2012-10-08: 3373401360 (amd64/Linux) - ,if_wordsize(32, - stats_range_field('bytes allocated', 1733638168, 1)) - # 2012-08-14: 1648610180 (x86/OSX) - # 2012-10-30: 1733638168 (x86/Windows) + [unless(in_tree_compiler(), skip) + ,stats_num_field('peak_megabytes_allocated', + [(wordsize(64), 217, 10) + # 2012-08-14: 202 (amd64/Linux) + # 2012-08-29: 211 (amd64/Linux, new codegen) + # 2012-09-20: 227 (amd64/Linux) + # 2012-10-08: 217 (amd64/Linux) + ,(platform('i386-unknown-mingw32'), 116, 1) + # 2012-10-30: 83 (x86/Windows) + # 2013-02-10: 116 (x86/Windows) + ,(wordsize(32), 89, 1)]) + # 2012-08-14: 116 (x86/OSX) + # 2013-02-10: 89 (x86/Windows) + ,stats_num_field('max_bytes_used', + [(wordsize(64), 80590280, 15) + # 2012-08-14: 74119424 (amd64/Linux) + # 2012-08-29: 77992512 (amd64/Linux, new codegen) + # 2012-10-02: 91341568 (amd64/Linux) + # 2012-10-08: 80590280 (amd64/Linux) + ,(platform('i386-unknown-mingw32'), 44224896, 1) + # 2012-10-30: 44224896 (x86/Windows) + ,(wordsize(32), 46563344, 1)]) + # 2012-08-14: 47461532 (x86/OSX) + # 2013-02-10: 46563344 (x86/OSX) + ,stats_num_field('bytes allocated', + [(wordsize(64), 3373401360, 2) + # 2012-08-14: 3255435248 (amd64/Linux) + # 2012-08-29: 3324606664 (amd64/Linux, new codegen) + # 2012-10-08: 3373401360 (amd64/Linux) + ,(platform('i386-unknown-mingw32'), 1906532680, 1) + # 2012-10-30: 1733638168 (x86/Windows) + # 2013-02-10: 1906532680 (x86/Windows) + ,(wordsize(32), 1733638168, 1)]) + # 2012-08-14: 1648610180 (x86/OSX) ], stats, ['../../../../libraries/Cabal/Cabal/dist-install/doc/html/Cabal/Cabal.haddock.t']) test('haddock.compiler', - [unless_in_tree_compiler(skip) - ,if_wordsize(64, - stats_range_field('peak_megabytes_allocated', 1240, 10)) - # 2012-08-14: 1203 (amd64/Linux) - # 2012-08-21: 1199 (amd64/Linux) - # 2012-09-20: 1228 (amd64/Linux) - # 2012-10-08: 1240 (amd64/Linux) - ,if_wordsize(32, - stats_num_field('peak_megabytes_allocated', 600, - 610)) - # 2012-08-14: 631 (x86/OSX) - # 2012-10-30: 606 (x86/Windows) - ,if_wordsize(64, - stats_range_field('max_bytes_used', 420105120, 10)) - # 2012-08-14: 428775544 (amd64/Linux) - # 2012-09-20: 437618008 (amd64/Linux) - # 2012-10-08: 442768280 (amd64/Linux) - # 2012-11-12: 420105120 (amd64/Linux) - ,if_wordsize(32, - stats_range_field('max_bytes_used', 220847924, 1)) - # 2012-08-14: 231064920 (x86/OSX) - # 2012-10-30: 220847924 (x86/Windows) - ,if_wordsize(64, - stats_range_field('bytes allocated', 25990254632, 10)) - # 2012-08-14: 26,070,600,504 (amd64/Linux) - # 2012-08-29: 26,353,100,288 (amd64/Linux, new CG) - # 2012-09-18: 26,882,813,032 (amd64/Linux) - # 2012-11-12: 25,990,254,632 (amd64/Linux) - ,if_wordsize(32, - stats_range_field('bytes allocated', 13773051312, 1)) - # 2012-08-14: 13471797488 (x86/OSX) - # 2012-10-30: 13773051312 (x86/Windows) + [unless(in_tree_compiler(), skip) + ,stats_num_field('peak_megabytes_allocated', + [(wordsize(64), 1240, 10) + # 2012-08-14: 1203 (amd64/Linux) + # 2012-08-21: 1199 (amd64/Linux) + # 2012-09-20: 1228 (amd64/Linux) + # 2012-10-08: 1240 (amd64/Linux) + ,(platform('i386-unknown-mingw32'), 653, 1) + # 2012-10-30: 606 (x86/Windows) + # 2013-02-10: 653 (x86/Windows) + ,(wordsize(32), 663, 1)]) + # 2012-08-14: 631 (x86/OSX) + # 2013-02-10: 663 (x86/OSX) + ,stats_num_field('max_bytes_used', + [(wordsize(64), 420105120, 10) + # 2012-08-14: 428775544 (amd64/Linux) + # 2012-09-20: 437618008 (amd64/Linux) + # 2012-10-08: 442768280 (amd64/Linux) + # 2012-11-12: 420105120 (amd64/Linux) + ,(platform('i386-unknown-mingw32'), 238529512, 1) + # 2012-10-30: 220847924 (x86/Windows) + # 2013-02-10: 238529512 (x86/Windows) + ,(wordsize(32), 241785276, 1)]) + # 2012-08-14: 231064920 (x86/OSX) + # 2013-02-10: 241785276 (x86/Windows) + ,stats_num_field('bytes allocated', + [(wordsize(64), 25990254632, 10) + # 2012-08-14: 26070600504 (amd64/Linux) + # 2012-08-29: 26353100288 (amd64/Linux, new CG) + # 2012-09-18: 26882813032 (amd64/Linux) + # 2012-11-12: 25990254632 (amd64/Linux) + ,(platform('i386-unknown-mingw32'), 14925262356, 1) + # 2012-10-30: 13773051312 (x86/Windows) + # 2013-02-10: 14925262356 (x86/Windows) + ,(wordsize(32), 13773051312, 1)]) + # 2012-08-14: 13471797488 (x86/OSX) ], stats, ['../../../../compiler/stage2/doc/html/ghc/ghc.haddock.t']) diff --git a/tests/perf/should_run/T3245.hs b/tests/perf/should_run/T3245.hs index f52fc27303559a7d5f990f612ab9459e26bccc62..d345fed38b9d10c3cc5ff81ee53e0bf5941de9c8 100644 --- a/tests/perf/should_run/T3245.hs +++ b/tests/perf/should_run/T3245.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE ExistentialQuantification #-} +{-# LANGUAGE ExistentialQuantification, DeriveDataTypeable #-} -- The second version (count2) took ages with GHC 6.12 -- because the typeOf function was not properly memoised @@ -44,7 +44,4 @@ main = do doTime $ count1 x doTime $ count1 x -data T = MkT -tcname :: TyCon -tcname = mkTyCon "T" -instance Typeable T where { typeOf _ = mkTyConApp tcname [] } +data T = MkT deriving Typeable diff --git a/tests/perf/should_run/3586.hs b/tests/perf/should_run/T3586.hs similarity index 100% rename from tests/perf/should_run/3586.hs rename to tests/perf/should_run/T3586.hs diff --git a/tests/perf/should_run/3586.stdout b/tests/perf/should_run/T3586.stdout similarity index 100% rename from tests/perf/should_run/3586.stdout rename to tests/perf/should_run/T3586.stdout diff --git a/tests/perf/should_run/T4978.hs b/tests/perf/should_run/T4978.hs index 6413b01fdc8219700d6429172463d789aac39b12..b661edc483ad91aa6897dbedbc79dee45a7b60bc 100644 --- a/tests/perf/should_run/T4978.hs +++ b/tests/perf/should_run/T4978.hs @@ -6,6 +6,7 @@ import Data.ByteString.Internal (inlinePerformIO) import qualified Data.ByteString.Internal as S import Data.Monoid import Foreign +import System.IO.Unsafe newtype Builder = Builder { runBuilder :: (Buffer -> [S.ByteString]) -> Buffer -> [S.ByteString] diff --git a/tests/perf/should_run/T876.hs b/tests/perf/should_run/T876.hs new file mode 100644 index 0000000000000000000000000000000000000000..398859f86da814971a1e3e0925196445fdbe1db9 --- /dev/null +++ b/tests/perf/should_run/T876.hs @@ -0,0 +1,11 @@ +-- This test allocates a lot more if length is +-- not a good consumer + +module Main where +import System.Environment (getArgs) + +foo :: Int -> Int +foo n = sum [ length [i..n] | i <- [1..n] ] + +main = do { [arg] <- getArgs + ; print (foo (read arg)) } diff --git a/tests/profiling/should_run/5314.stdout b/tests/perf/should_run/T876.stdout similarity index 100% rename from tests/profiling/should_run/5314.stdout rename to tests/perf/should_run/T876.stdout diff --git a/tests/perf/should_run/all.T b/tests/perf/should_run/all.T index 08ff2308a59b2f80340ab64faadeacb833dab3be..58ffe8f2d42c1ed190d724fc837592725b4c6c57 100644 --- a/tests/perf/should_run/all.T +++ b/tests/perf/should_run/all.T @@ -3,22 +3,24 @@ # fortunately the values here are mostly independent of the wordsize, # because the test allocates an unboxed array of doubles. -test('3586', - [stats_num_field('peak_megabytes_allocated', 17, - 18), - # expected value: 17 (amd64/Linux) - stats_num_field('bytes allocated', 16000000, - 17000000), - # expected value: 16835544 (amd64/Linux) +test('T3586', + [stats_num_field('peak_megabytes_allocated', (17, 1)), + # expected value: 17 (amd64/Linux) + stats_num_field('bytes allocated', (16835544, 5)), + # expected value: 16835544 (amd64/Linux) only_ways(['normal']) ], compile_and_run, ['-O']) test('T4830', - [stats_num_field('bytes allocated', 60000, - 200000), - # expected value: 127,000 (amd64/Linux) + [stats_num_field('bytes allocated', + [(wordsize(64), 99264, 1), + # 127000 (amd64/Linux) + # 2013-02-07: 99264 (amd64/Linux) + (wordsize(32), 70646, 2)]), + # 2013-02-10: 69744 (x86/Windows) + # 2013-02-10: 71548 (x86/OSX) only_ways(['normal']) ], compile_and_run, @@ -30,12 +32,15 @@ test('T3245', normal, compile_and_run, ['-O']) # a bug in hGetBufNonBlocking in 6.13 that triggered this. # test('lazy-bs-alloc', - [stats_num_field('peak_megabytes_allocated', 1, - 3), - # expected value: 2 (amd64/Linux) - stats_num_field('bytes allocated', 400000, - 600000), - # expected value: 489776 (amd64/Linux) + [stats_num_field('peak_megabytes_allocated', (2, 1)), + # expected value: 2 (amd64/Linux) + stats_num_field('bytes allocated', + [(wordsize(64), 429744, 1), + # 489776 (amd64/Linux) + # 2013-02-07: 429744 (amd64/Linux) + (wordsize(32), 417738, 1)]), + # 2013-02-10: 421296 (x86/Windows) + # 2013-02-10: 414180 (x86/OSX) only_ways(['normal']), extra_run_opts('../../numeric/should_run/arith011.stdout'), ignore_output @@ -44,6 +49,17 @@ test('lazy-bs-alloc', compile_and_run, ['-O']) +test('T876', + [stats_num_field('bytes allocated', + [(wordsize(64), 1263712 , 5), + # 2013-02-14: 1263712 (x86_64/Linux) + (wordsize(32), 663712, 5)]), + only_ways(['normal']), + extra_run_opts('10000') + ], + compile_and_run, + ['-O']) + # Get reproducible floating-point results on x86 if config.arch == 'i386': sse2_opts = '-msse2' @@ -60,35 +76,27 @@ test('T3736', ['$MAKE -s --no-print-directory T3736']) test('T3738', [extra_clean(['T3738a.hi', 'T3738a.o']), - stats_num_field('peak_megabytes_allocated', 1, - 1), - # expected value: 1 (amd64/Linux) - # expected value: 45648 (x86/Linux): - if_wordsize(32, - stats_num_field('bytes allocated', 40000, - 50000)), - if_wordsize(64, - stats_num_field('bytes allocated', 40000, - 60000)), - # expected value: 49400 (amd64/Linux) + stats_num_field('peak_megabytes_allocated', (1, 0)), + # expected value: 1 (amd64/Linux) + stats_num_field('bytes allocated', + [(wordsize(32), 45648, 5), + # expected value: 45648 (x86/Linux) + (wordsize(64), 49400, 5)]), + # expected value: 49400 (amd64/Linux) only_ways(['normal']) ], compile_and_run, ['-O']) test('MethSharing', - [stats_num_field('peak_megabytes_allocated', 1, - 1), - # expected value: 1 (amd64/Linux) - # expected value: 2685858140 (x86/OS X): - if_wordsize(32, - stats_num_field('bytes allocated', 300000000, - 400000000)), - # expected: 360940756 (x86/Linux) - if_wordsize(64, - stats_num_field('bytes allocated', 600000000, - 700000000)), - # expected: 640067672 (amd64/Linux) + [stats_num_field('peak_megabytes_allocated', (1, 0)), + # expected value: 1 (amd64/Linux) + stats_num_field('bytes allocated', + [(wordsize(32), 360940756, 5), + # expected value: 2685858140 (x86/OS X) + # expected: 360940756 (x86/Linux) + (wordsize(64), 640067672, 5)]), + # expected: 640067672 (amd64/Linux) only_ways(['normal']) ], compile_and_run, @@ -112,124 +120,99 @@ test('T149', ['$MAKE -s --no-print-directory T149']) test('T5113', - [ - if_wordsize(32, - stats_num_field('bytes allocated', 3000000, - 5000000)), - if_wordsize(64, - stats_num_field('bytes allocated', 8000000, - 9000000)), - only_ways(['normal']), - expect_broken(7046) + [stats_num_field('bytes allocated', + [(wordsize(32), 4000000, 5), + (wordsize(64), 8000000, 5)]), + only_ways(['normal']) ], compile_and_run, ['-O']) test('T4978', - [if_wordsize(32, - stats_num_field('bytes allocated', 9000000, - 11000000)), - if_wordsize(64, - stats_num_field('bytes allocated', 9000000, - 11000000)), - # expected value: 10137680 (amd64/Linux) + [stats_num_field('bytes allocated', + [(wordsize(32), 10000000, 5), + (wordsize(64), 10137680, 5)]), + # expected value: 10137680 (amd64/Linux) only_ways(['normal']) ], compile_and_run, ['-O2']) test('T5205', - [if_wordsize(32, - stats_num_field('bytes allocated', 40000, - 50000)), - # expected value: 47088 (x86/Darwin) - if_wordsize(64, - stats_num_field('bytes allocated', 40000, - 60000)), - # expected value: 51320 (amd64/Linux) + [stats_num_field('bytes allocated', + [(wordsize(32), 47088, 5), + # expected value: 47088 (x86/Darwin) + (wordsize(64), 51320, 5)]), + # expected value: 51320 (amd64/Linux) only_ways(['normal', 'optasm']) ], compile_and_run, ['']) test('T5549', - [if_wordsize(32, - stats_num_field('bytes allocated', 3000000000, - 8000000000)), - # expected value: 3362958676 (Windows) - if_wordsize(64, - stats_num_field('bytes allocated', 5000000000, - 8000000000)), - # expected value: 6,725,846,120 (amd64/Linux) + [stats_num_field('bytes allocated', + [(wordsize(32), 3362958676, 5), + # expected value: 3362958676 (Windows) + (wordsize(64), 6725846120, 5)]), + # expected value: 6725846120 (amd64/Linux) only_ways(['normal']) ], compile_and_run, ['-O']) test('T4474a', - [if_wordsize(32, - stats_num_field('bytes allocated', 1600000000, - 2000000000)), - # expected value: 1879095912 (i386/OSX) - if_wordsize(64, - stats_num_field('bytes allocated', 3500000000, - 3900000000)), - # expected value: 3766493912 (amd64/Linux) + [stats_num_field('bytes allocated', + [(wordsize(32), 1879095912, 5), + # expected value: 1879095912 (i386/OSX) + (wordsize(64), 3766493912, 5)]), + # expected value: 3766493912 (amd64/Linux) only_ways(['normal']) ], compile_and_run, ['-O']) test('T4474b', - [if_wordsize(32, - stats_num_field('bytes allocated', 1600000000, - 2000000000)), - # expected value: 1879095912 (i386/OSX) - if_wordsize(64, - stats_num_field('bytes allocated', 3500000000, - 3900000000)), - # expected value: 3766493912 (amd64/Linux) + [stats_num_field('bytes allocated', + [(wordsize(32), 1879095912, 5), + # expected value: 1879095912 (i386/OSX) + (wordsize(64), 3766493912, 5)]), + # expected value: 3766493912 (amd64/Linux) only_ways(['normal']) ], compile_and_run, ['-O']) test('T4474c', - [if_wordsize(32, - stats_num_field('bytes allocated', 1600000000, - 2000000000)), - # expected value: 1879095912 (i386/OSX) - if_wordsize(64, - stats_num_field('bytes allocated', 3500000000, - 3900000000)), - # expected value: 3766493912 (amd64/Linux) + [stats_num_field('bytes allocated', + [(wordsize(32), 1879095912, 5), + # expected value: 1879095912 (i386/OSX) + (wordsize(64), 3766493912, 5)]), + # expected value: 3766493912 (amd64/Linux) only_ways(['normal']) ], compile_and_run, ['-O']) test('T5237', - [if_wordsize(32, - stats_num_field('bytes allocated', 70000, - 90000)), - # expected value: 78328 (i386/Linux) - if_wordsize(64, - stats_num_field('bytes allocated', 90000, - 130000)), - # expected value: 110888 (amd64/Linux) + [stats_num_field('bytes allocated', + [(wordsize(32), 78328, 5), + # expected value: 78328 (i386/Linux) + (wordsize(64), 110888, 5)]), + # expected value: 110888 (amd64/Linux) only_ways(['normal']) ], compile_and_run, ['-O ' + sse2_opts]) test('T5536', - [if_wordsize(32, - stats_num_field('bytes allocated', 1150000000, - 1250000000)), - # expected value: 1246287228 (i386/Linux) - if_wordsize(64, - stats_num_field('bytes allocated', 2480000000, - 2510000000)), - # expected value: 2492589480 (amd64/Linux) + [stats_num_field('bytes allocated', + [(wordsize(32), 446260520, 1), + # 1246287228 (i386/Linux) + # 446328556 (i386/Windows) + # 446192484 (i386/OSX) + (wordsize(64), 892399040, 5)]), + # expected value: 2492589480 (amd64/Linux) + # 17/1/13: 892399040 (x86_64/Linux) + # (new demand analyser) extra_clean(['T5536.data']), ignore_output, only_ways(['normal']) @@ -238,30 +221,29 @@ test('T5536', ['-O']) test('T7257', - [if_wordsize(32, - stats_range_field('bytes allocated', 1150000000, 10)), - # expected value: 1246287228 (i386/Linux) - if_wordsize(32, - stats_range_field('peak_megabytes_allocated', 217, 5)), - # 2012-10-08: 217 (x86/Linux) - if_wordsize(64, - stats_range_field('bytes allocated', 1774893760, 5)), - # 2012-09-21: 1774893760 (amd64/Linux) - if_wordsize(64, - stats_range_field('peak_megabytes_allocated', 227, 5)), - # 2012-09-21: 227 (amd64/Linux) + [stats_num_field('bytes allocated', + [(wordsize(32), 1150000000, 10), + # expected value: 1246287228 (i386/Linux) + (wordsize(64), 1774893760, 5)]), + # 2012-09-21: 1774893760 (amd64/Linux) + stats_num_field('peak_megabytes_allocated', + [(wordsize(32), 217, 5), + # 2012-10-08: 217 (x86/Linux) + (wordsize(64), 227, 5)]), + # 2012-09-21: 227 (amd64/Linux) only_ways(['normal']) ], compile_and_run, ['-O']) test('Conversions', - [if_wordsize(32, - stats_range_field('bytes allocated', 55316, 5)), - # 2012-12-18: Guessed 64-bit value / 2 - if_wordsize(64, - stats_range_field('bytes allocated', 110632, 5)), - # 2012-12-18: 109608 (amd64/OS X) + [stats_num_field('bytes allocated', + [(wordsize(32), 78374, 2), + # 2012-12-18: 55316 Guessed 64-bit value / 2 + # 2013-02-10: 77472 (x86/OSX) + # 2013-02-10: 79276 (x86/Windows) + (wordsize(64), 110632, 5)]), + # 2012-12-18: 109608 (amd64/OS X) only_ways(['normal']) ], @@ -271,9 +253,13 @@ test('T7507', omit_ways(['ghci']), compile_and_run, ['-O']) # For 7507, stack overflow is the bad case test('T7436', - [stats_num_field('max_bytes_used', 50000, - 100000), - # expected value: 127,000 (amd64/Linux) + [stats_num_field('max_bytes_used', + [(wordsize(64), 60360, 1), + # 127000 (amd64/Linux) + # 2013-02-07: 60360 (amd64/Linux) + (wordsize(32), 58434, 1)]), + # 2013-02-10: 58032 (x86/Windows) + # 2013-02-10: 58836 (x86/OSX) only_ways(['normal']) ], compile_and_run, diff --git a/tests/perf/space_leaks/all.T b/tests/perf/space_leaks/all.T index 6dec9f0990b7561c00b7f637e46bba978ad7257f..a1fd641868824466e0138a59384cc9b4a1b95eb2 100644 --- a/tests/perf/space_leaks/all.T +++ b/tests/perf/space_leaks/all.T @@ -4,19 +4,21 @@ test('space_leak_001', # Now it's: 3 (amd64/Linux) # 4 (x86/OS X) # 5 (x86/Linux) - [stats_num_field('peak_megabytes_allocated', 3, 5), - stats_num_field('max_bytes_used', 400000, - 500000), - # expected value: 440224 (amd64/Linux) - # 417016 (x86/OS X) - # 415672 (x86/Windows) - # 481456 (unreg amd64/Linux) - stats_num_field('bytes allocated', 9050000000, - 9100000000), - # expected value: 9079316016 (amd64/Linux) - # 9331570416 (x86/Linux) - # 9329073952 (x86/OS X) - # 9327959840 (x86/Windows) + [stats_num_field('peak_megabytes_allocated', (4, 1)), + stats_num_field('max_bytes_used', + [(wordsize(64), 440000, 10), + # 440224 (amd64/Linux) + # 417016 (x86/OS X) + # 415672 (x86/Windows) + # 481456 (unreg amd64/Linux) + (wordsize(32), 405650, 10)]), + # 2013-02-10 372072 (x86/OSX) + # 2013-02-10 439228 (x86/OSX) + stats_num_field('bytes allocated', (9079316016, 1)), + # expected value: 9079316016 (amd64/Linux) + # 9331570416 (x86/Linux) + # 9329073952 (x86/OS X) + # 9327959840 (x86/Windows) omit_ways(['profasm','profthreaded','threaded1','threaded2']) ], compile_and_run, @@ -25,7 +27,7 @@ test('space_leak_001', test('T4334', # Test for a space leak in Data.List.lines (fixed with #4334) [extra_run_opts('1000000 2 t'), - stats_num_field('peak_megabytes_allocated', 1, 3), + stats_num_field('peak_megabytes_allocated', (2, 1)), # prof ways don't work well with +RTS -V0 omit_ways(['profasm','profthreaded']) ], @@ -34,7 +36,7 @@ test('T4334', test('T2762', [# peak_megabytes_allocated is 2 with 7.0.2. # Was 57 with 6.12.3. - stats_num_field('peak_megabytes_allocated', 1, 3), + stats_num_field('peak_megabytes_allocated', (2, 0)), only_ways(['normal']), extra_clean(['T2762A.hi', 'T2762A.o'])], compile_and_run, ['-O']) diff --git a/tests/plugins/all.T b/tests/plugins/all.T index 68225aed7b2e7923747c90641e855b63c58e6bc0..874fcdb4081b1e9c47353ffe1d34047363f1212a 100644 --- a/tests/plugins/all.T +++ b/tests/plugins/all.T @@ -1,9 +1,9 @@ -def f(opts): +def f(name, opts): if (ghc_with_interpreter == 0): opts.skip = 1 setTestOpts(f) -setTestOpts(if_compiler_lt('ghc', '7.1', skip)) +setTestOpts(when(compiler_lt('ghc', '7.1'), skip)) test('plugins01', [pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins01'), diff --git a/tests/plugins/plugins03.stderr b/tests/plugins/plugins03.stderr index f3fbc8e9f2b9a248f83f48167d3b3226c4d4e051..24feee818b0d3c631fb87eb0b9e9c176924209ef 100644 --- a/tests/plugins/plugins03.stderr +++ b/tests/plugins/plugins03.stderr @@ -1 +1,2 @@ -<command line>: Could not find module `Simple.NonExistantPlugin' Use -v to see a list of the files searched for. +<command line>: Could not find module ‛Simple.NonExistantPlugin’ +Use -v to see a list of the files searched for. diff --git a/tests/plugins/plugins04.stderr b/tests/plugins/plugins04.stderr index add1e60d0394cb13edb5b9f0a4b2beccdaa1a293..13f94e439215f121b0ce84e53c85ecf33e37a8c2 100644 --- a/tests/plugins/plugins04.stderr +++ b/tests/plugins/plugins04.stderr @@ -1,2 +1,2 @@ Module imports form a cycle: - module `HomePackagePlugin' (./HomePackagePlugin.hs) imports itself + module ‛HomePackagePlugin’ (./HomePackagePlugin.hs) imports itself diff --git a/tests/polykinds/PolyKinds02.stderr b/tests/polykinds/PolyKinds02.stderr index 60e00d5c96de2e3f9ff580c4d979005ae34de0b5..8fd49c8158143377e9a0f4f3c8620252bdf3d12e 100644 --- a/tests/polykinds/PolyKinds02.stderr +++ b/tests/polykinds/PolyKinds02.stderr @@ -1,5 +1,5 @@ PolyKinds02.hs:13:16: - The second argument of `Vec' should have kind `Nat', - but `Nat' has kind `*' - In the type signature for `vec': vec :: Vec Nat Nat + The second argument of ‛Vec’ should have kind ‛Nat’, + but ‛Nat’ has kind ‛*’ + In the type signature for ‛vec’: vec :: Vec Nat Nat diff --git a/tests/polykinds/PolyKinds04.stderr b/tests/polykinds/PolyKinds04.stderr index 2796b1a89889a22f0459afa51482898482604326..1ffdf3910bfc61eb5debdf63c0166b4a4a8ee203 100644 --- a/tests/polykinds/PolyKinds04.stderr +++ b/tests/polykinds/PolyKinds04.stderr @@ -1,8 +1,8 @@ PolyKinds04.hs:5:16: - Expecting one more argument to `Maybe' - The first argument of `A' should have kind `*', - but `Maybe' has kind `* -> *' - In the type `A Maybe' - In the definition of data constructor `B1' - In the data declaration for `B' + Expecting one more argument to ‛Maybe’ + The first argument of ‛A’ should have kind ‛*’, + but ‛Maybe’ has kind ‛* -> *’ + In the type ‛A Maybe’ + In the definition of data constructor ‛B1’ + In the data declaration for ‛B’ diff --git a/tests/polykinds/PolyKinds06.stderr b/tests/polykinds/PolyKinds06.stderr index 0d0baca84a43b4eb4df2d20ea7794b8ee073d70d..fc1700f31ff942a1f268934fc31087da57db7e8c 100644 --- a/tests/polykinds/PolyKinds06.stderr +++ b/tests/polykinds/PolyKinds06.stderr @@ -1,5 +1,5 @@ - -PolyKinds06.hs:9:11: - Type constructor `A' cannot be used here - (it is defined and used in the same recursive group) - In the kind `A -> *' + +PolyKinds06.hs:9:11: + Type constructor ‛A’ cannot be used here + (it is defined and used in the same recursive group) + In the kind ‛A -> *’ diff --git a/tests/polykinds/PolyKinds07.stderr b/tests/polykinds/PolyKinds07.stderr index 29930179ca8ec74976502dca7c03db553fd70cff..761f13aeb54d909f2ef4367642774b37af605e6b 100644 --- a/tests/polykinds/PolyKinds07.stderr +++ b/tests/polykinds/PolyKinds07.stderr @@ -1,7 +1,7 @@ - -PolyKinds07.hs:10:11: - Data constructor `A1' cannot be used here - (it is defined and used in the same recursive group) - In the type `B A1' - In the definition of data constructor `B1' - In the data declaration for `B' + +PolyKinds07.hs:10:11: + Data constructor ‛A1’ cannot be used here + (it is defined and used in the same recursive group) + In the type ‛B A1’ + In the definition of data constructor ‛B1’ + In the data declaration for ‛B’ diff --git a/tests/polykinds/T5716.stderr b/tests/polykinds/T5716.stderr index 7e38d01f6e50252e969d41afee503be7ec267b95..f32e604c2c3e8c1ffb0d21f436416807171bcbb3 100644 --- a/tests/polykinds/T5716.stderr +++ b/tests/polykinds/T5716.stderr @@ -1,6 +1,4 @@ -T5716.hs:13:33: - `U1' of type `DF Int -> U' is not promotable - In the type `I (U1 DFInt)' - In the definition of data constructor `I1' - In the data declaration for `I' +T5716.hs:13:11: + ‛U’ of kind ‛*’ is not promotable + In the kind ‛U -> *’ diff --git a/tests/polykinds/T5716a.stderr b/tests/polykinds/T5716a.stderr index 4b10729cdd6e3562e44dd70ae9fb04e6a052ed31..e21d4466784dafe3147ed7bbd8b7b088c87df5cf 100644 --- a/tests/polykinds/T5716a.stderr +++ b/tests/polykinds/T5716a.stderr @@ -1,7 +1,7 @@ - -T5716a.hs:10:27: - Data constructor `Bar' cannot be used here - (it comes from a data family instance) - In the type `Bar a' - In the definition of data constructor `Bar' - In the data instance declaration for `DF' + +T5716a.hs:10:27: + Data constructor ‛Bar’ cannot be used here + (it comes from a data family instance) + In the type ‛Bar a’ + In the definition of data constructor ‛Bar’ + In the data instance declaration for ‛DF’ diff --git a/tests/polykinds/T6021.stderr b/tests/polykinds/T6021.stderr index f164f78ed2f2ca5da3dc61e6938e8974ab15f0e7..706729113a61d9c1b3af80b79a9e770411b23567 100644 --- a/tests/polykinds/T6021.stderr +++ b/tests/polykinds/T6021.stderr @@ -1,4 +1,4 @@ - -T6021.hs:5:10: - Kind variable also used as type variable: `b' - In an instance declaration + +T6021.hs:5:10: + Kind variable also used as type variable: ‛b’ + In an instance declaration diff --git a/tests/polykinds/T6039.stderr b/tests/polykinds/T6039.stderr index 7620c3adfbb8dc085b9a1bcbafcb4eab5e65b7ef..20b947b861e6011324386264ac002b44d829825f 100644 --- a/tests/polykinds/T6039.stderr +++ b/tests/polykinds/T6039.stderr @@ -1,4 +1,4 @@ T6039.hs:5:14: - Kind variable `j' cannot appear in a function position - In the kind `j k' + Kind variable ‛j’ cannot appear in a function position + In the kind ‛j k’ diff --git a/tests/polykinds/T6054.stderr b/tests/polykinds/T6054.stderr index bc034d313a0ca88494634d032cd8d24ee1255f43..5fb7f6daa006da0913766843f78cd003204fb6fa 100644 --- a/tests/polykinds/T6054.stderr +++ b/tests/polykinds/T6054.stderr @@ -2,8 +2,8 @@ T6054.hs:7:14: No instance for (Bar () '() a0) arising from an expression type signature - In the first argument of `print', namely - `(Proxy :: Bar () a => Proxy a)' + In the first argument of ‛print’, namely + ‛(Proxy :: Bar () a => Proxy a)’ In the expression: print (Proxy :: Bar () a => Proxy a) - In an equation for `foo': + In an equation for ‛foo’: foo = print (Proxy :: Bar () a => Proxy a) diff --git a/tests/polykinds/T6068.hs b/tests/polykinds/T6068.hs index f9b7dc2c9b269aacb9429947cd295fcd52b10333..9c754bd87e677cd8ba132850e070ca2d8f8475f1 100644 --- a/tests/polykinds/T6068.hs +++ b/tests/polykinds/T6068.hs @@ -20,7 +20,9 @@ data Existential (p :: KProxy k) = class HasSingleton a (kp :: KProxy k) | a -> kp where exists :: a -> Existential kp -instance forall a (mp :: KProxy (Maybe ak)). HasSingleton (Maybe a) mp where +class Floop a b | a -> b + +instance forall a (mp :: KProxy (Maybe ak)). Floop a mp => HasSingleton (Maybe a) mp where exists Nothing = Exists SNothing -- instance forall (a ::*) (mp :: KProxy (Maybe ak)). HasSingleton (Maybe ak) (Maybe a) mp where diff --git a/tests/polykinds/T6068.stdout b/tests/polykinds/T6068.stdout index 2a6d08de6ed1b9639b12046836856bd590d4b332..bf9528b1fdf9ac1babb02a52c28206d29a1f0000 100644 --- a/tests/polykinds/T6068.stdout +++ b/tests/polykinds/T6068.stdout @@ -1 +1,2 @@ -exists Nothing :: Existential (Maybe *) mp +exists Nothing + :: Floop * (KProxy (Maybe *)) a mp => Existential (Maybe *) mp diff --git a/tests/polykinds/T6129.stderr b/tests/polykinds/T6129.stderr index 10db12ef45334069e73164a11d17184c0d50b07d..9b8d66f202400097fb3942210ed7f0664f61a5dd 100644 --- a/tests/polykinds/T6129.stderr +++ b/tests/polykinds/T6129.stderr @@ -1,7 +1,7 @@ - -T6129.hs:12:11: - Data constructor `DInt' cannot be used here - (it comes from a data family instance) - In the type `X DInt' - In the definition of data constructor `X1' - In the data declaration for `X' + +T6129.hs:12:11: + Data constructor ‛DInt’ cannot be used here + (it comes from a data family instance) + In the type ‛X DInt’ + In the definition of data constructor ‛X1’ + In the data declaration for ‛X’ diff --git a/tests/polykinds/T7053.stderr b/tests/polykinds/T7053.stderr index ab857978905ea9ba16c33aee2cb24d90e2ebe765..f5c3efc4f978faea4d7e4c824828d7fc7abdce52 100644 --- a/tests/polykinds/T7053.stderr +++ b/tests/polykinds/T7053.stderr @@ -1,8 +1,8 @@ - -T7053.hs:6:52: - Kind occurs check - The first argument of `a' should have kind `k0', - but `b' has kind `k0 -> k1' - In the type `TypeRep (a b)' - In the definition of data constructor `TyApp' - In the data declaration for `TypeRep' + +T7053.hs:6:52: + Kind occurs check + The first argument of ‛a’ should have kind ‛k0’, + but ‛b’ has kind ‛k0 -> k1’ + In the type ‛TypeRep (a b)’ + In the definition of data constructor ‛TyApp’ + In the data declaration for ‛TypeRep’ diff --git a/tests/polykinds/T7151.stderr b/tests/polykinds/T7151.stderr index ed98ddc0dd1f1a93812cdd404b5f87be12e2e4f2..bdefa666d3bf34c4965f9f881f10ba884e39856d 100644 --- a/tests/polykinds/T7151.stderr +++ b/tests/polykinds/T7151.stderr @@ -1,4 +1,4 @@ T7151.hs:3:12: - Illegal type: '[Int, String] + Illegal type: ‛'[Int, String]’ Perhaps you intended to use -XDataKinds diff --git a/tests/polykinds/T7224.stderr b/tests/polykinds/T7224.stderr index c1508e9b7d1fb943ac2f55db88e5e557fd1f2cc8..1ae01218aa4546b102462d09ed5f97b8d2d5b179 100644 --- a/tests/polykinds/T7224.stderr +++ b/tests/polykinds/T7224.stderr @@ -1,5 +1,5 @@ T7224.hs:6:19: - Kind variable `i' used as a type - In the type `a -> m i i a' - In the class declaration for PMonad' + Kind variable ‛i’ used as a type + In the type ‛a -> m i i a’ + In the class declaration for ‛PMonad'’ diff --git a/tests/polykinds/T7230.stderr b/tests/polykinds/T7230.stderr index 3bcccee8f2676bda004ad8171ec93bc46d2d11d9..34695d0e02e5385ba2359d6d852bb33da4ee8e62 100644 --- a/tests/polykinds/T7230.stderr +++ b/tests/polykinds/T7230.stderr @@ -10,13 +10,13 @@ T7230.hs:48:32: bound by a pattern with constructor SCons :: forall (k :: BOX) (x :: k) (xs :: [k]). Sing k x -> Sing [k] xs -> Sing [k] ((':) k x xs), - in an equation for `crash' + in an equation for ‛crash’ at T7230.hs:48:8-27 or from (xs1 ~ (':) Nat x1 xs2) bound by a pattern with constructor SCons :: forall (k :: BOX) (x :: k) (xs :: [k]). Sing k x -> Sing [k] xs -> Sing [k] ((':) k x xs), - in an equation for `crash' + in an equation for ‛crash’ at T7230.hs:48:17-26 Expected type: SBool (Increasing xs) Actual type: SBool (x :<<= x1) @@ -24,5 +24,5 @@ T7230.hs:48:32: x :: Sing Nat x (bound at T7230.hs:48:14) y :: Sing Nat x1 (bound at T7230.hs:48:23) In the expression: x %:<<= y - In an equation for `crash': + In an equation for ‛crash’: crash (SCons x (SCons y xs)) = x %:<<= y diff --git a/tests/polykinds/T7278.stderr b/tests/polykinds/T7278.stderr index 96f8dd718125a766b70d604d90d1f802a1590109..a242e5aaf85fae28d362ceb33cd89e24d2dc2563 100644 --- a/tests/polykinds/T7278.stderr +++ b/tests/polykinds/T7278.stderr @@ -1,5 +1,5 @@ T7278.hs:8:43: - `t' is applied to too many type arguments - In the type signature for `f': + ‛t’ is applied to too many type arguments + In the type signature for ‛f’: f :: C (t :: k) (TF t) => TF t p1 p0 -> t p1 p0 diff --git a/tests/polykinds/T7328.stderr b/tests/polykinds/T7328.stderr index 6151c5ae4200c83744b2f84a935861ad59024e89..54508c07736e0f164c413ca510eee935f6de608c 100644 --- a/tests/polykinds/T7328.stderr +++ b/tests/polykinds/T7328.stderr @@ -1,7 +1,7 @@ T7328.hs:8:34: Kind occurs check - The first argument of `Foo' should have kind `k0', - but `f' has kind `k1 -> k0' - In the type `a ~ f i => Proxy (Foo f)' - In the class declaration for `Foo' + The first argument of ‛Foo’ should have kind ‛k0’, + but ‛f’ has kind ‛k1 -> k0’ + In the type ‛a ~ f i => Proxy (Foo f)’ + In the class declaration for ‛Foo’ diff --git a/tests/polykinds/T7341.stderr b/tests/polykinds/T7341.stderr index da9ae7f707c917d1d0cee2eede55116d8a957498..36ab4eaaf268066a3c2a6305bb91f2a5fe75cfc2 100644 --- a/tests/polykinds/T7341.stderr +++ b/tests/polykinds/T7341.stderr @@ -1,6 +1,6 @@ - -T7341.hs:11:12: - Expecting one more argument to `[]' - The first argument of `C' should have kind `*', - but `[]' has kind `* -> *' - In the instance declaration for `C []' + +T7341.hs:11:12: + Expecting one more argument to ‛[]’ + The first argument of ‛C’ should have kind ‛*’, + but ‛[]’ has kind ‛* -> *’ + In the instance declaration for ‛C []’ diff --git a/tests/polykinds/T7404.stderr b/tests/polykinds/T7404.stderr index 561cc24b02bbdad00cdd87fdb743b11a8b69f6dd..a228e0c1ba71f86e228965be49ba721bee122954 100644 --- a/tests/polykinds/T7404.stderr +++ b/tests/polykinds/T7404.stderr @@ -1,4 +1,4 @@ T7404.hs:4:1: - Kind variable also used as type variable: `x' - In the declaration for type family `Foo' + Kind variable also used as type variable: ‛x’ + In the declaration for type family ‛Foo’ diff --git a/tests/polykinds/T7433.stderr b/tests/polykinds/T7433.stderr index 8f80b9e6790ba8a67802495b9ec208ddf5dad2f6..6cb69630e8cb760c4ab93991bbdd4b30d6f1cb52 100644 --- a/tests/polykinds/T7433.stderr +++ b/tests/polykinds/T7433.stderr @@ -1,6 +1,6 @@ T7433.hs:2:10: - Data constructor `Z' cannot be used here + Data constructor ‛Z’ cannot be used here (Perhaps you intended to use -XDataKinds) - In the type `Z' - In the type declaration for `T' + In the type ‛Z’ + In the type declaration for ‛T’ diff --git a/tests/polykinds/T7438.stderr b/tests/polykinds/T7438.stderr index 8a1af96fe3666f39e3166c18dd69eb0d3dfe0f1d..aaa4daf019cd40382c23ab16cbab76d38dd9e48d 100644 --- a/tests/polykinds/T7438.stderr +++ b/tests/polykinds/T7438.stderr @@ -1,20 +1,20 @@ T7438.hs:6:14: - Couldn't match expected type `t1' with actual type `t' - `t' is untouchable + Couldn't match expected type ‛t1’ with actual type ‛t’ + ‛t’ is untouchable inside the constraints (t2 ~ t3) bound by a pattern with constructor Nil :: forall (k :: BOX) (a :: k). Thrist k a a, - in an equation for `go' + in an equation for ‛go’ at T7438.hs:6:4-6 - `t' is a rigid type variable bound by + ‛t’ is a rigid type variable bound by the inferred type of go :: Thrist k t2 t3 -> t -> t1 at T7438.hs:6:1 - `t1' is a rigid type variable bound by + ‛t1’ is a rigid type variable bound by the inferred type of go :: Thrist k t2 t3 -> t -> t1 at T7438.hs:6:1 Relevant bindings include go :: Thrist k t2 t3 -> t -> t1 (bound at T7438.hs:6:1) acc :: t (bound at T7438.hs:6:8) In the expression: acc - In an equation for `go': go Nil acc = acc + In an equation for ‛go’: go Nil acc = acc diff --git a/tests/polykinds/T7488.hs b/tests/polykinds/T7488.hs index c76de847129302795fcc84eebc9548f05f20ebce..e833cddaa6ff12201f881d2da21300ac1a7da6a0 100644 --- a/tests/polykinds/T7488.hs +++ b/tests/polykinds/T7488.hs @@ -4,5 +4,5 @@ module T7488 where -newtype A = A Int +newtype A = A Bool data B (x :: A) diff --git a/tests/polykinds/T7524.hs b/tests/polykinds/T7524.hs new file mode 100644 index 0000000000000000000000000000000000000000..52b24282bf8a36b69c16336a5f9d79757ed07e74 --- /dev/null +++ b/tests/polykinds/T7524.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE TypeFamilies, PolyKinds #-} +module T7524 where + +type family F (a :: k1) (b :: k2) +type instance F a a = Int +type instance F a b = Bool diff --git a/tests/polykinds/T7524.stderr b/tests/polykinds/T7524.stderr new file mode 100644 index 0000000000000000000000000000000000000000..5d909593ed91390d95cc9197d082f73b982255d6 --- /dev/null +++ b/tests/polykinds/T7524.stderr @@ -0,0 +1,5 @@ + +T7524.hs:5:15: + Conflicting family instance declarations: + F k k a a -- Defined at T7524.hs:5:15 + F k k1 a b -- Defined at T7524.hs:6:15 diff --git a/tests/polykinds/T7594.hs b/tests/polykinds/T7594.hs new file mode 100644 index 0000000000000000000000000000000000000000..89e749ce3669a80c7c7c4055670c78c5fb0a2c7c --- /dev/null +++ b/tests/polykinds/T7594.hs @@ -0,0 +1,27 @@ +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE KindSignatures #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE Rank2Types #-} +module T7594 where + +import GHC.Prim (Constraint) + +class (c1 t, c2 t) => (:&:) (c1 :: * -> Constraint) (c2 :: * -> Constraint) (t :: *) +instance (c1 t, c2 t) => (:&:) c1 c2 t + +data ColD c where + ColD :: (c a) => a -> ColD c + +app :: (forall a. (c a) => a -> b) -> ColD c -> b +app f (ColD x) = f x + +q :: ColD (Show :&: Real) +q = ColD (1.2 :: Double) + +bar = app print q + + diff --git a/tests/polykinds/T7594.stderr b/tests/polykinds/T7594.stderr new file mode 100644 index 0000000000000000000000000000000000000000..c813a65e8cc64e79b9001bf59d6574f7bcc6ab19 --- /dev/null +++ b/tests/polykinds/T7594.stderr @@ -0,0 +1,16 @@ + +T7594.hs:25:11: + Couldn't match type ‛b’ with ‛IO ()’ + ‛b’ is untouchable + inside the constraints ((:&:) Show Real a) + bound by a type expected by the context: + (:&:) Show Real a => a -> b + at T7594.hs:25:7-17 + ‛b’ is a rigid type variable bound by + the inferred type of bar :: b at T7594.hs:25:1 + Expected type: a -> b + Actual type: a -> IO () + Relevant bindings include bar :: b (bound at T7594.hs:25:1) + In the first argument of ‛app’, namely ‛print’ + In the expression: app print q + In an equation for ‛bar’: bar = app print q diff --git a/tests/polykinds/T7601.hs b/tests/polykinds/T7601.hs new file mode 100644 index 0000000000000000000000000000000000000000..f2325abc7cb61b307d6d13826ff897d104c8987f --- /dev/null +++ b/tests/polykinds/T7601.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE TypeFamilies #-} + +module T7601 where + +import GHC.Exts + +class C (a :: k) where + type F (a :: k) + +class Category (c :: k -> k -> *) where + type Ob c :: k -> Constraint \ No newline at end of file diff --git a/tests/polykinds/all.T b/tests/polykinds/all.T index 99f8424fa6b6bbb49a5dda9b0bb2fd5332d24798..d492a54ca2f44c9413d7b3c1d3d4c5a919798ba2 100644 --- a/tests/polykinds/all.T +++ b/tests/polykinds/all.T @@ -82,3 +82,6 @@ test('T7438', normal, run_command, ['$MAKE -s --no-print-directory T7438']) test('T7404', normal, compile_fail,['']) test('T7502', normal, compile,['']) test('T7488', normal, compile,['']) +test('T7594', normal, compile_fail,['']) +test('T7524', normal, compile_fail,['']) +test('T7601', normal, compile,['']) diff --git a/tests/profiling/should_compile/2410.hs b/tests/profiling/should_compile/T2410.hs similarity index 100% rename from tests/profiling/should_compile/2410.hs rename to tests/profiling/should_compile/T2410.hs diff --git a/tests/profiling/should_compile/all.T b/tests/profiling/should_compile/all.T index b9539038b1d6e69761e7f919cede6534697f8151..ca3cc9300927bfb71ca8045bdc3a74c78bd7c5f2 100644 --- a/tests/profiling/should_compile/all.T +++ b/tests/profiling/should_compile/all.T @@ -1,8 +1,8 @@ # We need to run prof001 and prof002 the normal way, as the extra flags # added for the profiling ways makes it pass -test('prof001', compose(only_ways(['normal']), req_profiling), compile_and_run, ['-prof -caf-all']) -test('prof002', compose(only_ways(['normal']), req_profiling), compile_and_run, ['-prof -caf-all']) +test('prof001', [only_ways(['normal']), req_profiling], compile_and_run, ['-prof -caf-all']) +test('prof002', [only_ways(['normal']), req_profiling], compile_and_run, ['-prof -caf-all']) -test('2410', compose(only_ways(['normal']), req_profiling), compile, ['-O2 -prof -caf-all']) +test('T2410', [only_ways(['normal']), req_profiling], compile, ['-O2 -prof -caf-all']) diff --git a/tests/profiling/should_run/2592.hs b/tests/profiling/should_run/T2592.hs similarity index 100% rename from tests/profiling/should_run/2592.hs rename to tests/profiling/should_run/T2592.hs diff --git a/tests/profiling/should_run/2592.stderr b/tests/profiling/should_run/T2592.stderr similarity index 79% rename from tests/profiling/should_run/2592.stderr rename to tests/profiling/should_run/T2592.stderr index 478676340ad805a6a4adca645beba66154c27fbd..724ef0ec6eca23691b3f8f2e53d949a9e90fa8b1 100644 --- a/tests/profiling/should_run/2592.stderr +++ b/tests/profiling/should_run/T2592.stderr @@ -1,3 +1,3 @@ -2592: Heap exhausted; +T2592: Heap exhausted; Current maximum heap size is 1048576 bytes (1 MB); use `+RTS -M<size>' to increase it. diff --git a/tests/profiling/should_run/T3001-2.hs b/tests/profiling/should_run/T3001-2.hs index 961d9c3760f02c66011e5b56e8ce4a836e42ba17..5c0cb3e97750ce12717982bd74d6e46ccc2de8ee 100644 --- a/tests/profiling/should_run/T3001-2.hs +++ b/tests/profiling/should_run/T3001-2.hs @@ -21,6 +21,7 @@ import GHC.Word import Control.Monad import Foreign +import System.IO.Unsafe import System.IO import Data.Char (chr,ord) diff --git a/tests/profiling/should_run/5314.hs b/tests/profiling/should_run/T5314.hs similarity index 100% rename from tests/profiling/should_run/5314.hs rename to tests/profiling/should_run/T5314.hs diff --git a/tests/profiling/should_run/T5314.stdout b/tests/profiling/should_run/T5314.stdout new file mode 100644 index 0000000000000000000000000000000000000000..b9d569380ca128cd19e3cd672b2c0a0dec97de72 --- /dev/null +++ b/tests/profiling/should_run/T5314.stdout @@ -0,0 +1 @@ +50005000 diff --git a/tests/profiling/should_run/all.T b/tests/profiling/should_run/all.T index 539e0e7872b35b65e2d21b8e4991ed4d33da374c..493c846bc76e76006a12a6357127560ee6f6a917 100644 --- a/tests/profiling/should_run/all.T +++ b/tests/profiling/should_run/all.T @@ -3,13 +3,13 @@ extra_prof_ways = ['prof', 'prof_hc_hb', 'prof_hb', 'prof_hd', 'prof_hy', 'prof_hr'] test('heapprof001', - composes([only_ways(prof_ways), - extra_ways(extra_prof_ways), - req_profiling, - extra_run_opts('7')]), + [only_ways(prof_ways), + extra_ways(extra_prof_ways), + req_profiling, + extra_run_opts('7')], compile_and_run, ['']) -test('2592', +test('T2592', [only_ways(['profasm']), req_profiling, extra_run_opts('+RTS -M1m -RTS'), exit_code(251)], compile_and_run, ['']) @@ -43,7 +43,7 @@ test('scc004', [req_profiling, compile_and_run, ['']) -test('5314', +test('T5314', [ only_ways(prof_ways), extra_ways(extra_prof_ways), req_profiling ], diff --git a/tests/profiling/should_run/callstack001.stdout b/tests/profiling/should_run/callstack001.stdout index f5a8580d78138510a7ee089d920e9d834fa30b87..13c64a0a758990e19686bcd1f32387ce5c894b9a 100644 --- a/tests/profiling/should_run/callstack001.stdout +++ b/tests/profiling/should_run/callstack001.stdout @@ -1,2 +1,2 @@ -["Main.CAF (<entire-module>)","Main.main (callstack001.hs:17:8-21)","Main.mapM (callstack001.hs:10:13-17)","Main.mapM.go (callstack001.hs:13:17-19)","Main.f (callstack001.hs:7:10-35)"] -["Main.CAF (<entire-module>)","Main.main (callstack001.hs:17:8-21)","Main.mapM (callstack001.hs:10:13-17)","Main.mapM.go (callstack001.hs:13:17-19)","Main.f (callstack001.hs:7:10-35)"] +["Main.main (callstack001.hs:17:8-21)","Main.mapM (callstack001.hs:10:13-17)","Main.mapM.go (callstack001.hs:13:17-19)","Main.f (callstack001.hs:7:10-35)"] +["Main.main (callstack001.hs:17:8-21)","Main.mapM (callstack001.hs:10:13-17)","Main.mapM.go (callstack001.hs:13:17-19)","Main.f (callstack001.hs:7:10-35)"] diff --git a/tests/programs/10queens/test.T b/tests/programs/10queens/test.T index 4d2b7579ba1406e6b6c54952c7251ae6bd943cba..ac0435150ed7679f2ddded92917c11be2699c0a3 100644 --- a/tests/programs/10queens/test.T +++ b/tests/programs/10queens/test.T @@ -1,6 +1,6 @@ test('10queens', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/Queens/test.T b/tests/programs/Queens/test.T index 044ebf6a2cc304d84658ec5eff23036466b6cf21..77cf3750b5c807f5ed65a07dc70ee06b7d9047d2 100644 --- a/tests/programs/Queens/test.T +++ b/tests/programs/Queens/test.T @@ -1,6 +1,6 @@ test('queens', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], compile_and_run, ['']) diff --git a/tests/programs/andre_monad/test.T b/tests/programs/andre_monad/test.T index e5ad78feda8e040fba8c1ded02fc6ac5cbd0dbd6..619f4fd1e77d1dac4de445425779ea0547b7b9a3 100644 --- a/tests/programs/andre_monad/test.T +++ b/tests/programs/andre_monad/test.T @@ -1,6 +1,6 @@ # exhausts Hugs's heap (CAF leak) test('andre_monad', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o']), omit_compiler_types(['hugs'])], multimod_compile_and_run, diff --git a/tests/programs/andy_cherry/test.T b/tests/programs/andy_cherry/test.T index 4d14ee306ea3edd2199cfed096b812b8c2d68516..511eac50510c483a664a47793384c5b2f48690ae 100644 --- a/tests/programs/andy_cherry/test.T +++ b/tests/programs/andy_cherry/test.T @@ -1,6 +1,6 @@ test('andy_cherry', - [skip_if_fast, + [when(fast(), skip), extra_clean(['DataTypes.hi', 'DataTypes.o', 'GenUtils.hi', 'GenUtils.o', 'Interp.hi', 'Interp.o', diff --git a/tests/programs/barton-mangler-bug/test.T b/tests/programs/barton-mangler-bug/test.T index 966b971ae99da798714e733860a92ab6d2e6e0af..bb140f56f263f2e16c5bafe8bc0168626b951cff 100644 --- a/tests/programs/barton-mangler-bug/test.T +++ b/tests/programs/barton-mangler-bug/test.T @@ -1,7 +1,7 @@ # Exhausts Hugs's heap (CAF leak) test('barton-mangler-bug', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Basic.hi', 'Basic.o', 'Expected.hi', 'Expected.o', 'Main.hi', 'Main.o', diff --git a/tests/programs/cholewo-eval/test.T b/tests/programs/cholewo-eval/test.T index 32efd68f7bca43ffe10773ecd848001c08db28eb..3b418d4ac1fe6b096b17657ebf2600f62c96a371 100644 --- a/tests/programs/cholewo-eval/test.T +++ b/tests/programs/cholewo-eval/test.T @@ -1,5 +1,5 @@ test('cholewo-eval', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o', 'Arr.hi', 'Arr.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/cvh_unboxing/test.T b/tests/programs/cvh_unboxing/test.T index 4208a7f2af0cc0a875f1720a5cff2d91edbf10a4..6cc5ca4f6d9d512612c8a6f8d8e4bd60988ea5a4 100644 --- a/tests/programs/cvh_unboxing/test.T +++ b/tests/programs/cvh_unboxing/test.T @@ -1,7 +1,7 @@ setTestOpts(only_compiler_types(['ghc'])) test('cvh_unboxing', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Append.hi', 'Append.o', 'Main.hi', 'Main.o', 'Types.hi', 'Types.o'])], diff --git a/tests/programs/fast2haskell/test.T b/tests/programs/fast2haskell/test.T index a730ffdfe216baf615f58b8e0047a42052c9ed7a..621c589188eeb75c720ba4aeab90ee7a5f86833d 100644 --- a/tests/programs/fast2haskell/test.T +++ b/tests/programs/fast2haskell/test.T @@ -1,6 +1,6 @@ test('fast2haskell', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o', 'Fast2haskell.hi', 'Fast2haskell.o'])], multimod_compile_and_run, diff --git a/tests/programs/fun_insts/test.T b/tests/programs/fun_insts/test.T index 51514880387c9a8c67559cd5c1c752ffa5232fb9..98bcf3a32f3432f7b190bb0774cdec625443ee99 100644 --- a/tests/programs/fun_insts/test.T +++ b/tests/programs/fun_insts/test.T @@ -1,6 +1,6 @@ test('fun_insts', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/galois_raytrace/test.T b/tests/programs/galois_raytrace/test.T index 169e162d6a81c75ae71a9bfab1505009e32400d0..3bdcb75fc1e46fab5c0a17d93b8e0acc46d8b521 100644 --- a/tests/programs/galois_raytrace/test.T +++ b/tests/programs/galois_raytrace/test.T @@ -6,7 +6,7 @@ if config.platform.startswith('i386-') and \ setTestOpts(expect_fail_for(['hpc','optasm','profasm','threaded2','profthreaded'])) test('galois_raytrace', - [skip_if_fast, + [when(fast(), skip), extra_clean(['CSG.hi', 'CSG.o', 'Construct.hi', 'Construct.o', 'Data.hi', 'Data.o', diff --git a/tests/programs/hs-boot/hs-boot.stderr b/tests/programs/hs-boot/hs-boot.stderr index 99de1b67f5fea41d5aa5e21472b97b42eb606fda..b171e1b547c183666fd7cd937ed73c14af55ba1f 100644 --- a/tests/programs/hs-boot/hs-boot.stderr +++ b/tests/programs/hs-boot/hs-boot.stderr @@ -1,2 +1,2 @@ -B.hs:5:23: Warning: {-# SOURCE #-} unnecessary in import of `A' +B.hs:5:23: Warning: {-# SOURCE #-} unnecessary in import of ‛A’ diff --git a/tests/programs/jl_defaults/test.T b/tests/programs/jl_defaults/test.T index 0f6e4cbd6949ef0a572c96c3ef98d0db665865be..b17c0b8cb5a7763b05d781ebe7a00d6d3a39f8a3 100644 --- a/tests/programs/jl_defaults/test.T +++ b/tests/programs/jl_defaults/test.T @@ -1,6 +1,6 @@ test('jl_defaults', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/joao-circular/test.T b/tests/programs/joao-circular/test.T index 935ec7e6f4586f4c40e98d00c9084ee549ebbf21..3f229ab47b97cd9fb19ba454834ea98cb54c8470 100644 --- a/tests/programs/joao-circular/test.T +++ b/tests/programs/joao-circular/test.T @@ -1,5 +1,5 @@ test('joao-circular', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Data_Lazy.hi', 'Data_Lazy.o', 'Funcs_Lexer.hi', 'Funcs_Lexer.o', 'Funcs_Parser_Lazy.hi', 'Funcs_Parser_Lazy.o', diff --git a/tests/programs/jq_readsPrec/test.T b/tests/programs/jq_readsPrec/test.T index 393f82c4b3c2e0f2015ccabff8bfab98c9668a67..dcad28cd7b91e25d04136b05b70180f7bc75b0ae 100644 --- a/tests/programs/jq_readsPrec/test.T +++ b/tests/programs/jq_readsPrec/test.T @@ -1,6 +1,6 @@ test('jq_readsPrec', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/jtod_circint/test.T b/tests/programs/jtod_circint/test.T index 47338d7b896f4e15e4d9d5bda0c17ab5a712df51..b6ad840a26798199618cac2bac23d7d99511caa6 100644 --- a/tests/programs/jtod_circint/test.T +++ b/tests/programs/jtod_circint/test.T @@ -1,6 +1,6 @@ test('jtod_circint', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Bit.hi', 'Bit.o', 'LogFun.hi', 'LogFun.o', 'Main.hi', 'Main.o', diff --git a/tests/programs/jules_xref/test.T b/tests/programs/jules_xref/test.T index 07da9cbd0d189e13fa07c18b760b75223088792b..a8941e0331ab5ad8551969439a4a6f9c6af7fa0d 100644 --- a/tests/programs/jules_xref/test.T +++ b/tests/programs/jules_xref/test.T @@ -1,6 +1,6 @@ # exhausts Hugs's heap test('jules_xref', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o']), omit_compiler_types(['hugs'])], multimod_compile_and_run, diff --git a/tests/programs/jules_xref2/test.T b/tests/programs/jules_xref2/test.T index 384155c8c7d7a1e1fac0907c5bc7b7e91357cf46..2e627ab89cbeb6db59fa0e7b819bae6ca27e6644 100644 --- a/tests/programs/jules_xref2/test.T +++ b/tests/programs/jules_xref2/test.T @@ -1,6 +1,6 @@ test('jules_xref2', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/launchbury/test.T b/tests/programs/launchbury/test.T index 937bb94a6ee0c991f97cef16552afb4b808f5450..0af619f4c14fb07de11862d6b5fd2764ad769755 100644 --- a/tests/programs/launchbury/test.T +++ b/tests/programs/launchbury/test.T @@ -1,6 +1,6 @@ test('launchbury', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/lennart_range/test.T b/tests/programs/lennart_range/test.T index f308f0039d4abfa931357975dcab0c2c01081928..0cc5a351f5368914c94c5bfb918347b4de472c3e 100644 --- a/tests/programs/lennart_range/test.T +++ b/tests/programs/lennart_range/test.T @@ -1,6 +1,6 @@ test('lennart_range', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/lex/test.T b/tests/programs/lex/test.T index da6e227a6838ab30ea4d9a8e15b2ec614f9ea085..79459772a0e4cd7e187ea44f22cde979d1155d83 100644 --- a/tests/programs/lex/test.T +++ b/tests/programs/lex/test.T @@ -1,6 +1,6 @@ test('lex', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/life_space_leak/test.T b/tests/programs/life_space_leak/test.T index 417342f38e0ea17470eee1d1a6b83d8eb7ce9ef4..11f73e0eb0e459937ca213dd2ac9c7f30fb8d3b8 100644 --- a/tests/programs/life_space_leak/test.T +++ b/tests/programs/life_space_leak/test.T @@ -1,8 +1,8 @@ # exhausts Hugs's heap (CAF leak) test('life_space_leak', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o']), - if_compiler_type('hugs', expect_fail)], + when(compiler_type('hugs'), expect_fail)], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/maessen-hashtab/test.T b/tests/programs/maessen-hashtab/test.T index 807cb85e815e22817ac4b2f07474e7e2cf53d6a4..e21d2bb1c65b2003feafb5219f9c1731a131a9c8 100644 --- a/tests/programs/maessen-hashtab/test.T +++ b/tests/programs/maessen-hashtab/test.T @@ -3,7 +3,7 @@ test('maessen_hashtab', [reqlib('QuickCheck'), extra_clean(['HashTest.hi', 'HashTest.o', 'Data/HashTab.hi', 'Data/HashTab.o']), - skip_if_fast, + when(fast(), skip), # this test runs out of time when not optimised: omit_ways(['normal','ghci','threaded1']), extra_run_opts('99999')], diff --git a/tests/programs/north_array/test.T b/tests/programs/north_array/test.T index e2b89b4501fc5535ced0f6428b771b3401709048..d822897d5963ce4286cb89cec37d13e32f602c9a 100644 --- a/tests/programs/north_array/test.T +++ b/tests/programs/north_array/test.T @@ -1,6 +1,6 @@ test('north_array', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/okeefe_neural/test.T b/tests/programs/okeefe_neural/test.T index cf329cf716c26c659c285ded3a5a2e0e0b51a90b..e905ec0b99298fe5ecccd10b0df87e7f887d4869 100644 --- a/tests/programs/okeefe_neural/test.T +++ b/tests/programs/okeefe_neural/test.T @@ -1,11 +1,11 @@ # this one causes the compiler to run out of heap in the simplifier -def set_opts( opts ): +def set_opts( name, opts ): opts.expect = 'fail' test('okeefe_neural', - [skip_if_fast, + [when(fast(), skip), set_opts, extra_clean(['Main.hi'])], multimod_compile_and_run, diff --git a/tests/programs/record_upd/test.T b/tests/programs/record_upd/test.T index e98b70c43ec4be778c2b97b86faace9d72a59ef2..46149575b2ed058ce616753739ab7dec7dae8590 100644 --- a/tests/programs/record_upd/test.T +++ b/tests/programs/record_upd/test.T @@ -1,6 +1,6 @@ test('record_upd', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/rittri/test.T b/tests/programs/rittri/test.T index 2e14f6fdccdee7e008ece7daaf442a220865a164..57e7805ea3e7e03e93599e5b07367f010d3aaa4b 100644 --- a/tests/programs/rittri/test.T +++ b/tests/programs/rittri/test.T @@ -1,6 +1,6 @@ test('rittri', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/sanders_array/test.T b/tests/programs/sanders_array/test.T index 03c4d4eece9d11f2fc4dadf644ad5873ebbe9557..6e0a8c6e797fdc9ba502eb21d09cbf36443e1a85 100644 --- a/tests/programs/sanders_array/test.T +++ b/tests/programs/sanders_array/test.T @@ -1,6 +1,6 @@ test('sanders_array', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/seward-space-leak/test.T b/tests/programs/seward-space-leak/test.T index bdb775927533bb885025eada13d9798da36035ec..491da8e6c81e3c80e9e7c39358f08e371c9a838d 100644 --- a/tests/programs/seward-space-leak/test.T +++ b/tests/programs/seward-space-leak/test.T @@ -1,7 +1,7 @@ setTestOpts(omit_compiler_types(['hugs'])) # takes much too long test('seward-space-leak', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/strict_anns/test.T b/tests/programs/strict_anns/test.T index 77ed9dab5350ca0e4042de9ca86c01e97fee6af5..e64ee2fb7b001d698b29092608a6468c34968867 100644 --- a/tests/programs/strict_anns/test.T +++ b/tests/programs/strict_anns/test.T @@ -1,6 +1,6 @@ test('strict_anns', - [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o'])], multimod_compile_and_run, ['Main', '']) diff --git a/tests/programs/thurston-modular-arith/test.T b/tests/programs/thurston-modular-arith/test.T index 812fb07ba0706da77dfc2e71a3377c1e65944659..0af870e0d2c8a8cdfd9f57a937ce0e03f26a2c87 100644 --- a/tests/programs/thurston-modular-arith/test.T +++ b/tests/programs/thurston-modular-arith/test.T @@ -1,6 +1,6 @@ # uses GHC-specific scoped type variables test('thurston-modular-arith', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o', 'TypeVal.hi', 'TypeVal.o']), only_compiler_types(['ghc'])], multimod_compile_and_run, diff --git a/tests/quasiquotation/T3953.stderr b/tests/quasiquotation/T3953.stderr index da6f2dcebf5b6ca881c33a961c8721ba1b5f084b..bd2b0fed569f319e57714fd415464cb8157b7519 100644 --- a/tests/quasiquotation/T3953.stderr +++ b/tests/quasiquotation/T3953.stderr @@ -1,2 +1,2 @@ -T3953.hs:5:7: Not in scope: `notDefinedHere' +T3953.hs:5:7: Not in scope: ‛notDefinedHere’ diff --git a/tests/quasiquotation/qq005/test.T b/tests/quasiquotation/qq005/test.T index 52671ef838c26f1d6b7a0ade9d2db537f1bd5582..efa7b9d9558e2ecaed90adb062551aed8ec07256 100644 --- a/tests/quasiquotation/qq005/test.T +++ b/tests/quasiquotation/qq005/test.T @@ -1,5 +1,5 @@ test('qq005', - [skip_if_fast, + [when(fast(), skip), reqlib('parsec'), only_compiler_types(['ghc']), # We'd need to jump through some hoops to run this test the diff --git a/tests/quasiquotation/qq006/test.T b/tests/quasiquotation/qq006/test.T index 21d9a3db1cd5e979d5f9113b3bc764df01fc06a6..be471de9cab9fd61b5b5ec4f2ff978188f3527a9 100644 --- a/tests/quasiquotation/qq006/test.T +++ b/tests/quasiquotation/qq006/test.T @@ -1,5 +1,5 @@ test('qq006', - [skip_if_fast, + [when(fast(), skip), reqlib('parsec'), extra_clean(['Expr.hi', 'Expr.o']), only_compiler_types(['ghc'])], diff --git a/tests/quasiquotation/qq007/test.T b/tests/quasiquotation/qq007/test.T index 6b7ef6dcd74cc68e143202ddcf649ee531f9e4cf..61374e5719dd0acd276102759cf72f0aab0e00fd 100644 --- a/tests/quasiquotation/qq007/test.T +++ b/tests/quasiquotation/qq007/test.T @@ -1,5 +1,5 @@ test('qq007', - [skip_if_fast, + [when(fast(), skip), extra_clean(['QQ.hi', 'QQ.o', 'Test.hi', 'Test.o']), # We'd need to jump through some hoops to run this test the # profiling ways, due to the TH use, so for now we just diff --git a/tests/quasiquotation/qq008/test.T b/tests/quasiquotation/qq008/test.T index 02b88dbd0a0e869b19afe14b37680c123b634bf3..5d419996379d9f6e16c9f0b2e0827765a542ce3c 100644 --- a/tests/quasiquotation/qq008/test.T +++ b/tests/quasiquotation/qq008/test.T @@ -1,5 +1,5 @@ test('qq008', - [skip_if_fast, + [when(fast(), skip), extra_clean(['QQ.hi', 'QQ.o', 'Test.hi', 'Test.o']), # We'd need to jump through some hoops to run this test the # profiling ways, due to the TH use, so for now we just diff --git a/tests/rebindable/rebindable6.stderr b/tests/rebindable/rebindable6.stderr index a12cef09f22861fae42e32584c7933f1b62ef72e..e36e38d056a46c21b4cf231dfbf6957b5cf3534e 100644 --- a/tests/rebindable/rebindable6.stderr +++ b/tests/rebindable/rebindable6.stderr @@ -1,67 +1,67 @@ - -rebindable6.hs:106:17: - No instance for (HasSeq (IO a -> t0 -> IO b)) - arising from a do statement - The type variable `t0' is ambiguous - Relevant bindings include - test_do :: IO a -> IO (Maybe b) -> IO b - (bound at rebindable6.hs:104:9) - f :: IO a (bound at rebindable6.hs:104:17) - g :: IO (Maybe b) (bound at rebindable6.hs:104:19) - Note: there is a potential instance available: - instance HasSeq (IO a -> IO b -> IO b) - -- Defined at rebindable6.hs:52:18 - In a stmt of a 'do' block: f - In the expression: - do { f; - Just (b :: b) <- g; - return b } - In an equation for `test_do': - test_do f g - = do { f; - Just (b :: b) <- g; - return b } - -rebindable6.hs:107:17: - No instance for (HasBind (IO (Maybe b) -> (Maybe b -> t1) -> t0)) - arising from a do statement - The type variables `t0', `t1' are ambiguous - Relevant bindings include - test_do :: IO a -> IO (Maybe b) -> IO b - (bound at rebindable6.hs:104:9) - g :: IO (Maybe b) (bound at rebindable6.hs:104:19) - Note: there is a potential instance available: - instance HasBind (IO a -> (a -> IO b) -> IO b) - -- Defined at rebindable6.hs:47:18 - In a stmt of a 'do' block: Just (b :: b) <- g - In the expression: - do { f; - Just (b :: b) <- g; - return b } - In an equation for `test_do': - test_do f g - = do { f; - Just (b :: b) <- g; - return b } - -rebindable6.hs:108:17: - No instance for (HasReturn (b -> t1)) - arising from a use of `return' - The type variable `t1' is ambiguous - Relevant bindings include - test_do :: IO a -> IO (Maybe b) -> IO b - (bound at rebindable6.hs:104:9) - g :: IO (Maybe b) (bound at rebindable6.hs:104:19) - b :: b (bound at rebindable6.hs:107:23) - Note: there is a potential instance available: - instance HasReturn (a -> IO a) -- Defined at rebindable6.hs:42:18 - In a stmt of a 'do' block: return b - In the expression: - do { f; - Just (b :: b) <- g; - return b } - In an equation for `test_do': - test_do f g - = do { f; - Just (b :: b) <- g; - return b } + +rebindable6.hs:106:17: + No instance for (HasSeq (IO a -> t0 -> IO b)) + arising from a do statement + The type variable ‛t0’ is ambiguous + Relevant bindings include + test_do :: IO a -> IO (Maybe b) -> IO b + (bound at rebindable6.hs:104:9) + f :: IO a (bound at rebindable6.hs:104:17) + g :: IO (Maybe b) (bound at rebindable6.hs:104:19) + Note: there is a potential instance available: + instance HasSeq (IO a -> IO b -> IO b) + -- Defined at rebindable6.hs:52:18 + In a stmt of a 'do' block: f + In the expression: + do { f; + Just (b :: b) <- g; + return b } + In an equation for ‛test_do’: + test_do f g + = do { f; + Just (b :: b) <- g; + return b } + +rebindable6.hs:107:17: + No instance for (HasBind (IO (Maybe b) -> (Maybe b -> t1) -> t0)) + arising from a do statement + The type variables ‛t0’, ‛t1’ are ambiguous + Relevant bindings include + test_do :: IO a -> IO (Maybe b) -> IO b + (bound at rebindable6.hs:104:9) + g :: IO (Maybe b) (bound at rebindable6.hs:104:19) + Note: there is a potential instance available: + instance HasBind (IO a -> (a -> IO b) -> IO b) + -- Defined at rebindable6.hs:47:18 + In a stmt of a 'do' block: Just (b :: b) <- g + In the expression: + do { f; + Just (b :: b) <- g; + return b } + In an equation for ‛test_do’: + test_do f g + = do { f; + Just (b :: b) <- g; + return b } + +rebindable6.hs:108:17: + No instance for (HasReturn (b -> t1)) + arising from a use of ‛return’ + The type variable ‛t1’ is ambiguous + Relevant bindings include + test_do :: IO a -> IO (Maybe b) -> IO b + (bound at rebindable6.hs:104:9) + g :: IO (Maybe b) (bound at rebindable6.hs:104:19) + b :: b (bound at rebindable6.hs:107:23) + Note: there is a potential instance available: + instance HasReturn (a -> IO a) -- Defined at rebindable6.hs:42:18 + In a stmt of a 'do' block: return b + In the expression: + do { f; + Just (b :: b) <- g; + return b } + In an equation for ‛test_do’: + test_do f g + = do { f; + Just (b :: b) <- g; + return b } diff --git a/tests/rename/prog002/rename.prog002.stderr b/tests/rename/prog002/rename.prog002.stderr index 31b672b53913fe0d7cd7b114e3e54cea407fa793..3d488acb5a3fd9aac05c8ad9af5106ccc637feec 100644 --- a/tests/rename/prog002/rename.prog002.stderr +++ b/tests/rename/prog002/rename.prog002.stderr @@ -1,2 +1,2 @@ -rnfail037.hs:8:7: Not in scope: data constructor `Rn037Help.C' +rnfail037.hs:8:7: Not in scope: data constructor ‛Rn037Help.C’ diff --git a/tests/rename/prog003/rename.prog003.stderr b/tests/rename/prog003/rename.prog003.stderr index 49c264cae852bd7d346b73cabd0ddeaee69daf32..42cc924bea233df6f7ebe79b04f4192930097b9e 100644 --- a/tests/rename/prog003/rename.prog003.stderr +++ b/tests/rename/prog003/rename.prog003.stderr @@ -1,2 +1,2 @@ -B.hs:4:6: Not in scope: type constructor or class `Class' +B.hs:4:6: Not in scope: type constructor or class ‛Class’ diff --git a/tests/rename/should_compile/T1789.stderr b/tests/rename/should_compile/T1789.stderr index dc9a7949358438b8ef56277811861a78cba66a28..3fd1f1a037d1ebb7ff8fb4f4ce2505fb6421c179 100644 --- a/tests/rename/should_compile/T1789.stderr +++ b/tests/rename/should_compile/T1789.stderr @@ -1,12 +1,12 @@ -T1789.hs:6:1: - Warning: The module `Prelude' does not have an explicit import list +T1789.hs:6:1: Warning: + The module ‛Prelude’ does not have an explicit import list -T1789.hs:7:1: - Warning: The module `Data.Map' does not have an explicit import list +T1789.hs:7:1: Warning: + The module ‛Data.Map’ does not have an explicit import list -T1789.hs:9:1: - Warning: The import item `Maybe(..)' does not have an explicit import list +T1789.hs:9:1: Warning: + The import item ‛Maybe(..)’ does not have an explicit import list -T1789.hs:10:1: - Warning: The module `Data.Maybe' does not have an explicit import list +T1789.hs:10:1: Warning: + The module ‛Data.Maybe’ does not have an explicit import list diff --git a/tests/rename/should_compile/T1972.stderr b/tests/rename/should_compile/T1972.stderr index 610e509402a240a76a9c7db03ddafcf5e7aea169..1cb78fbc29cb96979719d4b1d38f18317c9b599e 100644 --- a/tests/rename/should_compile/T1972.stderr +++ b/tests/rename/should_compile/T1972.stderr @@ -1,11 +1,11 @@ -T1972.hs:12:3: - Warning: This binding for `name' shadows the existing binding - defined at T1972.hs:9:19 +T1972.hs:12:3: Warning: + This binding for ‛name’ shadows the existing binding + defined at T1972.hs:9:19 -T1972.hs:14:3: - Warning: This binding for `mapAccumL' shadows the existing bindings - defined at T1972.hs:16:1 - imported from `Data.List' at T1972.hs:7:1-16 +T1972.hs:14:3: Warning: + This binding for ‛mapAccumL’ shadows the existing bindings + defined at T1972.hs:16:1 + imported from ‛Data.List’ at T1972.hs:7:1-16 -T1972.hs:20:10: Warning: Defined but not used: `c' +T1972.hs:20:10: Warning: Defined but not used: ‛c’ diff --git a/tests/rename/should_compile/2334.hs b/tests/rename/should_compile/T2334.hs similarity index 100% rename from tests/rename/should_compile/2334.hs rename to tests/rename/should_compile/T2334.hs diff --git a/tests/rename/should_compile/T2435.hs b/tests/rename/should_compile/T2435.hs new file mode 100644 index 0000000000000000000000000000000000000000..ab58f2bb739f851344ab48611e5d639e7ecccf65 --- /dev/null +++ b/tests/rename/should_compile/T2435.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeFamilies #-} +module Bar where +import qualified T2435Foo as Foo +instance Foo.C Int where type T Int = Int diff --git a/tests/rename/should_compile/T2435Foo.hs b/tests/rename/should_compile/T2435Foo.hs new file mode 100644 index 0000000000000000000000000000000000000000..47fba68e63fb0ad4eaa3d916265e522f0f581485 --- /dev/null +++ b/tests/rename/should_compile/T2435Foo.hs @@ -0,0 +1,3 @@ +{-# LANGUAGE TypeFamilies #-} +module T2435Foo where +class C a where type T a diff --git a/tests/rename/should_compile/T3103/T3103.stderr b/tests/rename/should_compile/T3103/T3103.stderr index a36e4484b656bb72889da1afe1273053367f5efc..ed041023e9ffef0a894dcee23a9a3f514d88356a 100644 --- a/tests/rename/should_compile/T3103/T3103.stderr +++ b/tests/rename/should_compile/T3103/T3103.stderr @@ -1,3 +1,3 @@ GHC/Word.hs:10:23: - Warning: {-# SOURCE #-} unnecessary in import of `GHC.Unicode' + Warning: {-# SOURCE #-} unnecessary in import of ‛GHC.Unicode’ diff --git a/tests/rename/should_compile/T3262.stderr-ghc b/tests/rename/should_compile/T3262.stderr-ghc index 4e730efa8d785d6d789f68fa6fcba64de58d4723..b3250fd5a394999660af1129d1b26df11de86b96 100644 --- a/tests/rename/should_compile/T3262.stderr-ghc +++ b/tests/rename/should_compile/T3262.stderr-ghc @@ -1,8 +1,8 @@ -T3262.hs:12:11: - Warning: This binding for `not_ignored' shadows the existing binding - bound at T3262.hs:11:11 +T3262.hs:12:11: Warning: + This binding for ‛not_ignored’ shadows the existing binding + bound at T3262.hs:11:11 -T3262.hs:20:15: - Warning: This binding for `not_ignored' shadows the existing binding - bound at T3262.hs:19:15 +T3262.hs:20:15: Warning: + This binding for ‛not_ignored’ shadows the existing binding + bound at T3262.hs:19:15 diff --git a/tests/rename/should_compile/T3371.stderr b/tests/rename/should_compile/T3371.stderr index b354d9d3d6d70c5f0ddbffb1b05936db904cbdc3..944739e45a42771e5610423f554bb03befa081ac 100644 --- a/tests/rename/should_compile/T3371.stderr +++ b/tests/rename/should_compile/T3371.stderr @@ -1,2 +1,2 @@ -T3371.hs:10:14: Warning: Defined but not used: `a' +T3371.hs:10:14: Warning: Defined but not used: ‛a’ diff --git a/tests/rename/should_compile/T3449.stderr b/tests/rename/should_compile/T3449.stderr index da36d24465057867c37d819fc64da07ccdbda0ec..32ddc6f35d03e614b6ab6bed01903a6e442b9af1 100644 --- a/tests/rename/should_compile/T3449.stderr +++ b/tests/rename/should_compile/T3449.stderr @@ -1,2 +1,2 @@ -T3449.hs-boot:8:1: Warning: Defined but not used: `unused' +T3449.hs-boot:8:1: Warning: Defined but not used: ‛unused’ diff --git a/tests/rename/should_compile/T3823.stderr b/tests/rename/should_compile/T3823.stderr index 0eb82345543654e1a41d8556e4903c8d8a84ebae..90e3c864ed33ea4552a6aade395693865a6ec07f 100644 --- a/tests/rename/should_compile/T3823.stderr +++ b/tests/rename/should_compile/T3823.stderr @@ -1,6 +1,6 @@ T3823B.hs:8:7: - Couldn't match expected type `A' with actual type `Bool' - In the first argument of `y', namely `a' + Couldn't match expected type ‛A’ with actual type ‛Bool’ + In the first argument of ‛y’, namely ‛a’ In the expression: y a - In an equation for `b': b = y a + In an equation for ‛b’: b = y a diff --git a/tests/rename/should_compile/T4003A.hs-boot b/tests/rename/should_compile/T4003A.hs-boot index b750e47474d78d2dfe8298b6c887ca41a7f4468f..a615301e5730422d110d3ef5324a9730b7fb0a98 100644 --- a/tests/rename/should_compile/T4003A.hs-boot +++ b/tests/rename/should_compile/T4003A.hs-boot @@ -4,5 +4,5 @@ import Data.Data data HsExpr i -instance Typeable1 HsExpr +instance Typeable HsExpr instance Data i => Data (HsExpr i) diff --git a/tests/rename/should_compile/T4489.stderr b/tests/rename/should_compile/T4489.stderr index 8cd400a72032669d4a8cc59df5cc7d7f683e962d..5fd076ee4254425abe4114305a3e60c3443653f2 100644 --- a/tests/rename/should_compile/T4489.stderr +++ b/tests/rename/should_compile/T4489.stderr @@ -1,6 +1,6 @@ - -T4489.hs:4:1: - Warning: The module `Data.Maybe' does not have an explicit import list - -T4489.hs:5:1: - Warning: The import item `Maybe(..)' does not have an explicit import list + +T4489.hs:4:1: Warning: + The module ‛Data.Maybe’ does not have an explicit import list + +T4489.hs:5:1: Warning: + The import item ‛Maybe(..)’ does not have an explicit import list diff --git a/tests/rename/should_compile/T5331.stderr b/tests/rename/should_compile/T5331.stderr index e18c657e3f25f0c6bb6cd888894abce05d5f318e..e78dd64daf365155db5c189cb0db8eabfba0d907 100644 --- a/tests/rename/should_compile/T5331.stderr +++ b/tests/rename/should_compile/T5331.stderr @@ -1,13 +1,13 @@ - -T5331.hs:8:17: - Warning: Unused quantified type variable `a' - In the definition of data constructor `S1' - -T5331.hs:11:16: - Warning: Unused quantified type variable `a' - In the definition of data constructor `W1' - -T5331.hs:13:13: - Warning: Unused quantified type variable `a' - In the type `forall a. Int' - In the type signature for `f' + +T5331.hs:8:17: Warning: + Unused quantified type variable ‛a’ + In the definition of data constructor ‛S1’ + +T5331.hs:11:16: Warning: + Unused quantified type variable ‛a’ + In the definition of data constructor ‛W1’ + +T5331.hs:13:13: Warning: + Unused quantified type variable ‛a’ + In the type ‛forall a. Int’ + In the type signature for ‛f’ diff --git a/tests/rename/should_compile/T5334.stderr b/tests/rename/should_compile/T5334.stderr index de906b9dd6673e663cfdcc08a589e06b845d98d5..2985386338de55870d9b168340516d2523d863bd 100644 --- a/tests/rename/should_compile/T5334.stderr +++ b/tests/rename/should_compile/T5334.stderr @@ -1,13 +1,13 @@ -T5334.hs:7:5: - Warning: Fields of `T' not initialised: b +T5334.hs:7:5: Warning: + Fields of ‛T’ not initialised: b In the expression: T {..} - In an equation for `t': + In an equation for ‛t’: t = T {..} where a = 1 -T5334.hs:14:5: - Warning: Fields of `S' not initialised: y +T5334.hs:14:5: Warning: + Fields of ‛S’ not initialised: y In the expression: S {x = 1} - In an equation for `s': s = S {x = 1} + In an equation for ‛s’: s = S {x = 1} diff --git a/tests/rename/should_compile/T5867.stderr b/tests/rename/should_compile/T5867.stderr index 35941c8417c0d52277197b62a307c1f3f9a3763f..0ada9be52c049f10658b47a577b60b8d10e2be30 100644 --- a/tests/rename/should_compile/T5867.stderr +++ b/tests/rename/should_compile/T5867.stderr @@ -1,8 +1,8 @@ T5867.hs:4:7: Warning: - In the use of `f' (imported from T5867a): + In the use of ‛f’ (imported from T5867a): Deprecated: "Don't use f!" T5867.hs:5:7: Warning: - In the use of `f' (imported from T5867a): + In the use of ‛f’ (imported from T5867a): Deprecated: "Don't use f!" diff --git a/tests/rename/should_compile/T7145b.stderr b/tests/rename/should_compile/T7145b.stderr index 35e233d9ccf06dcca3d63fdc11a1c0bd040a4259..f24d02954b5bedf61f5f5dc2d3a3217d086d1a68 100644 --- a/tests/rename/should_compile/T7145b.stderr +++ b/tests/rename/should_compile/T7145b.stderr @@ -1,2 +1,2 @@ -T7145b.hs:6:1: Warning: Defined but not used: `pure' +T7145b.hs:6:1: Warning: Defined but not used: ‛pure’ diff --git a/tests/rename/should_compile/T7167.stderr b/tests/rename/should_compile/T7167.stderr index 0607529f10f9fe25284262a0bdcfe1b635e05186..cddbbfe74de579e5255b2443599b66bcd6efa74b 100644 --- a/tests/rename/should_compile/T7167.stderr +++ b/tests/rename/should_compile/T7167.stderr @@ -1,2 +1,2 @@ -T7167.hs:5:1: Warning: Module `Data.List' does not export `foo' +T7167.hs:5:1: Warning: Module ‛Data.List’ does not export ‛foo’ diff --git a/tests/rename/should_compile/T7336.stderr b/tests/rename/should_compile/T7336.stderr index bd51e730b2a7e828482ac34515329ab3788f190f..0610b13e21f0ec53e8c9cb5c3457e3c02bedf7d1 100644 --- a/tests/rename/should_compile/T7336.stderr +++ b/tests/rename/should_compile/T7336.stderr @@ -1,3 +1,3 @@ - -T7336.hs:3:10: Warning: - Defined but not used: data constructor `MkU' + +T7336.hs:3:10: Warning: + Defined but not used: data constructor ‛MkU’ diff --git a/tests/rename/should_compile/all.T b/tests/rename/should_compile/all.T index 0a51cd71d81a4dc2e32d4f6e16d10c61e465160b..db1f4913ebff5ad7de05f6b02d840269c9874957 100644 --- a/tests/rename/should_compile/all.T +++ b/tests/rename/should_compile/all.T @@ -113,7 +113,7 @@ test('rn067', test('T1972', normal, compile, ['']) test('T2205', normal, compile, ['']) -test('2334', normal, compile, ['']) +test('T2334', normal, compile, ['']) test('T2506', normal, compile, ['']) test('T2914', normal, compile, ['']) test('T3221', normal, compile, ['']) @@ -161,7 +161,7 @@ test('T4240', ['$MAKE -s --no-print-directory T4240']) test('T4489', normal, compile, ['']) -test('T4478', if_compiler_lt('ghc', '7.1', expect_fail), compile, ['']) +test('T4478', when(compiler_lt('ghc', '7.1'), expect_fail), compile, ['']) test('T4534', normal, compile, ['']) test('mc09', normal, compile, ['']) @@ -202,3 +202,5 @@ test('dodgy', ['dodgy', '-v0']) test('T7167', normal, compile, ['']) test('T7336', normal, compile, ['-Wall']) + +test('T2435', normal, multimod_compile, ['T2435','-v0']) diff --git a/tests/rename/should_compile/mc10.stderr-ghc b/tests/rename/should_compile/mc10.stderr-ghc index 585bfa4528a0b3ff1daac824b99218da8812e81d..56a21b8700515343ae30b95c3baf65df8173969f 100644 --- a/tests/rename/should_compile/mc10.stderr-ghc +++ b/tests/rename/should_compile/mc10.stderr-ghc @@ -1,2 +1,2 @@ -mc10.hs:14:11: Warning: Defined but not used: `y' +mc10.hs:14:11: Warning: Defined but not used: ‛y’ diff --git a/tests/rename/should_compile/rn037.stderr-ghc b/tests/rename/should_compile/rn037.stderr-ghc index 64b604f9bdef202955ec3d4d113ee00bb6a56990..ad171a42633a31c401b15a98304d3a07dfe73ed9 100644 --- a/tests/rename/should_compile/rn037.stderr-ghc +++ b/tests/rename/should_compile/rn037.stderr-ghc @@ -1,5 +1,5 @@ -rn037.hs:3:1: - Warning: The import of `Data.List' is redundant - except perhaps to import instances from `Data.List' - To import instances alone, use: import Data.List() +rn037.hs:3:1: Warning: + The import of ‛Data.List’ is redundant + except perhaps to import instances from ‛Data.List’ + To import instances alone, use: import Data.List() diff --git a/tests/rename/should_compile/rn039.stderr-ghc b/tests/rename/should_compile/rn039.stderr-ghc index 51adb6fa8b95ee6189ca7ad977f04cf4104f33ac..2b87c367e3a386728654306e1d84c1e79e162a7a 100644 --- a/tests/rename/should_compile/rn039.stderr-ghc +++ b/tests/rename/should_compile/rn039.stderr-ghc @@ -1,5 +1,5 @@ -rn039.hs:6:16: - Warning: This binding for `-' shadows the existing binding - imported from `Prelude' at rn039.hs:2:8-20 - (and originally defined in `GHC.Num') +rn039.hs:6:16: Warning: + This binding for ‛-’ shadows the existing binding + imported from ‛Prelude’ at rn039.hs:2:8-20 + (and originally defined in ‛GHC.Num’) diff --git a/tests/rename/should_compile/rn040.stderr-ghc b/tests/rename/should_compile/rn040.stderr-ghc index 5de9d0c1c6ff3d12f52b39d0c5d1571f0af103f5..f5802287b81cab3d6fce41e3c059f97d542abc03 100644 --- a/tests/rename/should_compile/rn040.stderr-ghc +++ b/tests/rename/should_compile/rn040.stderr-ghc @@ -1,4 +1,4 @@ -rn040.hs:6:12: Warning: Defined but not used: `y' +rn040.hs:6:12: Warning: Defined but not used: ‛y’ -rn040.hs:8:8: Warning: Defined but not used: `w' +rn040.hs:8:8: Warning: Defined but not used: ‛w’ diff --git a/tests/rename/should_compile/rn041.stderr-ghc b/tests/rename/should_compile/rn041.stderr-ghc index da94a0985489112c59c2565e17720afe24eb48df..fbf27899ade9b57033aa01cc08d8a9bf283f985d 100644 --- a/tests/rename/should_compile/rn041.stderr-ghc +++ b/tests/rename/should_compile/rn041.stderr-ghc @@ -1,6 +1,6 @@ -rn041.hs:7:1: Warning: Defined but not used: `f' +rn041.hs:7:1: Warning: Defined but not used: ‛f’ -rn041.hs:9:1: Warning: Defined but not used: `g' +rn041.hs:9:1: Warning: Defined but not used: ‛g’ -rn041.hs:10:1: Warning: Defined but not used: `h' +rn041.hs:10:1: Warning: Defined but not used: ‛h’ diff --git a/tests/rename/should_compile/rn046.stderr-ghc b/tests/rename/should_compile/rn046.stderr-ghc index ebde8af37340bad5dd06a3c354abc3a89725b550..433537613741d1efb1f12f82c45b590fbdef2338 100644 --- a/tests/rename/should_compile/rn046.stderr-ghc +++ b/tests/rename/should_compile/rn046.stderr-ghc @@ -1,8 +1,8 @@ -rn046.hs:2:1: - Warning: The import of `Data.List' is redundant - except perhaps to import instances from `Data.List' - To import instances alone, use: import Data.List() +rn046.hs:2:1: Warning: + The import of ‛Data.List’ is redundant + except perhaps to import instances from ‛Data.List’ + To import instances alone, use: import Data.List() -rn046.hs:3:1: - Warning: The import of `ord' from module `Data.Char' is redundant +rn046.hs:3:1: Warning: + The import of ‛ord’ from module ‛Data.Char’ is redundant diff --git a/tests/rename/should_compile/rn047.stderr-ghc b/tests/rename/should_compile/rn047.stderr-ghc index 8b9614cb17bf3c15e4ae258ad4d6e8f3d2eb7004..588237d267e5d0ba539ee98f5a13f62812a2de4e 100644 --- a/tests/rename/should_compile/rn047.stderr-ghc +++ b/tests/rename/should_compile/rn047.stderr-ghc @@ -1,2 +1,2 @@ -rn047.hs:12:11: Warning: Defined but not used: `y' +rn047.hs:12:11: Warning: Defined but not used: ‛y’ diff --git a/tests/rename/should_compile/rn050.stderr b/tests/rename/should_compile/rn050.stderr index 4eb19d696ee07ec253955c3bed9ad42c7c622180..2554787a458cb8119ccc9eb1be0f0ee7b8da25b6 100644 --- a/tests/rename/should_compile/rn050.stderr +++ b/tests/rename/should_compile/rn050.stderr @@ -1,8 +1,8 @@ rn050.hs:13:7: Warning: - In the use of `op' (imported from Rn050_A): + In the use of ‛op’ (imported from Rn050_A): Deprecated: "Use bop instead" rn050.hs:13:10: Warning: - In the use of data constructor `C' (imported from Rn050_A): + In the use of data constructor ‛C’ (imported from Rn050_A): Deprecated: "Use D instead" diff --git a/tests/rename/should_compile/rn063.stderr b/tests/rename/should_compile/rn063.stderr index c437dd3c6a0e5642148d5338ffaa6c1d431927f3..635ef98bd9a6d00ac11dfc1c525885f6b012b839 100644 --- a/tests/rename/should_compile/rn063.stderr +++ b/tests/rename/should_compile/rn063.stderr @@ -1,4 +1,4 @@ -rn063.hs:10:9: Warning: Defined but not used: `x' +rn063.hs:10:9: Warning: Defined but not used: ‛x’ -rn063.hs:13:9: Warning: Defined but not used: `y' +rn063.hs:13:9: Warning: Defined but not used: ‛y’ diff --git a/tests/rename/should_compile/rn064.stderr b/tests/rename/should_compile/rn064.stderr index f23a96bb54096f903f0de93e66b41c1694442010..6ca77eaf25b776d872c54c8209ff1966f1a73e7c 100644 --- a/tests/rename/should_compile/rn064.stderr +++ b/tests/rename/should_compile/rn064.stderr @@ -1,4 +1,4 @@ -rn064.hs:13:12: - Warning: This binding for `r' shadows the existing binding - bound at rn064.hs:15:9 +rn064.hs:13:12: Warning: + This binding for ‛r’ shadows the existing binding + bound at rn064.hs:15:9 diff --git a/tests/rename/should_compile/rn066.stderr b/tests/rename/should_compile/rn066.stderr index 3d38aa9f2fa66e3e433c4d39b13804f397988b9e..52e82e9e7a00deb0e17e824efa62e5df22d89614 100644 --- a/tests/rename/should_compile/rn066.stderr +++ b/tests/rename/should_compile/rn066.stderr @@ -1,8 +1,8 @@ rn066.hs:13:7: Warning: - In the use of `op' (imported from Rn066_A): + In the use of ‛op’ (imported from Rn066_A): "Is that really a good idea?" rn066.hs:13:10: Warning: - In the use of data constructor `C' (imported from Rn066_A): + In the use of data constructor ‛C’ (imported from Rn066_A): "Are you sure you want to do that?" diff --git a/tests/rename/should_fail/T1595a.stderr b/tests/rename/should_fail/T1595a.stderr index 3c9adca7f74f55716c4c8c3831ecf99db436fc4c..f7dd8113f0c65be11a61e3ea39397385651a65b3 100644 --- a/tests/rename/should_fail/T1595a.stderr +++ b/tests/rename/should_fail/T1595a.stderr @@ -1,2 +1,2 @@ -T1595a.hs:3:20: Not in scope: type constructor or class `Tpyo' +T1595a.hs:3:20: Not in scope: type constructor or class ‛Tpyo’ diff --git a/tests/rename/should_fail/T2310.stderr b/tests/rename/should_fail/T2310.stderr index 6500eef1fc34566ab3ae0bef903c15d9fb0639cc..a5dd532a0c6a923424e6e6b5aad1bf478aeb9f7f 100644 --- a/tests/rename/should_fail/T2310.stderr +++ b/tests/rename/should_fail/T2310.stderr @@ -1,10 +1,10 @@ T2310.hs:5:22: - Illegal result type signature `a' + Illegal result type signature ‛a’ Result signatures are no longer supported in pattern matches In a lambda abstraction: \ x :: a -> (x :: a) T2310.hs:5:39: - Not in scope: `co' + Not in scope: ‛co’ Perhaps you meant one of these: - `c' (line 5), `cos' (imported from Prelude) + ‛c’ (line 5), ‛cos’ (imported from Prelude) diff --git a/tests/rename/should_fail/T2723.stderr b/tests/rename/should_fail/T2723.stderr index 7ede0416584f2cfad89870808e68c0cf4dfbe3f2..b34816145335c9798fd18a5cf1faf9de76a4c726 100644 --- a/tests/rename/should_fail/T2723.stderr +++ b/tests/rename/should_fail/T2723.stderr @@ -1,4 +1,4 @@ -T2723.hs:15:5: - Warning: This binding for `field3' shadows the existing binding - defined at T2723.hs:7:1 +T2723.hs:15:5: Warning: + This binding for ‛field3’ shadows the existing binding + defined at T2723.hs:7:1 diff --git a/tests/rename/should_fail/T2901.stderr b/tests/rename/should_fail/T2901.stderr index 8cf5b2f2b142c61d3d996c05bb4860e90964549c..fedaee6329b8d4aa014f801d768ac2b480f1cadd 100644 --- a/tests/rename/should_fail/T2901.stderr +++ b/tests/rename/should_fail/T2901.stderr @@ -1,4 +1,4 @@ -T2901.hs:6:5: Not in scope: data constructor `F.Foo' +T2901.hs:6:5: Not in scope: data constructor ‛F.Foo’ -T2901.hs:6:13: `F.field' is not a (visible) constructor field name +T2901.hs:6:13: ‛F.field’ is not a (visible) constructor field name diff --git a/tests/rename/should_fail/T2993.stderr b/tests/rename/should_fail/T2993.stderr index 0ba55ddd36d054f84c804f3576af41cc8d61768b..ec6fa1ea2a2ac6f7562dc3e2c6bee65ddaa03503 100644 --- a/tests/rename/should_fail/T2993.stderr +++ b/tests/rename/should_fail/T2993.stderr @@ -1,2 +1,2 @@ -T2993.hs:7:13: Not in scope: `<$>' +T2993.hs:7:13: Not in scope: ‛<$>’ diff --git a/tests/rename/should_fail/T3265.stderr b/tests/rename/should_fail/T3265.stderr index 37642ff16b971675953cf53e2d9c24622e03f891..0a56f4c5d00c4f13765ec43dd0c3fd4f033c66ab 100644 --- a/tests/rename/should_fail/T3265.stderr +++ b/tests/rename/should_fail/T3265.stderr @@ -1,8 +1,8 @@ T3265.hs:7:8: - Illegal declaration of a type or class operator `:+:' + Illegal declaration of a type or class operator ‛:+:’ Use -XTypeOperators to declare operators in type and declarations T3265.hs:9:9: - Illegal declaration of a type or class operator `:*:' + Illegal declaration of a type or class operator ‛:*:’ Use -XTypeOperators to declare operators in type and declarations diff --git a/tests/rename/should_fail/T5211.stderr b/tests/rename/should_fail/T5211.stderr index b99cc04d97ad92adc415a373c223e72ceb7d7c0b..8dcc5b68bde00ab454ae08774251a0e8872f5b05 100644 --- a/tests/rename/should_fail/T5211.stderr +++ b/tests/rename/should_fail/T5211.stderr @@ -1,5 +1,5 @@ T5211.hs:5:1: Warning: - The qualified import of `Foreign.Storable' is redundant - except perhaps to import instances from `Foreign.Storable' + The qualified import of ‛Foreign.Storable’ is redundant + except perhaps to import instances from ‛Foreign.Storable’ To import instances alone, use: import Foreign.Storable() diff --git a/tests/rename/should_fail/T5281.stderr b/tests/rename/should_fail/T5281.stderr index 3fa7670bb69e2366289cd8d24804a34d7395e74a..99ad47b5846b4f2e1c0c70faa1c155dc28acf592 100644 --- a/tests/rename/should_fail/T5281.stderr +++ b/tests/rename/should_fail/T5281.stderr @@ -1,4 +1,4 @@ T5281.hs:6:5: Warning: - In the use of `deprec' (imported from T5281A): + In the use of ‛deprec’ (imported from T5281A): Deprecated: "This is deprecated" diff --git a/tests/rename/should_fail/T5372.stderr b/tests/rename/should_fail/T5372.stderr index 47e50dc672091a2a20361e6b1dd451a9a57ae040..66778750836561592cba702f017b60c9bfaec2e8 100644 --- a/tests/rename/should_fail/T5372.stderr +++ b/tests/rename/should_fail/T5372.stderr @@ -1,6 +1,6 @@ T5372.hs:4:11: - Not in scope: data constructor `MkS' - Perhaps you meant `T5372a.MkS' (imported from T5372a) + Not in scope: data constructor ‛MkS’ + Perhaps you meant ‛T5372a.MkS’ (imported from T5372a) -T5372.hs:4:17: `x' is not a (visible) constructor field name +T5372.hs:4:17: ‛x’ is not a (visible) constructor field name diff --git a/tests/rename/should_fail/T5385.stderr b/tests/rename/should_fail/T5385.stderr index c3ba1d5e67e9f99cd313083154a5cf49fa526020..2c87a0a47a93c944255295f9591f75df0429072b 100644 --- a/tests/rename/should_fail/T5385.stderr +++ b/tests/rename/should_fail/T5385.stderr @@ -1,8 +1,8 @@ T5385.hs:3:16: - In module `T5385a': - `(:::)' is a data constructor of `T' + In module ‛T5385a’: + ‛(:::)’ is a data constructor of ‛T’ To import it use - `import' T5385a( T( (:::) ) ) + ‛import’ T5385a( T( (:::) ) ) or - `import' T5385a( T(..) ) + ‛import’ T5385a( T(..) ) diff --git a/tests/rename/should_fail/T5533.stderr b/tests/rename/should_fail/T5533.stderr index b46285132fd366c0a890ab74b466a568446a5d5b..ce13e14e2eba2027aecca08651980b33905440c3 100644 --- a/tests/rename/should_fail/T5533.stderr +++ b/tests/rename/should_fail/T5533.stderr @@ -1,4 +1,4 @@ T5533.hs:4:1: - The type signature for `f2' lacks an accompanying binding + The type signature for ‛f2’ lacks an accompanying binding (You cannot give a type signature for a record selector or class method) diff --git a/tests/rename/should_fail/T5589.stderr b/tests/rename/should_fail/T5589.stderr index 5eaae6436ba20ba00e28d1b9a224cc60e09c4e55..cf0c0a9a12b242e9a03881ec0339ff881b1f64ed 100644 --- a/tests/rename/should_fail/T5589.stderr +++ b/tests/rename/should_fail/T5589.stderr @@ -1,5 +1,5 @@ - -T5589.hs:4:1: - Duplicate type signatures for `aaa' - at T5589.hs:3:6-8 - T5589.hs:4:1-3 + +T5589.hs:4:1: + Duplicate type signatures for ‛aaa’ + at T5589.hs:3:6-8 + T5589.hs:4:1-3 diff --git a/tests/rename/should_fail/T5657.stderr b/tests/rename/should_fail/T5657.stderr index af6f57e11a25ae614b39a50778a4449599fec636..17a223d41c1db94170e809a3e8bfd62f0aff24bf 100644 --- a/tests/rename/should_fail/T5657.stderr +++ b/tests/rename/should_fail/T5657.stderr @@ -1,5 +1,5 @@ -T5657.hs:3:8: Not in scope: `LT..' +T5657.hs:3:8: Not in scope: ‛LT..’ T5657.hs:3:8: A section must be enclosed in parentheses thus: (LT.. GT) diff --git a/tests/rename/should_fail/T5745.stderr b/tests/rename/should_fail/T5745.stderr index 44994c9187b256e0168bad3b679df37feb24bb01..b71e1e20577acaa401a9d035fd06d65656bdbcd2 100644 --- a/tests/rename/should_fail/T5745.stderr +++ b/tests/rename/should_fail/T5745.stderr @@ -1,2 +1,2 @@ -T5745.hs:5:6: Not in scope: type constructor or class `T' +T5745.hs:5:6: Not in scope: type constructor or class ‛T’ diff --git a/tests/rename/should_fail/T5892a.stderr b/tests/rename/should_fail/T5892a.stderr index 9eecad61b9ad80c78c7c807c8618d846792643aa..a378dc39195f853a353ea8dc767d880261001883 100644 --- a/tests/rename/should_fail/T5892a.stderr +++ b/tests/rename/should_fail/T5892a.stderr @@ -1,10 +1,10 @@ - -T5892a.hs:12:8: Warning: - Fields of `Version' not initialised: Data.Version.versionTags - In the expression: Version {..} - In the expression: let versionBranch = [] in Version {..} - In an equation for `foo': - foo (Version {..}) = let versionBranch = [] in Version {..} - -<no location info>: -Failing due to -Werror. + +T5892a.hs:12:8: Warning: + Fields of ‛Version’ not initialised: Data.Version.versionTags + In the expression: Version {..} + In the expression: let versionBranch = [] in Version {..} + In an equation for ‛foo’: + foo (Version {..}) = let versionBranch = ... in Version {..} + +<no location info>: +Failing due to -Werror. diff --git a/tests/rename/should_fail/T5892b.stderr b/tests/rename/should_fail/T5892b.stderr index 10d6c3692beba63a8339af90fd921f801d106ad0..10d1fd139e6b957a2f958321a3893f5f6d384c6b 100644 --- a/tests/rename/should_fail/T5892b.stderr +++ b/tests/rename/should_fail/T5892b.stderr @@ -1,4 +1,4 @@ - -T5892b.hs:11:7: - Not in scope: `T5892b.versionTags' - Perhaps you meant `T5892b.versionBranch' (line 7) + +T5892b.hs:11:7: + Not in scope: ‛T5892b.versionTags’ + Perhaps you meant ‛T5892b.versionBranch’ (line 7) diff --git a/tests/rename/should_fail/T7164.stderr b/tests/rename/should_fail/T7164.stderr index a7c23e136e24cc3d4be78da5d064e836036d7b11..5e27fb876d2f36b1450f588dd2c4afb616f1e0aa 100644 --- a/tests/rename/should_fail/T7164.stderr +++ b/tests/rename/should_fail/T7164.stderr @@ -1,5 +1,5 @@ T7164.hs:8:1: - Multiple declarations of `derp' + Multiple declarations of ‛derp’ Declared at: T7164.hs:5:5 T7164.hs:8:1 diff --git a/tests/rename/should_fail/T7338.stderr b/tests/rename/should_fail/T7338.stderr index e2a92d3df9b2afc119e17769ae40b87eb8ba2417..b1e6e5c80303b8c7c56c7165e022d55087374b42 100644 --- a/tests/rename/should_fail/T7338.stderr +++ b/tests/rename/should_fail/T7338.stderr @@ -1,6 +1,6 @@ T7338.hs:4:1: - Duplicate type signatures for `a' + Duplicate type signatures for ‛a’ at T7338.hs:3:1 T7338.hs:3:4 T7338.hs:4:1 diff --git a/tests/rename/should_fail/T7338a.stderr b/tests/rename/should_fail/T7338a.stderr index 58807dc3b097ba61fa812c7290ee08ffca91305a..b4b00a35908f297a75b8abebc9631515ec498c5c 100644 --- a/tests/rename/should_fail/T7338a.stderr +++ b/tests/rename/should_fail/T7338a.stderr @@ -1,10 +1,10 @@ T7338a.hs:7:4: - Duplicate type signatures for `a' + Duplicate type signatures for ‛a’ at T7338a.hs:3:1 T7338a.hs:7:4 T7338a.hs:10:1: - Duplicate type signatures for `c' + Duplicate type signatures for ‛c’ at T7338a.hs:7:1 T7338a.hs:10:1 diff --git a/tests/rename/should_fail/T7454.stderr b/tests/rename/should_fail/T7454.stderr index 4f68ca4b90b51e7b8eb449148d410114c15194a8..a8d11886e45409b9eda101290f86f261b83f6365 100644 --- a/tests/rename/should_fail/T7454.stderr +++ b/tests/rename/should_fail/T7454.stderr @@ -1,3 +1,3 @@ T7454.hs:5:1: Warning: - The import of `Arrow' from module `Control.Arrow' is redundant + The import of ‛Arrow’ from module ‛Control.Arrow’ is redundant diff --git a/tests/rename/should_fail/all.T b/tests/rename/should_fail/all.T index 4ced172c6213d6fca922a8264aedfa46fb1c01d0..c05662bde7e4920cc002a0d36a381f826741a759 100644 --- a/tests/rename/should_fail/all.T +++ b/tests/rename/should_fail/all.T @@ -44,7 +44,7 @@ test('rnfail040', test('rnfail041', normal, compile_fail, ['']) test('rnfail042', normal, compile_fail, ['']) -test('rnfail043', skip_if_no_ghci, compile_fail, ['-v0']) +test('rnfail043', unless(doing_ghci, skip), compile_fail, ['-v0']) test('rnfail044', normal, compile_fail, ['']) test('rnfail045', normal, compile_fail, ['']) test('rnfail046', normal, compile_fail, ['']) diff --git a/tests/rename/should_fail/mc13.stderr b/tests/rename/should_fail/mc13.stderr index 82f8dd5f1800ad4bc2cf06be322a947ba1d5de6a..3cf06955a49b14425bdbd2637337e5629f89bdc8 100644 --- a/tests/rename/should_fail/mc13.stderr +++ b/tests/rename/should_fail/mc13.stderr @@ -1,2 +1,2 @@ -mc13.hs:12:37: Not in scope: `f' +mc13.hs:12:37: Not in scope: ‛f’ diff --git a/tests/rename/should_fail/mc14.stderr b/tests/rename/should_fail/mc14.stderr index 1eadb9d4b753a4530d115d30ea6ff0ce34f2dc65..28d2ca224172544dcb562e2a511576643ad6f862 100644 --- a/tests/rename/should_fail/mc14.stderr +++ b/tests/rename/should_fail/mc14.stderr @@ -1,2 +1,2 @@ -mc14.hs:14:49: Not in scope: `f' +mc14.hs:14:49: Not in scope: ‛f’ diff --git a/tests/rename/should_fail/rn_dup.stderr b/tests/rename/should_fail/rn_dup.stderr index e7859ea82c806f77880b9f1440eabe3fed0805c9..223985f763c18d3a4a7dcbe544c6557a1ce41920 100644 --- a/tests/rename/should_fail/rn_dup.stderr +++ b/tests/rename/should_fail/rn_dup.stderr @@ -1,22 +1,22 @@ rn_dup.hs:9:10: - Multiple declarations of `MkT' + Multiple declarations of ‛MkT’ Declared at: rn_dup.hs:7:10 rn_dup.hs:7:16 rn_dup.hs:9:10 rn_dup.hs:12:16: - Multiple declarations of `rf' + Multiple declarations of ‛rf’ Declared at: rn_dup.hs:11:16 rn_dup.hs:11:27 rn_dup.hs:12:16 rn_dup.hs:17:8: - Multiple declarations of `CT' + Multiple declarations of ‛CT’ Declared at: rn_dup.hs:15:8 rn_dup.hs:17:8 rn_dup.hs:18:3: - Multiple declarations of `f' + Multiple declarations of ‛f’ Declared at: rn_dup.hs:16:3 rn_dup.hs:18:3 diff --git a/tests/rename/should_fail/rnfail001.stderr b/tests/rename/should_fail/rnfail001.stderr index 5414f93f275ed3ad26e3d3f6b5c6ab52f154c635..d8baefcb429e21facbc02456b6ec7b85e3d90b31 100644 --- a/tests/rename/should_fail/rnfail001.stderr +++ b/tests/rename/should_fail/rnfail001.stderr @@ -1,6 +1,6 @@ rnfail001.hs:3:3: - Conflicting definitions for `x' + Conflicting definitions for ‛x’ Bound at: rnfail001.hs:3:3 rnfail001.hs:3:5 - In an equation for `f' + In an equation for ‛f’ diff --git a/tests/rename/should_fail/rnfail002.stderr b/tests/rename/should_fail/rnfail002.stderr index 6f7313774817c142463fd2a25271899f1b1a4519..6c15ef103d4ce095ffedd212c05594129eb7a194 100644 --- a/tests/rename/should_fail/rnfail002.stderr +++ b/tests/rename/should_fail/rnfail002.stderr @@ -1,5 +1,5 @@ rnfail002.hs:6:1: - Multiple declarations of `y' + Multiple declarations of ‛y’ Declared at: rnfail002.hs:5:1 rnfail002.hs:6:1 diff --git a/tests/rename/should_fail/rnfail003.stderr b/tests/rename/should_fail/rnfail003.stderr index aab59114127eff8cea86ef452c35f55b46f4ca44..04823326266ea57e7d22343622bdac117c8679d7 100644 --- a/tests/rename/should_fail/rnfail003.stderr +++ b/tests/rename/should_fail/rnfail003.stderr @@ -1,5 +1,5 @@ rnfail003.hs:4:1: - Multiple declarations of `f' + Multiple declarations of ‛f’ Declared at: rnfail003.hs:2:1 rnfail003.hs:4:1 diff --git a/tests/rename/should_fail/rnfail004.stderr b/tests/rename/should_fail/rnfail004.stderr index edff58cf6ff7d817de3c477982d8fdcf06f8095a..23e22fe28f3ff42205d47a46d73fdf2622df759f 100644 --- a/tests/rename/should_fail/rnfail004.stderr +++ b/tests/rename/should_fail/rnfail004.stderr @@ -1,10 +1,10 @@ rnfail004.hs:6:5: - Conflicting definitions for `a' + Conflicting definitions for ‛a’ Bound at: rnfail004.hs:6:5 rnfail004.hs:7:10 rnfail004.hs:7:6: - Conflicting definitions for `b' + Conflicting definitions for ‛b’ Bound at: rnfail004.hs:7:6 rnfail004.hs:8:8 diff --git a/tests/rename/should_fail/rnfail007.stderr b/tests/rename/should_fail/rnfail007.stderr index a00dc892d59887220bec5478218e157fd318186b..316e141bd19a0594d3a28770a70fe369abc8073a 100644 --- a/tests/rename/should_fail/rnfail007.stderr +++ b/tests/rename/should_fail/rnfail007.stderr @@ -1,3 +1,3 @@ rnfail007.hs:1:1: - The function `main' is not defined in module `Main' + The function ‛main’ is not defined in module ‛Main’ diff --git a/tests/rename/should_fail/rnfail008.stderr b/tests/rename/should_fail/rnfail008.stderr index 91818fc65697641798b242adf0fc2ba99e3173da..f565d8799005e479c6484cb62a4e26ed0b9ff488 100644 --- a/tests/rename/should_fail/rnfail008.stderr +++ b/tests/rename/should_fail/rnfail008.stderr @@ -1,2 +1,2 @@ -rnfail008.hs:18:9: `op3' is not a (visible) method of class `K' +rnfail008.hs:18:9: ‛op3’ is not a (visible) method of class ‛K’ diff --git a/tests/rename/should_fail/rnfail009.stderr b/tests/rename/should_fail/rnfail009.stderr index 358c17afe079cd080af2a370a09660e673a0cbe8..9f5e98ecb1126cca7a6e73be600f1e62d76b0429 100644 --- a/tests/rename/should_fail/rnfail009.stderr +++ b/tests/rename/should_fail/rnfail009.stderr @@ -1,5 +1,5 @@ rnfail009.hs:5:10: - Multiple declarations of `A' + Multiple declarations of ‛A’ Declared at: rnfail009.hs:3:10 rnfail009.hs:5:10 diff --git a/tests/rename/should_fail/rnfail010.stderr b/tests/rename/should_fail/rnfail010.stderr index d0e7c835ac218b86179cfbebc5462df7b8eae6e0..d2f7a9385b937fc11443a3eb95b9daf23e8c20c1 100644 --- a/tests/rename/should_fail/rnfail010.stderr +++ b/tests/rename/should_fail/rnfail010.stderr @@ -1,5 +1,5 @@ rnfail010.hs:6:1: - Multiple declarations of `f' + Multiple declarations of ‛f’ Declared at: rnfail010.hs:2:1 rnfail010.hs:6:1 diff --git a/tests/rename/should_fail/rnfail011.stderr b/tests/rename/should_fail/rnfail011.stderr index 7e7d02abf0abe789321cd1521775ebc559c024ff..544455a08aa0971aa7a0787d92912d02fa5b584d 100644 --- a/tests/rename/should_fail/rnfail011.stderr +++ b/tests/rename/should_fail/rnfail011.stderr @@ -1,5 +1,5 @@ rnfail011.hs:6:6: - Multiple declarations of `A' + Multiple declarations of ‛A’ Declared at: rnfail011.hs:2:6 rnfail011.hs:6:6 diff --git a/tests/rename/should_fail/rnfail012.stderr b/tests/rename/should_fail/rnfail012.stderr index 82dbd3a76f0650b437901cde1185048cdc014bd2..83b1e1d2fbcfcc6afc86061312837ac33e4e47e6 100644 --- a/tests/rename/should_fail/rnfail012.stderr +++ b/tests/rename/should_fail/rnfail012.stderr @@ -1,5 +1,5 @@ rnfail012.hs:8:7: - Multiple declarations of `A' + Multiple declarations of ‛A’ Declared at: rnfail012.hs:2:7 rnfail012.hs:8:7 diff --git a/tests/rename/should_fail/rnfail013.stderr b/tests/rename/should_fail/rnfail013.stderr index 3ec4f43cb093977b3a130452438a89f9cfbf7ba4..eebfaa2e020e96eb14fa3f03bcfb195c876b6157 100644 --- a/tests/rename/should_fail/rnfail013.stderr +++ b/tests/rename/should_fail/rnfail013.stderr @@ -1,5 +1,5 @@ rnfail013.hs:7:11: - Multiple declarations of `MkT' + Multiple declarations of ‛MkT’ Declared at: rnfail013.hs:5:11 rnfail013.hs:7:11 diff --git a/tests/rename/should_fail/rnfail015.stderr b/tests/rename/should_fail/rnfail015.stderr index dcb54f5b9e500cf92803e3cc25e1423bd3227562..999a7acabf066687c85a5576f23a41a263560464 100644 --- a/tests/rename/should_fail/rnfail015.stderr +++ b/tests/rename/should_fail/rnfail015.stderr @@ -1,5 +1,5 @@ rnfail015.hs:14:9: - Multiple declarations of `TokLiteral' + Multiple declarations of ‛TokLiteral’ Declared at: rnfail015.hs:8:9 rnfail015.hs:14:9 diff --git a/tests/rename/should_fail/rnfail017.stderr b/tests/rename/should_fail/rnfail017.stderr index f04b1d0990616ff604fd3fe50a71fc0432ea452a..a89b6be1c03e1ed5d2584705b553b70832b25a4b 100644 --- a/tests/rename/should_fail/rnfail017.stderr +++ b/tests/rename/should_fail/rnfail017.stderr @@ -1,8 +1,8 @@ rnfail017.hs:5:10: Precedence parsing error - cannot mix `+' [infixl 6] and prefix `-' [infixl 6] in the same infix expression + cannot mix ‛+’ [infixl 6] and prefix `-' [infixl 6] in the same infix expression rnfail017.hs:6:10: Precedence parsing error - cannot mix `*' [infixl 7] and prefix `-' [infixl 6] in the same infix expression + cannot mix ‛*’ [infixl 7] and prefix `-' [infixl 6] in the same infix expression diff --git a/tests/rename/should_fail/rnfail018.stderr b/tests/rename/should_fail/rnfail018.stderr index 3bae3eb5279ee125d2a83a3d2f6c69000df11003..7658b18baadce3c44c94e8d99dc9c8924093f34d 100644 --- a/tests/rename/should_fail/rnfail018.stderr +++ b/tests/rename/should_fail/rnfail018.stderr @@ -1,8 +1,8 @@ -rnfail018.hs:12:37: Not in scope: type variable `a' +rnfail018.hs:12:37: Not in scope: type variable ‛a’ -rnfail018.hs:12:42: Not in scope: type variable `m' +rnfail018.hs:12:42: Not in scope: type variable ‛m’ -rnfail018.hs:12:47: Not in scope: type variable `m' +rnfail018.hs:12:47: Not in scope: type variable ‛m’ -rnfail018.hs:12:49: Not in scope: type variable `a' +rnfail018.hs:12:49: Not in scope: type variable ‛a’ diff --git a/tests/rename/should_fail/rnfail019.stderr b/tests/rename/should_fail/rnfail019.stderr index f990e2d2cd2caf7bdd2eb4d9bf91a34c71159469..449da500e1e9ccdbf6ed374b7b3851821d5eb750 100644 --- a/tests/rename/should_fail/rnfail019.stderr +++ b/tests/rename/should_fail/rnfail019.stderr @@ -1,6 +1,6 @@ rnfail019.hs:5:9: - The operator `:' [infixr 5] of a section + The operator ‛:’ [infixr 5] of a section must have lower precedence than that of the operand, - namely `:' [infixr 5] - in the section: `x : y :' + namely ‛:’ [infixr 5] + in the section: ‛x : y :’ diff --git a/tests/rename/should_fail/rnfail022.stderr b/tests/rename/should_fail/rnfail022.stderr index 011d6790d713db911433c3dbc1731dcb50988ee9..d443cec996bc502e9459a0d34c453b5d869712eb 100644 --- a/tests/rename/should_fail/rnfail022.stderr +++ b/tests/rename/should_fail/rnfail022.stderr @@ -1,4 +1,4 @@ rnfail022.hs:8:5: - Not in scope: `intersperse' - Perhaps you meant `L.intersperse' (imported from Data.List) + Not in scope: ‛intersperse’ + Perhaps you meant ‛L.intersperse’ (imported from Data.List) diff --git a/tests/rename/should_fail/rnfail023.stderr b/tests/rename/should_fail/rnfail023.stderr index ec9d81ab76b7040835f293c8176f076c4f62df21..7fa68c3f192857cabae9c92b3c7ef17561cea810 100644 --- a/tests/rename/should_fail/rnfail023.stderr +++ b/tests/rename/should_fail/rnfail023.stderr @@ -1,9 +1,9 @@ rnfail023.hs:7:1: - The type signature for `f' lacks an accompanying binding + The type signature for ‛f’ lacks an accompanying binding rnfail023.hs:8:12: - The INLINE pragma for `f' lacks an accompanying binding + The INLINE pragma for ‛f’ lacks an accompanying binding rnfail023.hs:14:7: - The type signature for `g' lacks an accompanying binding + The type signature for ‛g’ lacks an accompanying binding diff --git a/tests/rename/should_fail/rnfail024.stderr b/tests/rename/should_fail/rnfail024.stderr index 19b9f339216dbd1d85ced59bcd322102fff221d0..f3e6cbe615339fce83f63efd5b835496df5d3bde 100644 --- a/tests/rename/should_fail/rnfail024.stderr +++ b/tests/rename/should_fail/rnfail024.stderr @@ -1,6 +1,6 @@ rnfail024.hs:3:1: - The type signature for `sig_without_a_defn' + The type signature for ‛sig_without_a_defn’ lacks an accompanying binding -rnfail024.hs:6:5: Not in scope: `sig_without_a_defn' +rnfail024.hs:6:5: Not in scope: ‛sig_without_a_defn’ diff --git a/tests/rename/should_fail/rnfail025.stderr b/tests/rename/should_fail/rnfail025.stderr index 4c2e25a07cb480169d8909458cc4fb73bc5df92c..bdb07ad5cfaec7dcb657ddfecce50b44ff5112c4 100644 --- a/tests/rename/should_fail/rnfail025.stderr +++ b/tests/rename/should_fail/rnfail025.stderr @@ -1,4 +1,4 @@ rnfail025.hs:3:1: - The type signature for `sig_without_a_defn' + The type signature for ‛sig_without_a_defn’ lacks an accompanying binding diff --git a/tests/rename/should_fail/rnfail026.stderr b/tests/rename/should_fail/rnfail026.stderr index 3a4ae49224385aa6e485f92483195dfa32b07cf9..f082327d56d247d60441550ae05f75885f0bf2fb 100644 --- a/tests/rename/should_fail/rnfail026.stderr +++ b/tests/rename/should_fail/rnfail026.stderr @@ -1,9 +1,9 @@ rnfail026.hs:16:35: - The first argument of `Monad' should have kind `* -> *', - but `Set a' has kind `*' - In the instance declaration for `Monad (forall a. Eq a => Set a)' + The first argument of ‛Monad’ should have kind ‛* -> *’, + but ‛Set a’ has kind ‛*’ + In the instance declaration for ‛Monad (forall a. Eq a => Set a)’ rnfail026.hs:19:10: Illegal polymorphic or qualified type: forall a. [a] - In the instance declaration for `Eq (forall a. [a])' + In the instance declaration for ‛Eq (forall a. [a])’ diff --git a/tests/rename/should_fail/rnfail027.stderr b/tests/rename/should_fail/rnfail027.stderr index 31214a1a42795e3a895112537594012d30ef983d..062600ac8d1abcaea2b571edd03e27fa148c0a9c 100644 --- a/tests/rename/should_fail/rnfail027.stderr +++ b/tests/rename/should_fail/rnfail027.stderr @@ -1,3 +1,3 @@ rnfail027.hs:5:10: - The fixity signature for `wibble' lacks an accompanying binding + The fixity signature for ‛wibble’ lacks an accompanying binding diff --git a/tests/rename/should_fail/rnfail029.stderr b/tests/rename/should_fail/rnfail029.stderr index 360a9aac9e6c298b0feb85bd14a6ca7d615d7d08..671b035c464956a0eba56dccfa87ede0410ca71f 100644 --- a/tests/rename/should_fail/rnfail029.stderr +++ b/tests/rename/should_fail/rnfail029.stderr @@ -1,8 +1,8 @@ rnfail029.hs:2:36: - Conflicting exports for `map': - `Data.List.map' exports `Data.List.map' - imported qualified from `Data.List' at rnfail029.hs:3:1-26 - (and originally defined in `GHC.Base') - `module ShouldFail' exports `ShouldFail.map' + Conflicting exports for ‛map’: + ‛Data.List.map’ exports ‛Data.List.map’ + imported qualified from ‛Data.List’ at rnfail029.hs:3:1-26 + (and originally defined in ‛GHC.Base’) + ‛module ShouldFail’ exports ‛ShouldFail.map’ defined at rnfail029.hs:4:1 diff --git a/tests/rename/should_fail/rnfail030.stderr b/tests/rename/should_fail/rnfail030.stderr index 749206a814809ce805d67dec3ee3e7c7716aca78..cbac79dc42b1ae4800cca21ccaeab286164f2e52 100644 --- a/tests/rename/should_fail/rnfail030.stderr +++ b/tests/rename/should_fail/rnfail030.stderr @@ -1,2 +1,2 @@ -rnfail030.hs:2:21: Not in scope: `Data.List.map' +rnfail030.hs:2:21: Not in scope: ‛Data.List.map’ diff --git a/tests/rename/should_fail/rnfail031.stderr b/tests/rename/should_fail/rnfail031.stderr index ad04461dc38e02964c5d9eef4bdc2f1124e32020..eee31a2ec885b5fc13c93d6623a34b288ccd2692 100644 --- a/tests/rename/should_fail/rnfail031.stderr +++ b/tests/rename/should_fail/rnfail031.stderr @@ -1,2 +1,2 @@ -rnfail031.hs:2:21: Not in scope: `Data.List.map' +rnfail031.hs:2:21: Not in scope: ‛Data.List.map’ diff --git a/tests/rename/should_fail/rnfail032.stderr b/tests/rename/should_fail/rnfail032.stderr index ea80202dd0548ac55bfcf4d4a400095454d03b20..f4cf86597782a01ac2576537e7c16f449c340655 100644 --- a/tests/rename/should_fail/rnfail032.stderr +++ b/tests/rename/should_fail/rnfail032.stderr @@ -1,7 +1,7 @@ rnfail032.hs:2:21: - Not in scope: `Data.List.map' + Not in scope: ‛Data.List.map’ Perhaps you meant one of these: - `Data.List.zip' (imported from Data.List), - `Data.List.sum' (imported from Data.List), - `Data.List.all' (imported from Data.List) + ‛Data.List.zip’ (imported from Data.List), + ‛Data.List.sum’ (imported from Data.List), + ‛Data.List.all’ (imported from Data.List) diff --git a/tests/rename/should_fail/rnfail033.stderr b/tests/rename/should_fail/rnfail033.stderr index c9abd0f87a96d8183cbc2878eba4ccafef8f7ef6..4a2e76222ce152a377657367f9ec7c7ee22b34c5 100644 --- a/tests/rename/should_fail/rnfail033.stderr +++ b/tests/rename/should_fail/rnfail033.stderr @@ -1,7 +1,7 @@ rnfail033.hs:2:21: - Not in scope: `Data.List.map' + Not in scope: ‛Data.List.map’ Perhaps you meant one of these: - `Data.List.zip' (imported from Data.List), - `Data.List.sum' (imported from Data.List), - `Data.List.all' (imported from Data.List) + ‛Data.List.zip’ (imported from Data.List), + ‛Data.List.sum’ (imported from Data.List), + ‛Data.List.all’ (imported from Data.List) diff --git a/tests/rename/should_fail/rnfail034.stderr b/tests/rename/should_fail/rnfail034.stderr index 2ec0a3b8e5e19840c5a819cfe4c0e3bd9749f3fc..6c9b49ec4f7e297f217656dac2edd6a7ffb73964 100644 --- a/tests/rename/should_fail/rnfail034.stderr +++ b/tests/rename/should_fail/rnfail034.stderr @@ -2,5 +2,5 @@ rnfail034.hs:4:11: Qualified name in binding position: M.y rnfail034.hs:4:26: - Not in scope: `M.y' - Perhaps you meant `M.g' (line 4) + Not in scope: ‛M.y’ + Perhaps you meant ‛M.g’ (line 4) diff --git a/tests/rename/should_fail/rnfail035.stderr b/tests/rename/should_fail/rnfail035.stderr index 83eb2d85e33c47dafe2f2900a5631c6fd95e1d26..35dd128e240770c939b4a3583fd949ce1f979a2b 100644 --- a/tests/rename/should_fail/rnfail035.stderr +++ b/tests/rename/should_fail/rnfail035.stderr @@ -1,2 +1,2 @@ -rnfail035.hs:2:21: Not in scope: type constructor or class `C' +rnfail035.hs:2:21: Not in scope: type constructor or class ‛C’ diff --git a/tests/rename/should_fail/rnfail040.stderr b/tests/rename/should_fail/rnfail040.stderr index cacdaa8d8d3853146996ebf9108d4b11760dd825..1ff86a826215667341f03aeec770bc81754e2f4f 100644 --- a/tests/rename/should_fail/rnfail040.stderr +++ b/tests/rename/should_fail/rnfail040.stderr @@ -1,8 +1,8 @@ rnfail040.hs:7:12: - Conflicting exports for `nub': - `module M' exports `M.nub' - imported from `Data.List' at rnfail040.hs:10:2-22 - `module M' exports `T.nub' - imported from `Rnfail040_A' at rnfail040.hs:11:2-24 + Conflicting exports for ‛nub’: + ‛module M’ exports ‛M.nub’ + imported from ‛Data.List’ at rnfail040.hs:10:2-22 + ‛module M’ exports ‛T.nub’ + imported from ‛Rnfail040_A’ at rnfail040.hs:11:2-24 (and originally defined at Rnfail040_A.hs:2:3-5) diff --git a/tests/rename/should_fail/rnfail041.stderr b/tests/rename/should_fail/rnfail041.stderr index 0c5c60d4d23d89a5bd1b8eb3264daaee32c722d1..bebccf2176a92eaaee57e10a0762b6ae7bb7e901 100644 --- a/tests/rename/should_fail/rnfail041.stderr +++ b/tests/rename/should_fail/rnfail041.stderr @@ -1,6 +1,6 @@ rnfail041.hs:4:1: - The type signature for `h' lacks an accompanying binding + The type signature for ‛h’ lacks an accompanying binding rnfail041.hs:5:1: - The type signature for `j' lacks an accompanying binding + The type signature for ‛j’ lacks an accompanying binding diff --git a/tests/rename/should_fail/rnfail043.stderr b/tests/rename/should_fail/rnfail043.stderr index 428c1944dcccb5df2949fb2738b601613164ba3c..61cef734f917d7eb7929d7a1453651ee9fc59dff 100644 --- a/tests/rename/should_fail/rnfail043.stderr +++ b/tests/rename/should_fail/rnfail043.stderr @@ -1,5 +1,5 @@ rnfail043.hs:10:1: - Multiple declarations of `f' + Multiple declarations of ‛f’ Declared at: rnfail043.hs:6:1 rnfail043.hs:10:1 diff --git a/tests/rename/should_fail/rnfail044.stderr b/tests/rename/should_fail/rnfail044.stderr index 48be6944d0799ae87ced74c5a3ab264ddc0d6b82..fdae4e17c07ee803a159123377ef72d3c640f497 100644 --- a/tests/rename/should_fail/rnfail044.stderr +++ b/tests/rename/should_fail/rnfail044.stderr @@ -1,7 +1,7 @@ rnfail044.hs:5:12: - Ambiguous occurrence `splitAt' - It could refer to either `A.splitAt', defined at rnfail044.hs:8:3 - or `Data.List.splitAt', - imported from `Prelude' at rnfail044.hs:5:8 - (and originally defined in `GHC.List') + Ambiguous occurrence ‛splitAt’ + It could refer to either ‛A.splitAt’, defined at rnfail044.hs:8:3 + or ‛Data.List.splitAt’, + imported from ‛Prelude’ at rnfail044.hs:5:8 + (and originally defined in ‛GHC.List’) diff --git a/tests/rename/should_fail/rnfail045.stderr b/tests/rename/should_fail/rnfail045.stderr index d8c80008c06e6f4ad2e8083dcf7f0c4b1ac8aa4c..9cba624ac315060715fecca67e64d9004d5768e0 100644 --- a/tests/rename/should_fail/rnfail045.stderr +++ b/tests/rename/should_fail/rnfail045.stderr @@ -1,10 +1,10 @@ rnfail045.hs:5:1: - Equations for `op1' have different numbers of arguments + Equations for ‛op1’ have different numbers of arguments rnfail045.hs:5:1-16 rnfail045.hs:6:1-13 rnfail045.hs:8:1: - Equations for `op2' have different numbers of arguments + Equations for ‛op2’ have different numbers of arguments rnfail045.hs:8:1-13 rnfail045.hs:9:1-16 diff --git a/tests/rename/should_fail/rnfail048.stderr b/tests/rename/should_fail/rnfail048.stderr index 64cd89d280bb486afbab50c95aa3a25277028a2e..7dd35d12a32918fcc97f50246b4908aaec15e9fc 100644 --- a/tests/rename/should_fail/rnfail048.stderr +++ b/tests/rename/should_fail/rnfail048.stderr @@ -1,9 +1,9 @@ - -rnfail048.hs:11:12: - Duplicate INLINE pragmas for `foo' - at rnfail048.hs:6:17-19 - rnfail048.hs:7:18-20 - rnfail048.hs:8:14-16 - rnfail048.hs:9:15-17 - rnfail048.hs:10:16-18 - rnfail048.hs:11:12-14 + +rnfail048.hs:11:12: + Duplicate INLINE pragmas for ‛foo’ + at rnfail048.hs:6:17-19 + rnfail048.hs:7:18-20 + rnfail048.hs:8:14-16 + rnfail048.hs:9:15-17 + rnfail048.hs:10:16-18 + rnfail048.hs:11:12-14 diff --git a/tests/rename/should_fail/rnfail049.stderr b/tests/rename/should_fail/rnfail049.stderr index 6b753fbf2d364faca69d674f9460c47c76e68441..8f08407ac24b35124d85ef6769f752767c4e57ab 100644 --- a/tests/rename/should_fail/rnfail049.stderr +++ b/tests/rename/should_fail/rnfail049.stderr @@ -1,2 +1,2 @@ -rnfail049.hs:12:49: Not in scope: `f' +rnfail049.hs:12:49: Not in scope: ‛f’ diff --git a/tests/rename/should_fail/rnfail050.stderr b/tests/rename/should_fail/rnfail050.stderr index d097fc5b443042a82de70417c6c39ec0c3ed7ee6..bbd122543810a555ee2aea4828d3d01bd793bf8e 100644 --- a/tests/rename/should_fail/rnfail050.stderr +++ b/tests/rename/should_fail/rnfail050.stderr @@ -1,2 +1,2 @@ -rnfail050.hs:10:37: Not in scope: `f' +rnfail050.hs:10:37: Not in scope: ‛f’ diff --git a/tests/rename/should_fail/rnfail053.stderr b/tests/rename/should_fail/rnfail053.stderr index 47f44c44641e9038455a806cf93f7928a016bf7e..8dc85ab49ec55dfef8f215b24a9f676d1b92410a 100644 --- a/tests/rename/should_fail/rnfail053.stderr +++ b/tests/rename/should_fail/rnfail053.stderr @@ -1,4 +1,4 @@ rnfail053.hs:5:10: - Not a data constructor: `forall' + Not a data constructor: ‛forall’ Perhaps you intended to use -XExistentialQuantification diff --git a/tests/rename/should_fail/rnfail054.stderr b/tests/rename/should_fail/rnfail054.stderr index ab952aadebbdf2fce8760af5ef411e91d7bbc987..ef5b6d55b00ac3f5475e43109eca598ce85a992f 100644 --- a/tests/rename/should_fail/rnfail054.stderr +++ b/tests/rename/should_fail/rnfail054.stderr @@ -1,5 +1,5 @@ rnfail054.hs:6:13: - `foo' is not a record selector + ‛foo’ is not a record selector In the expression: x {foo = 1} - In an equation for `foo': foo x = x {foo = 1} + In an equation for ‛foo’: foo x = x {foo = 1} diff --git a/tests/rename/should_fail/rnfail055.stderr b/tests/rename/should_fail/rnfail055.stderr index a468cc063e4107006b2f44061b04aada8b196084..5f760219581035740573ca7ac171ac8fb470247f 100644 --- a/tests/rename/should_fail/rnfail055.stderr +++ b/tests/rename/should_fail/rnfail055.stderr @@ -1,109 +1,109 @@ - -RnFail055.hs:1: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: - -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. - -RnFail055.hs-boot:4:1: - Identifier `f1' has conflicting definitions in the module and its hs-boot file - Main module: f1 :: Int -> Float - Boot file: f1 :: Float -> Int - -RnFail055.hs-boot:6:6: - Type constructor `S1' has conflicting definitions in the module and its hs-boot file - Main module: type S1 a b = (a, b) - Boot file: type S1 a b c = (a, b) - -RnFail055.hs-boot:8:6: - Type constructor `S2' has conflicting definitions in the module and its hs-boot file - Main module: type S2 a b = forall a1. (a1, b) - Boot file: type S2 a b = forall b1. (a, b1) - -RnFail055.hs-boot:12:6: - Type constructor `T1' has conflicting definitions in the module and its hs-boot file - Main module: data T1 a b - No C type associated - RecFlag Recursive - = T1 :: forall a b. [b] -> [a] -> T1 a b Stricts: _ _ - FamilyInstance: none - Boot file: data T1 a b - No C type associated - RecFlag NonRecursive - = T1 :: forall a b. [a] -> [b] -> T1 a b Stricts: _ _ - FamilyInstance: none - -RnFail055.hs-boot:14:16: - Type constructor `T2' has conflicting definitions in the module and its hs-boot file - Main module: data Eq b => T2 a b - No C type associated - RecFlag Recursive - = T2 :: forall a b. a -> T2 a b Stricts: _ - FamilyInstance: none - Boot file: data Eq a => T2 a b - No C type associated - RecFlag NonRecursive - = T2 :: forall a b. a -> T2 a b Stricts: _ - FamilyInstance: none - -RnFail055.hs-boot:16:11: - T3 is exported by the hs-boot file, but not exported by the module - -RnFail055.hs-boot:17:12: - T3' is exported by the hs-boot file, but not exported by the module - -RnFail055.hs-boot:21:6: - Type constructor `T5' has conflicting definitions in the module and its hs-boot file - Main module: data T5 a - No C type associated - RecFlag Recursive - = T5 :: forall a. a -> T5 a Stricts: _ Fields: field5 - FamilyInstance: none - Boot file: data T5 a - No C type associated - RecFlag NonRecursive - = T5 :: forall a. a -> T5 a Stricts: _ - FamilyInstance: none - -RnFail055.hs-boot:23:6: - Type constructor `T6' has conflicting definitions in the module and its hs-boot file - Main module: data T6 - No C type associated - RecFlag Recursive - = T6 :: Int -> T6 Stricts: _ - FamilyInstance: none - Boot file: data T6 - No C type associated - RecFlag NonRecursive - = T6 :: Int -> T6 HasWrapper Stricts: ! - FamilyInstance: none - -RnFail055.hs-boot:25:6: - Type constructor `T7' has conflicting definitions in the module and its hs-boot file - Main module: data T7 a - No C type associated - RecFlag Recursive - = T7 :: forall a a1. a1 -> T7 a Stricts: _ - FamilyInstance: none - Boot file: data T7 a - No C type associated - RecFlag NonRecursive - = T7 :: forall a b. a -> T7 a Stricts: _ - FamilyInstance: none - -RnFail055.hs-boot:27:22: - RnFail055.m1 is exported by the hs-boot file, but not exported by the module - -RnFail055.hs-boot:28:7: - Class `C2' has conflicting definitions in the module and its hs-boot file - Main module: class C2 a b - RecFlag Recursive - m2 :: a -> b m2' :: a -> b - Boot file: class C2 a b - RecFlag NonRecursive - m2 :: a -> b - -RnFail055.hs-boot:29:24: - Class `C3' has conflicting definitions in the module and its hs-boot file - Main module: class (Eq a, Ord a) => C3 a RecFlag Recursive - Boot file: class (Ord a, Eq a) => C3 a RecFlag NonRecursive + +RnFail055.hs:1: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: + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. + +RnFail055.hs-boot:4:1: + Identifier ‛f1’ has conflicting definitions in the module and its hs-boot file + Main module: f1 :: Int -> Float + Boot file: f1 :: Float -> Int + +RnFail055.hs-boot:6:6: + Type constructor ‛S1’ has conflicting definitions in the module and its hs-boot file + Main module: type S1 a b = (a, b) + Boot file: type S1 a b c = (a, b) + +RnFail055.hs-boot:8:6: + Type constructor ‛S2’ has conflicting definitions in the module and its hs-boot file + Main module: type S2 a b = forall a1. (a1, b) + Boot file: type S2 a b = forall b1. (a, b1) + +RnFail055.hs-boot:12:6: + Type constructor ‛T1’ has conflicting definitions in the module and its hs-boot file + Main module: data T1 a b + No C type associated + RecFlag Recursive, Promotable + = T1 :: forall a b. [b] -> [a] -> T1 a b Stricts: _ _ + FamilyInstance: none + Boot file: data T1 a b + No C type associated + RecFlag NonRecursive, Promotable + = T1 :: forall a b. [a] -> [b] -> T1 a b Stricts: _ _ + FamilyInstance: none + +RnFail055.hs-boot:14:16: + Type constructor ‛T2’ has conflicting definitions in the module and its hs-boot file + Main module: data Eq b => T2 a b + No C type associated + RecFlag Recursive, Promotable + = T2 :: forall a b. a -> T2 a b Stricts: _ + FamilyInstance: none + Boot file: data Eq a => T2 a b + No C type associated + RecFlag NonRecursive, Promotable + = T2 :: forall a b. a -> T2 a b Stricts: _ + FamilyInstance: none + +RnFail055.hs-boot:16:11: + T3 is exported by the hs-boot file, but not exported by the module + +RnFail055.hs-boot:17:12: + T3' is exported by the hs-boot file, but not exported by the module + +RnFail055.hs-boot:21:6: + Type constructor ‛T5’ has conflicting definitions in the module and its hs-boot file + Main module: data T5 a + No C type associated + RecFlag Recursive, Promotable + = T5 :: forall a. a -> T5 a Stricts: _ Fields: field5 + FamilyInstance: none + Boot file: data T5 a + No C type associated + RecFlag NonRecursive, Promotable + = T5 :: forall a. a -> T5 a Stricts: _ + FamilyInstance: none + +RnFail055.hs-boot:23:6: + Type constructor ‛T6’ has conflicting definitions in the module and its hs-boot file + Main module: data T6 + No C type associated + RecFlag Recursive, Not promotable + = T6 :: Int -> T6 Stricts: _ + FamilyInstance: none + Boot file: data T6 + No C type associated + RecFlag NonRecursive, Not promotable + = T6 :: Int -> T6 HasWrapper Stricts: ! + FamilyInstance: none + +RnFail055.hs-boot:25:6: + Type constructor ‛T7’ has conflicting definitions in the module and its hs-boot file + Main module: data T7 a + No C type associated + RecFlag Recursive, Promotable + = T7 :: forall a a1. a1 -> T7 a Stricts: _ + FamilyInstance: none + Boot file: data T7 a + No C type associated + RecFlag NonRecursive, Promotable + = T7 :: forall a b. a -> T7 a Stricts: _ + FamilyInstance: none + +RnFail055.hs-boot:27:22: + RnFail055.m1 is exported by the hs-boot file, but not exported by the module + +RnFail055.hs-boot:28:7: + Class ‛C2’ has conflicting definitions in the module and its hs-boot file + Main module: class C2 a b + RecFlag Recursive + m2 :: a -> b m2' :: a -> b + Boot file: class C2 a b + RecFlag NonRecursive + m2 :: a -> b + +RnFail055.hs-boot:29:24: + Class ‛C3’ has conflicting definitions in the module and its hs-boot file + Main module: class (Eq a, Ord a) => C3 a RecFlag Recursive + Boot file: class (Ord a, Eq a) => C3 a RecFlag NonRecursive diff --git a/tests/rename/should_fail/rnfail057.stderr b/tests/rename/should_fail/rnfail057.stderr index 79a5ac7edc1c031d573933cf366fab845eaf71ce..682365654d95432501d88d07aa7f4b526f507f42 100644 --- a/tests/rename/should_fail/rnfail057.stderr +++ b/tests/rename/should_fail/rnfail057.stderr @@ -1,3 +1,3 @@ rnfail057.hs:5:16: - Not in scope: type constructor or class `DontExistKind' + Not in scope: type constructor or class ‛DontExistKind’ diff --git a/tests/rts/2783.stderr b/tests/rts/2783.stderr deleted file mode 100644 index 86d45f2a1a12c1f6bafed4010ea5f993fdbc0b1a..0000000000000000000000000000000000000000 --- a/tests/rts/2783.stderr +++ /dev/null @@ -1 +0,0 @@ -2783: <<loop>> diff --git a/tests/rts/4850.stdout b/tests/rts/4850.stdout deleted file mode 100644 index b8626c4cff2849624fb67f87cd0ad72b163671ad..0000000000000000000000000000000000000000 --- a/tests/rts/4850.stdout +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/tests/rts/5644/all.T b/tests/rts/5644/all.T deleted file mode 100644 index bd820d5f7a4ab5d375c931449f6f18b85fefbd2e..0000000000000000000000000000000000000000 --- a/tests/rts/5644/all.T +++ /dev/null @@ -1,7 +0,0 @@ -test('5644', [ - only_ways(['optasm','threaded1','threaded2']), - extra_run_opts('+RTS -M20m -RTS'), - exit_code(251) # RTS exit code for "out of memory" - ], - multimod_compile_and_run, - ['heap-overflow.hs','-O']) diff --git a/tests/rts/7087.stderr b/tests/rts/7087.stderr deleted file mode 100644 index d3a25047e3aa994716c72002c0502a9233a64a13..0000000000000000000000000000000000000000 --- a/tests/rts/7087.stderr +++ /dev/null @@ -1 +0,0 @@ -7087: thread killed diff --git a/tests/rts/Makefile b/tests/rts/Makefile index 7f7781f31a56452a41cd6204ee2088e7528a0783..5d663d1260745f043518b17104aafe8f4bef7310 100644 --- a/tests/rts/Makefile +++ b/tests/rts/Makefile @@ -31,11 +31,11 @@ exec_signals-prep: $(CC) -o exec_signals_child exec_signals_child.c $(CC) -o exec_signals_prepare exec_signals_prepare.c -.PHONY: 4850 -4850: - $(RM) 4850.o 4850.hi 4850$(exeext) - "$(TEST_HC)" $(TEST_HC_OPTS) -v0 -rtsopts -debug -threaded --make 4850 - ./4850 +RTS -s 2>&1 | grep TASKS | sed 's/^ *TASKS: *\([0-9]*\).*$$/\1/' +.PHONY: T4850 +T4850: + $(RM) T4850.o T4850.hi T4850$(exeext) + "$(TEST_HC)" $(TEST_HC_OPTS) -v0 -rtsopts -debug -threaded --make T4850 + ./T4850 +RTS -s 2>&1 | grep TASKS | sed 's/^ *TASKS: *\([0-9]*\).*$$/\1/' .PHONY: T5423 T5423: @@ -48,11 +48,16 @@ T5423: T6006_setup : '$(TEST_HC)' $(TEST_HC_OPTS) -c T6006.hs +ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" +T7037_CONST = const +else +T7037_CONST = +endif .PHONY: T7037 T7037: $(RM) 7037.o 7037.hi 7037$(exeext) "$(TEST_HC)" $(TEST_HC_OPTS) T7037.hs -v0 - "$(TEST_HC)" $(filter-out -rtsopts, $(TEST_HC_OPTS)) T7037_main.c -v0 -o T7037_main -no-hs-main + "$(TEST_HC)" -optc-DT7037_CONST=$(T7037_CONST) $(filter-out -rtsopts, $(TEST_HC_OPTS)) T7037_main.c -v0 -o T7037_main -no-hs-main ./T7037_main T7040_ghci_setup : diff --git a/tests/rts/2047.hs b/tests/rts/T2047.hs similarity index 100% rename from tests/rts/2047.hs rename to tests/rts/T2047.hs diff --git a/tests/rts/2783.hs b/tests/rts/T2783.hs similarity index 100% rename from tests/rts/2783.hs rename to tests/rts/T2783.hs diff --git a/tests/rts/T2783.stderr b/tests/rts/T2783.stderr new file mode 100644 index 0000000000000000000000000000000000000000..4ea4fc816f692cb8817654133a7b7e4210093f39 --- /dev/null +++ b/tests/rts/T2783.stderr @@ -0,0 +1 @@ +T2783: <<loop>> diff --git a/tests/rts/3236.c b/tests/rts/T3236.c similarity index 100% rename from tests/rts/3236.c rename to tests/rts/T3236.c diff --git a/tests/rts/3236.stderr b/tests/rts/T3236.stderr similarity index 100% rename from tests/rts/3236.stderr rename to tests/rts/T3236.stderr diff --git a/tests/rts/3424.hs b/tests/rts/T3424.hs similarity index 100% rename from tests/rts/3424.hs rename to tests/rts/T3424.hs diff --git a/tests/rts/3424.stdout b/tests/rts/T3424.stdout similarity index 100% rename from tests/rts/3424.stdout rename to tests/rts/T3424.stdout diff --git a/tests/rts/4850.hs b/tests/rts/T4850.hs similarity index 77% rename from tests/rts/4850.hs rename to tests/rts/T4850.hs index 72616d97ebd4cc43037a232f89945a862de42296..fa06ffbea2b7f42d7d82791f937014dffc1c78fe 100644 --- a/tests/rts/4850.hs +++ b/tests/rts/T4850.hs @@ -10,11 +10,12 @@ foreign import ccall "wrapper" mkF :: Fun -> IO (FunPtr Fun) foreign import ccall "dynamic" callF :: FunPtr Fun -> Fun --- This test should create 4 OS threads only: +-- This test should create 5 OS threads only: -- one for main -- worker 1 for the IO manager --- worker 2 to run the first forkIO --- worker 3 created when worker 2 makes its foreign call +-- worker 1 for the timeout manager +-- worker 3 to run the first forkIO +-- worker 4 created when worker 2 makes its foreign call -- Due to #4850, an extra worker was being created because worker 2 was -- lost after returning from its foreign call. diff --git a/tests/rts/T4850.stdout b/tests/rts/T4850.stdout new file mode 100644 index 0000000000000000000000000000000000000000..7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69 --- /dev/null +++ b/tests/rts/T4850.stdout @@ -0,0 +1 @@ +5 diff --git a/tests/rts/5250.hs b/tests/rts/T5250.hs similarity index 100% rename from tests/rts/5250.hs rename to tests/rts/T5250.hs diff --git a/tests/rts/5644/Conf.hs b/tests/rts/T5644/Conf.hs similarity index 100% rename from tests/rts/5644/Conf.hs rename to tests/rts/T5644/Conf.hs diff --git a/tests/rts/T5644/Makefile b/tests/rts/T5644/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..9101fbd40ada5d47b499a48e62cb4ccd7f67ef71 --- /dev/null +++ b/tests/rts/T5644/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/tests/rts/5644/ManyQueue.hs b/tests/rts/T5644/ManyQueue.hs similarity index 100% rename from tests/rts/5644/ManyQueue.hs rename to tests/rts/T5644/ManyQueue.hs diff --git a/tests/rts/5644/5644.stderr b/tests/rts/T5644/T5644.stderr similarity index 79% rename from tests/rts/5644/5644.stderr rename to tests/rts/T5644/T5644.stderr index c0e6e69be1eee3b474db15c336e5b7b063ec49a2..198dceb2bb1c8e91b7f7ac4cdc6c64e0d3ae6782 100644 --- a/tests/rts/5644/5644.stderr +++ b/tests/rts/T5644/T5644.stderr @@ -1,3 +1,3 @@ -5644: Heap exhausted; +T5644: Heap exhausted; Current maximum heap size is 20971520 bytes (20 MB); use `+RTS -M<size>' to increase it. diff --git a/tests/rts/5644/Util.hs b/tests/rts/T5644/Util.hs similarity index 100% rename from tests/rts/5644/Util.hs rename to tests/rts/T5644/Util.hs diff --git a/tests/rts/T5644/all.T b/tests/rts/T5644/all.T new file mode 100644 index 0000000000000000000000000000000000000000..4b2332bbc6cfe10b765a65aeafe8b4388d08b491 --- /dev/null +++ b/tests/rts/T5644/all.T @@ -0,0 +1,7 @@ +test('T5644', [ + only_ways(['optasm','threaded1','threaded2']), + extra_run_opts('+RTS -M20m -RTS'), + exit_code(251) # RTS exit code for "out of memory" + ], + multimod_compile_and_run, + ['heap-overflow.hs','-O']) diff --git a/tests/rts/5644/heap-overflow.hs b/tests/rts/T5644/heap-overflow.hs similarity index 100% rename from tests/rts/5644/heap-overflow.hs rename to tests/rts/T5644/heap-overflow.hs diff --git a/tests/rts/5993.hs b/tests/rts/T5993.hs similarity index 100% rename from tests/rts/5993.hs rename to tests/rts/T5993.hs diff --git a/tests/rts/5993.stdout b/tests/rts/T5993.stdout similarity index 100% rename from tests/rts/5993.stdout rename to tests/rts/T5993.stdout diff --git a/tests/rts/T7037_main.c b/tests/rts/T7037_main.c index 91f3130a43332e8e3a8a55e55728e4071d1e0b53..ce7fa65b02766d012c8b16a85c6a7f2e9433c8cc 100644 --- a/tests/rts/T7037_main.c +++ b/tests/rts/T7037_main.c @@ -1,6 +1,7 @@ +#include <stddef.h> #include <unistd.h> int main(int argc, char *argv[]) { - char *args[1] = {NULL}; + T7037_CONST char * args[2] = {"T7037", NULL}; execv("./T7037", args); } diff --git a/tests/rts/7087.hs b/tests/rts/T7087.hs similarity index 100% rename from tests/rts/7087.hs rename to tests/rts/T7087.hs diff --git a/tests/rts/T7087.stderr b/tests/rts/T7087.stderr new file mode 100644 index 0000000000000000000000000000000000000000..5754987f4b29236f7c8557eedc8bfd24357c626f --- /dev/null +++ b/tests/rts/T7087.stderr @@ -0,0 +1 @@ +T7087: thread killed diff --git a/tests/rts/T7636.hs b/tests/rts/T7636.hs new file mode 100644 index 0000000000000000000000000000000000000000..9e3dbd69d2f042f039f4b5dc46b2c17ede588305 --- /dev/null +++ b/tests/rts/T7636.hs @@ -0,0 +1,13 @@ +import GHC.Conc.Sync +import System.Environment + +test n = atomically $ f [1..n] + where + f [] = retry + f (x:xs) = do + ys <- f xs + return (x:ys) + +main = do + [n] <- getArgs + test (read n) diff --git a/tests/rts/T7636.stderr b/tests/rts/T7636.stderr new file mode 100644 index 0000000000000000000000000000000000000000..76984e3b7af9f461217c467084bc65b2b6aea5d4 --- /dev/null +++ b/tests/rts/T7636.stderr @@ -0,0 +1 @@ +T7636: thread blocked indefinitely in an STM transaction diff --git a/tests/rts/all.T b/tests/rts/all.T index d69d211eddc464ac901729d88e33620ab50848f9..3a73054bae9808dd561d58702a8a40d8872c6474 100644 --- a/tests/rts/all.T +++ b/tests/rts/all.T @@ -1,61 +1,58 @@ -test('testblockalloc', compose(c_src, - compose(only_ways(['normal','threaded1']), - extra_run_opts('+RTS -I0'))), - compile_and_run, ['']) +test('testblockalloc', + [c_src, only_ways(['normal','threaded1']), extra_run_opts('+RTS -I0')], + compile_and_run, ['']) # See bug #101, test requires +RTS -c (or equivalently +RTS -M<something>) # only GHCi triggers the bug, but we run the test all ways for completeness. test('bug1010', normal, compile_and_run, ['+RTS -c -RTS']) test('derefnull', - composes([ - if_platform('x86_64-unknown-mingw32', expect_broken(6079)), - # LLVM Optimiser considers dereference of a null pointer - # undefined and marks the code as unreachable which means - # that later optimisations remove it altogether. - omit_ways(['optllvm']), - # SIGSEGV on Linux (which we make the default) - exit_code(139), - # Apparently the output can be different on different - # Linux setups, so just ignore it. As long as we get - # the right exit code we're OK. - if_os('linux', ignore_output), - # SIGBUS on OX X (PPC and x86 only; amd64 gives SEGV) - if_platform('i386-apple-darwin', exit_code(138)), - if_platform('powerpc-apple-darwin', exit_code(138)), - if_os('mingw32', exit_code(1))]), + [when(platform('x86_64-unknown-mingw32'), expect_broken(6079)), + # LLVM Optimiser considers dereference of a null pointer + # undefined and marks the code as unreachable which means + # that later optimisations remove it altogether. + omit_ways(['optllvm']), + # SIGSEGV on Linux (which we make the default) + exit_code(139), + # Apparently the output can be different on different + # Linux setups, so just ignore it. As long as we get + # the right exit code we're OK. + when(opsys('linux'), ignore_output), + # SIGBUS on OX X (PPC and x86 only; amd64 gives SEGV) + when(platform('i386-apple-darwin'), exit_code(138)), + when(platform('powerpc-apple-darwin'), exit_code(138)), + when(opsys('mingw32'), exit_code(1))], compile_and_run, ['']) test('divbyzero', - composes([ - if_platform('x86_64-unknown-mingw32', expect_broken(6079)), - # SIGFPE on Linux - exit_code(136), - # Apparently the output can be different on different - # Linux setups, so just ignore it. As long as we get - # the right exit code we're OK. - if_os('linux', ignore_output), - if_os('mingw32', exit_code(1))]), + [when(platform('x86_64-unknown-mingw32'), expect_broken(6079)), + # SIGFPE on Linux + exit_code(136), + # Apparently the output can be different on different + # Linux setups, so just ignore it. As long as we get + # the right exit code we're OK. + when(opsys('linux'), ignore_output), + when(opsys('mingw32'), exit_code(1))], compile_and_run, ['']) -test('outofmem', if_os('darwin', skip), +test('outofmem', when(opsys('darwin'), skip), run_command, ['$MAKE -s --no-print-directory outofmem']) test('outofmem2', extra_run_opts('+RTS -M5m -RTS'), run_command, ['$MAKE -s --no-print-directory outofmem2']) -test('2047', compose(ignore_output, extra_run_opts('+RTS -c -RTS')), - compile_and_run, ['-package containers']) +test('T2047', [ignore_output, extra_run_opts('+RTS -c -RTS')], + compile_and_run, ['-package containers']) # Blackhole-detection test. # Skip GHCi due to #2786 -test('2783', [ omit_ways(['ghci']), exit_code(1) ], compile_and_run, ['']) +test('T2783', [ omit_ways(['ghci']), exit_code(1) ], compile_and_run, ['']) # Test the work-stealing deque implementation. We run this test in # both threaded1 (-threaded -debug) and threaded2 (-threaded) ways. -test('testwsdeque', [unless_in_tree_compiler(skip), +test('testwsdeque', [unless(in_tree_compiler(), skip), c_src, only_ways(['threaded1', 'threaded2'])], compile_and_run, ['-I../../../rts']) -test('3236', [c_src, only_ways(['normal','threaded1']), exit_code(1)], compile_and_run, ['']) +test('T3236', [c_src, only_ways(['normal','threaded1']), exit_code(1)], compile_and_run, ['']) test('stack001', extra_run_opts('+RTS -K32m -RTS'), compile_and_run, ['']) test('stack002', extra_run_opts('+RTS -K32m -k4m -RTS'), compile_and_run, ['']) @@ -68,9 +65,9 @@ test('stack003', [ omit_ways('ghci'), # uses unboxed tuples test('atomicinc', [ c_src, only_ways(['normal']) ], compile_and_run, ['']) -test('3424', # it's slow: - [ skip_if_fast, only_ways(['normal','threaded1','ghci']) ], - compile_and_run, ['']) +test('T3424', # it's slow: + [ when(fast(), skip), only_ways(['normal','threaded1','ghci']) ], + compile_and_run, ['']) # Test for out-of-range heap size test('rtsflags001', [ only_ways(['normal']), exit_code(1), extra_run_opts('+RTS -H0m -RTS') ], compile_and_run, ['']) @@ -80,14 +77,14 @@ test('rtsflags002', [ only_ways(['normal']) ], compile_and_run, ['-with-rtsopts= # Test to see if linker scripts link properly to real ELF files test('T2615', - [ if_os('mingw32', skip), + [ when(opsys('mingw32'), skip), # OS X doesn't seem to support linker scripts - if_os('darwin', skip), + when(opsys('darwin'), skip), # Solaris' linker does not support GNUish linker scripts - if_os('solaris2', skip), - cmd_prefix('$MAKE T2615-prep && ' + - # Add current directory to dlopen search path - 'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. '), + when(opsys('solaris2'), skip), + pre_cmd('$MAKE -s --no-print-directory T2615-prep'), + # Add current directory to dlopen search path + cmd_prefix('LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. '), extra_clean(['libfoo_T2615.so', 'libfoo_T2615.o'])], compile_and_run, ['-package ghc']) @@ -105,39 +102,39 @@ test('T4059', # Test for #4274 test('exec_signals', [ - if_os('mingw32', skip), - cmd_prefix('$MAKE exec_signals-prep && ./exec_signals_prepare'), + when(opsys('mingw32'), skip), + pre_cmd('$MAKE -s --no-print-directory exec_signals-prep'), + cmd_prefix('./exec_signals_prepare'), extra_clean(['exec_signals_child', 'exec_signals_prepare']) ], compile_and_run, ['']) test('return_mem_to_os', normal, compile_and_run, ['']) -test('4850', extra_clean(['4850.o','4850.hi','4850']), - run_command, ['$MAKE -s --no-print-directory 4850']) +test('T4850', normal, run_command, ['$MAKE -s --no-print-directory T4850']) -def config_5250(opts): +def config_T5250(name, opts): if not (config.arch in ['i386','x86_64']): opts.skip = 1; -test('5250', [ config_5250, - # stack ptr is not 16-byte aligned on 32-bit Windows - if_platform('i386-unknown-mingw32', expect_fail), - if_platform('i386-unknown-linux', - expect_broken_for(4211,['llvm'])), - extra_clean(['spalign.o']), - omit_ways(['ghci']) ], - compile_and_run, ['spalign.c']) +test('T5250', [ config_T5250, + # stack ptr is not 16-byte aligned on 32-bit Windows + when(platform('i386-unknown-mingw32'), expect_fail), + when(platform('i386-unknown-linux'), + expect_broken_for(4211,['llvm'])), + extra_clean(['spalign.o']), + omit_ways(['ghci']) ], + compile_and_run, ['spalign.c']) test('T5423', extra_clean(['T5423_cmm.o']), run_command, ['$MAKE -s --no-print-directory T5423']) -test('5993', extra_run_opts('+RTS -k8 -RTS'), compile_and_run, ['']) +test('T5993', extra_run_opts('+RTS -k8 -RTS'), compile_and_run, ['']) test('T6006', [ omit_ways(prof_ways + ['ghci']), extra_clean(['T6006_c.o']), - compile_cmd_prefix('$MAKE T6006_setup && ') ], + pre_cmd('$MAKE -s --no-print-directory T6006_setup') ], # The T6006_setup hack is to ensure that we generate # T6006_stub.h before compiling T6006_c.c, which # needs it. @@ -148,17 +145,23 @@ test('T7037', run_command, ['$MAKE -s --no-print-directory T7037']) -test('7087', exit_code(1), compile_and_run, ['']) +test('T7087', exit_code(1), compile_and_run, ['']) test('T7160', normal, compile_and_run, ['']) test('T7040', [ extra_clean(['T7040_c.o']), omit_ways(['ghci']) ], compile_and_run, ['T7040_c.c']) test('T7040_ghci', [ only_ways(['ghci']), - cmd_prefix('$MAKE T7040_ghci_setup && '), + pre_cmd('$MAKE -s --no-print-directory T7040_ghci_setup'), extra_clean(['T7040_ghci_c.o']) ], compile_and_run, ['T7040_ghci_c.o']) test('T7227', [ extra_run_opts('+RTS -tT7227.stat --machine-readable -RTS'), extra_clean(['T7227.stat']) ] , compile_and_run, [''] ) + +test('T7636', [ exit_code(1), extra_run_opts('100000') ], compile_and_run, [''] ) + +test('stablename001', expect_fail_for(['hpc']), compile_and_run, ['']) +# hpc should fail this, because it tags every variable occurrence with +# a different tick. It's probably a bug if it works, hence expect_fail. diff --git a/tests/rts/stablename001.hs b/tests/rts/stablename001.hs new file mode 100644 index 0000000000000000000000000000000000000000..f046f7c7fc3b4e2df7282668b8dc2088d986aa7b --- /dev/null +++ b/tests/rts/stablename001.hs @@ -0,0 +1,13 @@ +import System.Mem.StableName +import System.Mem + +-- Test that we get the same StableName even after a GC. This is easy +-- to get wrong, by not following indirections properly. + +main = do + let x = [1..10] + seq x (return ()) + n1 <- makeStableName x + performGC + n2 <- makeStableName x + print (n1 == n2) diff --git a/tests/rts/stablename001.stdout b/tests/rts/stablename001.stdout new file mode 100644 index 0000000000000000000000000000000000000000..0ca95142bb715442d0c2c82a7c573a08c4593845 --- /dev/null +++ b/tests/rts/stablename001.stdout @@ -0,0 +1 @@ +True diff --git a/tests/safeHaskell/check/all.T b/tests/safeHaskell/check/all.T index ca6ba0f3722b50713ec02332ded64421dc5209c9..59ab4fdb97b566cb30cea177b1df3f77b0d8f8b7 100644 --- a/tests/safeHaskell/check/all.T +++ b/tests/safeHaskell/check/all.T @@ -2,7 +2,7 @@ # check of safe haskell is working properly. # Just do the normal way, SafeHaskell is all in the frontend -def f( opts ): +def f( name, opts ): opts.only_ways = ['normal'] setTestOpts(f) diff --git a/tests/safeHaskell/check/pkg01/all.T b/tests/safeHaskell/check/pkg01/all.T index 0f5f2024e571a932a3e1a8ede071ff0c2439d16e..08f0b61820f6b75fea6a2ba3f26dfff361f1d6e7 100644 --- a/tests/safeHaskell/check/pkg01/all.T +++ b/tests/safeHaskell/check/pkg01/all.T @@ -1,5 +1,5 @@ # Just do the normal way, SafeHaskell is all in the frontend -def f( opts ): +def f( name, opts ): opts.only_ways = ['normal'] def normaliseArrayPackage(str): @@ -8,6 +8,9 @@ def normaliseArrayPackage(str): def normaliseBytestringPackage(str): return re.sub('bytestring-[0-9]+(\.[0-9]+)*', 'bytestring-<VERSION>', str) +def ignoreLdOutput(str): + return re.sub('Creating library file: pdb.safePkg01/dist.build.libHSsafePkg01-1.0-ghc[0-9.]*.dll.a\n', '', str) + setTestOpts(f) if config.have_vanilla: @@ -31,6 +34,7 @@ make_args = 'VANILLA=' + vanilla + ' PROF=' + prof + ' DYN=' + dyn # and can be changed correctly test('safePkg01', [clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.safePkg01'), + normalise_errmsg_fun(ignoreLdOutput), normalise_fun(two_normalisers(normaliseArrayPackage, normaliseBytestringPackage))], run_command, diff --git a/tests/safeHaskell/flags/SafeFlags22.stderr b/tests/safeHaskell/flags/SafeFlags22.stderr index abef5a8b8a5a0c0a340546191465aa5eb06edd85..784f0472be107cbea73ca062d82634c6d0cb5675 100644 --- a/tests/safeHaskell/flags/SafeFlags22.stderr +++ b/tests/safeHaskell/flags/SafeFlags22.stderr @@ -1,6 +1,6 @@ SafeFlags22.hs:1:16: Warning: - `SafeFlags22' has been inferred as unsafe! + ‛SafeFlags22’ has been inferred as unsafe! Reason: SafeFlags22.hs:7:1: System.IO.Unsafe: Can't be safely imported! diff --git a/tests/safeHaskell/flags/SafeFlags23.stderr b/tests/safeHaskell/flags/SafeFlags23.stderr index 410b8a1ba3c9112d09b54333d272c8c658fb3ba1..8af4d95f570ff0992a7eebf6926453bda650aed6 100644 --- a/tests/safeHaskell/flags/SafeFlags23.stderr +++ b/tests/safeHaskell/flags/SafeFlags23.stderr @@ -1,6 +1,6 @@ SafeFlags23.hs:1:16: Warning: - `SafeFlags22' has been inferred as unsafe! + ‛SafeFlags22’ has been inferred as unsafe! Reason: SafeFlags23.hs:7:1: System.IO.Unsafe: Can't be safely imported! diff --git a/tests/safeHaskell/flags/SafeFlags25.stderr b/tests/safeHaskell/flags/SafeFlags25.stderr index 3a1e971478c88d6ef098828e609bca68b5d6cf4f..3e1d7b360757f4a4dc6a4314b8f309894f00600d 100644 --- a/tests/safeHaskell/flags/SafeFlags25.stderr +++ b/tests/safeHaskell/flags/SafeFlags25.stderr @@ -1,3 +1,3 @@ SafeFlags25.hs:1:16: Warning: - `SafeFlags25' has been inferred as safe! + ‛SafeFlags25’ has been inferred as safe! diff --git a/tests/safeHaskell/flags/SafeFlags26.stderr b/tests/safeHaskell/flags/SafeFlags26.stderr index fd5b341d142a6d8c01a20ec59f010d42b370a6aa..640f5be414b59d8b129c62e6b5e1a8c7becd4416 100644 --- a/tests/safeHaskell/flags/SafeFlags26.stderr +++ b/tests/safeHaskell/flags/SafeFlags26.stderr @@ -1,6 +1,6 @@ SafeFlags26.hs:1:16: Warning: - `SafeFlags26' has been inferred as safe! + ‛SafeFlags26’ has been inferred as safe! <no location info>: Failing due to -Werror. diff --git a/tests/safeHaskell/flags/all.T b/tests/safeHaskell/flags/all.T index 713439567daef0d4886dafa3ff8f412767c2ce55..fff8841797df4c1472eeba489fd77a6becaa3d42 100644 --- a/tests/safeHaskell/flags/all.T +++ b/tests/safeHaskell/flags/all.T @@ -4,7 +4,7 @@ # has been dropped. # Just do the normal way, SafeHaskell is all in the frontend -def f( opts ): +def f( name, opts ): opts.only_ways = ['normal'] setTestOpts(f) diff --git a/tests/safeHaskell/ghci/all.T b/tests/safeHaskell/ghci/all.T index 2a91b33108a60ceb1d79521105f496e0425c4c09..2dca62efd6dcadf5f9ea489056cfed122a1c657b 100644 --- a/tests/safeHaskell/ghci/all.T +++ b/tests/safeHaskell/ghci/all.T @@ -5,7 +5,7 @@ def normaliseBytestringPackage(str): test('p1', normal, ghci_script, ['p1.script']) test('p2', normal, ghci_script, ['p2.script']) -test('p3', normalise_fun(normaliseBytestringPackage), +test('p3', normalise_errmsg_fun(normaliseBytestringPackage), ghci_script, ['p3.script']) test('p4', normal, ghci_script, ['p4.script']) test('p5', normal, ghci_script, ['p5.script']) @@ -15,13 +15,13 @@ test('p8', normal, ghci_script, ['p8.script']) test('p9', normal, ghci_script, ['p9.script']) test('p10', normal, ghci_script, ['p10.script']) test('p11', normal, ghci_script, ['p11.script']) -test('p12', normalise_fun(normaliseBytestringPackage), +test('p12', normalise_errmsg_fun(normaliseBytestringPackage), ghci_script, ['p12.script']) test('p13', normal, ghci_script, ['p13.script']) test('p14', normal, ghci_script, ['p14.script']) test('p15', normal, ghci_script, ['p15.script']) test('p16', normal, ghci_script, ['p16.script']) -test('p17', normalise_fun(normaliseBytestringPackage), +test('p17', normalise_errmsg_fun(normaliseBytestringPackage), ghci_script, ['p17.script']) # 7172 test('p18', normalise_fun(normaliseBytestringPackage), diff --git a/tests/safeHaskell/ghci/p10.stderr b/tests/safeHaskell/ghci/p10.stderr index 768948984e6649f9a6e0dca3c7d6f035cca740e0..71ace7356921e1e8b0b80c6a16ebc01bcbc39d78 100644 --- a/tests/safeHaskell/ghci/p10.stderr +++ b/tests/safeHaskell/ghci/p10.stderr @@ -1,2 +1,2 @@ -<interactive>:10:1: Not in scope: `b' +<interactive>:10:1: Not in scope: ‛b’ diff --git a/tests/safeHaskell/ghci/p13.stderr b/tests/safeHaskell/ghci/p13.stderr index 5e31e43439c1f789ea5ded30d3232a032a8e86af..226aac2f05c1f68e0fb4c2715a6f3dad0b351bcf 100644 --- a/tests/safeHaskell/ghci/p13.stderr +++ b/tests/safeHaskell/ghci/p13.stderr @@ -1,7 +1,7 @@ <interactive>:12:1: Unsafe overlapping instances for Pos [Int] - arising from a use of `res' + arising from a use of ‛res’ The matching instance is: instance [overlap ok] [safe] Pos [Int] -- Defined at <interactive>:10:10 @@ -10,4 +10,4 @@ overlaps the following instances from different modules: instance [overlap ok] [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] + In an equation for ‛it’: it = res [1 :: Int, 2 :: Int] diff --git a/tests/safeHaskell/ghci/p15.script b/tests/safeHaskell/ghci/p15.script index 3faeec9df905f7560c89cd359ab3ebeef0acb0e7..81f2033ea60b4a2bf7cb28b8ff337aa08045f434 100644 --- a/tests/safeHaskell/ghci/p15.script +++ b/tests/safeHaskell/ghci/p15.script @@ -4,7 +4,7 @@ :set -XDeriveDataTypeable :set -XStandaloneDeriving -:m + Data.Typeable +:m + Data.OldTypeable data H = H {h :: String} deriving (Typeable, Show) diff --git a/tests/safeHaskell/ghci/p15.stderr b/tests/safeHaskell/ghci/p15.stderr index bc1069c87ff436871010aca10ae837a3e58bae89..0bc16dfbf1c1bcfe6acee79678616c1edd9fbc52 100644 --- a/tests/safeHaskell/ghci/p15.stderr +++ b/tests/safeHaskell/ghci/p15.stderr @@ -1,10 +1,18 @@ +Top level: Warning: + Module ‛Data.OldTypeable’ is deprecated: Use Data.Typeable instead + +<interactive>:10:36: Warning: + In the use of type constructor or class ‛Typeable’ + (imported from Data.OldTypeable, but defined in Data.OldTypeable.Internal): + Deprecated: "Use Data.Typeable.Internal instead" + <interactive>:14:10: Can't create hand written instances of Typeable in Safe Haskell! Can only derive them <interactive>:22:22: - No instance for (Typeable G) arising from a use of `cast' + No instance for (Typeable G) arising from a use of ‛cast’ In the expression: (cast y) :: Maybe H In a pattern binding: (Just y_as_H) = (cast y) :: Maybe H -<interactive>:23:1: Not in scope: `y_as_H' +<interactive>:23:1: Not in scope: ‛y_as_H’ diff --git a/tests/safeHaskell/ghci/p16.stderr b/tests/safeHaskell/ghci/p16.stderr index 33602c70a52557f93047acc42d8a55b5754c5858..373920e57d684dccd26bba9d1e47b5fba8989573 100644 --- a/tests/safeHaskell/ghci/p16.stderr +++ b/tests/safeHaskell/ghci/p16.stderr @@ -3,13 +3,13 @@ -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving <interactive>:16:29: - Can't make a derived instance of `Op T2': - `Op' is not a derivable class + Can't make a derived instance of ‛Op T2’: + ‛Op’ is not a derivable class Try -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension - In the newtype declaration for `T2' + In the newtype declaration for ‛T2’ <interactive>:19:9: - Not in scope: data constructor `T2' - Perhaps you meant `T1' (line 13) + Not in scope: data constructor ‛T2’ + Perhaps you meant ‛T1’ (line 13) -<interactive>:22:4: Not in scope: `y' +<interactive>:22:4: Not in scope: ‛y’ diff --git a/tests/safeHaskell/ghci/p4.stderr b/tests/safeHaskell/ghci/p4.stderr index 8ff4107af8a299efdfd982ae1c0f72cd87cee59a..8ff140a7bd807f2ad2a22b2af69284f038b86528 100644 --- a/tests/safeHaskell/ghci/p4.stderr +++ b/tests/safeHaskell/ghci/p4.stderr @@ -1,6 +1,6 @@ -<interactive>:6:9: Not in scope: `System.IO.Unsafe.unsafePerformIO' +<interactive>:6:9: Not in scope: ‛System.IO.Unsafe.unsafePerformIO’ -<interactive>:7:9: Not in scope: `x' +<interactive>:7:9: Not in scope: ‛x’ -<interactive>:8:1: Not in scope: `y' +<interactive>:8:1: Not in scope: ‛y’ diff --git a/tests/safeHaskell/ghci/p6.stderr b/tests/safeHaskell/ghci/p6.stderr index b32c521b4d0c97a1e7e159db8e10de11b687a62f..f46c1f815e4608bdda623f7c9369da9a2faef9f6 100644 --- a/tests/safeHaskell/ghci/p6.stderr +++ b/tests/safeHaskell/ghci/p6.stderr @@ -6,5 +6,5 @@ foreign import ccall safe "static sin" c_sin :: Double -> Double <interactive>:13:1: - Not in scope: `c_sin' - Perhaps you meant c_sin' (line 8) + Not in scope: ‛c_sin’ + Perhaps you meant ‛c_sin'’ (line 8) diff --git a/tests/safeHaskell/ghci/p9.stderr b/tests/safeHaskell/ghci/p9.stderr index 768948984e6649f9a6e0dca3c7d6f035cca740e0..71ace7356921e1e8b0b80c6a16ebc01bcbc39d78 100644 --- a/tests/safeHaskell/ghci/p9.stderr +++ b/tests/safeHaskell/ghci/p9.stderr @@ -1,2 +1,2 @@ -<interactive>:10:1: Not in scope: `b' +<interactive>:10:1: Not in scope: ‛b’ diff --git a/tests/safeHaskell/safeInfered/UnsafeInfered07.stderr b/tests/safeHaskell/safeInfered/UnsafeInfered07.stderr index 98a7e808f05b13189d1e7648b5a9f039f37b0bf2..e318319eaa87ebe625102d21030dad0415c7a39a 100644 --- a/tests/safeHaskell/safeInfered/UnsafeInfered07.stderr +++ b/tests/safeHaskell/safeInfered/UnsafeInfered07.stderr @@ -1,4 +1,22 @@ [1 of 2] Compiling UnsafeInfered07_A ( UnsafeInfered07_A.hs, UnsafeInfered07_A.o ) + +UnsafeInfered07_A.hs:4:1: Warning: + Module ‛Data.OldTypeable’ is deprecated: Use Data.Typeable instead + +UnsafeInfered07_A.hs:8:10: Warning: + In the use of type constructor or class ‛Typeable’ + (imported from Data.OldTypeable, but defined in Data.OldTypeable.Internal): + Deprecated: "Use Data.Typeable.Internal instead" + +UnsafeInfered07_A.hs:8:10: Warning: + In the use of type constructor or class ‛Typeable’ + (imported from Data.OldTypeable, but defined in Data.OldTypeable.Internal): + Deprecated: "Use Data.Typeable.Internal instead" + +UnsafeInfered07_A.hs:9:16: Warning: + In the use of ‛typeOf’ + (imported from Data.OldTypeable, but defined in Data.OldTypeable.Internal): + Deprecated: "Use Data.Typeable.Internal instead" [2 of 2] Compiling UnsafeInfered07 ( UnsafeInfered07.hs, UnsafeInfered07.o ) UnsafeInfered07.hs:4:1: diff --git a/tests/safeHaskell/safeInfered/UnsafeInfered07_A.hs b/tests/safeHaskell/safeInfered/UnsafeInfered07_A.hs index ffc11597a01be8bd26043034ec63f028cb1e49eb..9bd6b452dd088cf9499bef3ef6c0583d81413acb 100644 --- a/tests/safeHaskell/safeInfered/UnsafeInfered07_A.hs +++ b/tests/safeHaskell/safeInfered/UnsafeInfered07_A.hs @@ -1,7 +1,7 @@ -- | Unsafe as hand crafts a typeable instance module UnsafeInfered07_A where -import Data.Typeable +import Data.OldTypeable data G = G Int diff --git a/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr b/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr index a6051e1b3d835922557333bfed2431ed7c44ff02..ec700d62fdb4fe5474f53ff64536de2b7cd17cdc 100644 --- a/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr +++ b/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr @@ -1,7 +1,7 @@ [1 of 2] Compiling UnsafeInfered11_A ( UnsafeInfered11_A.hs, UnsafeInfered11_A.o ) UnsafeInfered11_A.hs:1:16: Warning: - `UnsafeInfered11_A' has been inferred as unsafe! + ‛UnsafeInfered11_A’ has been inferred as unsafe! Reason: UnsafeInfered11_A.hs:17:11: Warning: Rule "lookupx/T" ignored diff --git a/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr b/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr index 8b6ec36bb9cbf8ccff3c6502dab6ca7f20e5138b..53d7a4c3285a64ced662a54b02d9a21a5979d4a9 100644 --- a/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr +++ b/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr @@ -1,6 +1,6 @@ UnsafeInfered12.hs:2:16: Warning: - `UnsafeInfered12' has been inferred as unsafe! + ‛UnsafeInfered12’ has been inferred as unsafe! Reason: UnsafeInfered12.hs:1:14: -XTemplateHaskell is not allowed in Safe Haskell diff --git a/tests/safeHaskell/safeInfered/all.T b/tests/safeHaskell/safeInfered/all.T index dee056a614e8f93413b444c6d51dd0aadc717b2d..47e9656279a9ce39c4cc7fd55fa41293d474496c 100644 --- a/tests/safeHaskell/safeInfered/all.T +++ b/tests/safeHaskell/safeInfered/all.T @@ -2,7 +2,7 @@ # mode safe inference works correctly. # Just do the normal way, SafeHaskell is all in the frontend -def f( opts ): +def f( name, opts ): opts.only_ways = ['normal'] setTestOpts(f) diff --git a/tests/safeHaskell/safeLanguage/SafeLang07.stderr b/tests/safeHaskell/safeLanguage/SafeLang07.stderr index cb081b0ebeb66fd7676f9ca4b891de575b8a8de6..50c0ef7e5665018938a7f87b87f4acc9ce1fc6a7 100644 --- a/tests/safeHaskell/safeLanguage/SafeLang07.stderr +++ b/tests/safeHaskell/safeLanguage/SafeLang07.stderr @@ -1,7 +1,7 @@ -SafeLang07.hs:2:14: - Warning: -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving +SafeLang07.hs:2:14: Warning: + -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving SafeLang07.hs:15:1: - Failed to load interface for `SafeLang07_A' + Failed to load interface for ‛SafeLang07_A’ Use -v to see a list of the files searched for. diff --git a/tests/safeHaskell/safeLanguage/SafeLang10.stderr b/tests/safeHaskell/safeLanguage/SafeLang10.stderr index de88221c280132dc547893b330b963c1f834f822..a226c797443bb674d533a71e8e43d95579c57781 100644 --- a/tests/safeHaskell/safeLanguage/SafeLang10.stderr +++ b/tests/safeHaskell/safeLanguage/SafeLang10.stderr @@ -4,7 +4,7 @@ SafeLang10.hs:8:13: Unsafe overlapping instances for Pos [Int] - arising from a use of `res' + arising from a use of ‛res’ The matching instance is: instance [overlap ok] [safe] Pos [Int] -- Defined at SafeLang10_B.hs:14:10 @@ -13,7 +13,7 @@ SafeLang10.hs:8:13: 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 an equation for ‛r’: r = res [(1 :: Int)] In the expression: do { let r = res ...; putStrLn $ "Result: " ++ show r; diff --git a/tests/safeHaskell/safeLanguage/SafeLang13.hs b/tests/safeHaskell/safeLanguage/SafeLang13.hs index 9be68a3abb72f04d0832fcd5020289ff3246a1ec..e11b61658a90270d6fa62157d64f44486b3a9eb9 100644 --- a/tests/safeHaskell/safeLanguage/SafeLang13.hs +++ b/tests/safeHaskell/safeLanguage/SafeLang13.hs @@ -5,7 +5,7 @@ module Main where import SafeLang13_A -import Data.Typeable +import Data.OldTypeable data H = H String deriving (Typeable, Show) diff --git a/tests/safeHaskell/safeLanguage/SafeLang14.hs b/tests/safeHaskell/safeLanguage/SafeLang14.hs index 59e8386ac12fba79208536580bf603af4e665405..98e29fbceb01d5af4810c23fabcdc591dc7565ad 100644 --- a/tests/safeHaskell/safeLanguage/SafeLang14.hs +++ b/tests/safeHaskell/safeLanguage/SafeLang14.hs @@ -5,7 +5,7 @@ module Main where import SafeLang14_A -import Data.Typeable +import Data.OldTypeable data H = H String deriving (Typeable, Show) diff --git a/tests/safeHaskell/safeLanguage/all.T b/tests/safeHaskell/safeLanguage/all.T index 506b45d4324feed0fce7e406cb558af14e48d9a8..f8479b12c36aa433c6e7200fff52efedbde5fdfc 100644 --- a/tests/safeHaskell/safeLanguage/all.T +++ b/tests/safeHaskell/safeLanguage/all.T @@ -4,7 +4,7 @@ # works correctly (incluidng testing safe imports a little). # Just do the normal way, SafeHaskell is all in the frontend -def f( opts ): +def f( name, opts ): opts.only_ways = ['normal'] setTestOpts(f) diff --git a/tests/safeHaskell/unsafeLibs/BadImport02.hs b/tests/safeHaskell/unsafeLibs/BadImport02.hs index e9d5ca7577bd33afc2fbb3b874cf7e78f5f2da2f..80eba6288fad14d5436d9125a72fd243c5dfb773 100644 --- a/tests/safeHaskell/unsafeLibs/BadImport02.hs +++ b/tests/safeHaskell/unsafeLibs/BadImport02.hs @@ -3,7 +3,7 @@ -- | Here we used typeable to produce an illegal value module Main where -import Data.Typeable +import Data.OldTypeable import BadImport02_A diff --git a/tests/safeHaskell/unsafeLibs/BadImport03.hs b/tests/safeHaskell/unsafeLibs/BadImport03.hs index 9b8a5651a9860a69769f75f9cffff25bd32aefad..9c06d34bab30533f652e5f1515ff86ae5b04f9ae 100644 --- a/tests/safeHaskell/unsafeLibs/BadImport03.hs +++ b/tests/safeHaskell/unsafeLibs/BadImport03.hs @@ -5,7 +5,7 @@ -- Now using SAFE though so will fail module Main where -import Data.Typeable +import Data.OldTypeable import BadImport03_A diff --git a/tests/safeHaskell/unsafeLibs/BadImport04.hs b/tests/safeHaskell/unsafeLibs/BadImport04.hs deleted file mode 100644 index c22b0362f7a36b47bde22b450f87dee89581e270..0000000000000000000000000000000000000000 --- a/tests/safeHaskell/unsafeLibs/BadImport04.hs +++ /dev/null @@ -1,12 +0,0 @@ -{-# LANGUAGE Safe #-} --- | Import unsafe module Foreign to make sure it fails -module Main where - -import Foreign (unsafePerformIO) - -f :: Int -f = unsafePerformIO $ putStrLn "What kind of swallow?" >> return 2 - -main :: IO () -main = putStrLn $ "X is: " ++ show f - diff --git a/tests/safeHaskell/unsafeLibs/BadImport04.stderr b/tests/safeHaskell/unsafeLibs/BadImport04.stderr deleted file mode 100644 index 2c2f3befb23ccd717cea17b3b580449c8d1363ea..0000000000000000000000000000000000000000 --- a/tests/safeHaskell/unsafeLibs/BadImport04.stderr +++ /dev/null @@ -1,3 +0,0 @@ - -BadImport04.hs:5:1: - Foreign: Can't be safely imported! The module itself isn't safe. diff --git a/tests/safeHaskell/unsafeLibs/BadImport09.hs b/tests/safeHaskell/unsafeLibs/BadImport09.hs deleted file mode 100644 index 30881b14309e0a19e738140d2884566256d1854d..0000000000000000000000000000000000000000 --- a/tests/safeHaskell/unsafeLibs/BadImport09.hs +++ /dev/null @@ -1,12 +0,0 @@ -{-# LANGUAGE Safe #-} --- | Import unsafe module Foreign.Marshal to make sure it fails -module Main where - -import Foreign.Marshal - -f :: Int -f = unsafeLocalState $ putStrLn "What kind of swallow?" >> return 2 - -main :: IO () -main = putStrLn $ "X is: " ++ show f - diff --git a/tests/safeHaskell/unsafeLibs/BadImport09.stderr b/tests/safeHaskell/unsafeLibs/BadImport09.stderr deleted file mode 100644 index 2dd8e7cf5827c1b7b9799bc0660d0eccc5b2b1f3..0000000000000000000000000000000000000000 --- a/tests/safeHaskell/unsafeLibs/BadImport09.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -BadImport09.hs:5:1: - Foreign.Marshal: Can't be safely imported! - The module itself isn't safe. diff --git a/tests/safeHaskell/unsafeLibs/Dep01.hs b/tests/safeHaskell/unsafeLibs/Dep01.hs deleted file mode 100644 index 5ee1cd028802c455a98b9bbeb6aca36370439a0a..0000000000000000000000000000000000000000 --- a/tests/safeHaskell/unsafeLibs/Dep01.hs +++ /dev/null @@ -1,13 +0,0 @@ -module Dep01 where - -import Control.Monad -import Control.Monad.ST -import Data.STRef - -sumST :: Num a => [a] -> IO a -sumST xs = unsafeSTToIO $ do - n <- newSTRef 0 - forM_ xs $ \x -> do - modifySTRef n (+x) - readSTRef n - diff --git a/tests/safeHaskell/unsafeLibs/Dep01.stderr b/tests/safeHaskell/unsafeLibs/Dep01.stderr deleted file mode 100644 index de3016e53410aba21aaa4cbbda0ee385dd4904a3..0000000000000000000000000000000000000000 --- a/tests/safeHaskell/unsafeLibs/Dep01.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -Dep01.hs:8:12: Warning: - In the use of `unsafeSTToIO' (imported from Control.Monad.ST): - Deprecated: "Please import from Control.Monad.ST.Unsafe instead; This will be removed in the next release" diff --git a/tests/safeHaskell/unsafeLibs/Dep02.hs b/tests/safeHaskell/unsafeLibs/Dep02.hs deleted file mode 100644 index f9dbb26064c97777b9ad0293dc691f653d5f1d2c..0000000000000000000000000000000000000000 --- a/tests/safeHaskell/unsafeLibs/Dep02.hs +++ /dev/null @@ -1,16 +0,0 @@ -module Dep02 where - -import Control.Monad -import Control.Monad.ST.Lazy -import Data.STRef.Lazy - -sumST :: Num a => [a] -> a -sumST xs = runST $ do - n <- newSTRef 0 - forM_ xs $ \x -> do - modifySTRef n (+x) - readSTRef n - -badST :: () -badST = runST $ unsafeIOToST $ putStrLn "Hello World" - diff --git a/tests/safeHaskell/unsafeLibs/Dep02.stderr b/tests/safeHaskell/unsafeLibs/Dep02.stderr deleted file mode 100644 index 531fda011dc36d1c665756215ab47e1c9ec4dcd4..0000000000000000000000000000000000000000 --- a/tests/safeHaskell/unsafeLibs/Dep02.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -Dep02.hs:15:17: Warning: - In the use of `unsafeIOToST' (imported from Control.Monad.ST.Lazy): - Deprecated: "Please import from Control.Monad.ST.Lazy.Unsafe instead; This will be removed in the next release" diff --git a/tests/safeHaskell/unsafeLibs/Dep03.hs b/tests/safeHaskell/unsafeLibs/Dep03.hs deleted file mode 100644 index b5f39affc73bb7a3460af75c6a7b5ec8fda8b38c..0000000000000000000000000000000000000000 --- a/tests/safeHaskell/unsafeLibs/Dep03.hs +++ /dev/null @@ -1,7 +0,0 @@ -module Dep03 where - -import Foreign - -bad :: IO a -> a -bad = unsafePerformIO - diff --git a/tests/safeHaskell/unsafeLibs/Dep03.stderr b/tests/safeHaskell/unsafeLibs/Dep03.stderr deleted file mode 100644 index 719ab522f033f2182de9d770f022780486524d9b..0000000000000000000000000000000000000000 --- a/tests/safeHaskell/unsafeLibs/Dep03.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -Dep03.hs:6:7: Warning: - In the use of `unsafePerformIO' (imported from Foreign): - Deprecated: "Use System.IO.Unsafe.unsafePerformIO instead; This function will be removed in the next release" diff --git a/tests/safeHaskell/unsafeLibs/Dep04.hs b/tests/safeHaskell/unsafeLibs/Dep04.hs deleted file mode 100644 index 5ff23ea0ad691593a6dff6b75a875849251d6c5a..0000000000000000000000000000000000000000 --- a/tests/safeHaskell/unsafeLibs/Dep04.hs +++ /dev/null @@ -1,8 +0,0 @@ -module Dep04 where - -import Foreign.Ptr -import Foreign.ForeignPtr - -bad :: ForeignPtr a -> Ptr a -bad = unsafeForeignPtrToPtr - diff --git a/tests/safeHaskell/unsafeLibs/Dep04.stderr b/tests/safeHaskell/unsafeLibs/Dep04.stderr deleted file mode 100644 index 8a10f221ca216da5f4e47cc599b2dfcf01ac691e..0000000000000000000000000000000000000000 --- a/tests/safeHaskell/unsafeLibs/Dep04.stderr +++ /dev/null @@ -1,5 +0,0 @@ - -Dep04.hs:7:7: Warning: - In the use of `unsafeForeignPtrToPtr' - (imported from Foreign.ForeignPtr): - Deprecated: "Use Foreign.ForeignPtr.Unsafe.unsafeForeignPtrToPtr instead; This function will be removed in the next release" diff --git a/tests/safeHaskell/unsafeLibs/GoodImport03.hs b/tests/safeHaskell/unsafeLibs/GoodImport03.hs index 921858a39254cafe4e176fa893030991ab85aba4..6533e18b7d8545ff73b84239e0f9d8f6962a98b1 100644 --- a/tests/safeHaskell/unsafeLibs/GoodImport03.hs +++ b/tests/safeHaskell/unsafeLibs/GoodImport03.hs @@ -23,7 +23,6 @@ import Control.Exception.Base import Control.Monad import Control.Monad.Fix -import Control.Monad.Instances import Control.Monad.Zip import Data.Bits diff --git a/tests/safeHaskell/unsafeLibs/all.T b/tests/safeHaskell/unsafeLibs/all.T index eddf9566cfbf2beffdd38c365a2546e7b1a8dbb7..605f7de3c50c8f25a0b2eab14ac2d48a5b0f504b 100644 --- a/tests/safeHaskell/unsafeLibs/all.T +++ b/tests/safeHaskell/unsafeLibs/all.T @@ -4,16 +4,12 @@ # Checking base package is properly safe basically # Just do the normal way, SafeHaskell is all in the frontend -def f( opts ): +def f( name, opts ): opts.only_ways = ['normal'] setTestOpts(f) # Check correct methods are deprecated -test('Dep01', normal, compile, ['']) -test('Dep02', normal, compile, ['']) -test('Dep03', normal, compile, ['']) -test('Dep04', normal, compile, ['']) test('Dep05', normal, compile_fail, ['']) test('Dep06', normal, compile_fail, ['']) test('Dep07', normal, compile_fail, ['']) @@ -31,12 +27,10 @@ test('BadImport03', extra_clean(['BadImport03_A.o', 'BadImport03_A.hi']), multimod_compile_fail, ['BadImport03', '']) -test('BadImport04', normal, compile_fail, ['']) test('BadImport05', normal, compile_fail, ['']) test('BadImport06', normal, compile_fail, ['']) test('BadImport07', normal, compile_fail, ['']) test('BadImport08', normal, compile_fail, ['']) -test('BadImport09', normal, compile_fail, ['']) # check safe modules are marked safe test('GoodImport01', normal, compile, ['']) diff --git a/tests/simplCore/should_compile/EvalTest.stdout b/tests/simplCore/should_compile/EvalTest.stdout index 5f32ee81d74c015118b92235396e22822e7b0e5e..30c7ea4efa227ddcc539480b947fd76069dfc211 100644 --- a/tests/simplCore/should_compile/EvalTest.stdout +++ b/tests/simplCore/should_compile/EvalTest.stdout @@ -1 +1 @@ -rght [Dmd=Just S] :: EvalTest.AList a +rght [Dmd=<S,U>] :: EvalTest.AList a diff --git a/tests/simplCore/should_compile/T3717.stderr b/tests/simplCore/should_compile/T3717.stderr index 56824f5166a41797e5c4c97e0a8cbad8cce5efab..bafc97436c49813d036b1e61d5eef9c079a5e59e 100644 --- a/tests/simplCore/should_compile/T3717.stderr +++ b/tests/simplCore/should_compile/T3717.stderr @@ -1,10 +1,10 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 19, types: 10, coercions: 0} +Result size of Tidy Core = {terms: 22, types: 10, coercions: 0} Rec { T3717.$wfoo [Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int# -[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType L] +[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,U>] T3717.$wfoo = \ (ww :: GHC.Prim.Int#) -> case ww of ds { @@ -17,18 +17,18 @@ T3717.foo [InlPrag=INLINE[0]] :: GHC.Types.Int -> GHC.Types.Int [GblId, Arity=1, Caf=NoCafRefs, - Str=DmdType U(L)m, + Str=DmdType <S(S),U(U)>m, Unf=Unf{Src=Worker=T3717.$wfoo, TopLvl=True, Arity=1, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) Tmpl= \ (w [Occ=Once!] :: GHC.Types.Int) -> - case w of _ { GHC.Types.I# ww [Occ=Once] -> - case T3717.$wfoo ww of ww1 { __DEFAULT -> GHC.Types.I# ww1 } + case w of _ { GHC.Types.I# ww1 [Occ=Once] -> + case T3717.$wfoo ww1 of ww2 { __DEFAULT -> GHC.Types.I# ww2 } }}] T3717.foo = \ (w :: GHC.Types.Int) -> - case w of _ { GHC.Types.I# ww -> - case T3717.$wfoo ww of ww1 { __DEFAULT -> GHC.Types.I# ww1 } + case w of _ { GHC.Types.I# ww1 -> + case T3717.$wfoo ww1 of ww2 { __DEFAULT -> GHC.Types.I# ww2 } } diff --git a/tests/simplCore/should_compile/T3772.stdout b/tests/simplCore/should_compile/T3772.stdout index 13665596f716f71b86a8e77f2e1f43d633ae8168..0b21950e966acc2ce309dd2988fa34a634cb5f0f 100644 --- a/tests/simplCore/should_compile/T3772.stdout +++ b/tests/simplCore/should_compile/T3772.stdout @@ -1,10 +1,10 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 23, types: 10, coercions: 0} +Result size of Tidy Core = {terms: 27, types: 10, coercions: 0} Rec { xs :: GHC.Prim.Int# -> () -[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType L] +[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <L,U>] xs = \ (m :: GHC.Prim.Int#) -> case GHC.Prim.<=# m 1 of _ { @@ -14,7 +14,7 @@ xs = end Rec } T3772.foo [InlPrag=NOINLINE] :: GHC.Types.Int -> () -[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType U(L)] +[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,U(U)>] T3772.foo = \ (n :: GHC.Types.Int) -> case n of _ { GHC.Types.I# n# -> diff --git a/tests/simplCore/should_compile/T4201.stdout b/tests/simplCore/should_compile/T4201.stdout index c3b7e8d26c1d03148e4dc6e7646aefb3ba54cd05..9f3c2acdeb2ef1341b3138196afcb6553f331d20 100644 --- a/tests/simplCore/should_compile/T4201.stdout +++ b/tests/simplCore/should_compile/T4201.stdout @@ -1,3 +1,3 @@ - Unfolding: (Eta.bof - `cast` - (Sym (Eta.NTCo:Foo[0]) -> Refl Eta.T)) -} + {- Arity: 1, HasNoCafRefs, Strictness: <S,U>m, + Unfolding: InlineRule (0, True, True) + Eta.bof `cast` (Sym (Eta.NTCo:Foo[0]) -> Refl Eta.T) -} diff --git a/tests/simplCore/should_compile/T4398.stderr b/tests/simplCore/should_compile/T4398.stderr index ab17c8a4e902bd44ba11ca6e2fc286e98724ae84..692583e68023a7d490654420e047dedbf822a75d 100644 --- a/tests/simplCore/should_compile/T4398.stderr +++ b/tests/simplCore/should_compile/T4398.stderr @@ -1,4 +1,3 @@ - -T4398.hs:5:11: - Warning: Forall'd constraint `Ord a' is not bound in RULE lhs - f @ a x y + +T4398.hs:5:11: Warning: + Forall'd constraint ‛Ord a’ is not bound in RULE lhs f @ a x y diff --git a/tests/simplCore/should_compile/T4908.stderr b/tests/simplCore/should_compile/T4908.stderr index 4f2c5f204898491dbd87d1896f71c7be2bbf5e84..fa5205633f401a2cd9b65c57551edd5f26dbcb39 100644 --- a/tests/simplCore/should_compile/T4908.stderr +++ b/tests/simplCore/should_compile/T4908.stderr @@ -1,12 +1,12 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 47, types: 38, coercions: 0} +Result size of Tidy Core = {terms: 54, types: 38, coercions: 0} Rec { T4908.f_$s$wf [Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Types.Int -> GHC.Prim.Int# -> GHC.Types.Bool -[GblId, Arity=3, Caf=NoCafRefs, Str=DmdType LLL] +[GblId, Arity=3, Caf=NoCafRefs, Str=DmdType <S,U><L,U><L,U>] T4908.f_$s$wf = \ (sc :: GHC.Prim.Int#) (sc1 :: GHC.Types.Int) @@ -27,7 +27,7 @@ T4908.$wf [GblId, Arity=2, Caf=NoCafRefs, - Str=DmdType LL, + Str=DmdType <S,U><L,U(UU(U))>, Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [30 20] 101 20}] @@ -52,16 +52,16 @@ T4908.f [InlPrag=INLINE[0]] [GblId, Arity=2, Caf=NoCafRefs, - Str=DmdType U(L)L, + Str=DmdType <S(S),U(U)><L,U(UU(U))>, Unf=Unf{Src=Worker=T4908.$wf, TopLvl=True, Arity=2, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) Tmpl= \ (w [Occ=Once!] :: GHC.Types.Int) (w1 [Occ=Once] :: (GHC.Types.Int, GHC.Types.Int)) -> - case w of _ { GHC.Types.I# ww [Occ=Once] -> T4908.$wf ww w1 }}] + case w of _ { GHC.Types.I# ww1 [Occ=Once] -> T4908.$wf ww1 w1 }}] T4908.f = \ (w :: GHC.Types.Int) (w1 :: (GHC.Types.Int, GHC.Types.Int)) -> - case w of _ { GHC.Types.I# ww -> T4908.$wf ww w1 } + case w of _ { GHC.Types.I# ww1 -> T4908.$wf ww1 w1 } ------ Local rules for imported ids -------- diff --git a/tests/simplCore/should_compile/T4930.stderr b/tests/simplCore/should_compile/T4930.stderr index 61c2f5afbd79ada19ea83945964ab1ad31148658..2d7c582130138bf033b0d44a9266905569ed4945 100644 --- a/tests/simplCore/should_compile/T4930.stderr +++ b/tests/simplCore/should_compile/T4930.stderr @@ -1,9 +1,9 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 20, types: 10, coercions: 0} +Result size of Tidy Core = {terms: 22, types: 10, coercions: 0} lvl :: [GHC.Types.Char] -[GblId] +[GblId, Str=DmdType] lvl = GHC.CString.unpackCString# "Too small"# T4930.foo1 :: GHC.Types.Int @@ -13,7 +13,7 @@ T4930.foo1 = GHC.Err.error @ GHC.Types.Int lvl T4930.foo :: GHC.Types.Int -> GHC.Types.Int [GblId, Arity=1, - Str=DmdType U(L)m, + Str=DmdType <S,U(U)>m, Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) diff --git a/tests/simplCore/should_compile/T5359b.stderr b/tests/simplCore/should_compile/T5359b.stderr index a3484cfd4457e7ec6970bb311bb73bf83f17e092..6106f3e17b7357cd9ededf62cccf69982f34d13a 100644 --- a/tests/simplCore/should_compile/T5359b.stderr +++ b/tests/simplCore/should_compile/T5359b.stderr @@ -1,3 +1,3 @@ T5359b.hs:62:1: Warning: - SPECIALISE pragma on INLINE function probably won't fire: `genum' + SPECIALISE pragma on INLINE function probably won't fire: ‛genum’ diff --git a/tests/simplCore/should_compile/T6082-RULE.stderr b/tests/simplCore/should_compile/T6082-RULE.stderr index a503b77d15eb33fa33bc8a7d2b5dcffeace6c9d8..e133ec7e585923e26ab5cbbf6c31dda7c12be944 100644 --- a/tests/simplCore/should_compile/T6082-RULE.stderr +++ b/tests/simplCore/should_compile/T6082-RULE.stderr @@ -1,8 +1,8 @@ T6082-RULE.hs:5:11: Warning: - Rule "foo1" may never fire because `foo1' might inline first - Probable fix: add an INLINE[n] or NOINLINE[n] pragma on `foo1' + Rule "foo1" may never fire because ‛foo1’ might inline first + Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‛foo1’ T6082-RULE.hs:10:11: Warning: - Rule "foo2" may never fire because `foo2' might inline first - Probable fix: add an INLINE[n] or NOINLINE[n] pragma on `foo2' + Rule "foo2" may never fire because ‛foo2’ might inline first + Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‛foo2’ diff --git a/tests/simplCore/should_compile/T7360.stderr b/tests/simplCore/should_compile/T7360.stderr index 0c5bb899e01be918e7174d6cde5f888e2bd4ba75..62dc4b83ce91a7508fde1554b397011c234d6339 100644 --- a/tests/simplCore/should_compile/T7360.stderr +++ b/tests/simplCore/should_compile/T7360.stderr @@ -1,12 +1,12 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 27, types: 24, coercions: 0} +Result size of Tidy Core = {terms: 36, types: 28, coercions: 0} T7360.$WFoo3 [InlPrag=INLINE] :: GHC.Types.Int -> T7360.Foo [GblId[DataConWrapper], Arity=1, Caf=NoCafRefs, - Str=DmdType S, + Str=DmdType <S,U>m3, Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=False) @@ -17,39 +17,52 @@ T7360.$WFoo3 = case dt of dt { __DEFAULT -> T7360.Foo3 dt } T7360.fun1 [InlPrag=NOINLINE] :: T7360.Foo -> () -[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType S] +[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,U>] T7360.fun1 = \ (x :: T7360.Foo) -> case x of _ { __DEFAULT -> GHC.Tuple.() } -T7360.fun3 :: () +T7360.fun4 :: () [GblId, Str=DmdType, Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, ConLike=False, WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 20 0}] -T7360.fun3 = T7360.fun1 T7360.Foo1 +T7360.fun4 = T7360.fun1 T7360.Foo1 + +T7360.fun3 :: GHC.Types.Int +[GblId, + Caf=NoCafRefs, + Str=DmdType m, + Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, + ConLike=True, WorkFree=True, Expandable=True, + Guidance=IF_ARGS [] 10 20}] +T7360.fun3 = GHC.Types.I# 0 T7360.fun2 :: forall a. [a] -> ((), GHC.Types.Int) [GblId, Arity=1, - Str=DmdType Lm, + Str=DmdType <L,U>m, Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ a) (x [Occ=Once] :: [a]) -> - (T7360.fun3, - case x of wild { __DEFAULT -> - case GHC.List.$wlen @ a wild 0 of ww { __DEFAULT -> - GHC.Types.I# ww - } + Tmpl= \ (@ a) (x [Occ=Once!] :: [a]) -> + (T7360.fun4, + case x of wild { + [] -> T7360.fun3; + : _ _ -> + case GHC.List.$wlenAcc @ a wild 0 of ww { __DEFAULT -> + GHC.Types.I# ww + } })}] T7360.fun2 = \ (@ a) (x :: [a]) -> - (T7360.fun3, - case x of wild { __DEFAULT -> - case GHC.List.$wlen @ a wild 0 of ww { __DEFAULT -> - GHC.Types.I# ww - } + (T7360.fun4, + case x of wild { + [] -> T7360.fun3; + : ds ds1 -> + case GHC.List.$wlenAcc @ a wild 0 of ww { __DEFAULT -> + GHC.Types.I# ww + } }) diff --git a/tests/simplCore/should_compile/all.T b/tests/simplCore/should_compile/all.T index 57871490ca016a70f44d7eca59b8e3b52e13005a..570f295c10e3781eb36861acdb74fdd224c9f940 100644 --- a/tests/simplCore/should_compile/all.T +++ b/tests/simplCore/should_compile/all.T @@ -29,7 +29,7 @@ test('simpl-T1370', normal, compile, ['']) test('T2520', normal, compile, ['']) -test('spec001', skip_if_fast, compile, ['']) +test('spec001', when(fast(), skip), compile, ['']) test('spec002', normal, compile, ['']) test('spec003', normal, compile, ['']) @@ -44,7 +44,7 @@ test('T4203', normal, compile, ['']) # With -prof -fvia-C, this test makes gcc go out to lunch, and the # testsuite driver times out. -test('T3016', skip_if_fast, compile, ['']) +test('T3016', when(fast(), skip), compile, ['']) test('T1647', normal, compile, ['-fdicts-strict -dcore-lint']) @@ -64,7 +64,7 @@ test('T4908', only_ways(['optasm']), compile, ['-O2 -ddump-simpl -dsuppress-uniques']) -test('T4930', [if_compiler_lt('ghc', '7.1', expect_fail), +test('T4930', [when(compiler_lt('ghc', '7.1'), expect_fail), only_ways(['optasm'])], compile, ['-O -ddump-simpl -dsuppress-uniques']) @@ -109,7 +109,7 @@ test('T4918', ['$MAKE -s --no-print-directory T4918']) test('T4945', - if_compiler_lt('ghc', '7.1', expect_fail), + when(compiler_lt('ghc', '7.1'), expect_fail), run_command, ['$MAKE -s --no-print-directory T4945']) diff --git a/tests/simplCore/should_compile/simpl016.stderr b/tests/simplCore/should_compile/simpl016.stderr index 681dd10cabbd8dfe9462454618ae9db9791aaf6a..0bd07fd0eb7034a0e58373143133697d2f97d8c2 100644 --- a/tests/simplCore/should_compile/simpl016.stderr +++ b/tests/simplCore/should_compile/simpl016.stderr @@ -1,4 +1,4 @@ -simpl016.hs:5:1: - Warning: Forall'd constraint `Num b' is not bound in RULE lhs - delta' @ Int @ b GHC.Classes.$fEqInt +simpl016.hs:5:1: Warning: + Forall'd constraint ‛Num b’ is not bound in RULE lhs + delta' @ Int @ b GHC.Classes.$fEqInt diff --git a/tests/simplCore/should_compile/simpl017.stderr b/tests/simplCore/should_compile/simpl017.stderr index 334691d2c25491d78728da386d3df1769dad9892..26068534b3f6c602436fb6a42ec527d2c6517c7e 100644 --- a/tests/simplCore/should_compile/simpl017.stderr +++ b/tests/simplCore/should_compile/simpl017.stderr @@ -1,26 +1,26 @@ simpl017.hs:44:12: - Couldn't match expected type `forall v. [E m i] -> E' v m a' - with actual type `[E m i] -> E' v0 m a' + Couldn't match expected type ‛forall v. [E m i] -> E' v m a’ + with actual type ‛[E m i] -> E' v0 m a’ Relevant bindings include liftArray :: arr i a -> E m (forall v. [E m i] -> E' v m a) (bound at simpl017.hs:39:1) a :: arr i a (bound at simpl017.hs:39:11) ix :: [E m i] -> m i (bound at simpl017.hs:41:9) f :: [E m i] -> E' v0 m a (bound at simpl017.hs:43:9) - In the first argument of `return', namely `f' + In the first argument of ‛return’, namely ‛f’ In a stmt of a 'do' block: return f - In the first argument of `E', namely - `(do { let ix :: [E m i] -> m i + In the first argument of ‛E’, namely + ‛(do { let ix :: [E m i] -> m i ix [i] = runE i {-# INLINE f #-} ....; - return f })' + return f })’ simpl017.hs:63:5: - Couldn't match type `forall v. - [E' RValue (ST s) Int] -> E' v (ST s) Int' - with `[E (ST t0) Int] -> E' RValue (ST s) Int' + Couldn't match type ‛forall v. + [E' RValue (ST s) Int] -> E' v (ST s) Int’ + with ‛[E (ST t0) Int] -> E' RValue (ST s) Int’ Expected type: [E (ST t0) Int] -> E (ST s) Int Actual type: forall v. [E (ST s) Int] -> E' v (ST s) Int Relevant bindings include @@ -28,15 +28,15 @@ simpl017.hs:63:5: ma :: STArray s Int Int (bound at simpl017.hs:59:5) a :: forall v. [E (ST s) Int] -> E' v (ST s) Int (bound at simpl017.hs:60:5) - The function `a' is applied to one argument, - but its type `forall v. [E (ST s) Int] -> E' v (ST s) Int' has none - In the first argument of `plus', namely `a [one]' + The function ‛a’ is applied to one argument, + but its type ‛forall v. [E (ST s) Int] -> E' v (ST s) Int’ has none + In the first argument of ‛plus’, namely ‛a [one]’ In a stmt of a 'do' block: a [one] `plus` a [one] simpl017.hs:63:19: - Couldn't match type `forall v. - [E' RValue (ST s) Int] -> E' v (ST s) Int' - with `[E (ST t1) Int] -> E' RValue (ST s) Int' + Couldn't match type ‛forall v. + [E' RValue (ST s) Int] -> E' v (ST s) Int’ + with ‛[E (ST t1) Int] -> E' RValue (ST s) Int’ Expected type: [E (ST t1) Int] -> E (ST s) Int Actual type: forall v. [E (ST s) Int] -> E' v (ST s) Int Relevant bindings include @@ -44,7 +44,7 @@ simpl017.hs:63:19: ma :: STArray s Int Int (bound at simpl017.hs:59:5) a :: forall v. [E (ST s) Int] -> E' v (ST s) Int (bound at simpl017.hs:60:5) - The function `a' is applied to one argument, - but its type `forall v. [E (ST s) Int] -> E' v (ST s) Int' has none - In the second argument of `plus', namely `a [one]' + The function ‛a’ is applied to one argument, + but its type ‛forall v. [E (ST s) Int] -> E' v (ST s) Int’ has none + In the second argument of ‛plus’, namely ‛a [one]’ In a stmt of a 'do' block: a [one] `plus` a [one] diff --git a/tests/simplCore/should_compile/simpl020.stderr b/tests/simplCore/should_compile/simpl020.stderr index cd84c1d2d3719cf34fb58f2d01253d28e99ae5a3..d23a8ddf2358289543bb9ddc6e970664ab7211c9 100644 --- a/tests/simplCore/should_compile/simpl020.stderr +++ b/tests/simplCore/should_compile/simpl020.stderr @@ -1,8 +1,8 @@ -Simpl020_A.hs:25:10: - Warning: No explicit method or default declaration for `toGUIObject' - In the instance declaration for `GUIObject ()' +Simpl020_A.hs:25:10: Warning: + No explicit method or default declaration for ‛toGUIObject’ + In the instance declaration for ‛GUIObject ()’ -Simpl020_A.hs:25:10: - Warning: No explicit method or default declaration for `cset' - In the instance declaration for `GUIObject ()' +Simpl020_A.hs:25:10: Warning: + No explicit method or default declaration for ‛cset’ + In the instance declaration for ‛GUIObject ()’ diff --git a/tests/simplCore/should_compile/spec-inline.stderr b/tests/simplCore/should_compile/spec-inline.stderr index 2cff9e307b9a450a478e21497d8bd3e064a79aa4..b604214c0d7e28393259d24376a5e9f824c62929 100644 --- a/tests/simplCore/should_compile/spec-inline.stderr +++ b/tests/simplCore/should_compile/spec-inline.stderr @@ -1,6 +1,6 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 140, types: 55, coercions: 0} +Result size of Tidy Core = {terms: 156, types: 55, coercions: 0} Roman.foo3 :: GHC.Types.Int [GblId, Str=DmdType b] @@ -11,11 +11,11 @@ Roman.foo3 = Rec { Roman.foo_$s$wgo [Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int# -[GblId, Arity=2, Caf=NoCafRefs, Str=DmdType LL] +[GblId, Arity=2, Caf=NoCafRefs, Str=DmdType <L,U><L,U>] Roman.foo_$s$wgo = \ (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#) -> let { - a [Dmd=Just L] :: GHC.Prim.Int# + a :: GHC.Prim.Int# [LclId, Str=DmdType] a = GHC.Prim.+# @@ -44,7 +44,7 @@ Roman.$wgo -> Data.Maybe.Maybe GHC.Types.Int -> GHC.Prim.Int# [GblId, Arity=2, - Str=DmdType SS, + Str=DmdType <S,U><S,U>, Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 30] 253 0}] @@ -56,7 +56,7 @@ Roman.$wgo = Data.Maybe.Just x -> case x of _ { GHC.Types.I# ipv -> let { - a [Dmd=Just L] :: GHC.Prim.Int# + a :: GHC.Prim.Int# [LclId, Str=DmdType] a = GHC.Prim.+# @@ -92,7 +92,7 @@ Roman.foo_go [InlPrag=INLINE[0]] -> Data.Maybe.Maybe GHC.Types.Int -> GHC.Types.Int [GblId, Arity=2, - Str=DmdType SSm, + Str=DmdType <S,U><S,U>m, Unf=Unf{Src=Worker=Roman.$wgo, TopLvl=True, Arity=2, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) @@ -116,7 +116,7 @@ Roman.foo2 = GHC.Types.I# 6 Roman.foo1 :: Data.Maybe.Maybe GHC.Types.Int [GblId, Caf=NoCafRefs, - Str=DmdType, + Str=DmdType m2, Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] @@ -126,7 +126,7 @@ Roman.foo :: GHC.Types.Int -> GHC.Types.Int [GblId, Arity=1, Caf=NoCafRefs, - Str=DmdType S(A)m, + Str=DmdType <S,U>m, Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) diff --git a/tests/simplCore/should_run/all.T b/tests/simplCore/should_run/all.T index fc59a0ac22b9913d49615423d874606ee4db13d5..fa1dddd7d164a7ce5bcf7c041016294d26d00c7f 100644 --- a/tests/simplCore/should_run/all.T +++ b/tests/simplCore/should_run/all.T @@ -4,7 +4,7 @@ # expected process return value, if not zero # Only compile with optimisation -def f( opts ): +def f( name, opts ): opts.only_ways = ['optasm'] setTestOpts(f) @@ -18,8 +18,8 @@ test('simplrun005', normal, compile_and_run, ['']) test('simplrun007', normal, compile_and_run, ['']) test('simplrun008', normal, compile_and_run, ['']) test('simplrun009', normal, compile_and_run, ['']) -test('simplrun010', composes([extra_run_opts('24 16 8'), - exit_code(1)]) +test('simplrun010', [extra_run_opts('24 16 8 +RTS -M10m -RTS'), + exit_code(251)] , compile_and_run, ['']) # Really we'd like to run T2486 too, to check that its diff --git a/tests/simplCore/should_run/simplrun004.hs b/tests/simplCore/should_run/simplrun004.hs index 16e7566ee2a049705c68c2a2ff17006f22f6ee31..e76274f97106feeb972a9f52b4355e563f4ba275 100644 --- a/tests/simplCore/should_run/simplrun004.hs +++ b/tests/simplCore/should_run/simplrun004.hs @@ -23,7 +23,7 @@ sucW = gen_sucW (\ g x -> map (+x) [fst g..snd g]) f (11,500000) main = print (sum $ sucW 11,sum $ sucW 12) --- Becuase this version uses a case expression, the bug +-- Because this version uses a case expression, the bug -- doesn't happen and execution is much faster gen_sucC grow c g = case c g of check -> \ x -> grow g x >>= \ y -> do guard $ check y; return y diff --git a/tests/simplCore/should_run/simplrun010.hs b/tests/simplCore/should_run/simplrun010.hs index 6cc79f0d026116c497c2657483bb49df19b8074a..eeeb48281f0eba4d9b240322f3517dcd7fdb58ae 100644 --- a/tests/simplCore/should_run/simplrun010.hs +++ b/tests/simplCore/should_run/simplrun010.hs @@ -1,6 +1,8 @@ {-# LANGUAGE ForeignFunctionInterface, MagicHash, UnboxedTuples #-} -- From trac #1947 +-- Should fail with heap exhaustion +-- See notes below with "Infinite loop here". module Main(main) where @@ -244,9 +246,20 @@ f20 v1 v2 = prelude_error (skipCAF realWorld# (str_ "Prelude.read: ambiguous parse")) +-- Infinite loop here. It was originally: +-- f34 v1 v2 v3 = +-- let v336 = f34 v1 v2 v3 +-- in v336 +-- +-- But that now (correctly) just makes a non-allocating infinite loop +-- instead of (incorrectly) eta-reducing to f34 = f34. +-- So I've changed to an infinite, allocating loop, which makes +-- the heap get exhausted. f34 v1 v2 v3 = - let v336 = f34 v1 v2 v3 + if abs v2 < 1000 then + let v336 = f34 (v1+1) (-v2) v3 in v336 + else if v2 == 2000 then 0 else v1 f38 v1 v2 = case v1 of diff --git a/tests/simplCore/should_run/simplrun010.stderr b/tests/simplCore/should_run/simplrun010.stderr index 57647f1f92540b7955d3d0879b07179b727c3f06..a2a586d00a1509c2c2710ef9dbeff1d61087634c 100644 --- a/tests/simplCore/should_run/simplrun010.stderr +++ b/tests/simplCore/should_run/simplrun010.stderr @@ -1 +1,3 @@ -simplrun010: <<loop>> +simplrun010: Heap exhausted; +Current maximum heap size is 10485760 bytes (10 MB); +use `+RTS -M<size>' to increase it. diff --git a/tests/stranal/should_run/T7649.hs b/tests/stranal/should_run/T7649.hs new file mode 100644 index 0000000000000000000000000000000000000000..cbf3d7177f4512861953b6db8ae724c871b2bf1a --- /dev/null +++ b/tests/stranal/should_run/T7649.hs @@ -0,0 +1,32 @@ +{-# LANGUAGE ViewPatterns, BangPatterns #-} +module Main where + +import Control.Exception +main :: IO () +main = do print (f False) + print (f True) + print (g undefined) `catchE` \_ -> putStrLn "g exception" + print (h undefined) `catchE` \_ -> putStrLn "h exception" + print (i undefined) `catchE` \_ -> putStrLn "i exception" + putStrLn "Done" + +catchE :: IO a -> (ErrorCall -> IO a) -> IO a +catchE = catch + +f :: Bool -> String +f (view -> Nothing) = "Got Nothing" +f (view -> Just x) = "Got Just " ++ show x + +g :: Bool -> String +g (view -> x) = "g Got something" + +h :: Bool -> String +h (view -> !x) = "h Got something" + +i :: Bool -> String +i !(view -> x) = "i Got something" + +view :: Bool -> Maybe Int +view False = Nothing +view True = Just 5 + diff --git a/tests/stranal/should_run/T7649.stdout b/tests/stranal/should_run/T7649.stdout new file mode 100644 index 0000000000000000000000000000000000000000..56f7f53b59dc393a5e54e9f324ce55ebcc8277ba --- /dev/null +++ b/tests/stranal/should_run/T7649.stdout @@ -0,0 +1,6 @@ +"Got Nothing" +"Got Just 5" +"g Got something" +h exception +i exception +Done diff --git a/tests/stranal/should_run/all.T b/tests/stranal/should_run/all.T index d94a7c492d387fbb2a995afc6de62add3347e644..0c43aac8c4add6c5897beefb99d885cf2eee91b7 100644 --- a/tests/stranal/should_run/all.T +++ b/tests/stranal/should_run/all.T @@ -6,4 +6,4 @@ test('strun002', exit_code(1), compile_and_run, ['']) test('strun003', normal, compile_and_run, ['']) test('strun004', normal, compile_and_run, ['']) test('T2756b', normal, compile_and_run, ['']) - +test('T7649', normal, compile_and_run, ['']) diff --git a/tests/th/T1849.script b/tests/th/T1849.script new file mode 100644 index 0000000000000000000000000000000000000000..861b8d43d3b6ecf36db2dcfcb670a8ae79ef5c68 --- /dev/null +++ b/tests/th/T1849.script @@ -0,0 +1,10 @@ +:set -XTemplateHaskell +import Language.Haskell.TH +let seeType n = do VarI _ t _ _ <- reify n; runIO $ putStrLn $ show t; [| return True |] +let f = undefined :: Int -> Int +let g = undefined :: [Int] +let h = undefined :: (Int, Int) +$(seeType (mkName "f")) +$(seeType (mkName "g")) +$(seeType (mkName "h")) + diff --git a/tests/th/T1849.stdout b/tests/th/T1849.stdout new file mode 100644 index 0000000000000000000000000000000000000000..3d48e778a51c47da45459813d5ba6d7b2c91a184 --- /dev/null +++ b/tests/th/T1849.stdout @@ -0,0 +1,6 @@ +AppT (AppT ArrowT (ConT GHC.Types.Int)) (ConT GHC.Types.Int) +True +AppT ListT (ConT GHC.Types.Int) +True +AppT (AppT (TupleT 2) (ConT GHC.Types.Int)) (ConT GHC.Types.Int) +True diff --git a/tests/th/2014/A.hs b/tests/th/T2014/A.hs similarity index 100% rename from tests/th/2014/A.hs rename to tests/th/T2014/A.hs diff --git a/tests/th/2014/A.hs-boot b/tests/th/T2014/A.hs-boot similarity index 100% rename from tests/th/2014/A.hs-boot rename to tests/th/T2014/A.hs-boot diff --git a/tests/th/2014/B.hs b/tests/th/T2014/B.hs similarity index 100% rename from tests/th/2014/B.hs rename to tests/th/T2014/B.hs diff --git a/tests/th/2014/C.hs b/tests/th/T2014/C.hs similarity index 100% rename from tests/th/2014/C.hs rename to tests/th/T2014/C.hs diff --git a/tests/th/2014/Makefile b/tests/th/T2014/Makefile similarity index 97% rename from tests/th/2014/Makefile rename to tests/th/T2014/Makefile index eafbcfb7e0bc616fe25942754073d3593e13ffa5..72607a588620f76b637dfd265af9ef968ce4895f 100644 --- a/tests/th/2014/Makefile +++ b/tests/th/T2014/Makefile @@ -2,7 +2,7 @@ TOP=../../.. include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/test.mk -2014 : +T2014 : '$(TEST_HC)' $(TEST_HC_OPTS) -fforce-recomp -c A.hs-boot '$(TEST_HC)' $(TEST_HC_OPTS) -fforce-recomp -c A.hs '$(TEST_HC)' $(TEST_HC_OPTS) -fforce-recomp -c B.hs diff --git a/tests/th/2014/all.T b/tests/th/T2014/all.T similarity index 58% rename from tests/th/2014/all.T rename to tests/th/T2014/all.T index c6792677d9786a75a3a495a37f0036510d3e057a..77709c23c5dbfb426d942f5ca0920746b80ec253 100644 --- a/tests/th/2014/all.T +++ b/tests/th/T2014/all.T @@ -1,8 +1,8 @@ -setTestOpts(if_compiler_profiled(skip)) +setTestOpts(when(compiler_profiled(), skip)) -test('2014', +test('T2014', [req_interp, extra_clean(['A.hi-boot','A.hi','A.o','A.o-boot', 'B.hi', 'B.o', 'C.hi', 'C.o'])], run_command, - ['$MAKE -s --no-print-directory 2014']) + ['$MAKE -s --no-print-directory T2014']) diff --git a/tests/th/T2222.hs b/tests/th/T2222.hs new file mode 100644 index 0000000000000000000000000000000000000000..9a97c0d4d3f3e8bdca73eb9a5814a21f611a1d1c --- /dev/null +++ b/tests/th/T2222.hs @@ -0,0 +1,36 @@ + +{-# LANGUAGE TemplateHaskell #-} +module ReifyPlusTypeInferenceBugs where + +import Language.Haskell.TH +import System.IO + +a = 1 + +b = $(do VarI _ t _ _ <- reify 'a + runIO $ putStrLn ("inside b: " ++ pprint t) + [| undefined |]) + +c = $([| True |]) + +d = $(do VarI _ t _ _ <- reify 'c + runIO $ putStrLn ("inside d: " ++ pprint t) + [| undefined |] ) + +$(do VarI _ t _ _ <- reify 'c + runIO $ putStrLn ("type of c: " ++ pprint t) + return [] ) + +e = $([| True |]) + +f = $(do VarI _ t _ _ <- reify 'e + runIO $ putStrLn ("inside f: " ++ pprint t) + [| undefined |] ) + +$(do VarI _ t _ _ <- reify 'e + runIO $ putStrLn ("type of e: " ++ pprint t) + return [] ) + +$( runIO $ do hFlush stdout + hFlush stderr + return [] ) diff --git a/tests/th/T2222.stderr b/tests/th/T2222.stderr new file mode 100644 index 0000000000000000000000000000000000000000..7d90eb3e949af44b6aac501913f1775ad6b1854b --- /dev/null +++ b/tests/th/T2222.stderr @@ -0,0 +1,5 @@ +inside d: t_0 +inside b: a_0 +type of c: GHC.Types.Bool +inside f: GHC.Types.Bool +type of e: GHC.Types.Bool diff --git a/tests/th/T2597b.stderr b/tests/th/T2597b.stderr index 8881b810449a7bd26c9fda22a6f8b6df409e3a03..a9295ebd5f126253fe24bff5529efa6aab27a06b 100644 --- a/tests/th/T2597b.stderr +++ b/tests/th/T2597b.stderr @@ -3,4 +3,4 @@ T2597b.hs:8:8: Empty stmt list in do-block When splicing a TH expression: do In the expression: $mkBug2 - In an equation for `bug2': bug2 = $mkBug2 + In an equation for ‛bug2’: bug2 = $mkBug2 diff --git a/tests/th/T2674.stderr b/tests/th/T2674.stderr index a69781dfe410420196e8844dbdcb091b393b14c3..6875684dda79b423a59fe463b4a11095a97c2c74 100644 --- a/tests/th/T2674.stderr +++ b/tests/th/T2674.stderr @@ -1,4 +1,4 @@ T2674.hs:9:3: - Function binding for `foo' has no equations + Function binding for ‛foo’ has no equations When splicing a TH declaration: diff --git a/tests/th/T2713.stderr b/tests/th/T2713.stderr index 16f130c65a6987b2095d2cbe9df31060b2c3a35a..c036b438481707b4d6ee1d5f6db714e51448a14a 100644 --- a/tests/th/T2713.stderr +++ b/tests/th/T2713.stderr @@ -1,8 +1,8 @@ T2713.hs:11:10: - The fixity signature for `.*.' lacks an accompanying binding - (The fixity signature must be given where `.*.' is declared) + The fixity signature for ‛.*.’ lacks an accompanying binding + (The fixity signature must be given where ‛.*.’ is declared) T2713.hs:12:1: - The type signature for `f' lacks an accompanying binding - (The type signature must be given where `f' is declared) + The type signature for ‛f’ lacks an accompanying binding + (The type signature must be given where ‛f’ is declared) diff --git a/tests/th/T3177a.stderr b/tests/th/T3177a.stderr index a39419b948f1b55763e3f3887111283c79509ec1..4e9d4dd8fa4d0b73c2965a9c22bde3d2ab6f36de 100644 --- a/tests/th/T3177a.stderr +++ b/tests/th/T3177a.stderr @@ -1,10 +1,10 @@ T3177a.hs:8:15: - `Int' is applied to too many type arguments - In the type `Int Int' + ‛Int’ is applied to too many type arguments + In the type ‛Int Int’ In the Template Haskell quotation [t| Int Int |] - In the first argument of `id', namely `[t| Int Int |]' + In the first argument of ‛id’, namely ‛[t| Int Int |]’ T3177a.hs:11:6: - `Int' is applied to too many type arguments - In the type signature for `g': g :: Int Int + ‛Int’ is applied to too many type arguments + In the type signature for ‛g’: g :: Int Int diff --git a/tests/th/T3395.stderr b/tests/th/T3395.stderr index f85f7cc1da54368937e4ebdf734717a52bf4f780..cd25afe0399f50d7dc9c7ebc7e9854406eaae5be 100644 --- a/tests/th/T3395.stderr +++ b/tests/th/T3395.stderr @@ -5,12 +5,13 @@ T3395.hs:6:9: (It should be an expression.) When splicing a TH expression: [r1 <- undefined | undefined] In the expression: - $(return + $(return $ CompE [NoBindS (VarE $ mkName "undefined"), BindS (VarP $ mkName "r1") (VarE $ mkName "undefined")]) - In an equation for `foo': - foo = $(return + In an equation for ‛foo’: + foo + = $(return $ CompE [NoBindS (VarE $ mkName "undefined"), BindS (VarP $ mkName "r1") (VarE $ mkName "undefined")]) diff --git a/tests/th/T5358.stderr b/tests/th/T5358.stderr index 26c83758d5021248baafc2621d17228d3666f594..bc4138f8a902d1a126e577a81746e510c7c78bb5 100644 --- a/tests/th/T5358.stderr +++ b/tests/th/T5358.stderr @@ -1,43 +1,43 @@ T5358.hs:7:1: - Couldn't match expected type `t1 -> t1' with actual type `Int' - The equation(s) for `t1' have one argument, - but its type `Int' has none + Couldn't match expected type ‛t1 -> t1’ with actual type ‛Int’ + The equation(s) for ‛t1’ have one argument, + but its type ‛Int’ has none T5358.hs:8:1: - Couldn't match expected type `t0 -> t0' with actual type `Int' - The equation(s) for `t2' have one argument, - but its type `Int' has none + Couldn't match expected type ‛t0 -> t0’ with actual type ‛Int’ + The equation(s) for ‛t2’ have one argument, + but its type ‛Int’ has none T5358.hs:10:13: - Couldn't match expected type `t -> a0' with actual type `Int' + Couldn't match expected type ‛t -> a0’ with actual type ‛Int’ Relevant bindings include prop_x1 :: t -> Bool (bound at T5358.hs:10:1) x :: t (bound at T5358.hs:10:9) - The function `t1' is applied to one argument, - but its type `Int' has none - In the first argument of `(==)', namely `t1 x' + The function ‛t1’ is applied to one argument, + but its type ‛Int’ has none + In the first argument of ‛(==)’, namely ‛t1 x’ In the expression: t1 x == t2 x T5358.hs:10:21: - Couldn't match expected type `t -> a0' with actual type `Int' + Couldn't match expected type ‛t -> a0’ with actual type ‛Int’ Relevant bindings include prop_x1 :: t -> Bool (bound at T5358.hs:10:1) x :: t (bound at T5358.hs:10:9) - The function `t2' is applied to one argument, - but its type `Int' has none - In the second argument of `(==)', namely `t2 x' + The function ‛t2’ is applied to one argument, + but its type ‛Int’ has none + In the second argument of ‛(==)’, namely ‛t2 x’ In the expression: t1 x == t2 x T5358.hs:12:15: Exception when trying to run compile-time code: runTest called error: forall t_0 . t_0 -> GHC.Types.Bool - Code: do { VarI _ t _ _ <- reify (mkName "prop_x1"); - ($) error ((++) "runTest called error: " pprint t) } + Code: do { VarI _ t _ _ <- reify (mkName "prop_x1"); + ($) error ((++) "runTest called error: " pprint t) } In the expression: $(do { VarI _ t _ _ <- reify (mkName "prop_x1"); error $ ("runTest called error: " ++ pprint t) }) - In an equation for `runTests': + In an equation for ‛runTests’: runTests = $(do { VarI _ t _ _ <- reify (mkName "prop_x1"); error $ ("runTest called error: " ++ pprint t) }) diff --git a/tests/th/T5795.stderr b/tests/th/T5795.stderr index 5fce537ea6c26e1e42edb53c87080d5d73efeff0..74d6c34941a90f7316486c5b2373e801294bcb4b 100644 --- a/tests/th/T5795.stderr +++ b/tests/th/T5795.stderr @@ -1,7 +1,7 @@ T5795.hs:9:6: GHC stage restriction: - `ty' is used in a top-level splice or annotation, + ‛ty’ is used in a top-level splice or annotation, and must be imported, not defined locally In the expression: ty - In the type signature for `f': f :: $ty + In the type signature for ‛f’: f :: $ty diff --git a/tests/th/T5971.stderr b/tests/th/T5971.stderr index 3a06330a4778ed816090dd82b2c8c6b147ae24cc..9f3f993813ec06c4f24385f35a6d81359a4a42d9 100644 --- a/tests/th/T5971.stderr +++ b/tests/th/T5971.stderr @@ -1,6 +1,6 @@ T5971.hs:6:7: - The exact Name `x' is not in scope + The exact Name ‛x’ is not in scope Probable cause: you used a unique Template Haskell name (NameU), perhaps via newName, but did not bind it If that's it, then -ddump-splices might be useful diff --git a/tests/th/T6114.stderr b/tests/th/T6114.stderr index 253c7c4d672b9663c96761bab9b6399cfd9e1574..e588ada7f3930eceadabf415bd5e991326a28112 100644 --- a/tests/th/T6114.stderr +++ b/tests/th/T6114.stderr @@ -1,6 +1,6 @@ T6114.hs:6:17: - The exact Name `x' is not in scope + The exact Name ‛x’ is not in scope Probable cause: you used a unique Template Haskell name (NameU), perhaps via newName, but did not bind it If that's it, then -ddump-splices might be useful @@ -10,7 +10,7 @@ T6114.hs:6:17: instanceType <- [t| $(varT xName) |]; _ <- reifyInstances ''Eq [instanceType]; .... }) - In an equation for `instanceVar': + In an equation for ‛instanceVar’: instanceVar = $(do { xName <- newName "x"; instanceType <- [t| $(varT xName) |]; diff --git a/tests/th/T7276.stderr b/tests/th/T7276.stderr index aeb36647dc93032fbd5cd2defa3865bdc3dab27b..d1bb7c71feb0d93c494d2b1d6716fc675c45abbf 100644 --- a/tests/th/T7276.stderr +++ b/tests/th/T7276.stderr @@ -1,7 +1,7 @@ T7276.hs:6:8: - Couldn't match type `[Language.Haskell.TH.Syntax.Dec]' - with `Language.Haskell.TH.Syntax.Exp' + Couldn't match type ‛[Language.Haskell.TH.Syntax.Dec]’ + with ‛Language.Haskell.TH.Syntax.Exp’ Expected type: Language.Haskell.TH.Lib.ExpQ Actual type: Language.Haskell.TH.Lib.DecsQ In the Template Haskell quotation [d| y = 3 |] diff --git a/tests/th/T7276a.stdout b/tests/th/T7276a.stdout index 8c4f7afc6426491af39d37cf88f364e057f71ef4..15ece9337298ef31a043fb22bd13a8124003f472 100644 --- a/tests/th/T7276a.stdout +++ b/tests/th/T7276a.stdout @@ -1,21 +1,21 @@ <interactive>:4:9: Warning: - Couldn't match type `[Dec]' with `Exp' + Couldn't match type ‛[Dec]’ with ‛Exp’ Expected type: Q Exp Actual type: DecsQ In the Template Haskell quotation [d| a = () |] In the expression: [d| a = () |] :: Q Exp - In an equation for `x': x = [d| a = () |] :: Q Exp + In an equation for ‛x’: x = [d| a = () |] :: Q Exp <interactive>:1:1: Exception when trying to run compile-time code: <interactive>:4:9: - Couldn't match type `[Dec]' with `Exp' + Couldn't match type ‛[Dec]’ with ‛Exp’ Expected type: Q Exp Actual type: DecsQ In the Template Haskell quotation [d| a = () |] In the expression: [d| a = () |] :: Q Exp - In an equation for `x': x = [d| a = () |] :: Q Exp + In an equation for ‛x’: x = [d| a = () |] :: Q Exp (deferred type error) Code: x In the expression: $x diff --git a/tests/th/T7681.hs b/tests/th/T7681.hs new file mode 100644 index 0000000000000000000000000000000000000000..c7f43e77982440833863ec5f47ebce37c90ca553 --- /dev/null +++ b/tests/th/T7681.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE EmptyCase, TemplateHaskell, LambdaCase #-} + +module T7681 where + +data Void + +foo :: Void -> a +foo x = $( [| case x of {} |] ) + +bar :: Void -> a +bar = $( [| \case {} |] ) + diff --git a/tests/th/TH_1tuple.stderr b/tests/th/TH_1tuple.stderr index cb8889e4ca0ef6c913e06d2e8b382372d420c5ed..309bde5ebfb18a49ec82bcbf79b907d6e0167e8b 100644 --- a/tests/th/TH_1tuple.stderr +++ b/tests/th/TH_1tuple.stderr @@ -3,4 +3,4 @@ TH_1tuple.hs:11:7: Illegal 1-tuple type constructor When splicing a TH expression: 1 :: () In the expression: $(sigE [| 1 |] (tupleT 1)) - In an equation for `y': y = $(sigE [| 1 |] (tupleT 1)) + In an equation for ‛y’: y = $(sigE [| 1 |] (tupleT 1)) diff --git a/tests/th/TH_dupdecl.stderr b/tests/th/TH_dupdecl.stderr index a8628a3de7a5b5fb30242a2bc567dfe595a78bd8..4bd90febade502c927d20c270079b42195f06a23 100644 --- a/tests/th/TH_dupdecl.stderr +++ b/tests/th/TH_dupdecl.stderr @@ -1,5 +1,5 @@ TH_dupdecl.hs:10:4: - Multiple declarations of `x' + Multiple declarations of ‛x’ Declared at: TH_dupdecl.hs:8:4 TH_dupdecl.hs:10:4 diff --git a/tests/th/TH_emptycase.hs b/tests/th/TH_emptycase.hs index d68ca9a8ee24ed30101801079b5ca484ec1f6210..fc75cfe5b011f8ce498ef4e93aa930a16c6c9631 100644 --- a/tests/th/TH_emptycase.hs +++ b/tests/th/TH_emptycase.hs @@ -1,6 +1,6 @@ -{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TemplateHaskell, EmptyCase #-} -- Trac #2431: empty case expression --- currently rejected +-- now accepted module Main where diff --git a/tests/th/TH_emptycase.stderr b/tests/th/TH_emptycase.stderr deleted file mode 100644 index 2de068769bcde5c9dd4b15191cdb49712fa4b965..0000000000000000000000000000000000000000 --- a/tests/th/TH_emptycase.stderr +++ /dev/null @@ -1,6 +0,0 @@ - -TH_emptycase.hs:10:7: - Case expression with no alternatives - When splicing a TH expression: case 'a' of - In the expression: $(caseE (litE $ CharL 'a') []) - In an equation for `f': f = $(caseE (litE $ CharL 'a') []) diff --git a/tests/th/TH_exn1.stderr b/tests/th/TH_exn1.stderr index f5444852453d6fb9f9550a788e3e481482572ae3..63548613d8562204211c189bec810165c357bc30 100644 --- a/tests/th/TH_exn1.stderr +++ b/tests/th/TH_exn1.stderr @@ -3,4 +3,4 @@ TH_exn1.hs:1:1: Exception when trying to run compile-time code: TH_exn1.hs:(9,4)-(10,23): Non-exhaustive patterns in case - Code: case reverse "no" of { [] -> return (GHC.Types.[]) } + Code: case reverse "no" of { [] -> return [] } diff --git a/tests/th/TH_import_loop/TH_import_loop.T b/tests/th/TH_import_loop/TH_import_loop.T index 37059e1d6c513de5860882cdbc5a66cb0ca95999..8a4a180c2817598e4cfc8ed7fe673164d6b6343f 100644 --- a/tests/th/TH_import_loop/TH_import_loop.T +++ b/tests/th/TH_import_loop/TH_import_loop.T @@ -1,5 +1,5 @@ -setTestOpts(if_compiler_profiled(skip)) +setTestOpts(when(compiler_profiled(), skip)) test('TH_import_loop', [extra_clean(['ModuleA.o-boot', 'ModuleA.hi-boot', diff --git a/tests/th/TH_runIO.stderr b/tests/th/TH_runIO.stderr index f7a536a95adcc12839db9809334018a740c4204c..6d7499a3da3a628707e938d1cb13faaa622fcfcc 100644 --- a/tests/th/TH_runIO.stderr +++ b/tests/th/TH_runIO.stderr @@ -2,6 +2,6 @@ TH_runIO.hs:12:9: Exception when trying to run compile-time code: user error (hi) - Code: runIO (fail "hi") + Code: runIO (fail "hi") In the expression: $(runIO (fail "hi")) - In an equation for `foo': foo = $(runIO (fail "hi")) + In an equation for ‛foo’: foo = $(runIO (fail "hi")) diff --git a/tests/th/TH_spliceD1.stderr b/tests/th/TH_spliceD1.stderr index d54ef19b88e93a8e7866c7db42b49268e1cebd79..2a93bb4f5a660258ffea1da6e05deb5ebbdfef7a 100644 --- a/tests/th/TH_spliceD1.stderr +++ b/tests/th/TH_spliceD1.stderr @@ -1,6 +1,6 @@ TH_spliceD1.hs:10:3: - Conflicting definitions for `c' + Conflicting definitions for ‛c’ Bound at: TH_spliceD1.hs:10:3-5 TH_spliceD1.hs:10:3-5 - In an equation for `f' + In an equation for ‛f’ diff --git a/tests/th/TH_spliceViewPat/test.T b/tests/th/TH_spliceViewPat/test.T index c93e1cb3a731306726475c91f59017c150576a79..23b4f6a1b13271877aedb0d9a846f9d998b0318d 100644 --- a/tests/th/TH_spliceViewPat/test.T +++ b/tests/th/TH_spliceViewPat/test.T @@ -1,4 +1,4 @@ -def f(opts): +def f(name, opts): opts.extra_hc_opts = '-XTemplateHaskell -package template-haskell' if (ghc_with_interpreter == 0): opts.skip = 1 @@ -6,7 +6,7 @@ def f(opts): setTestOpts(f) setTestOpts(only_compiler_types(['ghc'])) setTestOpts(only_ways(['normal','ghci'])) -setTestOpts(if_compiler_profiled(skip)) +setTestOpts(when(compiler_profiled(), skip)) test('TH_spliceViewPat', extra_clean(['Main.o', 'Main.hi', 'A.o', 'A.hi']), diff --git a/tests/th/TH_unresolvedInfix2.stderr b/tests/th/TH_unresolvedInfix2.stderr index a23cd4ae919d1eff422e2bf334840c248308a8e2..fab508a331313f94f5b6407c1dd10d7d5d2d1317 100644 --- a/tests/th/TH_unresolvedInfix2.stderr +++ b/tests/th/TH_unresolvedInfix2.stderr @@ -1,9 +1,9 @@ TH_unresolvedInfix2.hs:12:11: - The operator `:+' [infixl 6] of a section + The operator ‛:+’ [infixl 6] of a section must have lower precedence than that of the operand, - namely `:+' [infixl 6] - in the section: `:+ N :+ N' + namely ‛:+’ [infixl 6] + in the section: ‛:+ N :+ N’ In the result of the splice: $(let plus = conE ':+ @@ -15,7 +15,7 @@ TH_unresolvedInfix2.hs:12:11: plus = conE ... n = conE ... in infixE Nothing plus (Just $ uInfixE n plus n)) - In an equation for `expr': + In an equation for ‛expr’: expr = $(let plus = ... diff --git a/tests/th/all.T b/tests/th/all.T index 21464d2bbd45453dd6a5ba7e4c08b890d4c189c0..fa185aa4ca0867d46716bb8640a90316ea426ca5 100644 --- a/tests/th/all.T +++ b/tests/th/all.T @@ -1,9 +1,9 @@ # This test needs to come before the setTestOpts calls below, as we want -# to run it !if_compiler_profiled -test('T4255', unless_compiler_profiled(skip), compile_fail, ['-v0']) +# to run it if !compiler_profiled +test('T4255', unless(compiler_profiled(), skip), compile_fail, ['-v0']) -def f(opts): +def f(name, opts): opts.extra_hc_opts = '-XTemplateHaskell -package template-haskell' if (ghc_with_interpreter == 0): opts.skip = 1 @@ -11,7 +11,7 @@ def f(opts): setTestOpts(f) setTestOpts(only_compiler_types(['ghc'])) setTestOpts(only_ways(['normal','ghci'])) -setTestOpts(if_compiler_profiled(skip)) +setTestOpts(when(compiler_profiled(), skip)) test('TH_mkName', normal, compile, ['-v0']) test('TH_1tuple', normal, compile_fail, ['-v0']) @@ -138,7 +138,7 @@ test('T2817', normal, compile, ['-v0']) test('T2713', normal, compile_fail, ['-v0']) test('T2674', normal, compile_fail, ['-v0']) test('T2931', normal, compile, ['-v0']) -test('TH_emptycase', normal, compile_fail, ['-v0']) +test('TH_emptycase', normal, compile, ['-v0']) test('T2386', extra_clean(['T2386_Lib.hi', 'T2386_Lib.o']), run_command, @@ -267,3 +267,6 @@ test('T7532', extra_clean(['T7532a.hi', 'T7532a.o']), multimod_compile, ['T7532', '-v0']) +test('T2222', normal, compile, ['-v0']) +test('T1849', normal, ghci_script, ['T1849.script']) +test('T7681', normal, compile, ['-v0']) \ No newline at end of file diff --git a/tests/typecheck/bug1465/bug1465.stderr b/tests/typecheck/bug1465/bug1465.stderr index 47a4d0c616438a399621a4ffec5bc943fdf9c06a..3108183be2569cefee29cb2a890b22aad739adb7 100644 --- a/tests/typecheck/bug1465/bug1465.stderr +++ b/tests/typecheck/bug1465/bug1465.stderr @@ -1,7 +1,7 @@ C.hs:6:11: - Couldn't match expected type `bug1465-1.0:A.T' - with actual type `A.T' + Couldn't match expected type ‛bug1465-1.0:A.T’ + with actual type ‛A.T’ In the expression: B2.f In the expression: [B1.f, B2.f] - In an equation for `x': x = [B1.f, B2.f] + In an equation for ‛x’: x = [B1.f, B2.f] diff --git a/tests/typecheck/prog001/test.T b/tests/typecheck/prog001/test.T index 09bb3f0f30783c4afce4a3c3195bc5ff71385741..1f0d67cbaecd17dd058537262fbdff29c9765f97 100644 --- a/tests/typecheck/prog001/test.T +++ b/tests/typecheck/prog001/test.T @@ -1,6 +1,6 @@ test('typecheck.prog001', - [skip_if_fast, + [when(fast(), skip), extra_clean(['A.hi', 'A.o', 'B.hi', 'B.o', 'C.hi', 'C.o'])], multimod_compile, ['C', '-v0']) diff --git a/tests/typecheck/prog001/typecheck.prog001.stderr-ghc b/tests/typecheck/prog001/typecheck.prog001.stderr-ghc index 17d8e2cf849ff98a587198848f45ca27714c52b0..4652417ce624c3ee60ad58cec9f1ff3ec0863721 100644 --- a/tests/typecheck/prog001/typecheck.prog001.stderr-ghc +++ b/tests/typecheck/prog001/typecheck.prog001.stderr-ghc @@ -1,5 +1,4 @@ -B.hs:7:10: - Warning: No explicit method or default declaration for `row' - In the instance declaration for `Matrix Bool Val' - +B.hs:7:10: Warning: + No explicit method or default declaration for ‛row’ + In the instance declaration for ‛Matrix Bool Val’ diff --git a/tests/typecheck/prog002/test.T b/tests/typecheck/prog002/test.T index 24625bad04b0e912598ea928256e6a11f03ccddf..adac6d5022be718d980a07d6316eb3ed17517f1d 100644 --- a/tests/typecheck/prog002/test.T +++ b/tests/typecheck/prog002/test.T @@ -1,7 +1,7 @@ setTestOpts(only_compiler_types(['ghc'])) test('typecheck.prog002', - [skip_if_fast, + [when(fast(), skip), extra_clean(['A.hi', 'A.o', 'B.hi', 'B.o'])], multimod_compile, ['B', '-v0']) diff --git a/tests/typecheck/should_compile/FD1.stderr b/tests/typecheck/should_compile/FD1.stderr index fdeb30e42dd70eb78a0bfaabafc5ac9f9ea151ec..5fa16fdf1506c0fa0ef99bf5c276dd0f0514c7fd 100644 --- a/tests/typecheck/should_compile/FD1.stderr +++ b/tests/typecheck/should_compile/FD1.stderr @@ -5,9 +5,9 @@ FD1.hs:16:1: bound by the type signature for plus :: E a (Int -> Int) => Int -> a at FD1.hs:15:9-38 - `a' is a rigid type variable bound by + ‛a’ is a rigid type variable bound by the type signature for plus :: E a (Int -> Int) => Int -> a at FD1.hs:15:9 Relevant bindings include plus :: Int -> a (bound at FD1.hs:16:1) - The equation(s) for `plus' have two arguments, - but its type `Int -> a' has only one + The equation(s) for ‛plus’ have two arguments, + but its type ‛Int -> a’ has only one diff --git a/tests/typecheck/should_compile/FD2.stderr b/tests/typecheck/should_compile/FD2.stderr index 8822c1ccb22395acccfe9aab008e237bc762f927..c98c9cf4804024245c01a64576e521cf6a9b1af1 100644 --- a/tests/typecheck/should_compile/FD2.stderr +++ b/tests/typecheck/should_compile/FD2.stderr @@ -2,7 +2,7 @@ FD2.hs:26:34: Could not deduce (e ~ e1) from the context (Foldable a) - bound by the class declaration for `Foldable' + bound by the class declaration for ‛Foldable’ at FD2.hs:(17,1)-(26,39) or from (Elem a e) bound by the type signature for @@ -12,11 +12,11 @@ FD2.hs:26:34: bound by the type signature for mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1 at FD2.hs:24:18-54 - `e' is a rigid type variable bound by + ‛e’ is a rigid type variable bound by the type signature for foldr1 :: Elem a e => (e -> e -> e) -> a -> e at FD2.hs:21:13 - `e1' is a rigid type variable bound by + ‛e1’ is a rigid type variable bound by the type signature for mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1 at FD2.hs:24:18 @@ -26,6 +26,6 @@ FD2.hs:26:34: mf :: e1 -> Maybe e1 -> Maybe e1 (bound at FD2.hs:25:12) x :: e1 (bound at FD2.hs:26:15) y :: e1 (bound at FD2.hs:26:23) - In the return type of a call of `f' - In the first argument of `Just', namely `(f x y)' + In the return type of a call of ‛f’ + In the first argument of ‛Just’, namely ‛(f x y)’ In the expression: Just (f x y) diff --git a/tests/typecheck/should_compile/FD3.stderr b/tests/typecheck/should_compile/FD3.stderr index ad849e6b0f6f65d2238ce5bb10811ce941504b39..9c0a11c36ca71c6040e3e3b7983193635b6960cc 100644 --- a/tests/typecheck/should_compile/FD3.stderr +++ b/tests/typecheck/should_compile/FD3.stderr @@ -1,7 +1,7 @@ FD3.hs:15:15: - Couldn't match type `a' with `(String, a)' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛(String, a)’ + ‛a’ is a rigid type variable bound by the type signature for translate :: (String, a) -> A a at FD3.hs:14:14 Relevant bindings include @@ -9,8 +9,8 @@ FD3.hs:15:15: a :: (String, a) (bound at FD3.hs:15:11) When using functional dependencies to combine MkA a a, - arising from the dependency `a -> b' + arising from the dependency ‛a -> b’ in the instance declaration at FD3.hs:12:10 - MkA (String, a) a, arising from a use of `mkA' at FD3.hs:15:15-17 + MkA (String, a) a, arising from a use of ‛mkA’ at FD3.hs:15:15-17 In the expression: mkA a - In an equation for `translate': translate a = mkA a + In an equation for ‛translate’: translate a = mkA a diff --git a/tests/typecheck/should_compile/T2433.hs b/tests/typecheck/should_compile/T2433.hs index 345c961029ef1b139891a740359ac0e380cd7f2a..727ec6bb9b4a0afe6777837cf27ca983a2b2aca9 100644 --- a/tests/typecheck/should_compile/T2433.hs +++ b/tests/typecheck/should_compile/T2433.hs @@ -5,7 +5,7 @@ module T2433 where - import Data.Typeable(Typeable1) + import Data.Typeable(Typeable) import T2433_Help( T ) - deriving instance Typeable1 T + deriving instance Typeable T diff --git a/tests/typecheck/should_compile/T2494.stderr b/tests/typecheck/should_compile/T2494.stderr index bbb8d0c94618eaa98e762b65be446529292b80d5..68b8dd4be12f59f438278e2571c102ca53040894 100644 --- a/tests/typecheck/should_compile/T2494.stderr +++ b/tests/typecheck/should_compile/T2494.stderr @@ -1,9 +1,9 @@ T2494.hs:15:14: - Couldn't match type `a' with `b' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛b’ + ‛a’ is a rigid type variable bound by the RULE "foo/foo" at T2494.hs:13:16 - `b' is a rigid type variable bound by + ‛b’ is a rigid type variable bound by the RULE "foo/foo" at T2494.hs:14:16 Expected type: Maybe (m a) -> Maybe (m a) Actual type: Maybe (m b) -> Maybe (m b) @@ -13,15 +13,15 @@ T2494.hs:15:14: (bound at T2494.hs:14:11) f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a) (bound at T2494.hs:13:11) - In the first argument of `foo', namely `g' - In the second argument of `foo', namely `(foo g x)' + In the first argument of ‛foo’, namely ‛g’ + In the second argument of ‛foo’, namely ‛(foo g x)’ In the expression: foo f (foo g x) T2494.hs:15:30: - Couldn't match type `a' with `b' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛b’ + ‛a’ is a rigid type variable bound by the RULE "foo/foo" at T2494.hs:13:16 - `b' is a rigid type variable bound by + ‛b’ is a rigid type variable bound by the RULE "foo/foo" at T2494.hs:14:16 Expected type: Maybe (m a) -> Maybe (m a) Actual type: Maybe (m b) -> Maybe (m b) @@ -31,6 +31,6 @@ T2494.hs:15:30: (bound at T2494.hs:14:11) f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a) (bound at T2494.hs:13:11) - In the second argument of `(.)', namely `g' - In the first argument of `foo', namely `(f . g)' + In the second argument of ‛(.)’, namely ‛g’ + In the first argument of ‛foo’, namely ‛(f . g)’ In the expression: foo (f . g) x diff --git a/tests/typecheck/should_compile/T2497.stderr b/tests/typecheck/should_compile/T2497.stderr index de6ca484b5b80d30c4c97e1c5ac85ca6b7f630b2..7ee9bee08e883aeccfec1c3c3b9df1e7ec6107f7 100644 --- a/tests/typecheck/should_compile/T2497.stderr +++ b/tests/typecheck/should_compile/T2497.stderr @@ -1,2 +1,2 @@ -T2497.hs:18:1: Warning: Defined but not used: `beq' +T2497.hs:18:1: Warning: Defined but not used: ‛beq’ diff --git a/tests/typecheck/should_compile/T5481.stderr b/tests/typecheck/should_compile/T5481.stderr index c88aecbca630913be9d2491db9400b56446f7ce1..931c3e04202b5d582d0de71a7b0e3914af54e40d 100644 --- a/tests/typecheck/should_compile/T5481.stderr +++ b/tests/typecheck/should_compile/T5481.stderr @@ -1,8 +1,8 @@ T5481.hs:6:10: - The RHS of an associated type declaration mentions type variable `b' + The RHS of an associated type declaration mentions type variable ‛b’ All such variables must be bound on the LHS T5481.hs:8:10: - The RHS of an associated type declaration mentions type variable `a' + The RHS of an associated type declaration mentions type variable ‛a’ All such variables must be bound on the LHS diff --git a/tests/typecheck/should_compile/T6055.hs b/tests/typecheck/should_compile/T6055.hs index beede5513900b95440b66b4b06e166da2d15173c..dcc39d1618ff58671f2c7b6d5261da2d2545fa50 100644 --- a/tests/typecheck/should_compile/T6055.hs +++ b/tests/typecheck/should_compile/T6055.hs @@ -21,7 +21,7 @@ class Add' x y z | x y -> z instance Succ y z => Add' D1 y z -class (Add' x y z) => Add x y z +class (Add' x y z) => Add x y z | x y -> z instance (Add' D1 y z) => Add D1 y z diff --git a/tests/typecheck/should_compile/T7050.stderr b/tests/typecheck/should_compile/T7050.stderr index e7330ce4f5e9ae3db5e53c08c6ddde94073af564..860c90757fb4255f5649321dd16dbe8ddf1640b2 100644 --- a/tests/typecheck/should_compile/T7050.stderr +++ b/tests/typecheck/should_compile/T7050.stderr @@ -1,5 +1,5 @@ T7050.hs:3:14: Warning: - Ignoring unusable UNPACK pragma on the first argument of `Foo' - In the definition of data constructor `Foo' - In the data declaration for `Foo' + Ignoring unusable UNPACK pragma on the first argument of ‛Foo’ + In the definition of data constructor ‛Foo’ + In the data declaration for ‛Foo’ diff --git a/tests/typecheck/should_compile/T7562.hs b/tests/typecheck/should_compile/T7562.hs new file mode 100644 index 0000000000000000000000000000000000000000..40634e27944ec0eeca41098a328eac566526e937 --- /dev/null +++ b/tests/typecheck/should_compile/T7562.hs @@ -0,0 +1,3 @@ +module T7562 where + +data Pair2 = Pair2 {-# UNPACK #-} Int diff --git a/tests/typecheck/should_compile/T7562.stderr b/tests/typecheck/should_compile/T7562.stderr new file mode 100644 index 0000000000000000000000000000000000000000..36f1de5780d73f0797d53c9fb49deb0d30b5e465 --- /dev/null +++ b/tests/typecheck/should_compile/T7562.stderr @@ -0,0 +1,5 @@ + +T7562.hs:3:14: Warning: + UNPACK pragma lacks '!' on the first argument of ‛Pair2’ + In the definition of data constructor ‛Pair2’ + In the data declaration for ‛Pair2’ diff --git a/tests/typecheck/should_compile/all.T b/tests/typecheck/should_compile/all.T index ab5dccf4291725aba759ed5ec1986931ca819a1a..6d7d621543e94b2ccdaa4e1cf3877f08830ffde3 100644 --- a/tests/typecheck/should_compile/all.T +++ b/tests/typecheck/should_compile/all.T @@ -1,6 +1,6 @@ # Args to vtc are: extra compile flags -def f( opts ): +def f( name, opts ): opts.extra_hc_opts = '-fno-warn-incomplete-patterns' setTestOpts(f) @@ -84,7 +84,7 @@ test('tc079', normal, compile, ['']) test('tc080', normal, compile, ['']) test('tc081', normal, compile, ['']) test('tc082', normal, compile, ['']) -test('tc084', if_compiler_type('hugs', expect_fail), compile, ['']) +test('tc084', when(compiler_type('hugs'), expect_fail), compile, ['']) test('tc085', only_compiler_types(['ghc']), compile, ['']) test('tc086', normal, compile, ['']) test('tc087', normal, compile, ['']) @@ -96,7 +96,7 @@ test('tc092', normal, compile, ['']) test('tc093', normal, compile, ['']) test('tc094', normal, compile, ['']) test('tc095', normal, compile, ['']) -test('tc096', if_compiler_type('hugs', expect_fail), compile, ['']) +test('tc096', when(compiler_type('hugs'), expect_fail), compile, ['']) test('tc097', normal, compile, ['']) test('tc098', normal, compile, ['']) test('tc099', normal, compile, ['']) @@ -380,7 +380,7 @@ test('T6055', normal, compile, ['']) test('DfltProb1', normal, compile, ['']) test('DfltProb2', normal, compile, ['']) test('T6134', normal, compile, ['']) -test('TcLambdaCase', if_compiler_lt('ghc', '7.5', skip), compile, ['']) +test('TcLambdaCase', when(compiler_lt('ghc', '7.5'), skip), compile, ['']) test('T7147', normal, compile, ['']) test('T7171',normal,run_command, ['$MAKE -s --no-print-directory T7171']) @@ -396,6 +396,7 @@ test('holes3', normal, compile_fail, ['']) test('T7408', normal, compile, ['']) test('UnboxStrictPrimitiveFields', normal, compile, ['']) test('T7541', normal, compile, ['']) +test('T7562', normal, compile, ['']) test('TypeNatBasics', normal, compile, ['']) test('TypeNatAC', normal, compile, ['']) test('TypeNatVec', normal, compile, ['']) diff --git a/tests/typecheck/should_compile/holes.hs b/tests/typecheck/should_compile/holes.hs index fa5a892aa5cc6a767fdc033e9747214bf4dde5e3..eee68bcfd6d83d8f8c338fe73b637902084d9bdf 100644 --- a/tests/typecheck/should_compile/holes.hs +++ b/tests/typecheck/should_compile/holes.hs @@ -1,8 +1,6 @@ {-# LANGUAGE TypeHoles #-} -module Main where - -main = return () +module Holes where f = _ diff --git a/tests/typecheck/should_compile/holes.stderr b/tests/typecheck/should_compile/holes.stderr index 626230fbf0f0ac91db52c72c71b13ccf12079f5c..6f00061cbd4e8c58eb8a4132e9d1546542ae9f60 100644 --- a/tests/typecheck/should_compile/holes.stderr +++ b/tests/typecheck/should_compile/holes.stderr @@ -1,26 +1,26 @@ -holes.hs:7:5: Warning: - Found hole `_' with type t - Where: `t' is a rigid type variable bound by - the inferred type of f :: t at holes.hs:7:1 - Relevant bindings include f :: t (bound at holes.hs:7:1) +holes.hs:5:5: Warning: + Found hole ‛_’ with type: t + Where: ‛t’ is a rigid type variable bound by + the inferred type of f :: t at holes.hs:5:1 + Relevant bindings include f :: t (bound at holes.hs:5:1) In the expression: _ - In an equation for `f': f = _ + In an equation for ‛f’: f = _ -holes.hs:10:7: Warning: - Found hole `_' with type Char +holes.hs:8:7: Warning: + Found hole ‛_’ with type: Char In the expression: _ - In an equation for `g': g x = _ + In an equation for ‛g’: g x = _ -holes.hs:12:5: Warning: - Found hole `_' with type [Char] - In the first argument of `(++)', namely `_' +holes.hs:10:5: Warning: + Found hole ‛_’ with type: [Char] + In the first argument of ‛(++)’, namely ‛_’ In the expression: _ ++ "a" - In an equation for `h': h = _ ++ "a" + In an equation for ‛h’: h = _ ++ "a" -holes.hs:15:15: Warning: - Found hole `_' with type b0 - Where: `b0' is an ambiguous type variable - In the second argument of `const', namely `_' +holes.hs:13:15: Warning: + Found hole ‛_’ with type: b0 + Where: ‛b0’ is an ambiguous type variable + In the second argument of ‛const’, namely ‛_’ In the expression: const y _ - In an equation for `z': z y = const y _ + In an equation for ‛z’: z y = const y _ diff --git a/tests/typecheck/should_compile/holes2.hs b/tests/typecheck/should_compile/holes2.hs index 56614c7ec7e6192c544c6c25f8c471b52ce5e5a0..7b909d94b98b4ba858f519a84d72c6e3eaa3ecb7 100644 --- a/tests/typecheck/should_compile/holes2.hs +++ b/tests/typecheck/should_compile/holes2.hs @@ -1,7 +1,5 @@ {-# LANGUAGE TypeHoles #-} -module Main where - -main = return () +module Holes2 where f = show _ diff --git a/tests/typecheck/should_compile/holes2.stderr b/tests/typecheck/should_compile/holes2.stderr index 13604264e1462fa4fdfa5ef18282784f7bcd7ec6..5ceb46e05fe471105b09e1db8a46b175b497062f 100644 --- a/tests/typecheck/should_compile/holes2.stderr +++ b/tests/typecheck/should_compile/holes2.stderr @@ -1,19 +1,19 @@ - -holes2.hs:7:5: Warning: - No instance for (Show a0) arising from a use of `show' - The type variable `a0' is ambiguous - Note: there are several potential instances: - instance Show Double -- Defined in `GHC.Float' - instance Show Float -- Defined in `GHC.Float' - instance (Integral a, Show a) => Show (GHC.Real.Ratio a) - -- Defined in `GHC.Real' - ...plus 23 others - In the expression: show _ - In an equation for `f': f = show _ - -holes2.hs:7:10: Warning: - Found hole `_' with type a0 - Where: `a0' is an ambiguous type variable - In the first argument of `show', namely `_' - In the expression: show _ - In an equation for `f': f = show _ + +holes2.hs:5:5: Warning: + No instance for (Show a0) arising from a use of ‛show’ + The type variable ‛a0’ is ambiguous + Note: there are several potential instances: + instance Show Double -- Defined in ‛GHC.Float’ + instance Show Float -- Defined in ‛GHC.Float’ + instance (Integral a, Show a) => Show (GHC.Real.Ratio a) + -- Defined in ‛GHC.Real’ + ...plus 23 others + In the expression: show _ + In an equation for ‛f’: f = show _ + +holes2.hs:5:10: Warning: + Found hole ‛_’ with type: a0 + Where: ‛a0’ is an ambiguous type variable + In the first argument of ‛show’, namely ‛_’ + In the expression: show _ + In an equation for ‛f’: f = show _ diff --git a/tests/typecheck/should_compile/holes3.hs b/tests/typecheck/should_compile/holes3.hs index fa5a892aa5cc6a767fdc033e9747214bf4dde5e3..802133b649eb323bd542f6311cd8cf8eb4f62379 100644 --- a/tests/typecheck/should_compile/holes3.hs +++ b/tests/typecheck/should_compile/holes3.hs @@ -1,15 +1,13 @@ {-# LANGUAGE TypeHoles #-} -module Main where - -main = return () +module Holes3 where f = _ g :: Int -> Char -g x = _ +g x = _gr -h = _ ++ "a" +h = _aa ++ "a" z :: [a] -> [a] -z y = const y _ +z y = const y _x diff --git a/tests/typecheck/should_compile/holes3.stderr b/tests/typecheck/should_compile/holes3.stderr index 3bdba50f7ed64ca519d84e745fc055e206232399..a945e5e25157266553101c9e684150e18e5885ba 100644 --- a/tests/typecheck/should_compile/holes3.stderr +++ b/tests/typecheck/should_compile/holes3.stderr @@ -1,26 +1,26 @@ -holes3.hs:7:5: - Found hole `_' with type t - Where: `t' is a rigid type variable bound by - the inferred type of f :: t at holes3.hs:7:1 - Relevant bindings include f :: t (bound at holes3.hs:7:1) +holes3.hs:5:5: + Found hole ‛_’ with type: t + Where: ‛t’ is a rigid type variable bound by + the inferred type of f :: t at holes3.hs:5:1 + Relevant bindings include f :: t (bound at holes3.hs:5:1) In the expression: _ - In an equation for `f': f = _ + In an equation for ‛f’: f = _ -holes3.hs:10:7: - Found hole `_' with type Char - In the expression: _ - In an equation for `g': g x = _ +holes3.hs:8:7: + Found hole ‛_gr’ with type: Char + In the expression: _gr + In an equation for ‛g’: g x = _gr -holes3.hs:12:5: - Found hole `_' with type [Char] - In the first argument of `(++)', namely `_' - In the expression: _ ++ "a" - In an equation for `h': h = _ ++ "a" +holes3.hs:10:5: + Found hole ‛_aa’ with type: [Char] + In the first argument of ‛(++)’, namely ‛_aa’ + In the expression: _aa ++ "a" + In an equation for ‛h’: h = _aa ++ "a" -holes3.hs:15:15: - Found hole `_' with type b0 - Where: `b0' is an ambiguous type variable - In the second argument of `const', namely `_' - In the expression: const y _ - In an equation for `z': z y = const y _ +holes3.hs:13:15: + Found hole ‛_x’ with type: b0 + Where: ‛b0’ is an ambiguous type variable + In the second argument of ‛const’, namely ‛_x’ + In the expression: const y _x + In an equation for ‛z’: z y = const y _x diff --git a/tests/typecheck/should_compile/tc056.stderr b/tests/typecheck/should_compile/tc056.stderr index 786c88e8043405ac0229ae5d0c4b708fe3692b6e..c05f9b3bc2db48f4856d6df2b4248d9a3652e3b9 100644 --- a/tests/typecheck/should_compile/tc056.stderr +++ b/tests/typecheck/should_compile/tc056.stderr @@ -1,6 +1,6 @@ -tc056.hs:16:10: - Warning: Duplicate constraint(s): Eq' a +tc056.hs:16:10: Warning: + Duplicate constraint(s): Eq' a In the context: (Eq' a, Eq' a) While checking an instance declaration - In the instance declaration for `Eq' [a]' + In the instance declaration for ‛Eq' [a]’ diff --git a/tests/typecheck/should_compile/tc115.stderr-ghc b/tests/typecheck/should_compile/tc115.stderr-ghc index 8b3997deb5c37d247438b892d6e1397846c7a53b..26c37479352d9057e4ba8b543a679b44a187eaf0 100644 --- a/tests/typecheck/should_compile/tc115.stderr-ghc +++ b/tests/typecheck/should_compile/tc115.stderr-ghc @@ -1,4 +1,4 @@ -tc115.hs:12:10: - Warning: No explicit method or default declaration for `foo' - In the instance declaration for `Foo [m a] (m a)' +tc115.hs:12:10: Warning: + No explicit method or default declaration for ‛foo’ + In the instance declaration for ‛Foo [m a] (m a)’ diff --git a/tests/typecheck/should_compile/tc116.stderr-ghc b/tests/typecheck/should_compile/tc116.stderr-ghc index 5593928d28d73a24d360f7ee76238f6cdfdc9c1e..cb1856bfccf04f8da9c48c6410b080c79bee7149 100644 --- a/tests/typecheck/should_compile/tc116.stderr-ghc +++ b/tests/typecheck/should_compile/tc116.stderr-ghc @@ -1,4 +1,4 @@ -tc116.hs:12:10: - Warning: No explicit method or default declaration for `foo' - In the instance declaration for `Foo [m a] (m a)' +tc116.hs:12:10: Warning: + No explicit method or default declaration for ‛foo’ + In the instance declaration for ‛Foo [m a] (m a)’ diff --git a/tests/typecheck/should_compile/tc125.stderr-ghc b/tests/typecheck/should_compile/tc125.stderr-ghc index 2a2de4283d3a67575436774b06d1c01eb5ed5f9c..0bbaf442d533bf15440aecd6044922da4bd44b39 100644 --- a/tests/typecheck/should_compile/tc125.stderr-ghc +++ b/tests/typecheck/should_compile/tc125.stderr-ghc @@ -1,20 +1,20 @@ -tc125.hs:16:10: - Warning: No explicit method or default declaration for `add' - In the instance declaration for `Add Z a a' +tc125.hs:16:10: Warning: + No explicit method or default declaration for ‛add’ + In the instance declaration for ‛Add Z a a’ -tc125.hs:17:10: - Warning: No explicit method or default declaration for `add' - In the instance declaration for `Add (S a) b (S c)' +tc125.hs:17:10: Warning: + No explicit method or default declaration for ‛add’ + In the instance declaration for ‛Add (S a) b (S c)’ -tc125.hs:21:10: - Warning: No explicit method or default declaration for `mul' - In the instance declaration for `Mul Z a Z' +tc125.hs:21:10: Warning: + No explicit method or default declaration for ‛mul’ + In the instance declaration for ‛Mul Z a Z’ -tc125.hs:22:10: - Warning: No explicit method or default declaration for `mul' - In the instance declaration for `Mul (S a) b d' +tc125.hs:22:10: Warning: + No explicit method or default declaration for ‛mul’ + In the instance declaration for ‛Mul (S a) b d’ -tc125.hs:29:10: - Warning: No explicit method or default declaration for `add' - In the instance declaration for `Add (Q a b) (Q c d) (Q ad_bc bd)' +tc125.hs:29:10: Warning: + No explicit method or default declaration for ‛add’ + In the instance declaration for ‛Add (Q a b) (Q c d) (Q ad_bc bd)’ diff --git a/tests/typecheck/should_compile/tc126.stderr-ghc b/tests/typecheck/should_compile/tc126.stderr-ghc index ee49f159f4f709583a4bee5968e926aed5d992ed..c4c41ea4739cd8ce7eb3bea902f172b28143d710 100644 --- a/tests/typecheck/should_compile/tc126.stderr-ghc +++ b/tests/typecheck/should_compile/tc126.stderr-ghc @@ -1,8 +1,8 @@ -tc126.hs:15:25: - Warning: No explicit method or default declaration for `bug' - In the instance declaration for `Bug (Int -> r) Int r' +tc126.hs:15:25: Warning: + No explicit method or default declaration for ‛bug’ + In the instance declaration for ‛Bug (Int -> r) Int r’ -tc126.hs:16:10: - Warning: No explicit method or default declaration for `bug' - In the instance declaration for `Bug f (c a) (c r)' +tc126.hs:16:10: Warning: + No explicit method or default declaration for ‛bug’ + In the instance declaration for ‛Bug f (c a) (c r)’ diff --git a/tests/typecheck/should_compile/tc141.stderr b/tests/typecheck/should_compile/tc141.stderr index e7d7f7cb1c54c676f39c041726d3efbe0b51f190..55aac9e9430260b89f0773137ecc0bd01341fb1f 100644 --- a/tests/typecheck/should_compile/tc141.stderr +++ b/tests/typecheck/should_compile/tc141.stderr @@ -1,14 +1,14 @@ tc141.hs:11:12: - You cannot bind scoped type variable `a' + You cannot bind scoped type variable ‛a’ in a pattern binding signature In the pattern: p :: a In the pattern: (p :: a, q :: a) In a pattern binding: (p :: a, q :: a) = x tc141.hs:11:31: - Couldn't match expected type `a1' with actual type `a' - because type variable `a1' would escape its scope + Couldn't match expected type ‛a1’ with actual type ‛a’ + because type variable ‛a1’ would escape its scope This (rigid, skolem) type variable is bound by an expression type signature: a1 at tc141.hs:11:31-34 @@ -22,7 +22,7 @@ tc141.hs:11:31: In the expression: let (p :: a, q :: a) = x in (q :: a, p) tc141.hs:13:13: - You cannot bind scoped type variable `a' + You cannot bind scoped type variable ‛a’ in a pattern binding signature In the pattern: y :: a In a pattern binding: y :: a = a @@ -34,8 +34,8 @@ tc141.hs:13:13: in v tc141.hs:15:18: - Couldn't match expected type `a2' with actual type `t' - because type variable `a2' would escape its scope + Couldn't match expected type ‛a2’ with actual type ‛t’ + because type variable ‛a2’ would escape its scope This (rigid, skolem) type variable is bound by the type signature for v :: a2 at tc141.hs:14:19 @@ -44,7 +44,7 @@ tc141.hs:15:18: b :: t (bound at tc141.hs:13:5) v :: a2 (bound at tc141.hs:15:14) In the expression: b - In an equation for `v': v = b + In an equation for ‛v’: v = b In the expression: let v :: a diff --git a/tests/typecheck/should_compile/tc161.stderr-ghc b/tests/typecheck/should_compile/tc161.stderr-ghc index 57b0f60830f0d07fba8633197b7d649bd071cd9f..60b5b95d76f794e66a66052ef9a31d07b151976d 100644 --- a/tests/typecheck/should_compile/tc161.stderr-ghc +++ b/tests/typecheck/should_compile/tc161.stderr-ghc @@ -1,4 +1,4 @@ -tc161.hs:17:10: - Warning: No explicit method or default declaration for `op' - In the instance declaration for `Foo Int' +tc161.hs:17:10: Warning: + No explicit method or default declaration for ‛op’ + In the instance declaration for ‛Foo Int’ diff --git a/tests/typecheck/should_compile/tc167.hs b/tests/typecheck/should_compile/tc167.hs index b317763831a1d3a33e17c6e97471d60a1f289f20..cadb1a7fba5c1916165a47b8f9b353321d636012 100644 --- a/tests/typecheck/should_compile/tc167.hs +++ b/tests/typecheck/should_compile/tc167.hs @@ -17,7 +17,7 @@ f x = x -- You might think that (->) should have type (? -> ? -> *), and you'd be right -- But if we do that we get kind errors when saying -- instance Control.Arrow (->) --- becuase the expected kind is (*->*->*). The trouble is that the +-- because the expected kind is (*->*->*). The trouble is that the -- expected/actual stuff in the unifier does not go contra-variant, whereas -- the kind sub-typing does. Sigh. It really only matters if you use (->) in -- a prefix way, thus: (->) Int# Int#. And this is unusual. diff --git a/tests/typecheck/should_compile/tc167.stderr b/tests/typecheck/should_compile/tc167.stderr index 7790d22677924865a675fbe0531b7eb0387b8a29..51c982a2762b4271dd1af4f753d58aae27db54d8 100644 --- a/tests/typecheck/should_compile/tc167.stderr +++ b/tests/typecheck/should_compile/tc167.stderr @@ -1,4 +1,4 @@ tc167.hs:8:12: - Expecting a lifted type, but `Int#' is unlifted - In the type signature for `f': f :: ((->) Int#) Int# + Expecting a lifted type, but ‛Int#’ is unlifted + In the type signature for ‛f’: f :: ((->) Int#) Int# diff --git a/tests/typecheck/should_compile/tc168.stderr b/tests/typecheck/should_compile/tc168.stderr index 96fa5a062937c35e1a973030bdb21f73fb2753d7..6fbc96f9343b53a1970ed9a757ff728339e69cd1 100644 --- a/tests/typecheck/should_compile/tc168.stderr +++ b/tests/typecheck/should_compile/tc168.stderr @@ -1,11 +1,11 @@ - -tc168.hs:17:1: - Could not deduce (C a1 (a, b0)) - arising from the ambiguity check for `g' - from the context (C a1 (a, b)) - bound by the inferred type for `g': C a1 (a, b) => a1 -> a - at tc168.hs:17:1-16 - The type variable `b0' is ambiguous - When checking that `g' - has the inferred type `forall a b a1. C a1 (a, b) => a1 -> a' - Probable cause: the inferred type is ambiguous + +tc168.hs:17:1: + Could not deduce (C a1 (a, b0)) + arising from the ambiguity check for ‛g’ + from the context (C a1 (a, b)) + bound by the inferred type for ‛g’: C a1 (a, b) => a1 -> a + at tc168.hs:17:1-16 + The type variable ‛b0’ is ambiguous + When checking that ‛g’ + has the inferred type ‛forall a b a1. C a1 (a, b) => a1 -> a’ + Probable cause: the inferred type is ambiguous diff --git a/tests/typecheck/should_compile/tc211.stderr b/tests/typecheck/should_compile/tc211.stderr index 998cd76f5ed25e3e79e8cb002ee756c50be0091b..7538dedda8b0458e21d04700ac5c9002e7addc66 100644 --- a/tests/typecheck/should_compile/tc211.stderr +++ b/tests/typecheck/should_compile/tc211.stderr @@ -1,20 +1,20 @@ tc211.hs:15:22: - Couldn't match type `forall a6. a6 -> a6' with `a -> a' + Couldn't match type ‛forall a6. a6 -> a6’ with ‛a -> a’ Expected type: [a -> a] Actual type: [forall a. a -> a] - In the first argument of `head', namely `foo' - In the first argument of `(:) :: + In the first argument of ‛head’, namely ‛foo’ + In the first argument of ‛(:) :: (forall a. a -> a) - -> [forall a. a -> a] -> [forall a. a -> a]', namely - `(head foo)' + -> [forall a. a -> a] -> [forall a. a -> a]’, namely + ‛(head foo)’ In the expression: ((:) :: (forall a. a -> a) -> [forall a. a -> a] -> [forall a. a -> a]) (head foo) foo tc211.hs:70:9: - Couldn't match type `forall a7. a7 -> a7' with `a6 -> a6' + Couldn't match type ‛forall a7. a7 -> a7’ with ‛a6 -> a6’ Expected type: List (forall a. a -> a) -> (forall a. a -> a) -> a6 -> a6 Actual type: List (forall a. a -> a) @@ -27,7 +27,7 @@ tc211.hs:70:9: List (forall a. a -> a) -> (forall a. a -> a) -> (forall a. a -> a)) xs1 (\ x -> x) - In an equation for `bar4': + In an equation for ‛bar4’: bar4 = (foo2 :: List (forall a. a -> a) diff --git a/tests/typecheck/should_compile/tc226.hs b/tests/typecheck/should_compile/tc226.hs index 1e5e28ac5ba1c521336aef058907076b5622e347..d9c94c2c4308fc61831c76153522b720c9bc9fa1 100644 --- a/tests/typecheck/should_compile/tc226.hs +++ b/tests/typecheck/should_compile/tc226.hs @@ -1,7 +1,8 @@ -{-# OPTIONS_GHC -funbox-strict-fields #-} +{-# OPTIONS_GHC -O -funbox-strict-fields #-} -- The combination of unboxing and a recursive newtype crashed GHC 6.6.1 -- Trac #1255 +-- Use -O to force the unboxing to happen module Foo where diff --git a/tests/typecheck/should_compile/tc231.stderr b/tests/typecheck/should_compile/tc231.stderr index 0e9196c3fbe7215a011a79fbdee96aadc8f1f4f0..e8ebcc7ba8c7d1505ddc14879c087d72f4e9c0ac 100644 --- a/tests/typecheck/should_compile/tc231.stderr +++ b/tests/typecheck/should_compile/tc231.stderr @@ -1,29 +1,29 @@ -TYPE SIGNATURES - foo :: - forall s b chain. - Zork s (Z [Char]) b => - Q s (Z [Char]) chain -> ST s () - s :: forall t t1. Q t (Z [Char]) t1 -> Q t (Z [Char]) t1 -TYPE CONSTRUCTORS - Q :: * -> * -> * -> * - data Q s a chain - No C type associated - RecFlag NonRecursive - = Node :: forall s a chain. s -> a -> chain -> Q s a chain - Stricts: _ _ _ - FamilyInstance: none - Z :: * -> * - data Z a - No C type associated - RecFlag NonRecursive - = Z :: forall a. a -> Z a Stricts: _ - FamilyInstance: none - Zork :: * -> * -> * -> Constraint - class Zork s a b | a -> b - RecFlag NonRecursive - huh :: forall chain. Q s a chain -> ST s () -COERCION AXIOMS - axiom ShouldCompile.NTCo:Zork :: - forall s a b. Zork s a b ~# (forall chain. Q s a chain -> ST s ()) -Dependent modules: [] -Dependent packages: [base, ghc-prim, integer-gmp] +TYPE SIGNATURES + foo :: + forall s b chain. + Zork s (Z [Char]) b => + Q s (Z [Char]) chain -> ST s () + s :: forall t t1. Q t (Z [Char]) t1 -> Q t (Z [Char]) t1 +TYPE CONSTRUCTORS + Q :: * -> * -> * -> * + data Q s a chain + No C type associated + RecFlag NonRecursive, Promotable + = Node :: forall s a chain. s -> a -> chain -> Q s a chain + Stricts: _ _ _ + FamilyInstance: none + Z :: * -> * + data Z a + No C type associated + RecFlag NonRecursive, Promotable + = Z :: forall a. a -> Z a Stricts: _ + FamilyInstance: none + Zork :: * -> * -> * -> Constraint + class Zork s a b | a -> b + RecFlag NonRecursive + huh :: forall chain. Q s a chain -> ST s () +COERCION AXIOMS + axiom ShouldCompile.NTCo:Zork :: + Zork s a b = forall chain. Q s a chain -> ST s () +Dependent modules: [] +Dependent packages: [base, ghc-prim, integer-gmp] diff --git a/tests/typecheck/should_compile/tc235.hs b/tests/typecheck/should_compile/tc235.hs index feeca6a998301f1b31df572baf8c6edd261ddbdd..53822b3418d31f680b055fb7084e26f346540113 100644 --- a/tests/typecheck/should_compile/tc235.hs +++ b/tests/typecheck/should_compile/tc235.hs @@ -17,7 +17,7 @@ instance FooBar [] Bool Bool where instance FooBar Maybe Int Int where a = error "urk" -class (Monad m)=>Gr g ep m | g -> ep where +class (Monad m)=>Gr g ep m where x:: m Int v:: m Int diff --git a/tests/typecheck/should_compile/tc254.stderr b/tests/typecheck/should_compile/tc254.stderr index b24224d709542498e46b8437795fc27618f7f71b..a721c7e3b4475a87043c1af90885074461cd4c88 100644 --- a/tests/typecheck/should_compile/tc254.stderr +++ b/tests/typecheck/should_compile/tc254.stderr @@ -1,4 +1,4 @@ -tc254.hs:8:1: - Warning: No explicit associated type or default declaration for `Typ' - In the instance declaration for `Cls Int' +tc254.hs:8:1: Warning: + No explicit associated type or default declaration for ‛Typ’ + In the instance declaration for ‛Cls Int’ diff --git a/tests/typecheck/should_fail/AssocTyDef01.stderr b/tests/typecheck/should_fail/AssocTyDef01.stderr index 5d3a596d976345073ec9a486bb8fa03f05a40201..e342e900a6bbb48e0b83119e5626d6a7b64aa61e 100644 --- a/tests/typecheck/should_fail/AssocTyDef01.stderr +++ b/tests/typecheck/should_fail/AssocTyDef01.stderr @@ -1,3 +1,3 @@ AssocTyDef01.hs:9:10: - `OtherType' is not a (visible) associated type of class `Cls' + ‛OtherType’ is not a (visible) associated type of class ‛Cls’ diff --git a/tests/typecheck/should_fail/AssocTyDef02.hs b/tests/typecheck/should_fail/AssocTyDef02.hs index 8f22d4ce1c033b6e5cfa2213d08d9d954078ddeb..5db82037bac91303d7b726e18969c32f94ef3977 100644 --- a/tests/typecheck/should_fail/AssocTyDef02.hs +++ b/tests/typecheck/should_fail/AssocTyDef02.hs @@ -3,5 +3,6 @@ module AssocTyDef02 where class Cls a where type Typ a - type Typ b = Int + type Typ [b] = Int -- Default is not parametric in type class params + diff --git a/tests/typecheck/should_fail/AssocTyDef02.stderr b/tests/typecheck/should_fail/AssocTyDef02.stderr index 920ae0acd9252d1129905790e8fe3bcf6d849510..749e42c991c6271efecc8e7e21aaf75dce8b8a4f 100644 --- a/tests/typecheck/should_fail/AssocTyDef02.stderr +++ b/tests/typecheck/should_fail/AssocTyDef02.stderr @@ -1,6 +1,6 @@ AssocTyDef02.hs:6:10: Type indexes must match class instance head - Found `b' but expected `a' - In the type synonym instance default declaration for `Typ' - In the class declaration for `Cls' + Found ‛[b]’ but expected ‛a’ + In the type synonym instance default declaration for ‛Typ’ + In the class declaration for ‛Cls’ diff --git a/tests/typecheck/should_fail/AssocTyDef03.stderr b/tests/typecheck/should_fail/AssocTyDef03.stderr index bd7fadfd8c2eac715ec8196185f966ff4b235ed4..82e9b0f3a303a957774919373cfa01b70d686d46 100644 --- a/tests/typecheck/should_fail/AssocTyDef03.stderr +++ b/tests/typecheck/should_fail/AssocTyDef03.stderr @@ -1,5 +1,5 @@ - -AssocTyDef03.hs:6:5: - Wrong category of family instance; declaration was for a data type - In the type instance declaration for `Typ' - In the class declaration for `Cls' + +AssocTyDef03.hs:6:5: + Wrong category of family instance; declaration was for a data type + In the type instance declaration for ‛Typ’ + In the class declaration for ‛Cls’ diff --git a/tests/typecheck/should_fail/AssocTyDef04.stderr b/tests/typecheck/should_fail/AssocTyDef04.stderr index e02758b288efab870d980cbe588e3de0a008c960..b03eb045e5f382a02bc5047b8298dcc9a733f582 100644 --- a/tests/typecheck/should_fail/AssocTyDef04.stderr +++ b/tests/typecheck/should_fail/AssocTyDef04.stderr @@ -1,7 +1,7 @@ - -AssocTyDef04.hs:6:18: - Expecting one more argument to `Maybe' - Expected kind `*', but `Maybe' has kind `* -> *' - In the type `Maybe' - In the type instance declaration for `Typ' - In the class declaration for `Cls' + +AssocTyDef04.hs:6:18: + Expecting one more argument to ‛Maybe’ + Expected kind ‛*’, but ‛Maybe’ has kind ‛* -> *’ + In the type ‛Maybe’ + In the type instance declaration for ‛Typ’ + In the class declaration for ‛Cls’ diff --git a/tests/typecheck/should_fail/AssocTyDef05.stderr b/tests/typecheck/should_fail/AssocTyDef05.stderr index 797c8389134a931233a54eda26a5e30d42c1011e..401251e36abf360bcb857961efbf701106d7c107 100644 --- a/tests/typecheck/should_fail/AssocTyDef05.stderr +++ b/tests/typecheck/should_fail/AssocTyDef05.stderr @@ -1,5 +1,5 @@ AssocTyDef05.hs:6:10: Number of parameters must match family declaration; expected 1 - In the type instance declaration for `Typ' - In the class declaration for `Cls' + In the type instance declaration for ‛Typ’ + In the class declaration for ‛Cls’ diff --git a/tests/typecheck/should_fail/AssocTyDef06.stderr b/tests/typecheck/should_fail/AssocTyDef06.stderr index 6100ef2a902aa983b1050f8f6ee566bd0334e207..91e92bdcae35b5936d1f0d1409779040c1880af7 100644 --- a/tests/typecheck/should_fail/AssocTyDef06.stderr +++ b/tests/typecheck/should_fail/AssocTyDef06.stderr @@ -1,5 +1,5 @@ AssocTyDef06.hs:6:10: Number of parameters must match family declaration; expected 1 - In the type instance declaration for `Typ' - In the class declaration for `Cls' + In the type instance declaration for ‛Typ’ + In the class declaration for ‛Cls’ diff --git a/tests/typecheck/should_fail/AssocTyDef07.stderr b/tests/typecheck/should_fail/AssocTyDef07.stderr index 4a4562d0e03d177a0771c709a33ea24245b12b7c..151f5a9b8fee8ecefe2e226417164022183b2fe7 100644 --- a/tests/typecheck/should_fail/AssocTyDef07.stderr +++ b/tests/typecheck/should_fail/AssocTyDef07.stderr @@ -1,3 +1,3 @@ AssocTyDef07.hs:5:10: - `Typ' is not a (visible) associated type of class `Cls' + ‛Typ’ is not a (visible) associated type of class ‛Cls’ diff --git a/tests/typecheck/should_fail/AssocTyDef08.stderr b/tests/typecheck/should_fail/AssocTyDef08.stderr index c45132f994ba67a1ce00cfac9c88305ca23783fb..97147c7dfdcbf1fc995cb7b2cd0b0f4616855fdf 100644 --- a/tests/typecheck/should_fail/AssocTyDef08.stderr +++ b/tests/typecheck/should_fail/AssocTyDef08.stderr @@ -1,3 +1,3 @@ AssocTyDef08.hs:4:10: - `Typ' is not a (visible) associated type of class `Cls' + ‛Typ’ is not a (visible) associated type of class ‛Cls’ diff --git a/tests/typecheck/should_fail/AssocTyDef09.stderr b/tests/typecheck/should_fail/AssocTyDef09.stderr index 053450c48eb8223fa96cbd712fc357f3f9c93910..3f8c113289743a962295e60d8cda3b8ff6fdae65 100644 --- a/tests/typecheck/should_fail/AssocTyDef09.stderr +++ b/tests/typecheck/should_fail/AssocTyDef09.stderr @@ -1,3 +1,3 @@ AssocTyDef09.hs:8:10: - `OtherType' is not a (visible) associated type of class `Cls' + ‛OtherType’ is not a (visible) associated type of class ‛Cls’ diff --git a/tests/typecheck/should_fail/FDsFromGivens.stderr b/tests/typecheck/should_fail/FDsFromGivens.stderr index 60a334232e187b2826a0ad95ddd12bb3c62ba38f..893ec8ae12359ef86b51c7235ca896f0a82087e7 100644 --- a/tests/typecheck/should_fail/FDsFromGivens.stderr +++ b/tests/typecheck/should_fail/FDsFromGivens.stderr @@ -1,14 +1,14 @@ FDsFromGivens.hs:21:15: - Couldn't match type `Char' with `[a]' + Couldn't match type ‛Char’ with ‛[a]’ Relevant bindings include bar :: KCC -> a -> a (bound at FDsFromGivens.hs:21:1) When using functional dependencies to combine C Char Char, arising from a pattern with constructor KCC :: C Char Char => () -> KCC, - in an equation for `bar' + in an equation for ‛bar’ at FDsFromGivens.hs:21:6-10 - C Char [a], arising from a use of `f' at FDsFromGivens.hs:21:15 + C Char [a], arising from a use of ‛f’ at FDsFromGivens.hs:21:15 In the expression: f - In an equation for `bar': bar (KCC _) = f + In an equation for ‛bar’: bar (KCC _) = f diff --git a/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr b/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr index 1cf4e9f1cca80ba27b4e80dc993a51bada40aa22..74e0bc7341c2015e3705a76d9a43f2511d2ef8e8 100644 --- a/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr +++ b/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr @@ -1,12 +1,12 @@ FailDueToGivenOverlapping.hs:27:9: - Overlapping instances for E [t0] arising from a use of `eop' + Overlapping instances for E [t0] arising from a use of ‛eop’ Matching givens (or their superclasses): (E [Int]) bound by the type signature for bar :: E [Int] => () -> () at FailDueToGivenOverlapping.hs:26:8-26 Matching instances: instance E [a] -- Defined at FailDueToGivenOverlapping.hs:21:10 - (The choice depends on the instantiation of `t0') + (The choice depends on the instantiation of ‛t0’) In the expression: eop [undefined] - In an equation for `bar': bar _ = eop [undefined] + In an equation for ‛bar’: bar _ = eop [undefined] diff --git a/tests/typecheck/should_fail/FrozenErrorTests.stderr b/tests/typecheck/should_fail/FrozenErrorTests.stderr index 5a36d7d54b7513d501b59861b397ee9554dc1b68..9857c9c9a75a74d6dc76426668e00e32a5a768f7 100644 --- a/tests/typecheck/should_fail/FrozenErrorTests.stderr +++ b/tests/typecheck/should_fail/FrozenErrorTests.stderr @@ -1,53 +1,53 @@ - -FrozenErrorTests.hs:12:12: - Couldn't match type `Int' with `Bool' - Inaccessible code in - a pattern with constructor - MkT3 :: forall a. a ~ Bool => T a, - in a case alternative - In the pattern: MkT3 - In a case alternative: MkT3 -> () - In the expression: case x of { MkT3 -> () } - -FrozenErrorTests.hs:26:9: - Occurs check: cannot construct the infinite type: a ~ [a] - Expected type: [a] - Actual type: F a Bool - Relevant bindings include - test1 :: a (bound at FrozenErrorTests.hs:26:1) - In the expression: goo1 False undefined - In an equation for `test1': test1 = goo1 False undefined - -FrozenErrorTests.hs:29:15: - Couldn't match type `Int' with `[Int]' - Expected type: [[Int]] - Actual type: F [Int] Bool - In the first argument of `goo2', namely `(goo1 False undefined)' - In the expression: goo2 (goo1 False undefined) - In an equation for `test2': test2 = goo2 (goo1 False undefined) - -FrozenErrorTests.hs:30:9: - Couldn't match type `Int' with `[Int]' - Expected type: [[Int]] - Actual type: F [Int] Bool - In the expression: goo1 False (goo2 undefined) - In an equation for `test3': test3 = goo1 False (goo2 undefined) - -FrozenErrorTests.hs:45:15: - Couldn't match type `T2 c c' with `M (T2 (T2 c c) c)' - Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c) - Actual type: F (T2 (T2 c c) c) Bool - Relevant bindings include - test4 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:45:1) - In the first argument of `goo4', namely `(goo3 False undefined)' - In the expression: goo4 (goo3 False undefined) - In an equation for `test4': test4 = goo4 (goo3 False undefined) - -FrozenErrorTests.hs:46:9: - Couldn't match type `T2 c c' with `M (T2 (T2 c c) c)' - Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c) - Actual type: F (T2 (T2 c c) c) Bool - Relevant bindings include - test5 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:46:1) - In the expression: goo3 False (goo4 undefined) - In an equation for `test5': test5 = goo3 False (goo4 undefined) + +FrozenErrorTests.hs:12:12: + Couldn't match type ‛Int’ with ‛Bool’ + Inaccessible code in + a pattern with constructor + MkT3 :: forall a. a ~ Bool => T a, + in a case alternative + In the pattern: MkT3 + In a case alternative: MkT3 -> () + In the expression: case x of { MkT3 -> () } + +FrozenErrorTests.hs:26:9: + Occurs check: cannot construct the infinite type: a ~ [a] + Expected type: [a] + Actual type: F a Bool + Relevant bindings include + test1 :: a (bound at FrozenErrorTests.hs:26:1) + In the expression: goo1 False undefined + In an equation for ‛test1’: test1 = goo1 False undefined + +FrozenErrorTests.hs:29:15: + Couldn't match type ‛Int’ with ‛[Int]’ + Expected type: [[Int]] + Actual type: F [Int] Bool + In the first argument of ‛goo2’, namely ‛(goo1 False undefined)’ + In the expression: goo2 (goo1 False undefined) + In an equation for ‛test2’: test2 = goo2 (goo1 False undefined) + +FrozenErrorTests.hs:30:9: + Couldn't match type ‛Int’ with ‛[Int]’ + Expected type: [[Int]] + Actual type: F [Int] Bool + In the expression: goo1 False (goo2 undefined) + In an equation for ‛test3’: test3 = goo1 False (goo2 undefined) + +FrozenErrorTests.hs:45:15: + Couldn't match type ‛T2 c c’ with ‛M (T2 (T2 c c) c)’ + Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c) + Actual type: F (T2 (T2 c c) c) Bool + Relevant bindings include + test4 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:45:1) + In the first argument of ‛goo4’, namely ‛(goo3 False undefined)’ + In the expression: goo4 (goo3 False undefined) + In an equation for ‛test4’: test4 = goo4 (goo3 False undefined) + +FrozenErrorTests.hs:46:9: + Couldn't match type ‛T2 c c’ with ‛M (T2 (T2 c c) c)’ + Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c) + Actual type: F (T2 (T2 c c) c) Bool + Relevant bindings include + test5 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:46:1) + In the expression: goo3 False (goo4 undefined) + In an equation for ‛test5’: test5 = goo3 False (goo4 undefined) diff --git a/tests/typecheck/should_fail/IPFail.stderr b/tests/typecheck/should_fail/IPFail.stderr index d8efdfec56b82eee44c4fa6d837d42cebf761464..127693a5caf15d3cb764039d36f569f49b2221c8 100644 --- a/tests/typecheck/should_fail/IPFail.stderr +++ b/tests/typecheck/should_fail/IPFail.stderr @@ -1,9 +1,9 @@ IPFail.hs:6:18: - Could not deduce (Num Bool) arising from the literal `5' + Could not deduce (Num Bool) arising from the literal ‛5’ from the context (?x::Int) bound by the type signature for f0 :: (?x::Int) => () -> Bool at IPFail.hs:5:7-31 In the expression: 5 In the expression: let ?x = 5 in ?x - In an equation for `f0': f0 () = let ?x = 5 in ?x + In an equation for ‛f0’: f0 () = let ?x = 5 in ?x diff --git a/tests/typecheck/should_fail/LongWayOverlapping.stderr b/tests/typecheck/should_fail/LongWayOverlapping.stderr index fbd0b448689584e940493c6c4555ab01eef01943..d50cc847ddf21f5d0a096b42507f3fe2879ff29d 100644 --- a/tests/typecheck/should_fail/LongWayOverlapping.stderr +++ b/tests/typecheck/should_fail/LongWayOverlapping.stderr @@ -1,7 +1,7 @@ LongWayOverlapping.hs:23:11: No instance for (EmbAsChild [Char] Char) - arising from a use of `emb' + arising from a use of ‛emb’ In the expression: emb 'c' - In an equation for `emb': emb _ = emb 'c' - In the instance declaration for `EmbAsChild [Char] Bool' + In an equation for ‛emb’: emb _ = emb 'c' + In the instance declaration for ‛EmbAsChild [Char] Bool’ diff --git a/tests/typecheck/should_fail/SCLoop.stderr b/tests/typecheck/should_fail/SCLoop.stderr index 37970cc737ed7b829d759cbee0fd382c7d6bbb13..309dd91af01661af88d7c89de8904752a8c530ff 100644 --- a/tests/typecheck/should_fail/SCLoop.stderr +++ b/tests/typecheck/should_fail/SCLoop.stderr @@ -1,5 +1,5 @@ SCLoop.hs:22:7: - No instance for (SC ()) arising from a use of `op' + No instance for (SC ()) arising from a use of ‛op’ In the expression: op () ([Just True]) - In an equation for `foo': foo = op () ([Just True]) + In an equation for ‛foo’: foo = op () ([Just True]) diff --git a/tests/typecheck/should_fail/SilentParametersOverlapping.stderr b/tests/typecheck/should_fail/SilentParametersOverlapping.stderr index 6a49325e4377c05cbeaed7f0dc2cd76e231e4b08..255e6513ebff7aa1349a67b01bbed3cbb9d0cee8 100644 --- a/tests/typecheck/should_fail/SilentParametersOverlapping.stderr +++ b/tests/typecheck/should_fail/SilentParametersOverlapping.stderr @@ -1,13 +1,13 @@ SilentParametersOverlapping.hs:15:9: - Overlapping instances for C [(t0, t1)] arising from a use of `c' + Overlapping instances for C [(t0, t1)] arising from a use of ‛c’ Matching givens (or their superclasses): (C [(a, b)]) bound by the instance declaration at SilentParametersOverlapping.hs:14:37-45 Matching instances: instance C [a] -- Defined at SilentParametersOverlapping.hs:11:10 - (The choice depends on the instantiation of `t0, t1') + (The choice depends on the instantiation of ‛t0, t1’) In the expression: c [(undefined, undefined)] - In an equation for `b': b x = c [(undefined, undefined)] - In the instance declaration for `B [(a, b)]' + In an equation for ‛b’: b x = c [(undefined, undefined)] + In the instance declaration for ‛B [(a, b)]’ diff --git a/tests/typecheck/should_fail/T1595.stderr b/tests/typecheck/should_fail/T1595.stderr index d3f665c15a963f05e0b813b4b96571dfa1604458..a84903ded70605bfba9ee181404fbbfda5a8825c 100644 --- a/tests/typecheck/should_fail/T1595.stderr +++ b/tests/typecheck/should_fail/T1595.stderr @@ -1,6 +1,6 @@ T1595.hs:8:15: - Not in scope: type constructor or class `DoesNotExist' + Not in scope: type constructor or class ‛DoesNotExist’ T1595.hs:13:22: - Not in scope: type constructor or class `DoesNotExist' + Not in scope: type constructor or class ‛DoesNotExist’ diff --git a/tests/typecheck/should_fail/T1633.stderr b/tests/typecheck/should_fail/T1633.stderr index bdfa10ad59b217ab4357560dabed0823949226a6..8a01bd9fd67435bc1e28e346c247e7663009fec0 100644 --- a/tests/typecheck/should_fail/T1633.stderr +++ b/tests/typecheck/should_fail/T1633.stderr @@ -1,5 +1,5 @@ T1633.hs:6:18: - The first argument of `Functor' should have kind `* -> *', - but `Bool' has kind `*' - In the instance declaration for `Functor Bool' + The first argument of ‛Functor’ should have kind ‛* -> *’, + but ‛Bool’ has kind ‛*’ + In the instance declaration for ‛Functor Bool’ diff --git a/tests/typecheck/should_fail/T1897a.stderr b/tests/typecheck/should_fail/T1897a.stderr index eb1204850ff40e12529e8c60c27d7a6759319e96..b495f17b1c6eb1690ad2c249d4cb8c3dd786c718 100644 --- a/tests/typecheck/should_fail/T1897a.stderr +++ b/tests/typecheck/should_fail/T1897a.stderr @@ -1,11 +1,11 @@ - -T1897a.hs:9:1: - Could not deduce (Wob a0 b) - arising from the ambiguity check for `foo' - from the context (Wob a b) - bound by the inferred type for `foo': Wob a b => b -> [b] - at T1897a.hs:9:1-24 - The type variable `a0' is ambiguous - When checking that `foo' - has the inferred type `forall a b. Wob a b => b -> [b]' - Probable cause: the inferred type is ambiguous + +T1897a.hs:9:1: + Could not deduce (Wob a0 b) + arising from the ambiguity check for ‛foo’ + from the context (Wob a b) + bound by the inferred type for ‛foo’: Wob a b => b -> [b] + at T1897a.hs:9:1-24 + The type variable ‛a0’ is ambiguous + When checking that ‛foo’ + has the inferred type ‛forall a b. Wob a b => b -> [b]’ + Probable cause: the inferred type is ambiguous diff --git a/tests/typecheck/should_fail/T1899.stderr b/tests/typecheck/should_fail/T1899.stderr index 0838984c2f82f8ee84a5bba123a5da273b036a73..d637ac7a0a1c5ae1aa640958b63ff25079474ba1 100644 --- a/tests/typecheck/should_fail/T1899.stderr +++ b/tests/typecheck/should_fail/T1899.stderr @@ -1,12 +1,12 @@ T1899.hs:12:29: - Couldn't match expected type `a' with actual type `Proposition a0' - `a' is a rigid type variable bound by + Couldn't match expected type ‛a’ with actual type ‛Proposition a0’ + ‛a’ is a rigid type variable bound by the type signature for transRHS :: [a] -> Int -> Constraint a at T1899.hs:9:14 Relevant bindings include transRHS :: [a] -> Int -> Constraint a (bound at T1899.hs:10:2) varSet :: [a] (bound at T1899.hs:10:11) - In the return type of a call of `Auxiliary' - In the first argument of `Prop', namely `(Auxiliary undefined)' + In the return type of a call of ‛Auxiliary’ + In the first argument of ‛Prop’, namely ‛(Auxiliary undefined)’ In the expression: Prop (Auxiliary undefined) diff --git a/tests/typecheck/should_fail/T2126.stderr b/tests/typecheck/should_fail/T2126.stderr index 2facb189a9fb1a3757193baa78811009c54d54c1..1e0a72df2edd756d9b32561744e4b35277478629 100644 --- a/tests/typecheck/should_fail/T2126.stderr +++ b/tests/typecheck/should_fail/T2126.stderr @@ -1,4 +1,4 @@ T2126.hs:5:1: - A newtype must have exactly one constructor, but `X' has none - In the newtype declaration for `X' + A newtype must have exactly one constructor, but ‛X’ has none + In the newtype declaration for ‛X’ diff --git a/tests/typecheck/should_fail/T2247.hs b/tests/typecheck/should_fail/T2247.hs new file mode 100644 index 0000000000000000000000000000000000000000..3779f2db760986c2de2c601d2751b3f0a9961ac6 --- /dev/null +++ b/tests/typecheck/should_fail/T2247.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE FunctionalDependencies, MultiParamTypeClasses, UndecidableInstances, FlexibleInstances #-} + +module T2247 where + +class FD a b | a -> b +instance CFD a b => FD a b + +class {- FD a b => -} CFD a b +instance CFD Bool Char +instance CFD Bool Bool + +f' :: FD Bool Bool => Bool +f' = True + +g' :: FD Bool Char => Bool +g' = False + +x = f' diff --git a/tests/typecheck/should_fail/T2247.stderr b/tests/typecheck/should_fail/T2247.stderr new file mode 100644 index 0000000000000000000000000000000000000000..15ec584482967f96620c3164abc2a2984e4765b2 --- /dev/null +++ b/tests/typecheck/should_fail/T2247.stderr @@ -0,0 +1,6 @@ + +T2247.hs:6:10: + Illegal instance declaration for ‛FD a b’ + Multiple uses of this instance may be inconsistent + with the functional dependencies of the class. + In the instance declaration for ‛FD a b’ diff --git a/tests/typecheck/should_fail/T2354.hs b/tests/typecheck/should_fail/T2354.hs new file mode 100644 index 0000000000000000000000000000000000000000..7bc1d40b725053a20f24262e4bdc9a33d38d56af --- /dev/null +++ b/tests/typecheck/should_fail/T2354.hs @@ -0,0 +1,7 @@ +module T2354(test) where + +class AsInt a where + {-# NOINLINE toInt #-} + toInt :: a -> Int + {-# NOINLINE fromInt #-} + fromInt :: Int -> a diff --git a/tests/typecheck/should_fail/T2354.stderr b/tests/typecheck/should_fail/T2354.stderr new file mode 100644 index 0000000000000000000000000000000000000000..55285ffd123046db6abcb531ed3fe7dd7e7c0bab --- /dev/null +++ b/tests/typecheck/should_fail/T2354.stderr @@ -0,0 +1,6 @@ + +T2354.hs:4:3: + The INLINE pragma for default method ‛toInt’ lacks an accompanying binding + +T2354.hs:6:3: + The INLINE pragma for default method ‛fromInt’ lacks an accompanying binding diff --git a/tests/typecheck/should_fail/T2414.stderr b/tests/typecheck/should_fail/T2414.stderr index 53ea2b11e3a82c3cf03542ba4ca609d1148e4016..af968d90dae4cee712c0267e007db64058a1f1cf 100644 --- a/tests/typecheck/should_fail/T2414.stderr +++ b/tests/typecheck/should_fail/T2414.stderr @@ -3,6 +3,6 @@ T2414.hs:9:13: Occurs check: cannot construct the infinite type: b0 ~ (Bool, b0) Expected type: b0 -> Maybe (Bool, b0) Actual type: b0 -> Maybe b0 - In the first argument of `unfoldr', namely `Just' + In the first argument of ‛unfoldr’, namely ‛Just’ In the expression: unfoldr Just - In an equation for `f': f = unfoldr Just + In an equation for ‛f’: f = unfoldr Just diff --git a/tests/typecheck/should_fail/T2534.stderr b/tests/typecheck/should_fail/T2534.stderr index 8943b979ac4ce4cf668331dbb60520fef3261bf7..389b515957ec4e42d53e7c80a1a499d94c14578a 100644 --- a/tests/typecheck/should_fail/T2534.stderr +++ b/tests/typecheck/should_fail/T2534.stderr @@ -1,8 +1,8 @@ T2534.hs:3:19: - Couldn't match expected type `a -> a -> b' with actual type `[a0]' + Couldn't match expected type ‛a -> a -> b’ with actual type ‛[t0]’ Relevant bindings include foo :: a -> a -> b (bound at T2534.hs:3:1) - In the second argument of `foldr', namely `[]' + In the second argument of ‛foldr’, namely ‛[]’ In the expression: foldr (>>=) [] [] - In an equation for `foo': foo = foldr (>>=) [] [] + In an equation for ‛foo’: foo = foldr (>>=) [] [] diff --git a/tests/typecheck/should_fail/T2538.stderr b/tests/typecheck/should_fail/T2538.stderr index b2d1d3aeb6fc04f99c7e09eb555f47856187bc62..2e67c878af37575c2355f96ff68f7fe4fe8deed9 100644 --- a/tests/typecheck/should_fail/T2538.stderr +++ b/tests/typecheck/should_fail/T2538.stderr @@ -2,13 +2,13 @@ T2538.hs:6:6: Illegal polymorphic or qualified type: Eq a => a -> a Perhaps you intended to use -XRankNTypes or -XRank2Types - In the type signature for `f': f :: (Eq a => a -> a) -> Int + In the type signature for ‛f’: f :: (Eq a => a -> a) -> Int T2538.hs:9:6: Illegal polymorphic or qualified type: Eq a => a -> a Perhaps you intended to use -XImpredicativeTypes - In the type signature for `g': g :: [Eq a => a -> a] -> Int + In the type signature for ‛g’: g :: [Eq a => a -> a] -> Int T2538.hs:12:6: Illegal polymorphic or qualified type: Eq a => a -> a - In the type signature for `h': h :: Ix (Eq a => a -> a) => Int + In the type signature for ‛h’: h :: Ix (Eq a => a -> a) => Int diff --git a/tests/typecheck/should_fail/T2688.stderr b/tests/typecheck/should_fail/T2688.stderr index 3bb0f493494c8a69a3d368e7721cb9630d3a28bf..bbc415ad81b4e820a63d932f5482f142accf7db7 100644 --- a/tests/typecheck/should_fail/T2688.stderr +++ b/tests/typecheck/should_fail/T2688.stderr @@ -2,16 +2,16 @@ T2688.hs:8:22: Could not deduce (s ~ v) from the context (VectorSpace v s) - bound by the class declaration for `VectorSpace' + bound by the class declaration for ‛VectorSpace’ at T2688.hs:(5,1)-(8,23) - `s' is a rigid type variable bound by - the class declaration for `VectorSpace' at T2688.hs:5:21 - `v' is a rigid type variable bound by - the class declaration for `VectorSpace' at T2688.hs:5:19 + ‛s’ is a rigid type variable bound by + the class declaration for ‛VectorSpace’ at T2688.hs:5:21 + ‛v’ is a rigid type variable bound by + the class declaration for ‛VectorSpace’ at T2688.hs:5:19 Relevant bindings include ^/ :: v -> s -> v (bound at T2688.hs:8:5) v :: v (bound at T2688.hs:8:5) s :: s (bound at T2688.hs:8:10) - In the second argument of `(/)', namely `s' - In the second argument of `(*^)', namely `(1 / s)' + In the second argument of ‛(/)’, namely ‛s’ + In the second argument of ‛(*^)’, namely ‛(1 / s)’ In the expression: v *^ (1 / s) diff --git a/tests/typecheck/should_fail/T2714.stderr b/tests/typecheck/should_fail/T2714.stderr index 68056509c73ba6e6abe0244c2d050e87586d69fb..07adee2eee0236e1ffe1a957b6f6869702d18ebe 100644 --- a/tests/typecheck/should_fail/T2714.stderr +++ b/tests/typecheck/should_fail/T2714.stderr @@ -1,7 +1,7 @@ T2714.hs:8:5: - Couldn't match type `c' with `f0 (a -> b)' - `c' is a rigid type variable bound by + Couldn't match type ‛c’ with ‛f0 (a -> b)’ + ‛c’ is a rigid type variable bound by the type signature for f :: ((a -> b) -> b) -> c -> a at T2714.hs:8:1 Expected type: ((a -> b) -> b) -> c -> a @@ -9,11 +9,11 @@ T2714.hs:8:5: Relevant bindings include f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1) In the expression: ffmap - In an equation for `f': f = ffmap + In an equation for ‛f’: f = ffmap T2714.hs:8:5: - Couldn't match type `a' with `f0 b' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛f0 b’ + ‛a’ is a rigid type variable bound by the type signature for f :: ((a -> b) -> b) -> forall c. c -> a at T2714.hs:7:6 Expected type: ((a -> b) -> b) -> c -> a @@ -21,4 +21,4 @@ T2714.hs:8:5: Relevant bindings include f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1) In the expression: ffmap - In an equation for `f': f = ffmap + In an equation for ‛f’: f = ffmap diff --git a/tests/typecheck/should_fail/T2806.stderr b/tests/typecheck/should_fail/T2806.stderr index ebbffb29eb7c274495837b7930c5f26ce3274e58..da35b207ddc20bca803a59742736ef578483178a 100644 --- a/tests/typecheck/should_fail/T2806.stderr +++ b/tests/typecheck/should_fail/T2806.stderr @@ -1,8 +1,8 @@ -T2806.hs:13:11: - Warning: Pattern bindings containing unlifted types should use an outermost bang pattern: - (I# _x) = 4 - In an equation for `foo': +T2806.hs:13:11: Warning: + Pattern bindings containing unlifted types should use an outermost bang pattern: + (I# _x) = 4 + In an equation for ‛foo’: foo = 3 where diff --git a/tests/typecheck/should_fail/T2846b.stderr b/tests/typecheck/should_fail/T2846b.stderr index b70c4d1a0dbbe1e43066170fdbd9a17c5fa1eaf7..23b6a6a0e2c41d8c35c3d4aa07780aa81278db6a 100644 --- a/tests/typecheck/should_fail/T2846b.stderr +++ b/tests/typecheck/should_fail/T2846b.stderr @@ -1,5 +1,5 @@ T2846b.hs:5:5: - No instance for (Show (Num a0 => a0)) arising from a use of `show' + No instance for (Show (Num a0 => a0)) arising from a use of ‛show’ In the expression: show ([1, 2, 3] :: [Num a => a]) - In an equation for `f': f = show ([1, 2, 3] :: [Num a => a]) + In an equation for ‛f’: f = show ([1, 2, 3] :: [Num a => a]) diff --git a/tests/typecheck/should_fail/T2994.stderr b/tests/typecheck/should_fail/T2994.stderr index 7c797afb75b7db719f34adfc89035325f2546721..2794cb2afc586a220e49ee8ab68c401c2ab57f38 100644 --- a/tests/typecheck/should_fail/T2994.stderr +++ b/tests/typecheck/should_fail/T2994.stderr @@ -1,16 +1,16 @@ T2994.hs:11:10: - Expecting one more argument to `MonadReader Int' + Expecting one more argument to ‛MonadReader Int’ Expected a constraint, - but `MonadReader Int' has kind `* -> Constraint' - In the instance declaration for `MonadReader Int' + but ‛MonadReader Int’ has kind ‛* -> Constraint’ + In the instance declaration for ‛MonadReader Int’ T2994.hs:13:23: - Expecting one more argument to `Reader' r' - The first argument of `MonadReader' should have kind `*', - but `Reader' r' has kind `* -> *' - In the instance declaration for `MonadReader (Reader' r)' + Expecting one more argument to ‛Reader' r’ + The first argument of ‛MonadReader’ should have kind ‛*’, + but ‛Reader' r’ has kind ‛* -> *’ + In the instance declaration for ‛MonadReader (Reader' r)’ T2994.hs:15:10: - `MonadReader' is applied to too many type arguments - In the instance declaration for `MonadReader r r (Reader' r)' + ‛MonadReader’ is applied to too many type arguments + In the instance declaration for ‛MonadReader r r (Reader' r)’ diff --git a/tests/typecheck/should_fail/T3102.stderr b/tests/typecheck/should_fail/T3102.stderr index 0cf9d5218700d374273d4a42aceeb6282c23e709..b3f69d376103a00b6bbdb0a047723749d64fc2f1 100644 --- a/tests/typecheck/should_fail/T3102.stderr +++ b/tests/typecheck/should_fail/T3102.stderr @@ -1,10 +1,10 @@ T3102.hs:11:12: - Couldn't match type `a' with `(?p::Int) => a0' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛(?p::Int) => a0’ + ‛a’ is a rigid type variable bound by a type expected by the context: a -> String at T3102.hs:11:10 Expected type: a -> String Actual type: ((?p::Int) => a0) -> String - In the first argument of `f', namely `t' + In the first argument of ‛f’, namely ‛t’ In the expression: f t - In an equation for `result': result = f t + In an equation for ‛result’: result = f t diff --git a/tests/typecheck/should_fail/T3176.stderr b/tests/typecheck/should_fail/T3176.stderr index 393880367dadeb64737408c20f8629aeca886ea3..160eb4769e3f1b99c6aaf6c63acf689d643eb99a 100644 --- a/tests/typecheck/should_fail/T3176.stderr +++ b/tests/typecheck/should_fail/T3176.stderr @@ -1,7 +1,7 @@ T3176.hs:9:27: - Cannot use record selector `unES' as a function due to escaped type variables + Cannot use record selector ‛unES’ as a function due to escaped type variables Probable fix: use pattern-matching syntax instead In the expression: unES - In the second argument of `($)', namely `unES $ f t' + In the second argument of ‛($)’, namely ‛unES $ f t’ In the expression: show $ unES $ f t diff --git a/tests/typecheck/should_fail/T3323.stderr b/tests/typecheck/should_fail/T3323.stderr index d7c4c266814f8d836c74d3792ff03705e8738d5a..029ef7357800adf56d7d3aec617fb2689d376e35 100644 --- a/tests/typecheck/should_fail/T3323.stderr +++ b/tests/typecheck/should_fail/T3323.stderr @@ -2,4 +2,4 @@ T3323.hs:18:7: Record update for insufficiently polymorphic field: haDevice :: dev In the expression: h {haDevice = undefined} - In an equation for `f': f h = h {haDevice = undefined} + In an equation for ‛f’: f h = h {haDevice = undefined} diff --git a/tests/typecheck/should_fail/T3406.stderr b/tests/typecheck/should_fail/T3406.stderr index ceba706f876f56e794cd9823bd67cd18c6c60db9..40779d4f2ebb4d110c1d1502013a580fee8657d0 100644 --- a/tests/typecheck/should_fail/T3406.stderr +++ b/tests/typecheck/should_fail/T3406.stderr @@ -1,10 +1,10 @@ T3406.hs:11:6: - The type variables `a, b' - should be bound by the pattern signature `ItemColID a b' + The type variables ‛a, b’ + should be bound by the pattern signature ‛ItemColID a b’ but are actually discarded by a type synonym To fix this, expand the type synonym [Note: I hope to lift this restriction in due course] In the pattern: x :: ItemColID a b - In an equation for `get': + In an equation for ‛get’: get (x :: ItemColID a b) = x :: ItemColID a b diff --git a/tests/typecheck/should_fail/T3468.stderr b/tests/typecheck/should_fail/T3468.stderr index ac040ba05d1166eab6685763c4e243c4b7d11236..fa702d6d0fbf8dc80aa9f80d80e3eb9c6c84a312 100644 --- a/tests/typecheck/should_fail/T3468.stderr +++ b/tests/typecheck/should_fail/T3468.stderr @@ -1,12 +1,12 @@ T3468.hs-boot:3:6: - Type constructor `Tool' has conflicting definitions in the module and its hs-boot file + Type constructor ‛Tool’ has conflicting definitions in the module and its hs-boot file Main module: data Tool d No C type associated - RecFlag Recursive + RecFlag Recursive, Promotable = F :: forall d a r. a -> Tool d Stricts: _ FamilyInstance: none Boot file: abstract(False) Tool No C type associated - RecFlag NonRecursive + RecFlag NonRecursive, Not promotable FamilyInstance: none diff --git a/tests/typecheck/should_fail/T3540.stderr b/tests/typecheck/should_fail/T3540.stderr index 83bcbf1f859a4e097996b7d8695bdfd013ff84a0..db84dcd62c015236d31d983a3737e10133344189 100644 --- a/tests/typecheck/should_fail/T3540.stderr +++ b/tests/typecheck/should_fail/T3540.stderr @@ -1,20 +1,20 @@ T3540.hs:4:12: - Expected a type, but `a ~ Int' has kind `Constraint' - In the type signature for `thing': thing :: a ~ Int + Expected a type, but ‛a ~ Int’ has kind ‛Constraint’ + In the type signature for ‛thing’: thing :: a ~ Int T3540.hs:7:20: - Expected a type, but `a ~ Int' has kind `Constraint' - In the type signature for `thing1': thing1 :: Int -> (a ~ Int) + Expected a type, but ‛a ~ Int’ has kind ‛Constraint’ + In the type signature for ‛thing1’: thing1 :: Int -> (a ~ Int) T3540.hs:10:13: - Expected a type, but `a ~ Int' has kind `Constraint' - In the type signature for `thing2': thing2 :: (a ~ Int) -> Int + Expected a type, but ‛a ~ Int’ has kind ‛Constraint’ + In the type signature for ‛thing2’: thing2 :: (a ~ Int) -> Int T3540.hs:13:12: - Expected a type, but `?dude :: Int' has kind `Constraint' - In the type signature for `thing3': thing3 :: (?dude :: Int) -> Int + Expected a type, but ‛?dude :: Int’ has kind ‛Constraint’ + In the type signature for ‛thing3’: thing3 :: (?dude :: Int) -> Int T3540.hs:16:11: - Expected a type, but `Eq a' has kind `Constraint' - In the type signature for `thing4': thing4 :: (Eq a) -> Int + Expected a type, but ‛Eq a’ has kind ‛Constraint’ + In the type signature for ‛thing4’: thing4 :: (Eq a) -> Int diff --git a/tests/typecheck/should_fail/T3592.stderr b/tests/typecheck/should_fail/T3592.stderr index 08a02ce8a2756825af4c89b49c754d7ac5e17c4a..be59667e3407670a8cd7f53a725cc0c48eb48e3f 100644 --- a/tests/typecheck/should_fail/T3592.stderr +++ b/tests/typecheck/should_fail/T3592.stderr @@ -1,13 +1,13 @@ T3592.hs:8:5: - No instance for (Show (T a)) arising from a use of `show' + No instance for (Show (T a)) arising from a use of ‛show’ In the expression: show - In an equation for `f': f = show + In an equation for ‛f’: f = show T3592.hs:11:7: - No instance for (Show a) arising from a use of `show' + No instance for (Show a) arising from a use of ‛show’ Possible fix: add (Show a) to the context of the type signature for g :: T a -> String In the expression: show x - In an equation for `g': g x = show x + In an equation for ‛g’: g x = show x diff --git a/tests/typecheck/should_fail/T3613.stderr b/tests/typecheck/should_fail/T3613.stderr index 1373b7143d76efe4d2605e741124b09710199883..956e20cb76dde8a6287f704f457b18f1b79ecffe 100644 --- a/tests/typecheck/should_fail/T3613.stderr +++ b/tests/typecheck/should_fail/T3613.stderr @@ -1,20 +1,20 @@ T3613.hs:14:20: - Couldn't match type `IO' with `Maybe' + Couldn't match type ‛IO’ with ‛Maybe’ Expected type: Maybe () Actual type: IO () - In the first argument of `(>>)', namely `bar' - In the first argument of `fooThen', namely `(bar >> undefined)' + In the first argument of ‛(>>)’, namely ‛bar’ + In the first argument of ‛fooThen’, namely ‛(bar >> undefined)’ In the expression: fooThen (bar >> undefined) T3613.hs:17:24: - Couldn't match type `IO' with `Maybe' + Couldn't match type ‛IO’ with ‛Maybe’ Expected type: Maybe () Actual type: IO () In a stmt of a 'do' block: bar - In the first argument of `fooThen', namely - `(do { bar; - undefined })' + In the first argument of ‛fooThen’, namely + ‛(do { bar; + undefined })’ In the expression: fooThen (do { bar; diff --git a/tests/typecheck/should_fail/T3950.stderr b/tests/typecheck/should_fail/T3950.stderr index 07b1d32f997ecb2b536fbcefe9e72faa6111a29e..b95b4f817799484307eef9df3d996c835c88c2da 100644 --- a/tests/typecheck/should_fail/T3950.stderr +++ b/tests/typecheck/should_fail/T3950.stderr @@ -1,14 +1,14 @@ T3950.hs:15:13: - Couldn't match kind `* -> *' with `*' + Couldn't match kind ‛* -> *’ with ‛*’ When matching types w :: (* -> * -> *) -> * Sealed :: (* -> *) -> * Expected type: w (Id p) Actual type: Sealed (Id p0 x0) - In the first argument of `Just', namely rp' + In the first argument of ‛Just’, namely ‛rp'’ In the expression: Just rp' - In an equation for `rp': + In an equation for ‛rp’: rp _ = Just rp' where diff --git a/tests/typecheck/should_fail/T3966.stderr b/tests/typecheck/should_fail/T3966.stderr index ccbe467449727f09e4f5a5f49b105d84d59439ce..6e292b088736515acd6fa8512eea07557b9c6969 100644 --- a/tests/typecheck/should_fail/T3966.stderr +++ b/tests/typecheck/should_fail/T3966.stderr @@ -1,8 +1,8 @@ T3966.hs:5:16: Warning: - Ignoring unusable UNPACK pragma on the first argument of `Foo' - In the definition of data constructor `Foo' - In the data declaration for `Foo' + Ignoring unusable UNPACK pragma on the first argument of ‛Foo’ + In the definition of data constructor ‛Foo’ + In the data declaration for ‛Foo’ <no location info>: Failing due to -Werror. diff --git a/tests/typecheck/should_fail/T4875.stderr b/tests/typecheck/should_fail/T4875.stderr index 24c570e73b883d5559ba936fd2a11e41a59120f5..ae88bdf9762bb9cf899b3b16cbf7c24fb4ab5d1b 100644 --- a/tests/typecheck/should_fail/T4875.stderr +++ b/tests/typecheck/should_fail/T4875.stderr @@ -1,5 +1,5 @@ - -T4875.hs:27:24: - `r' is applied to too many type arguments - In the type `r c -> [c]' - In the class declaration for `Morphic' + +T4875.hs:27:24: + ‛r’ is applied to too many type arguments + In the type ‛r c -> [c]’ + In the class declaration for ‛Morphic’ diff --git a/tests/typecheck/should_fail/T5051.stderr b/tests/typecheck/should_fail/T5051.stderr index cebde5c29fc666e8d50ab2877ca79c146b790cc6..b15c2d9fafed6875def9a2e41a4e06772006d0a3 100644 --- a/tests/typecheck/should_fail/T5051.stderr +++ b/tests/typecheck/should_fail/T5051.stderr @@ -1,11 +1,11 @@ T5051.hs:11:11: - Overlapping instances for Eq [a] arising from a use of `>=' + Overlapping instances for Eq [a] arising from a use of ‛>=’ Matching instances: - instance Eq a => Eq [a] -- Defined in `GHC.Classes' + instance Eq a => Eq [a] -- Defined in ‛GHC.Classes’ instance [overlap ok] Eq [T] -- Defined at T5051.hs:8:10 - (The choice depends on the instantiation of `a' + (The choice depends on the instantiation of ‛a’ To pick the first instance above, use -XIncoherentInstances when compiling the other instance declarations) In the expression: x >= x - In an equation for `foo': foo x = x >= x + In an equation for ‛foo’: foo x = x >= x diff --git a/tests/typecheck/should_fail/T5084.stderr b/tests/typecheck/should_fail/T5084.stderr index eba9426342d2d562c71bd9c3701a45c1e3e235a6..de9b4b1469a248ca1951a9587550a1a15c594fdf 100644 --- a/tests/typecheck/should_fail/T5084.stderr +++ b/tests/typecheck/should_fail/T5084.stderr @@ -1,3 +1,3 @@ T5084.hs:6:5: - The INLINE pragma for default method `bar' lacks an accompanying binding + The INLINE pragma for default method ‛bar’ lacks an accompanying binding diff --git a/tests/typecheck/should_fail/T5095.stderr b/tests/typecheck/should_fail/T5095.stderr index 6ef994fdc6700c9db6558dd890062b2c479a11ad..166bc5e2cf62894af05da905c321cceb511c216d 100644 --- a/tests/typecheck/should_fail/T5095.stderr +++ b/tests/typecheck/should_fail/T5095.stderr @@ -1,64 +1,64 @@ T5095.hs:9:11: - Overlapping instances for Eq a arising from a use of `==' + Overlapping instances for Eq a arising from a use of ‛==’ Matching instances: instance [overlap ok] Show a => Eq a -- Defined at T5095.hs:5:10 - instance Eq a => Eq (GHC.Real.Ratio a) -- Defined in `GHC.Real' - instance Eq () -- Defined in `GHC.Classes' - instance (Eq a, Eq b) => Eq (a, b) -- Defined in `GHC.Classes' + instance Eq a => Eq (GHC.Real.Ratio a) -- Defined in ‛GHC.Real’ + instance Eq () -- Defined in ‛GHC.Classes’ + instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c) => Eq (a, b, c) - -- Defined in `GHC.Classes' + -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) - -- Defined in `GHC.Classes' + -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e) - -- Defined in `GHC.Classes' + -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f) - -- Defined in `GHC.Classes' + -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq (a, b, c, d, e, f, g) - -- Defined in `GHC.Classes' + -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) => Eq (a, b, c, d, e, f, g, h) - -- Defined in `GHC.Classes' + -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) => Eq (a, b, c, d, e, f, g, h, i) - -- Defined in `GHC.Classes' + -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j) => Eq (a, b, c, d, e, f, g, h, i, j) - -- Defined in `GHC.Classes' + -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k) => Eq (a, b, c, d, e, f, g, h, i, j, k) - -- Defined in `GHC.Classes' + -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l) => Eq (a, b, c, d, e, f, g, h, i, j, k, l) - -- Defined in `GHC.Classes' + -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m) - -- Defined in `GHC.Classes' + -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n) - -- Defined in `GHC.Classes' + -- Defined in ‛GHC.Classes’ instance (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) - -- Defined in `GHC.Classes' - instance Eq Bool -- Defined in `GHC.Classes' - instance Eq Char -- Defined in `GHC.Classes' - instance Eq Double -- Defined in `GHC.Classes' - instance Eq Float -- Defined in `GHC.Classes' - instance Eq Int -- Defined in `GHC.Classes' - instance Eq Ordering -- Defined in `GHC.Classes' - instance Eq GHC.Types.Word -- Defined in `GHC.Classes' - instance Eq a => Eq [a] -- Defined in `GHC.Classes' - instance Eq Integer -- Defined in `integer-gmp:GHC.Integer.Type' - (The choice depends on the instantiation of `a' + -- Defined in ‛GHC.Classes’ + instance Eq Bool -- Defined in ‛GHC.Classes’ + instance Eq Char -- Defined in ‛GHC.Classes’ + instance Eq Double -- Defined in ‛GHC.Classes’ + instance Eq Float -- Defined in ‛GHC.Classes’ + instance Eq Int -- Defined in ‛GHC.Classes’ + instance Eq Ordering -- Defined in ‛GHC.Classes’ + instance Eq GHC.Types.Word -- Defined in ‛GHC.Classes’ + instance Eq a => Eq [a] -- Defined in ‛GHC.Classes’ + instance Eq Integer -- Defined in ‛integer-gmp:GHC.Integer.Type’ + (The choice depends on the instantiation of ‛a’ To pick the first instance above, use -XIncoherentInstances when compiling the other instance declarations) In the expression: x == y - In an equation for `f': f x y = x == y + In an equation for ‛f’: f x y = x == y diff --git a/tests/typecheck/should_fail/T5236.stderr b/tests/typecheck/should_fail/T5236.stderr index 74e4606993600472640169c5ad803a6bd1958751..b2de3de8d63a4e6de6f8678aa39647d4750bbd5a 100644 --- a/tests/typecheck/should_fail/T5236.stderr +++ b/tests/typecheck/should_fail/T5236.stderr @@ -1,12 +1,12 @@ - -T5236.hs:13:9: - Couldn't match type `A' with `B' - When using functional dependencies to combine - Id A A, - arising from the dependency `a -> b' - in the instance declaration at T5236.hs:10:10 - Id A B, - arising from the type signature for loop :: Id A B => Bool - at T5236.hs:13:9-22 - In the ambiguity check for: Id A B => Bool - In the type signature for `loop': loop :: Id A B => Bool + +T5236.hs:13:9: + Couldn't match type ‛A’ with ‛B’ + When using functional dependencies to combine + Id A A, + arising from the dependency ‛a -> b’ + in the instance declaration at T5236.hs:10:10 + Id A B, + arising from the type signature for loop :: Id A B => Bool + at T5236.hs:13:9-22 + In the ambiguity check for: Id A B => Bool + In the type signature for ‛loop’: loop :: Id A B => Bool diff --git a/tests/typecheck/should_fail/T5246.stderr b/tests/typecheck/should_fail/T5246.stderr index b37fbf3ebede9803d0c724e5a2ddae1f4440ef5b..f494a4c5b77b80ad2fd126fc38d81e7d9c675c40 100644 --- a/tests/typecheck/should_fail/T5246.stderr +++ b/tests/typecheck/should_fail/T5246.stderr @@ -1,10 +1,10 @@ T5246.hs:11:10: - Couldn't match type `[Char]' with `Int' + Couldn't match type ‛[Char]’ with ‛Int’ When using functional dependencies to combine ?x::[Char], arising from the implicit-parameter bindings for ?x at T5246.hs:(10,7)-(11,12) - ?x::Int, arising from a use of `foo' at T5246.hs:11:10-12 + ?x::Int, arising from a use of ‛foo’ at T5246.hs:11:10-12 In the expression: foo In the expression: let ?x = "hello" in foo diff --git a/tests/typecheck/should_fail/T5300.stderr b/tests/typecheck/should_fail/T5300.stderr index 749bd22b2fe2448489e3cf82de2dcf2413c7578a..f2652fcbbdcf2e2aca8012c4279fe8dab5bdd617 100644 --- a/tests/typecheck/should_fail/T5300.stderr +++ b/tests/typecheck/should_fail/T5300.stderr @@ -1,32 +1,32 @@ - -T5300.hs:11:7: - Could not deduce (C1 a b c0) - arising from the ambiguity check for `f1' - from the context (Monad m, C1 a b c) - bound by the type signature for - f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a - at T5300.hs:11:7-50 - The type variable `c0' is ambiguous - In the ambiguity check for: - forall a b (m :: * -> *) c. - (Monad m, C1 a b c) => - a -> StateT (T b) m a - In the type signature for `f1': - f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a - -T5300.hs:14:7: - Could not deduce (C1 a1 b1 c10) - arising from the ambiguity check for `f2' - from the context (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) - bound by the type signature for - f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) => - a1 -> StateT (T b2) m a2 - at T5300.hs:14:7-69 - The type variable `c10' is ambiguous - In the ambiguity check for: - forall a1 b2 (m :: * -> *) a2 b1 c1 c2. - (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) => - a1 -> StateT (T b2) m a2 - In the type signature for `f2': - f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) => - a1 -> StateT (T b2) m a2 + +T5300.hs:11:7: + Could not deduce (C1 a b c0) + arising from the ambiguity check for ‛f1’ + from the context (Monad m, C1 a b c) + bound by the type signature for + f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a + at T5300.hs:11:7-50 + The type variable ‛c0’ is ambiguous + In the ambiguity check for: + forall a b (m :: * -> *) c. + (Monad m, C1 a b c) => + a -> StateT (T b) m a + In the type signature for ‛f1’: + f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a + +T5300.hs:14:7: + Could not deduce (C1 a1 b1 c10) + arising from the ambiguity check for ‛f2’ + from the context (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) + bound by the type signature for + f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) => + a1 -> StateT (T b2) m a2 + at T5300.hs:14:7-69 + The type variable ‛c10’ is ambiguous + In the ambiguity check for: + forall a1 b2 (m :: * -> *) a2 b1 c1 c2. + (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) => + a1 -> StateT (T b2) m a2 + In the type signature for ‛f2’: + f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) => + a1 -> StateT (T b2) m a2 diff --git a/tests/typecheck/should_fail/T5570.stderr b/tests/typecheck/should_fail/T5570.stderr index d45eec581d34c57f44142f81ab9dd280bf929fa7..90f9155afad2c66fb331bc12520bfd418862afc0 100644 --- a/tests/typecheck/should_fail/T5570.stderr +++ b/tests/typecheck/should_fail/T5570.stderr @@ -1,9 +1,9 @@ - -T5570.hs:7:16: - Couldn't match kind `*' with `#' - When matching types - s0 :: * - Double# :: # - In the second argument of `($)', namely `D# $ 3.0##' - In the expression: print $ D# $ 3.0## - In an equation for `main': main = print $ D# $ 3.0## + +T5570.hs:7:16: + Couldn't match kind ‛*’ with ‛#’ + When matching types + s0 :: * + Double# :: # + In the second argument of ‛($)’, namely ‛D# $ 3.0##’ + In the expression: print $ D# $ 3.0## + In an equation for ‛main’: main = print $ D# $ 3.0## diff --git a/tests/typecheck/should_fail/T5684.hs b/tests/typecheck/should_fail/T5684.hs index a8c72595d07fad283bfdcb58a4ae8755e7a2eb7d..41d3773ebe9af19ab7dfc56294808e15a58e31d1 100755 --- a/tests/typecheck/should_fail/T5684.hs +++ b/tests/typecheck/should_fail/T5684.hs @@ -5,7 +5,7 @@ module T5684 where class B a b | a -> b where op :: a -> b -> () -class A a +class A a | -> a instance A b => B Bool b diff --git a/tests/typecheck/should_fail/T5684.stderr b/tests/typecheck/should_fail/T5684.stderr index a94aa883428a96e1dae327e683bfd6f8da0e0573..f3534f506d497e883d527136ea2545688de480b0 100644 --- a/tests/typecheck/should_fail/T5684.stderr +++ b/tests/typecheck/should_fail/T5684.stderr @@ -1,64 +1,64 @@ T5684.hs:25:12: - No instance for (A b6) arising from a use of `op' + No instance for (A b6) arising from a use of ‛op’ In the expression: op True undefined In the expression: [op False False, op 'c' undefined, op True undefined] - In an equation for `flop1': + In an equation for ‛flop1’: flop1 = [op False False, op 'c' undefined, op True undefined] T5684.hs:30:12: - No instance for (A b5) arising from a use of `op' + No instance for (A b5) arising from a use of ‛op’ In the expression: op True undefined In the expression: [op False False, op True undefined, op 'c' undefined] - In an equation for `flop2': + In an equation for ‛flop2’: flop2 = [op False False, op True undefined, op 'c' undefined] T5684.hs:36:12: - No instance for (A b4) arising from a use of `op' + No instance for (A b4) arising from a use of ‛op’ In the expression: op True undefined In the expression: [op 'c' undefined, op True undefined, op False False] - In an equation for `flop3': + In an equation for ‛flop3’: flop3 = [op 'c' undefined, op True undefined, op False False] T5684.hs:42:12: - No instance for (A b3) arising from a use of `op' + No instance for (A b3) arising from a use of ‛op’ In the expression: op True undefined In the expression: [op 'c' undefined, op False False, op True undefined] - In an equation for `flop4': + In an equation for ‛flop4’: flop4 = [op 'c' undefined, op False False, op True undefined] T5684.hs:46:12: - No instance for (A b2) arising from a use of `op' + No instance for (A b2) arising from a use of ‛op’ In the expression: op True undefined In the expression: [op True undefined, op 'c' undefined, op False False] - In an equation for `flop5': + In an equation for ‛flop5’: flop5 = [op True undefined, op 'c' undefined, op False False] T5684.hs:52:12: - No instance for (A b0) arising from a use of `op' + No instance for (A b0) arising from a use of ‛op’ In the expression: op True undefined In the expression: [op True undefined, op False False, op 'c' undefined] - In an equation for `flop6': + In an equation for ‛flop6’: flop6 = [op True undefined, op False False, op 'c' undefined] T5684.hs:53:12: - No instance for (A Bool) arising from a use of `op' + No instance for (A Bool) arising from a use of ‛op’ In the expression: op False False In the expression: [op True undefined, op False False, op 'c' undefined] - In an equation for `flop6': + In an equation for ‛flop6’: flop6 = [op True undefined, op False False, op 'c' undefined] T5684.hs:54:12: - No instance for (B Char b1) arising from a use of `op' + No instance for (B Char b1) arising from a use of ‛op’ In the expression: op 'c' undefined In the expression: [op True undefined, op False False, op 'c' undefined] - In an equation for `flop6': + In an equation for ‛flop6’: flop6 = [op True undefined, op False False, op 'c' undefined] diff --git a/tests/typecheck/should_fail/T5689.stderr b/tests/typecheck/should_fail/T5689.stderr index 4bd1210784cb626665460e203227d9e9fa6b5920..6fb1f222d68cabb1989b71f8fd664652052fa2d4 100644 --- a/tests/typecheck/should_fail/T5689.stderr +++ b/tests/typecheck/should_fail/T5689.stderr @@ -1,39 +1,39 @@ - -T5689.hs:10:36: - Couldn't match expected type `Bool' with actual type `t' - Relevant bindings include - r :: IORef (t -> t) (bound at T5689.hs:7:14) - v :: t (bound at T5689.hs:10:28) - In the expression: v - In the expression: if v then False else True - In the second argument of `writeIORef', namely - `(\ v -> if v then False else True)' - -T5689.hs:10:43: - Couldn't match expected type `t' with actual type `Bool' - Relevant bindings include - r :: IORef (t -> t) (bound at T5689.hs:7:14) - v :: t (bound at T5689.hs:10:28) - In the expression: False - In the expression: if v then False else True - In the second argument of `writeIORef', namely - `(\ v -> if v then False else True)' - -T5689.hs:10:54: - Couldn't match expected type `t' with actual type `Bool' - Relevant bindings include - r :: IORef (t -> t) (bound at T5689.hs:7:14) - v :: t (bound at T5689.hs:10:28) - In the expression: True - In the expression: if v then False else True - In the second argument of `writeIORef', namely - `(\ v -> if v then False else True)' - -T5689.hs:14:23: - Couldn't match expected type `t' with actual type `Bool' - Relevant bindings include - r :: IORef (t -> t) (bound at T5689.hs:7:14) - c :: t -> t (bound at T5689.hs:12:13) - In the first argument of `c', namely `True' - In the second argument of `($)', namely `c True' - In a stmt of a 'do' block: print $ c True + +T5689.hs:10:36: + Couldn't match expected type ‛Bool’ with actual type ‛t’ + Relevant bindings include + r :: IORef (t -> t) (bound at T5689.hs:7:14) + v :: t (bound at T5689.hs:10:28) + In the expression: v + In the expression: if v then False else True + In the second argument of ‛writeIORef’, namely + ‛(\ v -> if v then False else True)’ + +T5689.hs:10:43: + Couldn't match expected type ‛t’ with actual type ‛Bool’ + Relevant bindings include + r :: IORef (t -> t) (bound at T5689.hs:7:14) + v :: t (bound at T5689.hs:10:28) + In the expression: False + In the expression: if v then False else True + In the second argument of ‛writeIORef’, namely + ‛(\ v -> if v then False else True)’ + +T5689.hs:10:54: + Couldn't match expected type ‛t’ with actual type ‛Bool’ + Relevant bindings include + r :: IORef (t -> t) (bound at T5689.hs:7:14) + v :: t (bound at T5689.hs:10:28) + In the expression: True + In the expression: if v then False else True + In the second argument of ‛writeIORef’, namely + ‛(\ v -> if v then False else True)’ + +T5689.hs:14:23: + Couldn't match expected type ‛t’ with actual type ‛Bool’ + Relevant bindings include + r :: IORef (t -> t) (bound at T5689.hs:7:14) + c :: t -> t (bound at T5689.hs:12:13) + In the first argument of ‛c’, namely ‛True’ + In the second argument of ‛($)’, namely ‛c True’ + In a stmt of a 'do' block: print $ c True diff --git a/tests/typecheck/should_fail/T5691.stderr b/tests/typecheck/should_fail/T5691.stderr index fc517c2d482b64566514f32619c573837372bfa6..4b5676374c6e8c327cc243893220e76d7511b99f 100644 --- a/tests/typecheck/should_fail/T5691.stderr +++ b/tests/typecheck/should_fail/T5691.stderr @@ -1,17 +1,17 @@ - -T5691.hs:14:9: - Couldn't match type `p' with `PrintRuleInterp' - Expected type: PrintRuleInterp a - Actual type: p a - In the pattern: f :: p a - In an equation for `test': test (f :: p a) = MkPRI $ printRule_ f - In the instance declaration for `Test PrintRuleInterp' - -T5691.hs:15:24: - Couldn't match type `p' with `PrintRuleInterp' - Expected type: PrintRuleInterp a - Actual type: p a - Relevant bindings include f :: p a (bound at T5691.hs:14:9) - In the first argument of `printRule_', namely `f' - In the second argument of `($)', namely `printRule_ f' - In the expression: MkPRI $ printRule_ f + +T5691.hs:14:9: + Couldn't match type ‛p’ with ‛PrintRuleInterp’ + Expected type: PrintRuleInterp a + Actual type: p a + In the pattern: f :: p a + In an equation for ‛test’: test (f :: p a) = MkPRI $ printRule_ f + In the instance declaration for ‛Test PrintRuleInterp’ + +T5691.hs:15:24: + Couldn't match type ‛p’ with ‛PrintRuleInterp’ + Expected type: PrintRuleInterp a + Actual type: p a + Relevant bindings include f :: p a (bound at T5691.hs:14:9) + In the first argument of ‛printRule_’, namely ‛f’ + In the second argument of ‛($)’, namely ‛printRule_ f’ + In the expression: MkPRI $ printRule_ f diff --git a/tests/typecheck/should_fail/T5853.stderr b/tests/typecheck/should_fail/T5853.stderr index c36d64e84debda7d7f6e158c47c69537187eb4e8..4fdef8cdd7805bb662d1443ce57942ae7c333f5f 100644 --- a/tests/typecheck/should_fail/T5853.stderr +++ b/tests/typecheck/should_fail/T5853.stderr @@ -8,7 +8,7 @@ T5853.hs:15:52: Elem (Subst fa a) ~ a, Subst (Subst fa a) (Elem fa) ~ fa) bound by the RULE "map/map" at T5853.hs:15:2-57 - NB: `Subst' is a type function, and may not be injective + NB: ‛Subst’ is a type function, and may not be injective Relevant bindings include xs :: Subst fa a (bound at T5853.hs:15:23) g :: a -> Elem fa (bound at T5853.hs:15:21) diff --git a/tests/typecheck/should_fail/T5858.stderr b/tests/typecheck/should_fail/T5858.stderr index 0ecd766ec6a80e4734f5853b38c89be27b0a877e..893fd1a62b7ecfaacf1e5ecf47be2907775f552f 100644 --- a/tests/typecheck/should_fail/T5858.stderr +++ b/tests/typecheck/should_fail/T5858.stderr @@ -1,10 +1,10 @@ - -T5858.hs:11:7: - No instance for (InferOverloaded ([a0], [a1])) - arising from a use of `infer' - The type variables `a0', `a1' are ambiguous - Note: there is a potential instance available: - instance t1 ~ String => InferOverloaded (t1, t1) - -- Defined at T5858.hs:8:10 - In the expression: infer ([], []) - In an equation for `foo': foo = infer ([], []) + +T5858.hs:11:7: + No instance for (InferOverloaded ([t0], [t1])) + arising from a use of ‛infer’ + The type variables ‛t0’, ‛t1’ are ambiguous + Note: there is a potential instance available: + instance t1 ~ String => InferOverloaded (t1, t1) + -- Defined at T5858.hs:8:10 + In the expression: infer ([], []) + In an equation for ‛foo’: foo = infer ([], []) diff --git a/tests/typecheck/should_fail/T5957.stderr b/tests/typecheck/should_fail/T5957.stderr index c0bc12a7a2b419197c8939524fac86af2db81dae..f4300b0633a45c96bf22866164d43bc04e10778a 100644 --- a/tests/typecheck/should_fail/T5957.stderr +++ b/tests/typecheck/should_fail/T5957.stderr @@ -2,5 +2,5 @@ T5957.hs:3:9: Illegal polymorphic or qualified type: Show a => a -> String Perhaps you intended to use -XRankNTypes or -XRank2Types - In the type signature for `flex': + In the type signature for ‛flex’: flex :: Int -> Show a => a -> String diff --git a/tests/typecheck/should_fail/T5978.stderr b/tests/typecheck/should_fail/T5978.stderr index 9edfde072164839aa658964984f9124b97735c98..e07acd49b142c3ce80dc517848deb34b09a90f1d 100644 --- a/tests/typecheck/should_fail/T5978.stderr +++ b/tests/typecheck/should_fail/T5978.stderr @@ -1,10 +1,10 @@ - -T5978.hs:22:11: - Couldn't match type `Bool' with `Char' - When using functional dependencies to combine - C Double Bool, - arising from the dependency `from -> to' - in the instance declaration at T5978.hs:8:10 - C Double Char, arising from a use of `polyBar' at T5978.hs:22:11-17 - In the expression: polyBar id monoFoo - In an equation for `monoBar': monoBar = polyBar id monoFoo + +T5978.hs:22:11: + Couldn't match type ‛Bool’ with ‛Char’ + When using functional dependencies to combine + C Double Bool, + arising from the dependency ‛from -> to’ + in the instance declaration at T5978.hs:8:10 + C Double Char, arising from a use of ‛polyBar’ at T5978.hs:22:11-17 + In the expression: polyBar id monoFoo + In an equation for ‛monoBar’: monoBar = polyBar id monoFoo diff --git a/tests/typecheck/should_fail/T6001.stderr b/tests/typecheck/should_fail/T6001.stderr index 7fe591d54fc1bd886fe9d0482f4ee54d45123f2e..b1ef88d9fbfa3ad953fb33e1a7ca87bd817a275b 100644 --- a/tests/typecheck/should_fail/T6001.stderr +++ b/tests/typecheck/should_fail/T6001.stderr @@ -2,4 +2,4 @@ T6001.hs:8:18: Method signature does not match class; it should be fromInteger :: Integer -> DayKind - In the instance declaration for `Num DayKind' + In the instance declaration for ‛Num DayKind’ diff --git a/tests/typecheck/should_fail/T6069.stderr b/tests/typecheck/should_fail/T6069.stderr index b6ce7799bd93aabd341ed417873eee9aab8e8112..750dcbc5404498cfc95e42bb99bfecee80cd8b49 100644 --- a/tests/typecheck/should_fail/T6069.stderr +++ b/tests/typecheck/should_fail/T6069.stderr @@ -1,24 +1,24 @@ T6069.hs:13:15: - Couldn't match type `ST s0 Int' with `forall s. ST s b0' + Couldn't match type ‛ST s0 Int’ with ‛forall s. ST s b0’ Expected type: ST s0 Int -> b0 Actual type: (forall s. ST s b0) -> b0 - In the second argument of `(.)', namely `runST' + In the second argument of ‛(.)’, namely ‛runST’ In the expression: print . runST In the expression: (print . runST) fourty_two T6069.hs:14:15: - Couldn't match type `ST s1 Int' with `forall s. ST s b1' + Couldn't match type ‛ST s1 Int’ with ‛forall s. ST s b1’ Expected type: ST s1 Int -> b1 Actual type: (forall s. ST s b1) -> b1 - In the second argument of `(.)', namely `runST' + In the second argument of ‛(.)’, namely ‛runST’ In the expression: (print . runST) In the expression: (print . runST) $ fourty_two T6069.hs:15:16: - Couldn't match type `ST s2 Int' with `forall s. ST s b2' + Couldn't match type ‛ST s2 Int’ with ‛forall s. ST s b2’ Expected type: ST s2 Int -> b2 Actual type: (forall s. ST s b2) -> b2 - In the second argument of `(.)', namely `runST' - In the first argument of `($)', namely `(print . runST)' + In the second argument of ‛(.)’, namely ‛runST’ + In the first argument of ‛($)’, namely ‛(print . runST)’ In the expression: (print . runST) $ diff --git a/tests/typecheck/should_fail/T6078.stderr b/tests/typecheck/should_fail/T6078.stderr index 7690ecd9c61caa710e105da2df3b7bef9c5a6f97..32e3e056d3ae2cef7058eccb3a1e8832959bf5a2 100644 --- a/tests/typecheck/should_fail/T6078.stderr +++ b/tests/typecheck/should_fail/T6078.stderr @@ -7,5 +7,5 @@ T6078.hs:8:10: let ip1p@(Ptr ip1) = Ptr ip0 `plusPtr` len in ip1p In the expression: \ fpbuf ip0 ipe s0 -> let ip1p@(Ptr ip1) = ... in ip1p - In an equation for `byteStringSlice': + In an equation for ‛byteStringSlice’: byteStringSlice len = \ fpbuf ip0 ipe s0 -> let ... in ip1p diff --git a/tests/typecheck/should_fail/T6161.stderr b/tests/typecheck/should_fail/T6161.stderr index 089da39f20e8fb65210951bfd4611ad1f05fd773..afc3a946f86fefb2f080c09b4e150896af1c6c00 100644 --- a/tests/typecheck/should_fail/T6161.stderr +++ b/tests/typecheck/should_fail/T6161.stderr @@ -1,5 +1,5 @@ T6161.hs:29:12: - No instance for (Super (Fam Float)) arising from a use of `testDup' + No instance for (Super (Fam Float)) arising from a use of ‛testDup’ In the expression: testDup (FamFloat 3.0) - In an equation for `testProg': testProg = testDup (FamFloat 3.0) + In an equation for ‛testProg’: testProg = testDup (FamFloat 3.0) diff --git a/tests/typecheck/should_fail/T7019.stderr b/tests/typecheck/should_fail/T7019.stderr index 43f1fe520907f6d809737e4a464468071167ffad..935c3be522f147ef59893362f234767c712fe9d9 100644 --- a/tests/typecheck/should_fail/T7019.stderr +++ b/tests/typecheck/should_fail/T7019.stderr @@ -1,6 +1,6 @@ T7019.hs:14:10: - Malformed predicate `C c' + Malformed predicate ‛C c’ In the context: (C c) While checking an instance declaration - In the instance declaration for `Monad (Free c)' + In the instance declaration for ‛Monad (Free c)’ diff --git a/tests/typecheck/should_fail/T7019a.stderr b/tests/typecheck/should_fail/T7019a.stderr index 2859f716b63bc2470b08d07bdf00cc54d8e772e9..cd474af8a63da80ecc4c4c99c2a20dc203aa8401 100644 --- a/tests/typecheck/should_fail/T7019a.stderr +++ b/tests/typecheck/should_fail/T7019a.stderr @@ -1,6 +1,6 @@ T7019a.hs:11:1: - Malformed predicate `forall b. Context (Associated a b)' + Malformed predicate ‛forall b. Context (Associated a b)’ In the context: (forall b. Context (Associated a b)) - While checking the super-classes of class `Class' - In the class declaration for `Class' + While checking the super-classes of class ‛Class’ + In the class declaration for ‛Class’ diff --git a/tests/typecheck/should_fail/T7175.stderr b/tests/typecheck/should_fail/T7175.stderr index 92272b6b36c1dfb3d978febb477d3c4e187c27b3..e65918c22b9484b115c3755efd40202f1548abab 100644 --- a/tests/typecheck/should_fail/T7175.stderr +++ b/tests/typecheck/should_fail/T7175.stderr @@ -1,6 +1,6 @@ T7175.hs:8:4: - Data constructor `G1C' returns type `F Int' - instead of an instance of its parent type `G1 a' - In the definition of data constructor `G1C' - In the data declaration for `G1' + Data constructor ‛G1C’ returns type ‛F Int’ + instead of an instance of its parent type ‛G1 a’ + In the definition of data constructor ‛G1C’ + In the data declaration for ‛G1’ diff --git a/tests/typecheck/should_fail/T7210.stderr b/tests/typecheck/should_fail/T7210.stderr index d0fbf382cb1034103a8801b1de00f4f43fac0132..148f9bcd5e8a60ab49b44fb7e007c841ad074b28 100644 --- a/tests/typecheck/should_fail/T7210.stderr +++ b/tests/typecheck/should_fail/T7210.stderr @@ -1,6 +1,6 @@ T7210.hs:5:19: Unexpected strictness annotation: !IntMap - In the type `!IntMap Int' - In the definition of data constructor `C' - In the data declaration for `T' + In the type ‛!IntMap Int’ + In the definition of data constructor ‛C’ + In the data declaration for ‛T’ diff --git a/tests/typecheck/should_fail/T7220.stderr b/tests/typecheck/should_fail/T7220.stderr index 50860145d1af4c9402e22e1f9fc18a8784f8f916..d57e06843e70d4a5bf0c660b6ff9343d8d1c53cb 100644 --- a/tests/typecheck/should_fail/T7220.stderr +++ b/tests/typecheck/should_fail/T7220.stderr @@ -1,9 +1,9 @@ T7220.hs:24:6: - Cannot instantiate unification variable `b0' + Cannot instantiate unification variable ‛b0’ with a type involving foralls: forall b. (C A b, TF b ~ Y) => b Perhaps you want -XImpredicativeTypes In the expression: f :: (forall b. (C A b, TF b ~ Y) => b) -> X In the expression: (f :: (forall b. (C A b, TF b ~ Y) => b) -> X) u - In an equation for `v': + In an equation for ‛v’: v = (f :: (forall b. (C A b, TF b ~ Y) => b) -> X) u diff --git a/tests/typecheck/should_fail/T7264.stderr b/tests/typecheck/should_fail/T7264.stderr index 31cc1dfbe5045f280ec6e6eb5b35f6e6ef225f93..3c0c068afdb6646b167ea6173419958223eddd4d 100644 --- a/tests/typecheck/should_fail/T7264.stderr +++ b/tests/typecheck/should_fail/T7264.stderr @@ -1,13 +1,13 @@ T7264.hs:13:19: - Couldn't match type `a' with `forall r. r -> String' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛forall r. r -> String’ + ‛a’ is a rigid type variable bound by the inferred type of mkFoo2 :: a -> Maybe Foo at T7264.hs:13:1 Expected type: a -> Foo Actual type: (forall r. r -> String) -> Foo Relevant bindings include mkFoo2 :: a -> Maybe Foo (bound at T7264.hs:13:1) val :: a (bound at T7264.hs:13:8) - In the first argument of `mmap', namely `Foo' + In the first argument of ‛mmap’, namely ‛Foo’ In the expression: mmap Foo (Just val) - In an equation for `mkFoo2': mkFoo2 val = mmap Foo (Just val) + In an equation for ‛mkFoo2’: mkFoo2 val = mmap Foo (Just val) diff --git a/tests/typecheck/should_fail/T7279.stderr b/tests/typecheck/should_fail/T7279.stderr index 6af478e52f16be9b194f8c99cb18b10fce8f68ee..52793544c2b3a728a1a4df230f8e37f75d03f1c5 100644 --- a/tests/typecheck/should_fail/T7279.stderr +++ b/tests/typecheck/should_fail/T7279.stderr @@ -5,6 +5,6 @@ T7279.hs:6:10: from the context (Eq a, Show b) bound by an instance declaration: (Eq a, Show b) => Eq (T a) at T7279.hs:6:10-35 - The type variable `b0' is ambiguous + The type variable ‛b0’ is ambiguous In the ambiguity check for: forall a b. (Eq a, Show b) => Eq (T a) - In the instance declaration for `Eq (T a)' + In the instance declaration for ‛Eq (T a)’ diff --git a/tests/typecheck/should_fail/T7368.stderr b/tests/typecheck/should_fail/T7368.stderr index e189c8907d0ad31cdfb7507ab7580d1335f42b15..8f1f478b944a50f2c55a4ff5888674bd9cf98050 100644 --- a/tests/typecheck/should_fail/T7368.stderr +++ b/tests/typecheck/should_fail/T7368.stderr @@ -1,20 +1,20 @@ T7368.hs:3:10: - Couldn't match kind `* -> *' with `*' + Couldn't match kind ‛* -> *’ with ‛*’ When matching types c0 :: (* -> *) -> * (->) a0 :: * -> * Expected type: a0 -> b0 Actual type: c0 b1 - In the return type of a call of `l' - Probable cause: `l' is applied to too many arguments - In the first argument of `b', namely `(l ())' + In the return type of a call of ‛l’ + Probable cause: ‛l’ is applied to too many arguments + In the first argument of ‛b’, namely ‛(l ())’ In the expression: b (l ()) T7368.hs:3:13: - Couldn't match type `()' with `b0 a1' + Couldn't match type ‛()’ with ‛b0 a1’ Expected type: b1 a1 Actual type: () - In the first argument of `l', namely `()' - In the first argument of `b', namely `(l ())' + In the first argument of ‛l’, namely ‛()’ + In the first argument of ‛b’, namely ‛(l ())’ In the expression: b (l ()) diff --git a/tests/typecheck/should_fail/T7368a.stderr b/tests/typecheck/should_fail/T7368a.stderr index db0f69fbac91f0ca5a9b133d9767378b90366783..bc193cab05f6d627feb16ad575c841368e6fef2b 100644 --- a/tests/typecheck/should_fail/T7368a.stderr +++ b/tests/typecheck/should_fail/T7368a.stderr @@ -1,10 +1,10 @@ - -T7368a.hs:8:6: - Couldn't match kind `*' with `* -> *' - When matching types - f :: * -> * - Bad :: (* -> *) -> * - Expected type: f (Bad f) - Actual type: Bad t0 - In the pattern: Bad x - In an equation for `fun': fun (Bad x) = True + +T7368a.hs:8:6: + Couldn't match kind ‛*’ with ‛* -> *’ + When matching types + f :: * -> * + Bad :: (* -> *) -> * + Expected type: f (Bad f) + Actual type: Bad t0 + In the pattern: Bad x + In an equation for ‛fun’: fun (Bad x) = True diff --git a/tests/typecheck/should_fail/T7410.stderr b/tests/typecheck/should_fail/T7410.stderr index 80526514665ba73be5baeb6a532908e484bfabde..877377e1b05c930493fba668f3506f544a488406 100644 --- a/tests/typecheck/should_fail/T7410.stderr +++ b/tests/typecheck/should_fail/T7410.stderr @@ -1,6 +1,6 @@ T7410.hs:3:9: - Expecting one more argument to `Either Int' - The first argument of a tuple should have kind `*', - but `Either Int' has kind `* -> *' - In the type signature for `foo': foo :: (Either Int, Int) + Expecting one more argument to ‛Either Int’ + The first argument of a tuple should have kind ‛*’, + but ‛Either Int’ has kind ‛* -> *’ + In the type signature for ‛foo’: foo :: (Either Int, Int) diff --git a/tests/typecheck/should_fail/T7453.stderr b/tests/typecheck/should_fail/T7453.stderr index af88fef12011d4d056e4d0a8a61be86cde3c6a77..4a95105f44f5469cd3b6ae07544e3c7697a44f29 100644 --- a/tests/typecheck/should_fail/T7453.stderr +++ b/tests/typecheck/should_fail/T7453.stderr @@ -1,7 +1,7 @@ T7453.hs:10:30: - Couldn't match expected type `t1' with actual type `t' - because type variable `t1' would escape its scope + Couldn't match expected type ‛t1’ with actual type ‛t’ + because type variable ‛t1’ would escape its scope This (rigid, skolem) type variable is bound by the type signature for z :: Id t1 at T7453.hs:8:16-19 @@ -10,13 +10,13 @@ T7453.hs:10:30: v :: t (bound at T7453.hs:7:7) z :: Id t1 (bound at T7453.hs:9:11) aux :: Id t1 (bound at T7453.hs:10:21) - In the first argument of `Id', namely `v' + In the first argument of ‛Id’, namely ‛v’ In the expression: Id v - In an equation for `aux': aux = Id v + In an equation for ‛aux’: aux = Id v T7453.hs:16:33: - Couldn't match expected type `t2' with actual type `t' - because type variable `t2' would escape its scope + Couldn't match expected type ‛t2’ with actual type ‛t’ + because type variable ‛t2’ would escape its scope This (rigid, skolem) type variable is bound by the type signature for z :: () -> t2 at T7453.hs:14:16-22 @@ -25,13 +25,13 @@ T7453.hs:16:33: v :: t (bound at T7453.hs:13:7) z :: () -> t2 (bound at T7453.hs:15:11) aux :: b -> t2 (bound at T7453.hs:16:21) - In the first argument of `const', namely `v' + In the first argument of ‛const’, namely ‛v’ In the expression: const v - In an equation for `aux': aux = const v + In an equation for ‛aux’: aux = const v T7453.hs:21:15: - Couldn't match expected type `t2' with actual type `t' - because type variable `t2' would escape its scope + Couldn't match expected type ‛t2’ with actual type ‛t’ + because type variable ‛t2’ would escape its scope This (rigid, skolem) type variable is bound by the type signature for z :: t2 at T7453.hs:20:16 @@ -41,11 +41,11 @@ T7453.hs:21:15: z :: t2 (bound at T7453.hs:21:11) aux :: forall b. b -> t2 (bound at T7453.hs:22:21) In the expression: v - In an equation for `z': + In an equation for ‛z’: z = v where aux = const v - In an equation for `cast3': + In an equation for ‛cast3’: cast3 v = z where diff --git a/tests/typecheck/should_fail/T7525.stderr b/tests/typecheck/should_fail/T7525.stderr index 032de67df7796a17967fdadd6cf0be4df2ab70dd..1e2c0eb235bda2cccb9d41536fabc6912af3f389 100644 --- a/tests/typecheck/should_fail/T7525.stderr +++ b/tests/typecheck/should_fail/T7525.stderr @@ -1,9 +1,9 @@ T7525.hs:5:30: Could not deduce (?b::Bool) - arising from a use of implicit parameter `?b' + arising from a use of implicit parameter ‛?b’ from the context (?a::Bool) bound by the implicit-parameter bindings for ?a at T7525.hs:5:7-31 - In the second argument of `(&&)', namely `?b' + In the second argument of ‛(&&)’, namely ‛?b’ In the expression: ?a && ?b In the expression: let ?a = True in ?a && ?b diff --git a/tests/typecheck/should_fail/T7545.stderr b/tests/typecheck/should_fail/T7545.stderr index 1b6a3370d2455a566acd1790cb0d331c0304abdb..dc661dae73a92c747c0837466d75b630d83a3053 100644 --- a/tests/typecheck/should_fail/T7545.stderr +++ b/tests/typecheck/should_fail/T7545.stderr @@ -2,4 +2,4 @@ T7545.hs:8:9: Method signature does not match class; it should be f :: forall b1. (a -> b) -> b1 - In the instance declaration for `C (a -> b)' + In the instance declaration for ‛C (a -> b)’ diff --git a/tests/typecheck/should_fail/T7609.hs b/tests/typecheck/should_fail/T7609.hs new file mode 100644 index 0000000000000000000000000000000000000000..9e9ebe1a59d7eb12cda5732f32173c99014d15ca --- /dev/null +++ b/tests/typecheck/should_fail/T7609.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE TypeOperators #-} + +module T7609 where + +data X a b + +f :: (a `X` a, Maybe) +f = undefined + +g :: (a `X` a) => Maybe +g = undefined \ No newline at end of file diff --git a/tests/typecheck/should_fail/T7609.stderr b/tests/typecheck/should_fail/T7609.stderr new file mode 100644 index 0000000000000000000000000000000000000000..650329a298588609b293e9b9c525eef3cff16b44 --- /dev/null +++ b/tests/typecheck/should_fail/T7609.stderr @@ -0,0 +1,11 @@ + +T7609.hs:7:16: + Expecting one more argument to ‛Maybe’ + The second argument of a tuple should have kind ‛*’, + but ‛Maybe’ has kind ‛* -> *’ + In the type signature for ‛f’: f :: (a `X` a, Maybe) + +T7609.hs:10:19: + Expecting one more argument to ‛Maybe’ + Expected a type, but ‛Maybe’ has kind ‛* -> *’ + In the type signature for ‛g’: g :: a `X` a => Maybe diff --git a/tests/typecheck/should_fail/T7645.hs b/tests/typecheck/should_fail/T7645.hs new file mode 100644 index 0000000000000000000000000000000000000000..db086c8e61d35d1c0e3ab6059597e95d68e5a6e8 --- /dev/null +++ b/tests/typecheck/should_fail/T7645.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE TypeOperators, KindSignatures #-} +module T7645 where + +data (+) a b = P + +f :: ((+) a (a :: *), Maybe) +f = undefined + diff --git a/tests/typecheck/should_fail/T7645.stderr b/tests/typecheck/should_fail/T7645.stderr new file mode 100644 index 0000000000000000000000000000000000000000..ae00e21ca68a7ff3d127b1654503c821aec03c59 --- /dev/null +++ b/tests/typecheck/should_fail/T7645.stderr @@ -0,0 +1,6 @@ + +T7645.hs:6:23: + Expecting one more argument to ‛Maybe’ + The second argument of a tuple should have kind ‛*’, + but ‛Maybe’ has kind ‛* -> *’ + In the type signature for ‛f’: f :: ((+) a (a :: *), Maybe) diff --git a/tests/typecheck/should_fail/T7734.hs b/tests/typecheck/should_fail/T7734.hs new file mode 100644 index 0000000000000000000000000000000000000000..85f83f528193e5dc751eedd5e5b102f9a9029be2 --- /dev/null +++ b/tests/typecheck/should_fail/T7734.hs @@ -0,0 +1,5 @@ + +module T7734 where + +x `f` y = x x +(&) x y = x x diff --git a/tests/typecheck/should_fail/T7734.stderr b/tests/typecheck/should_fail/T7734.stderr new file mode 100644 index 0000000000000000000000000000000000000000..d90d136a1a93ce8c4f17e08792e87e092a8c52cf --- /dev/null +++ b/tests/typecheck/should_fail/T7734.stderr @@ -0,0 +1,18 @@ + +T7734.hs:4:13: + Occurs check: cannot construct the infinite type: t2 ~ t2 -> t1 + Relevant bindings include + f :: (t2 -> t1) -> t -> t1 (bound at T7734.hs:4:1) + x :: t2 -> t1 (bound at T7734.hs:4:1) + In the first argument of ‛x’, namely ‛x’ + In the expression: x x + In an equation for ‛f’: x `f` y = x x + +T7734.hs:5:13: + Occurs check: cannot construct the infinite type: t2 ~ t2 -> t1 + Relevant bindings include + & :: (t2 -> t1) -> t -> t1 (bound at T7734.hs:5:1) + x :: t2 -> t1 (bound at T7734.hs:5:5) + In the first argument of ‛x’, namely ‛x’ + In the expression: x x + In an equation for ‛&’: (&) x y = x x diff --git a/tests/typecheck/should_fail/TcMultiWayIfFail.stderr b/tests/typecheck/should_fail/TcMultiWayIfFail.stderr index fe53beac4788f18818512ce70730e203f3aeb842..5655af9da6d33bd1281cfed48ddf10e77ea69146 100644 --- a/tests/typecheck/should_fail/TcMultiWayIfFail.stderr +++ b/tests/typecheck/should_fail/TcMultiWayIfFail.stderr @@ -1,16 +1,16 @@ TcMultiWayIfFail.hs:6:24: - Couldn't match expected type `Int' with actual type `[Char]' + Couldn't match expected type ‛Int’ with actual type ‛[Char]’ In the expression: "2" In the expression: if | True -> 1 :: Int | False -> "2" | otherwise -> [3 :: Int] - In an equation for `x1': + In an equation for ‛x1’: x1 = if | True -> 1 :: Int | False -> "2" | otherwise -> [3 :: Int] TcMultiWayIfFail.hs:7:24: - Couldn't match expected type `Int' with actual type `[Int]' + Couldn't match expected type ‛Int’ with actual type ‛[Int]’ In the expression: [3 :: Int] In the expression: if | True -> 1 :: Int | False -> "2" | otherwise -> [3 :: Int] - In an equation for `x1': + In an equation for ‛x1’: x1 = if | True -> 1 :: Int | False -> "2" | otherwise -> [3 :: Int] diff --git a/tests/typecheck/should_fail/all.T b/tests/typecheck/should_fail/all.T index a4d021662ed861695dfdcfc12d0eab07e86f555e..dfa0668bef6f4d4a8f8c33f37c7112818d467523 100644 --- a/tests/typecheck/should_fail/all.T +++ b/tests/typecheck/should_fail/all.T @@ -24,7 +24,7 @@ test('tcfail023', normal, compile_fail, ['']) test('tcfail027', normal, compile_fail, ['']) test('tcfail028', normal, compile_fail, ['']) test('tcfail029', normal, compile_fail, ['']) -test('tcfail030', if_compiler_type('hugs', expect_fail), compile_fail, ['']) +test('tcfail030', when(compiler_type('hugs'), expect_fail), compile_fail, ['']) test('tcfail031', normal, compile_fail, ['']) test('tcfail032', normal, compile_fail, ['']) test('tcfail033', normal, compile_fail, ['']) @@ -278,7 +278,7 @@ test('FDsFromGivens', normal, compile_fail, ['']) test('T7019', normal, compile_fail,['']) test('T7019a', normal, compile_fail,['']) test('T5978', normal, compile_fail, ['']) -test('TcMultiWayIfFail', if_compiler_lt('ghc', '7.5', skip), compile_fail, ['']) +test('TcMultiWayIfFail', when(compiler_lt('ghc', '7.5'), skip), compile_fail, ['']) test('T2534', normal, compile_fail, ['']) test('T7175', normal, compile_fail, ['']) test('T7210', normal, compile_fail, ['']) @@ -293,3 +293,8 @@ test('T7525', normal, compile_fail, ['']) test('T7368a', normal, compile_fail, ['']) test('T7545', normal, compile_fail, ['']) test('T7279', normal, compile_fail, ['']) +test('T2247', normal, compile_fail, ['']) +test('T7609', normal, compile_fail, ['']) +test('T7645', normal, compile_fail, ['']) +test('T2354', normal, compile_fail, ['-O']) +test('T7734', normal, compile_fail, ['']) diff --git a/tests/typecheck/should_fail/fd-loop.stderr b/tests/typecheck/should_fail/fd-loop.stderr index 3158a1007799ef01efa8014e94c7090690f9ab33..37eae5d955eaf7faffac5cae4ac817d1d51d8406 100644 --- a/tests/typecheck/should_fail/fd-loop.stderr +++ b/tests/typecheck/should_fail/fd-loop.stderr @@ -1,12 +1,12 @@ - -fd-loop.hs:12:10: - Variable `b' occurs more often than in the instance head - in the constraint: C a b - (Use -XUndecidableInstances to permit this) - In the instance declaration for `Eq (T a)' - -fd-loop.hs:12:10: - Variable `b' occurs more often than in the instance head - in the constraint: Eq b - (Use -XUndecidableInstances to permit this) - In the instance declaration for `Eq (T a)' + +fd-loop.hs:12:10: + Variable ‛b’ occurs more often than in the instance head + in the constraint: C a b + (Use -XUndecidableInstances to permit this) + In the instance declaration for ‛Eq (T a)’ + +fd-loop.hs:12:10: + Variable ‛b’ occurs more often than in the instance head + in the constraint: Eq b + (Use -XUndecidableInstances to permit this) + In the instance declaration for ‛Eq (T a)’ diff --git a/tests/typecheck/should_fail/mc19.stderr b/tests/typecheck/should_fail/mc19.stderr index 7015d47d74e59fa520f75f0440ce50dc50ce0a86..de2367cfe4142f913c1ca98e293447130a354dcf 100644 --- a/tests/typecheck/should_fail/mc19.stderr +++ b/tests/typecheck/should_fail/mc19.stderr @@ -1,7 +1,7 @@ mc19.hs:10:31: - Couldn't match type `a' with `[a]' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛[a]’ + ‛a’ is a rigid type variable bound by a type expected by the context: [a] -> [a] at mc19.hs:10:26 Expected type: [a] -> [a] Actual type: [a] -> [[a]] diff --git a/tests/typecheck/should_fail/mc20.stderr b/tests/typecheck/should_fail/mc20.stderr index 01048c44811babf079740fd6555495bca7830b0a..86be7f4a1af570504c7080b023b2b1a86efc234e 100644 --- a/tests/typecheck/should_fail/mc20.stderr +++ b/tests/typecheck/should_fail/mc20.stderr @@ -1,6 +1,6 @@ mc20.hs:14:31: - No instance for (Ord Unorderable) arising from a use of `groupWith' + No instance for (Ord Unorderable) arising from a use of ‛groupWith’ In the expression: groupWith In a stmt of a monad comprehension: then group by x using groupWith In the expression: diff --git a/tests/typecheck/should_fail/mc21.stderr b/tests/typecheck/should_fail/mc21.stderr index bd7bac1dd99bd405862ae61fa19f7a7a671975b3..eeda10a396398ecd5df308753e30120a4012d0e3 100644 --- a/tests/typecheck/should_fail/mc21.stderr +++ b/tests/typecheck/should_fail/mc21.stderr @@ -1,10 +1,10 @@ mc21.hs:12:26: - Couldn't match type `a' with `[a]' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛[a]’ + ‛a’ is a rigid type variable bound by a type expected by the context: [a] -> [[a]] at mc21.hs:12:9 Expected type: [a] -> [[a]] Actual type: [a] -> [a] - In the return type of a call of `take' + In the return type of a call of ‛take’ In the expression: take 5 In a stmt of a monad comprehension: then group using take 5 diff --git a/tests/typecheck/should_fail/mc22.stderr b/tests/typecheck/should_fail/mc22.stderr index d020bae09441618fd01a59f10f52454f4a5b349f..7a4cc4e44b27d83a674d864d2d9bbb792897ff4e 100644 --- a/tests/typecheck/should_fail/mc22.stderr +++ b/tests/typecheck/should_fail/mc22.stderr @@ -1,11 +1,11 @@ mc22.hs:10:26: - Couldn't match type `a' with `t a' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛t a’ + ‛a’ is a rigid type variable bound by a type expected by the context: [a] -> [t a] at mc22.hs:10:9 Expected type: [a] -> [t a] Actual type: [a] -> [a] Relevant bindings include foo :: [t [Char]] (bound at mc22.hs:8:1) - In the return type of a call of `take' + In the return type of a call of ‛take’ In the expression: take 5 In a stmt of a monad comprehension: then group using take 5 diff --git a/tests/typecheck/should_fail/mc23.stderr b/tests/typecheck/should_fail/mc23.stderr index b8c398728068ee6158db099da1583713ab75ce0e..674c5571d1e4984664753b6e714aab65455553e0 100644 --- a/tests/typecheck/should_fail/mc23.stderr +++ b/tests/typecheck/should_fail/mc23.stderr @@ -1,10 +1,10 @@ mc23.hs:9:29: - Couldn't match type `[a0]' with `a -> b' + Couldn't match type ‛[a0]’ with ‛a -> b’ Expected type: (a -> b) -> [a] -> t a Actual type: [a0] -> [a0] Relevant bindings include z :: t b (bound at mc23.hs:9:1) - In the return type of a call of `take' - Probable cause: `take' is applied to too many arguments + In the return type of a call of ‛take’ + Probable cause: ‛take’ is applied to too many arguments In the expression: take 5 In a stmt of a monad comprehension: then take 5 by x diff --git a/tests/typecheck/should_fail/mc24.stderr b/tests/typecheck/should_fail/mc24.stderr index 92b66b0464d3ba8d56de628d18bdc96025b1b026..8a67d364d0f1701ddfd170c6904f065751715657 100644 --- a/tests/typecheck/should_fail/mc24.stderr +++ b/tests/typecheck/should_fail/mc24.stderr @@ -1,9 +1,9 @@ mc24.hs:10:31: - Couldn't match type `[a0]' with `a -> a1' + Couldn't match type ‛[a0]’ with ‛a -> a1’ Expected type: (a -> a1) -> [a] -> t [a] Actual type: [a0] -> [a0] - In the return type of a call of `take' - Probable cause: `take' is applied to too many arguments + In the return type of a call of ‛take’ + Probable cause: ‛take’ is applied to too many arguments In the expression: take 2 In a stmt of a monad comprehension: then group by x using take 2 diff --git a/tests/typecheck/should_fail/mc25.stderr b/tests/typecheck/should_fail/mc25.stderr index 3925f833f0fb317259ba5cf87973188cce35da43..855ec1eb18f97fd4654ffbcf6dd07363374f78bc 100644 --- a/tests/typecheck/should_fail/mc25.stderr +++ b/tests/typecheck/should_fail/mc25.stderr @@ -1,6 +1,6 @@ mc25.hs:9:46: - Couldn't match type `Int' with `a -> t' + Couldn't match type ‛Int’ with ‛a -> t’ Expected type: (a -> t) -> [a] -> [t1 a] Actual type: Int -> [a] -> [a] Relevant bindings include z :: [t1 t] (bound at mc25.hs:9:1) diff --git a/tests/typecheck/should_fail/tcfail001.stderr b/tests/typecheck/should_fail/tcfail001.stderr index 85b6788a7f9d129bcf10946902befa4ea1adba57..32418ac5c2b1c1187f9101acc22f92e7057fc7fa 100644 --- a/tests/typecheck/should_fail/tcfail001.stderr +++ b/tests/typecheck/should_fail/tcfail001.stderr @@ -1,7 +1,7 @@ tcfail001.hs:9:2: - Couldn't match expected type `[t0] -> [a0]' with actual type `[a]' + Couldn't match expected type ‛[t0] -> [t1]’ with actual type ‛[a]’ Relevant bindings include op :: [a] (bound at tcfail001.hs:9:2) - The equation(s) for `op' have one argument, - but its type `[a]' has none - In the instance declaration for `A [a]' + The equation(s) for ‛op’ have one argument, + but its type ‛[a]’ has none + In the instance declaration for ‛A [a]’ diff --git a/tests/typecheck/should_fail/tcfail002.stderr b/tests/typecheck/should_fail/tcfail002.stderr index 3a9c89c13df31ad6f07fc980786f88b2a0808630..f055d66eb6372f0a7a82835bd71500d0dc5186a2 100644 --- a/tests/typecheck/should_fail/tcfail002.stderr +++ b/tests/typecheck/should_fail/tcfail002.stderr @@ -5,4 +5,4 @@ tcfail002.hs:4:7: c :: [t] -> t (bound at tcfail002.hs:3:1) z :: [t] (bound at tcfail002.hs:4:3) In the expression: z - In an equation for `c': c z = z + In an equation for ‛c’: c z = z diff --git a/tests/typecheck/should_fail/tcfail003.stderr b/tests/typecheck/should_fail/tcfail003.stderr index 42d7c597649f9e1a48b80c0cda3ccd9561324613..e605497890b9a288719297d6e5d6af63db72c4eb 100644 --- a/tests/typecheck/should_fail/tcfail003.stderr +++ b/tests/typecheck/should_fail/tcfail003.stderr @@ -1,6 +1,6 @@ tcfail003.hs:3:10: - No instance for (Num Char) arising from the literal `1' + No instance for (Num Char) arising from the literal ‛1’ In the expression: 1 In the expression: [1, 'a'] In a pattern binding: (d : e) = [1, 'a'] diff --git a/tests/typecheck/should_fail/tcfail004.stderr b/tests/typecheck/should_fail/tcfail004.stderr index 112a3aab38fcc97482fb9b3f4883966ae0255c9e..bf439ab343f19235c82cc0fee94432ead10a20ee 100644 --- a/tests/typecheck/should_fail/tcfail004.stderr +++ b/tests/typecheck/should_fail/tcfail004.stderr @@ -1,7 +1,7 @@ tcfail004.hs:3:9: - Couldn't match expected type `(t, t3)' - with actual type `(t0, t1, t2)' + Couldn't match expected type ‛(t, t3)’ + with actual type ‛(t0, t1, t2)’ Relevant bindings include g :: t3 (bound at tcfail004.hs:3:4) f :: t (bound at tcfail004.hs:3:2) diff --git a/tests/typecheck/should_fail/tcfail005.stderr b/tests/typecheck/should_fail/tcfail005.stderr index fa97c98b061d16516f45b044ab2c0585378bc118..ebb2999f79c613476b430f074eb1893169f6a56f 100644 --- a/tests/typecheck/should_fail/tcfail005.stderr +++ b/tests/typecheck/should_fail/tcfail005.stderr @@ -1,6 +1,6 @@ tcfail005.hs:3:9: - Couldn't match expected type `[t]' with actual type `(t0, Char)' + Couldn't match expected type ‛[t]’ with actual type ‛(t0, Char)’ Relevant bindings include i :: [t] (bound at tcfail005.hs:3:4) h :: t (bound at tcfail005.hs:3:2) diff --git a/tests/typecheck/should_fail/tcfail006.stderr b/tests/typecheck/should_fail/tcfail006.stderr index a31f4fdc217a8cd318c912c86733c5b34da9d14a..387fe56b4921283691a4250d8b67f19370719758 100644 --- a/tests/typecheck/should_fail/tcfail006.stderr +++ b/tests/typecheck/should_fail/tcfail006.stderr @@ -1,6 +1,6 @@ tcfail006.hs:4:24: - No instance for (Num Bool) arising from the literal `1' + No instance for (Num Bool) arising from the literal ‛1’ In the expression: 1 In the expression: (True, 1) In a case alternative: True -> (True, 1) diff --git a/tests/typecheck/should_fail/tcfail007.stderr b/tests/typecheck/should_fail/tcfail007.stderr index d375e40eb2323bca60ca3c349acbb4d19f0f1d48..99c9504a7ec93f4c95890242a00ee82a15e67c71 100644 --- a/tests/typecheck/should_fail/tcfail007.stderr +++ b/tests/typecheck/should_fail/tcfail007.stderr @@ -1,8 +1,8 @@ tcfail007.hs:3:15: - No instance for (Num Bool) arising from a use of `+' + No instance for (Num Bool) arising from a use of ‛+’ In the expression: x + 1 - In an equation for `n': + In an equation for ‛n’: n x | True = x + 1 | False = True diff --git a/tests/typecheck/should_fail/tcfail008.stderr b/tests/typecheck/should_fail/tcfail008.stderr index 7abed93f58f70dfa69ac04b2977c0e63cdd07d3b..09c4c54558e219e33db351962248a7f9f19bfefe 100644 --- a/tests/typecheck/should_fail/tcfail008.stderr +++ b/tests/typecheck/should_fail/tcfail008.stderr @@ -1,20 +1,20 @@ - -tcfail008.hs:3:5: - No instance for (Num a0) arising from the literal `1' - The type variable `a0' is ambiguous - Relevant bindings include o :: [a0] (bound at tcfail008.hs:3:1) - Note: there are several potential instances: - instance Num Double -- Defined in `GHC.Float' - instance Num Float -- Defined in `GHC.Float' - instance Integral a => Num (GHC.Real.Ratio a) - -- Defined in `GHC.Real' - ...plus three others - In the first argument of `(:)', namely `1' - In the expression: 1 : 2 - In an equation for `o': o = 1 : 2 - -tcfail008.hs:3:7: - No instance for (Num [a0]) arising from the literal `2' - In the second argument of `(:)', namely `2' - In the expression: 1 : 2 - In an equation for `o': o = 1 : 2 + +tcfail008.hs:3:5: + No instance for (Num a0) arising from the literal ‛1’ + The type variable ‛a0’ is ambiguous + Relevant bindings include o :: [a0] (bound at tcfail008.hs:3:1) + Note: there are several potential instances: + instance Num Double -- Defined in ‛GHC.Float’ + instance Num Float -- Defined in ‛GHC.Float’ + instance Integral a => Num (GHC.Real.Ratio a) + -- Defined in ‛GHC.Real’ + ...plus three others + In the first argument of ‛(:)’, namely ‛1’ + In the expression: 1 : 2 + In an equation for ‛o’: o = 1 : 2 + +tcfail008.hs:3:7: + No instance for (Num [a0]) arising from the literal ‛2’ + In the second argument of ‛(:)’, namely ‛2’ + In the expression: 1 : 2 + In an equation for ‛o’: o = 1 : 2 diff --git a/tests/typecheck/should_fail/tcfail009.stderr b/tests/typecheck/should_fail/tcfail009.stderr index 8226c1fbdc14e25f0841aa9e122187b1b29375f2..517e39c36fc226a2b5a3f62a280da14dc1a8406c 100644 --- a/tests/typecheck/should_fail/tcfail009.stderr +++ b/tests/typecheck/should_fail/tcfail009.stderr @@ -1,6 +1,6 @@ tcfail009.hs:3:17: - Couldn't match expected type `Int' with actual type `Integer' + Couldn't match expected type ‛Int’ with actual type ‛Integer’ In the expression: (2 :: Integer) In the expression: [(1 :: Int) .. (2 :: Integer)] - In an equation for `p': p = [(1 :: Int) .. (2 :: Integer)] + In an equation for ‛p’: p = [(1 :: Int) .. (2 :: Integer)] diff --git a/tests/typecheck/should_fail/tcfail010.stderr b/tests/typecheck/should_fail/tcfail010.stderr index 695655c31ef4cec2ad91532f25fa4f8a91a5be41..3f718371aacbd254619d2754b84728cb2ee48df6 100644 --- a/tests/typecheck/should_fail/tcfail010.stderr +++ b/tests/typecheck/should_fail/tcfail010.stderr @@ -1,6 +1,6 @@ tcfail010.hs:3:17: - No instance for (Num [t0]) arising from a use of `+' + No instance for (Num [t0]) arising from a use of ‛+’ In the expression: z + 2 In the expression: \ (y : z) -> z + 2 - In an equation for `q': q = \ (y : z) -> z + 2 + In an equation for ‛q’: q = \ (y : z) -> z + 2 diff --git a/tests/typecheck/should_fail/tcfail011.stderr b/tests/typecheck/should_fail/tcfail011.stderr index f41e3a67ce08c7e0435607b1929780329c14a361..8ef94fec12ad747b8961439c95fdae27b1cdb06f 100644 --- a/tests/typecheck/should_fail/tcfail011.stderr +++ b/tests/typecheck/should_fail/tcfail011.stderr @@ -1,2 +1,2 @@ -tcfail011.hs:3:25: Not in scope: `y' +tcfail011.hs:3:25: Not in scope: ‛y’ diff --git a/tests/typecheck/should_fail/tcfail012.stderr b/tests/typecheck/should_fail/tcfail012.stderr index 7fe9b18d47bd55aa4ffafd319ecf80507d1df7f7..257eca351f51b25054f7d0f42f3128439ade22bc 100644 --- a/tests/typecheck/should_fail/tcfail012.stderr +++ b/tests/typecheck/should_fail/tcfail012.stderr @@ -1,5 +1,5 @@ tcfail012.hs:3:8: - Couldn't match expected type `Bool' with actual type `[a0]' + Couldn't match expected type ‛Bool’ with actual type ‛[t0]’ In the expression: [] In a pattern binding: True = [] diff --git a/tests/typecheck/should_fail/tcfail013.stderr b/tests/typecheck/should_fail/tcfail013.stderr index a1fd433f6700449c317bebd3397226149d464e4d..075c4dab87436202d4c64ad21a0badfdc2a1d228 100644 --- a/tests/typecheck/should_fail/tcfail013.stderr +++ b/tests/typecheck/should_fail/tcfail013.stderr @@ -1,6 +1,6 @@ tcfail013.hs:4:3: - Couldn't match expected type `[t]' with actual type `Bool' + Couldn't match expected type ‛[t]’ with actual type ‛Bool’ Relevant bindings include f :: [t] -> a (bound at tcfail013.hs:3:1) In the pattern: True - In an equation for `f': f True = 2 + In an equation for ‛f’: f True = 2 diff --git a/tests/typecheck/should_fail/tcfail014.stderr b/tests/typecheck/should_fail/tcfail014.stderr index 713ffce5e5b3d4ef3de50d3b25bcc58aecb4dbd9..1e4b637a9f09688bbdb59152bd6d746cdc2b830b 100644 --- a/tests/typecheck/should_fail/tcfail014.stderr +++ b/tests/typecheck/should_fail/tcfail014.stderr @@ -4,6 +4,6 @@ tcfail014.hs:5:33: Relevant bindings include h :: (t8 -> t7) -> t7 (bound at tcfail014.hs:5:25) z :: t8 -> t7 (bound at tcfail014.hs:5:27) - In the first argument of `z', namely `z' + In the first argument of ‛z’, namely ‛z’ In the expression: z z - In an equation for `h': h z = z z + In an equation for ‛h’: h z = z z diff --git a/tests/typecheck/should_fail/tcfail015.stderr b/tests/typecheck/should_fail/tcfail015.stderr index 41899dffb4e6d608929e5ff6ed6a75b9313423e8..7e02253760135ca8e5375bf1796ab76431431386 100644 --- a/tests/typecheck/should_fail/tcfail015.stderr +++ b/tests/typecheck/should_fail/tcfail015.stderr @@ -1,5 +1,5 @@ tcfail015.hs:7:13: - No instance for (Num Bool) arising from the literal `2' + No instance for (Num Bool) arising from the literal ‛2’ In the expression: 2 - In an equation for `g': g (ANull) = 2 + In an equation for ‛g’: g (ANull) = 2 diff --git a/tests/typecheck/should_fail/tcfail016.stderr b/tests/typecheck/should_fail/tcfail016.stderr index 17f2f16e4c4081ce13c2b147fd707b4a82fe74de..15122e8e1ba46238c3586a2f5edb56d7be2e48f0 100644 --- a/tests/typecheck/should_fail/tcfail016.stderr +++ b/tests/typecheck/should_fail/tcfail016.stderr @@ -1,24 +1,24 @@ tcfail016.hs:9:20: - Couldn't match type `(t, Expr t)' with `Expr t' + Couldn't match type ‛(t, Expr t)’ with ‛Expr t’ Expected type: Expr t Actual type: AnnExpr t Relevant bindings include g :: Expr t -> [[Char]] (bound at tcfail016.hs:8:1) e1 :: AnnExpr t (bound at tcfail016.hs:9:8) e2 :: AnnExpr t (bound at tcfail016.hs:9:11) - In the first argument of `g', namely `e1' - In the first argument of `(++)', namely `(g e1)' + In the first argument of ‛g’, namely ‛e1’ + In the first argument of ‛(++)’, namely ‛(g e1)’ In the expression: (g e1) ++ (g e2) tcfail016.hs:9:28: - Couldn't match type `(t, Expr t)' with `Expr t' + Couldn't match type ‛(t, Expr t)’ with ‛Expr t’ Expected type: Expr t Actual type: AnnExpr t Relevant bindings include g :: Expr t -> [[Char]] (bound at tcfail016.hs:8:1) e1 :: AnnExpr t (bound at tcfail016.hs:9:8) e2 :: AnnExpr t (bound at tcfail016.hs:9:11) - In the first argument of `g', namely `e2' - In the second argument of `(++)', namely `(g e2)' + In the first argument of ‛g’, namely ‛e2’ + In the second argument of ‛(++)’, namely ‛(g e2)’ In the expression: (g e1) ++ (g e2) diff --git a/tests/typecheck/should_fail/tcfail017.stderr b/tests/typecheck/should_fail/tcfail017.stderr index 006ff73d147b101141a63f551852c99d5e1fc41a..a0d73da862653936e19d5547493a89d2c96af784 100644 --- a/tests/typecheck/should_fail/tcfail017.stderr +++ b/tests/typecheck/should_fail/tcfail017.stderr @@ -4,4 +4,4 @@ tcfail017.hs:10:10: arising from the superclasses of an instance declaration from the context (B a) bound by the instance declaration at tcfail017.hs:10:10-23 - In the instance declaration for `B [a]' + In the instance declaration for ‛B [a]’ diff --git a/tests/typecheck/should_fail/tcfail018.stderr b/tests/typecheck/should_fail/tcfail018.stderr index 67b3cbb47ec410fb82c0137741b60d886f6435b4..687938983bdfaec27b6e388c30267d880c7379d4 100644 --- a/tests/typecheck/should_fail/tcfail018.stderr +++ b/tests/typecheck/should_fail/tcfail018.stderr @@ -1,5 +1,5 @@ tcfail018.hs:5:10: - No instance for (Num [t0]) arising from the literal `1' + No instance for (Num [t0]) arising from the literal ‛1’ In the expression: 1 In a pattern binding: (a : []) = 1 diff --git a/tests/typecheck/should_fail/tcfail019.stderr b/tests/typecheck/should_fail/tcfail019.stderr index 79ab411795ed9bca9d9aa4f216e8332174206732..848805abda241a27540bf39a25b6372de507e081 100644 --- a/tests/typecheck/should_fail/tcfail019.stderr +++ b/tests/typecheck/should_fail/tcfail019.stderr @@ -2,4 +2,4 @@ tcfail019.hs:18:10: No instance for (B [a]) arising from the superclasses of an instance declaration - In the instance declaration for `D [a]' + In the instance declaration for ‛D [a]’ diff --git a/tests/typecheck/should_fail/tcfail020.stderr b/tests/typecheck/should_fail/tcfail020.stderr index 13ef851ed69b44c8168f2c9dc17aff57d3b10fd2..9dfaa63a4e43260a9208b7baa6a90c5f9fb0f6ca 100644 --- a/tests/typecheck/should_fail/tcfail020.stderr +++ b/tests/typecheck/should_fail/tcfail020.stderr @@ -4,4 +4,4 @@ tcfail020.hs:10:10: arising from the superclasses of an instance declaration from the context (A a) bound by the instance declaration at tcfail020.hs:10:10-23 - In the instance declaration for `B [a]' + In the instance declaration for ‛B [a]’ diff --git a/tests/typecheck/should_fail/tcfail027.stderr b/tests/typecheck/should_fail/tcfail027.stderr index c5df0bcbf32df541499862879e8c6a09a339ae7c..cc4ffcaab3a0ff1dd3fa9c2762ecdeae7628d0a8 100644 --- a/tests/typecheck/should_fail/tcfail027.stderr +++ b/tests/typecheck/should_fail/tcfail027.stderr @@ -1,8 +1,8 @@ tcfail027.hs:4:1: Cycle in class declaration (via superclasses): A -> B -> A - In the class declaration for `A' + In the class declaration for ‛A’ tcfail027.hs:7:1: Cycle in class declaration (via superclasses): B -> A -> B - In the class declaration for `B' + In the class declaration for ‛B’ diff --git a/tests/typecheck/should_fail/tcfail028.stderr b/tests/typecheck/should_fail/tcfail028.stderr index 53e3f7614ee0c17feb43ba9dd4153127356c9f5d..a5c0a59612db8443125c38ffb5b36a4b398d73e1 100644 --- a/tests/typecheck/should_fail/tcfail028.stderr +++ b/tests/typecheck/should_fail/tcfail028.stderr @@ -1,7 +1,7 @@ tcfail028.hs:4:17: - Expecting one more argument to `A a' - Expected a type, but `A a' has kind `k0 -> *' - In the type `A a' - In the definition of data constructor `B' - In the data declaration for `A' + Expecting one more argument to ‛A a’ + Expected a type, but ‛A a’ has kind ‛k0 -> *’ + In the type ‛A a’ + In the definition of data constructor ‛B’ + In the data declaration for ‛A’ diff --git a/tests/typecheck/should_fail/tcfail029.stderr b/tests/typecheck/should_fail/tcfail029.stderr index d9cb862388728a0d9516e0b732e2e14b5c3d21a4..13a1e4936ed8ddfc0a14d76436804fe35f102a0f 100644 --- a/tests/typecheck/should_fail/tcfail029.stderr +++ b/tests/typecheck/should_fail/tcfail029.stderr @@ -1,5 +1,5 @@ tcfail029.hs:6:9: - No instance for (Ord Foo) arising from a use of `>' + No instance for (Ord Foo) arising from a use of ‛>’ In the expression: x > Bar - In an equation for `f': f x = x > Bar + In an equation for ‛f’: f x = x > Bar diff --git a/tests/typecheck/should_fail/tcfail030.stderr b/tests/typecheck/should_fail/tcfail030.stderr index cb9d80959d350cf47acace5ecf82ef8a591e1549..e0a8b494f3a580d1ea0c245d82596136418de4fa 100644 --- a/tests/typecheck/should_fail/tcfail030.stderr +++ b/tests/typecheck/should_fail/tcfail030.stderr @@ -1,3 +1,3 @@ tcfail030.hs:1:1: - The function `main' is not defined in module `Main' + The function ‛main’ is not defined in module ‛Main’ diff --git a/tests/typecheck/should_fail/tcfail031.stderr b/tests/typecheck/should_fail/tcfail031.stderr index f7fc14bb1fd74d64ebcb7cdf6e55ea64a7df9548..5d55430eaa436b6884e35d46a0e323f9a2cab858 100644 --- a/tests/typecheck/should_fail/tcfail031.stderr +++ b/tests/typecheck/should_fail/tcfail031.stderr @@ -1,6 +1,6 @@ tcfail031.hs:3:10: - Couldn't match expected type `Bool' with actual type `Char' + Couldn't match expected type ‛Bool’ with actual type ‛Char’ In the expression: 'a' In the expression: if 'a' then 1 else 2 - In an equation for `f': f x = if 'a' then 1 else 2 + In an equation for ‛f’: f x = if 'a' then 1 else 2 diff --git a/tests/typecheck/should_fail/tcfail032.hs b/tests/typecheck/should_fail/tcfail032.hs index 5950064655fab2567d47970a15df6f82e4243615..8c6bdd46c7699a31ed04e967357fe4e870dd2958 100644 --- a/tests/typecheck/should_fail/tcfail032.hs +++ b/tests/typecheck/should_fail/tcfail032.hs @@ -6,7 +6,7 @@ It *is* an error, because x does not have the polytype forall a. Eq a => a -> Int -becuase it is monomorphic, but the error message isn't very illuminating. +because it is monomorphic, but the error message isn't very illuminating. -} module ShouldFail where diff --git a/tests/typecheck/should_fail/tcfail032.stderr b/tests/typecheck/should_fail/tcfail032.stderr index 5a93f8c66c2225e25ecdf142d0aa23d103161718..56e4a791ad970f94f8e83e9560be34a24c68502b 100644 --- a/tests/typecheck/should_fail/tcfail032.stderr +++ b/tests/typecheck/should_fail/tcfail032.stderr @@ -1,7 +1,7 @@ tcfail032.hs:14:8: - Couldn't match expected type `a1 -> Int' with actual type `t' - because type variable `a1' would escape its scope + Couldn't match expected type ‛a1 -> Int’ with actual type ‛t’ + because type variable ‛a1’ would escape its scope This (rigid, skolem) type variable is bound by an expression type signature: Eq a1 => a1 -> Int at tcfail032.hs:14:8-30 @@ -9,4 +9,4 @@ tcfail032.hs:14:8: f :: t -> a -> Int (bound at tcfail032.hs:14:1) x :: t (bound at tcfail032.hs:14:3) In the expression: (x :: Eq a => a -> Int) - In an equation for `f': f x = (x :: Eq a => a -> Int) + In an equation for ‛f’: f x = (x :: Eq a => a -> Int) diff --git a/tests/typecheck/should_fail/tcfail033.stderr b/tests/typecheck/should_fail/tcfail033.stderr index 53822843343db62a503674b1e71bc97ab8204b7c..0ebb5c826eb5af325e8f3e54bdc09d21a8fad04e 100644 --- a/tests/typecheck/should_fail/tcfail033.stderr +++ b/tests/typecheck/should_fail/tcfail033.stderr @@ -7,4 +7,4 @@ tcfail033.hs:4:12: y :: t1 (bound at tcfail033.hs:4:19) In the expression: x In the expression: [x | (x, y) <- buglet] - In an equation for `buglet': buglet = [x | (x, y) <- buglet] + In an equation for ‛buglet’: buglet = [x | (x, y) <- buglet] diff --git a/tests/typecheck/should_fail/tcfail034.stderr b/tests/typecheck/should_fail/tcfail034.stderr index 38b04c10c6c035ceec84a0f70931b382c8ca5236..3fca8122b98adc80f44fa7d329837389354741d9 100644 --- a/tests/typecheck/should_fail/tcfail034.stderr +++ b/tests/typecheck/should_fail/tcfail034.stderr @@ -1,12 +1,12 @@ tcfail034.hs:17:13: - Could not deduce (Integral a) arising from a use of `mod' + Could not deduce (Integral a) arising from a use of ‛mod’ from the context (Num a, Eq a) bound by the type signature for test :: (Num a, Eq a) => a -> Bool at tcfail034.hs:16:7-32 Possible fix: add (Integral a) to the context of the type signature for test :: (Num a, Eq a) => a -> Bool - In the first argument of `(==)', namely `(x `mod` 3)' + In the first argument of ‛(==)’, namely ‛(x `mod` 3)’ In the expression: (x `mod` 3) == 0 - In an equation for `test': test x = (x `mod` 3) == 0 + In an equation for ‛test’: test x = (x `mod` 3) == 0 diff --git a/tests/typecheck/should_fail/tcfail036.stderr b/tests/typecheck/should_fail/tcfail036.stderr index 98d172278727a060a9e276f1772c5ab0a57f72e9..465e4547127fcd60d654925fc24fc7b61e222f40 100644 --- a/tests/typecheck/should_fail/tcfail036.stderr +++ b/tests/typecheck/should_fail/tcfail036.stderr @@ -5,7 +5,7 @@ tcfail036.hs:6:10: instance Num NUM -- Defined at tcfail036.hs:8:10 tcfail036.hs:9:13: - Expecting one more argument to `Num' - The first argument of `Eq' should have kind `*', - but `Num' has kind `* -> Constraint' - In the instance declaration for `Eq Num' + Expecting one more argument to ‛Num’ + The first argument of ‛Eq’ should have kind ‛*’, + but ‛Num’ has kind ‛* -> Constraint’ + In the instance declaration for ‛Eq Num’ diff --git a/tests/typecheck/should_fail/tcfail037.stderr b/tests/typecheck/should_fail/tcfail037.stderr index 998a68ccdcfbfa5ebaa40ee80fa9f827f6bb0cd4..00f757841c1f3463864a1c36cd33cd56600a08aa 100644 --- a/tests/typecheck/should_fail/tcfail037.stderr +++ b/tests/typecheck/should_fail/tcfail037.stderr @@ -1,8 +1,8 @@ tcfail037.hs:7:11: - Ambiguous occurrence `+' - It could refer to either `ShouldFail.+', + Ambiguous occurrence ‛+’ + It could refer to either ‛ShouldFail.+’, defined at tcfail037.hs:10:5 - or `Prelude.+', - imported from `Prelude' at tcfail037.hs:3:8-17 - (and originally defined in `GHC.Num') + or ‛Prelude.+’, + imported from ‛Prelude’ at tcfail037.hs:3:8-17 + (and originally defined in ‛GHC.Num’) diff --git a/tests/typecheck/should_fail/tcfail038.stderr b/tests/typecheck/should_fail/tcfail038.stderr index 70e13f3c7221520b79bd947bf76935625ebd7ba6..f8b7915e00125b1acb2346d2d3f0d698301bc30c 100644 --- a/tests/typecheck/should_fail/tcfail038.stderr +++ b/tests/typecheck/should_fail/tcfail038.stderr @@ -1,10 +1,10 @@ tcfail038.hs:7:11: - Conflicting definitions for `==' + Conflicting definitions for ‛==’ Bound at: tcfail038.hs:7:11-12 tcfail038.hs:9:11-12 tcfail038.hs:8:11: - Conflicting definitions for `/=' + Conflicting definitions for ‛/=’ Bound at: tcfail038.hs:8:11-12 tcfail038.hs:10:11-12 diff --git a/tests/typecheck/should_fail/tcfail040.stderr b/tests/typecheck/should_fail/tcfail040.stderr index 003cb9f6d07bd1a73e246f34b26c25f8c54ca5ae..90fb76d99d98567dc43eaedf809dfdfe175fa7bf 100644 --- a/tests/typecheck/should_fail/tcfail040.stderr +++ b/tests/typecheck/should_fail/tcfail040.stderr @@ -1,9 +1,9 @@ - -tcfail040.hs:19:5: - No instance for (ORD a0) arising from a use of `<<' - The type variable `a0' is ambiguous - Note: there is a potential instance available: - instance ORD (a -> b) -- Defined at tcfail040.hs:17:10 - In the first argument of `(===)', namely `(<<)' - In the expression: (<<) === (<<) - In an equation for `f': f = (<<) === (<<) + +tcfail040.hs:19:5: + No instance for (ORD a0) arising from a use of ‛<<’ + The type variable ‛a0’ is ambiguous + Note: there is a potential instance available: + instance ORD (a -> b) -- Defined at tcfail040.hs:17:10 + In the first argument of ‛(===)’, namely ‛(<<)’ + In the expression: (<<) === (<<) + In an equation for ‛f’: f = (<<) === (<<) diff --git a/tests/typecheck/should_fail/tcfail041.stderr b/tests/typecheck/should_fail/tcfail041.stderr index ae8cd47aeecdbc32d5f5edd7804dc0fefe3ca263..f86384133d490c4a86cb3d87f4d5b8c53d107565 100644 --- a/tests/typecheck/should_fail/tcfail041.stderr +++ b/tests/typecheck/should_fail/tcfail041.stderr @@ -2,4 +2,4 @@ tcfail041.hs:9:10: Unbound implicit parameter (?imp::Int) arising from the superclasses of an instance declaration - In the instance declaration for `D Int' + In the instance declaration for ‛D Int’ diff --git a/tests/typecheck/should_fail/tcfail042.stderr b/tests/typecheck/should_fail/tcfail042.stderr index 76031bb221c87a68b1be25b1d0ee8cce6361649d..1e1c5ad01ee07d14ac353695489a2330295492cc 100644 --- a/tests/typecheck/should_fail/tcfail042.stderr +++ b/tests/typecheck/should_fail/tcfail042.stderr @@ -6,4 +6,4 @@ tcfail042.hs:15:10: bound by the instance declaration at tcfail042.hs:15:10-34 Possible fix: add (Num a) to the context of the instance declaration - In the instance declaration for `Bar [a]' + In the instance declaration for ‛Bar [a]’ diff --git a/tests/typecheck/should_fail/tcfail043.stderr b/tests/typecheck/should_fail/tcfail043.stderr index ef4e999996e4cf0e78b017b0526f492842b03b64..9be218f040bbdce627306ec95431d8e447740943 100644 --- a/tests/typecheck/should_fail/tcfail043.stderr +++ b/tests/typecheck/should_fail/tcfail043.stderr @@ -1,40 +1,40 @@ - -tcfail043.hs:38:17: - No instance for (Ord_ a0) arising from a use of `gt' - The type variable `a0' is ambiguous - Relevant bindings include - search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1) - a :: a0 (bound at tcfail043.hs:38:6) - bs :: [a0] (bound at tcfail043.hs:38:8) - Note: there is a potential instance available: - instance Ord_ Int -- Defined at tcfail043.hs:34:10 - In the expression: gt (hd bs) a - In the expression: - if gt (hd bs) a then - False - else - if eq a (hd bs) then True else search a (tl bs) - In the expression: - \ a bs - -> if gt (hd bs) a then - False - else - if eq a (hd bs) then True else search a (tl bs) - -tcfail043.hs:40:25: - No instance for (Eq_ a0) arising from a use of `eq' - The type variable `a0' is ambiguous - Relevant bindings include - search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1) - a :: a0 (bound at tcfail043.hs:38:6) - bs :: [a0] (bound at tcfail043.hs:38:8) - Note: there are several potential instances: - instance Eq_ a => Eq_ [a] -- Defined at tcfail043.hs:23:10 - instance Eq_ Int -- Defined at tcfail043.hs:20:10 - In the expression: eq a (hd bs) - In the expression: if eq a (hd bs) then True else search a (tl bs) - In the expression: - if gt (hd bs) a then - False - else - if eq a (hd bs) then True else search a (tl bs) + +tcfail043.hs:38:17: + No instance for (Ord_ a0) arising from a use of ‛gt’ + The type variable ‛a0’ is ambiguous + Relevant bindings include + search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1) + a :: a0 (bound at tcfail043.hs:38:6) + bs :: [a0] (bound at tcfail043.hs:38:8) + Note: there is a potential instance available: + instance Ord_ Int -- Defined at tcfail043.hs:34:10 + In the expression: gt (hd bs) a + In the expression: + if gt (hd bs) a then + False + else + if eq a (hd bs) then True else search a (tl bs) + In the expression: + \ a bs + -> if gt (hd bs) a then + False + else + if eq a (hd bs) then True else search a (tl bs) + +tcfail043.hs:40:25: + No instance for (Eq_ a0) arising from a use of ‛eq’ + The type variable ‛a0’ is ambiguous + Relevant bindings include + search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1) + a :: a0 (bound at tcfail043.hs:38:6) + bs :: [a0] (bound at tcfail043.hs:38:8) + Note: there are several potential instances: + instance Eq_ a => Eq_ [a] -- Defined at tcfail043.hs:23:10 + instance Eq_ Int -- Defined at tcfail043.hs:20:10 + In the expression: eq a (hd bs) + In the expression: if eq a (hd bs) then True else search a (tl bs) + In the expression: + if gt (hd bs) a then + False + else + if eq a (hd bs) then True else search a (tl bs) diff --git a/tests/typecheck/should_fail/tcfail044.stderr b/tests/typecheck/should_fail/tcfail044.stderr index 03ad2fb705a7df17d98f0f65c995e78815fef51c..ab3b94f007f376756fbd03d6bf0e069afa91bf9f 100644 --- a/tests/typecheck/should_fail/tcfail044.stderr +++ b/tests/typecheck/should_fail/tcfail044.stderr @@ -1,16 +1,16 @@ tcfail044.hs:5:20: - Illegal instance declaration for `Eq (a -> a)' + 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 -XFlexibleInstances if you want to disable this.) - In the instance declaration for `Eq (a -> a)' + In the instance declaration for ‛Eq (a -> a)’ tcfail044.hs:8:21: - Illegal instance declaration for `Num (a -> a)' + 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 -XFlexibleInstances if you want to disable this.) - In the instance declaration for `Num (a -> a)' + In the instance declaration for ‛Num (a -> a)’ diff --git a/tests/typecheck/should_fail/tcfail047.stderr b/tests/typecheck/should_fail/tcfail047.stderr index e99d9df755e78629efa5c6e464293e4c46631f15..5c96920f0e01d77641f803802140cb9d468b42c0 100644 --- a/tests/typecheck/should_fail/tcfail047.stderr +++ b/tests/typecheck/should_fail/tcfail047.stderr @@ -1,8 +1,8 @@ tcfail047.hs:6:10: - Illegal instance declaration for `A (a, (b, c))' + 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 -XFlexibleInstances if you want to disable this.) - In the instance declaration for `A (a, (b, c))' + In the instance declaration for ‛A (a, (b, c))’ diff --git a/tests/typecheck/should_fail/tcfail048.stderr b/tests/typecheck/should_fail/tcfail048.stderr index aa1330d46a1544d9e4b254091079e5c66ec0e943..29d205e27956af54ae693af50b92f53103c1bb6c 100644 --- a/tests/typecheck/should_fail/tcfail048.stderr +++ b/tests/typecheck/should_fail/tcfail048.stderr @@ -1,2 +1,2 @@ -tcfail048.hs:3:8: Not in scope: type constructor or class `B' +tcfail048.hs:3:8: Not in scope: type constructor or class ‛B’ diff --git a/tests/typecheck/should_fail/tcfail049.stderr b/tests/typecheck/should_fail/tcfail049.stderr index 750a65bc3c88c167b9867bbaf1998adf561893ca..3a632e2425cb9e1bb2a17bbb5c06ea77dd6ea2e4 100644 --- a/tests/typecheck/should_fail/tcfail049.stderr +++ b/tests/typecheck/should_fail/tcfail049.stderr @@ -1,2 +1,2 @@ -tcfail049.hs:3:7: Not in scope: `g' +tcfail049.hs:3:7: Not in scope: ‛g’ diff --git a/tests/typecheck/should_fail/tcfail050.stderr b/tests/typecheck/should_fail/tcfail050.stderr index 9115af93fbaf64b925f710b078116cf9609c300e..5d7a917f53d6de845ca5086241c5a734d24f2014 100644 --- a/tests/typecheck/should_fail/tcfail050.stderr +++ b/tests/typecheck/should_fail/tcfail050.stderr @@ -1,2 +1,2 @@ -tcfail050.hs:3:7: Not in scope: data constructor `B' +tcfail050.hs:3:7: Not in scope: data constructor ‛B’ diff --git a/tests/typecheck/should_fail/tcfail051.stderr b/tests/typecheck/should_fail/tcfail051.stderr index 35a33d2aa2012bb4172c24303fad4803965ad932..f4b0c0c56398ea1475dbf17cbae638f9de2e8595 100644 --- a/tests/typecheck/should_fail/tcfail051.stderr +++ b/tests/typecheck/should_fail/tcfail051.stderr @@ -1,2 +1,2 @@ - -tcfail051.hs:3:10: Not in scope: type constructor or class `B' + +tcfail051.hs:3:10: Not in scope: type constructor or class ‛B’ diff --git a/tests/typecheck/should_fail/tcfail052.stderr b/tests/typecheck/should_fail/tcfail052.stderr index 9ffa31c22723c0f2a0e1e9ea918354ef8fbb07b2..2359b4433e93eef42a25127f3b01b408b0fd984f 100644 --- a/tests/typecheck/should_fail/tcfail052.stderr +++ b/tests/typecheck/should_fail/tcfail052.stderr @@ -1,2 +1,2 @@ -tcfail052.hs:3:16: Not in scope: type variable `c' +tcfail052.hs:3:16: Not in scope: type variable ‛c’ diff --git a/tests/typecheck/should_fail/tcfail053.stderr b/tests/typecheck/should_fail/tcfail053.stderr index 9889c3f0f607b52ad0b309ac4b19f0c9909d36d4..c014f2f4f38fa40e06008fb658bee268c66137a8 100644 --- a/tests/typecheck/should_fail/tcfail053.stderr +++ b/tests/typecheck/should_fail/tcfail053.stderr @@ -1,2 +1,2 @@ -tcfail053.hs:3:12: Not in scope: type constructor or class `A' +tcfail053.hs:3:12: Not in scope: type constructor or class ‛A’ diff --git a/tests/typecheck/should_fail/tcfail054.stderr b/tests/typecheck/should_fail/tcfail054.stderr index 1a5cfca053fefce2afbf418bff9d06e5d5b80bf8..93b200983f3675bfe5642686a51a509609198cac 100644 --- a/tests/typecheck/should_fail/tcfail054.stderr +++ b/tests/typecheck/should_fail/tcfail054.stderr @@ -1,2 +1,2 @@ -tcfail054.hs:3:4: Not in scope: data constructor `B' +tcfail054.hs:3:4: Not in scope: data constructor ‛B’ diff --git a/tests/typecheck/should_fail/tcfail055.stderr b/tests/typecheck/should_fail/tcfail055.stderr index ac012da98e72eb78ae341f404c697ed00b3856be..c82e9af2aae43e2ee219bb42308d62a93260b052 100644 --- a/tests/typecheck/should_fail/tcfail055.stderr +++ b/tests/typecheck/should_fail/tcfail055.stderr @@ -1,5 +1,5 @@ tcfail055.hs:3:8: - Couldn't match expected type `Float' with actual type `Int' + Couldn't match expected type ‛Float’ with actual type ‛Int’ In the expression: (x + 1 :: Int) :: Float - In an equation for `f': f x = (x + 1 :: Int) :: Float + In an equation for ‛f’: f x = (x + 1 :: Int) :: Float diff --git a/tests/typecheck/should_fail/tcfail056.stderr b/tests/typecheck/should_fail/tcfail056.stderr index 09505ed9451a0fddc40c7d5591b90a1c1af23d57..60bba9745312985feb41b21f083136f478d81e9b 100644 --- a/tests/typecheck/should_fail/tcfail056.stderr +++ b/tests/typecheck/should_fail/tcfail056.stderr @@ -1,2 +1,2 @@ -tcfail056.hs:10:15: `<=' is not a (visible) method of class `Eq' +tcfail056.hs:10:15: ‛<=’ is not a (visible) method of class ‛Eq’ diff --git a/tests/typecheck/should_fail/tcfail057.stderr b/tests/typecheck/should_fail/tcfail057.stderr index 9399e914861c5c660cfca030a95c1ac81832e182..5b19563bfcc8ef80234775b607425dcbb325d7a3 100644 --- a/tests/typecheck/should_fail/tcfail057.stderr +++ b/tests/typecheck/should_fail/tcfail057.stderr @@ -1,4 +1,4 @@ tcfail057.hs:5:7: - Expected a type, but `RealFrac a' has kind `Constraint' - In the type signature for `f': f :: (RealFrac a) -> a -> a + Expected a type, but ‛RealFrac a’ has kind ‛Constraint’ + In the type signature for ‛f’: f :: (RealFrac a) -> a -> a diff --git a/tests/typecheck/should_fail/tcfail058.stderr b/tests/typecheck/should_fail/tcfail058.stderr index 880bef69e3d4f11c4c2c5f5e5be24769bebfbef0..f5770a42ddf72bfa239fbeac7fc6454193b49911 100644 --- a/tests/typecheck/should_fail/tcfail058.stderr +++ b/tests/typecheck/should_fail/tcfail058.stderr @@ -1,5 +1,5 @@ tcfail058.hs:6:7: - Expecting one more argument to `Array a' - Expected a constraint, but `Array a' has kind `* -> *' - In the type signature for `f': f :: Array a => a -> b + Expecting one more argument to ‛Array a’ + Expected a constraint, but ‛Array a’ has kind ‛* -> *’ + In the type signature for ‛f’: f :: Array a => a -> b diff --git a/tests/typecheck/should_fail/tcfail061.stderr b/tests/typecheck/should_fail/tcfail061.stderr index a047863e9b2c789e6cb769c74f8e2b110733a2e8..14ce5aec71eb0458b7d8da089bb25bcd896e473f 100644 --- a/tests/typecheck/should_fail/tcfail061.stderr +++ b/tests/typecheck/should_fail/tcfail061.stderr @@ -1,8 +1,8 @@ -tcfail061.hs:5:17: Not in scope: type variable `b' +tcfail061.hs:5:17: Not in scope: type variable ‛b’ -tcfail061.hs:5:19: Not in scope: type variable `b' +tcfail061.hs:5:19: Not in scope: type variable ‛b’ -tcfail061.hs:11:22: Not in scope: type variable `b' +tcfail061.hs:11:22: Not in scope: type variable ‛b’ -tcfail061.hs:11:24: Not in scope: type variable `b' +tcfail061.hs:11:24: Not in scope: type variable ‛b’ diff --git a/tests/typecheck/should_fail/tcfail062.stderr b/tests/typecheck/should_fail/tcfail062.stderr index 9ee1bb75a94c27d0e7413c86644270480c4b0eee..2111c7e0fa24ebab385bb36d44e2af2073a37146 100644 --- a/tests/typecheck/should_fail/tcfail062.stderr +++ b/tests/typecheck/should_fail/tcfail062.stderr @@ -1,6 +1,6 @@ tcfail062.hs:34:6: - Not in scope: type variable `behaviouralExpression' + Not in scope: type variable ‛behaviouralExpression’ tcfail062.hs:34:29: - Not in scope: type variable `behaviouralExpression' + Not in scope: type variable ‛behaviouralExpression’ diff --git a/tests/typecheck/should_fail/tcfail063.stderr b/tests/typecheck/should_fail/tcfail063.stderr index 35d4f406a744c6a171f0e70977c8788450cd9c90..0464396725589d1bd606c66979f0f72b493d6822 100644 --- a/tests/typecheck/should_fail/tcfail063.stderr +++ b/tests/typecheck/should_fail/tcfail063.stderr @@ -1,5 +1,5 @@ tcfail063.hs:6:9: - Expecting one more argument to `Num' - Expected a constraint, but `Num' has kind `* -> Constraint' - In the type signature for `moby': moby :: Num => Int -> a -> Int + Expecting one more argument to ‛Num’ + Expected a constraint, but ‛Num’ has kind ‛* -> Constraint’ + In the type signature for ‛moby’: moby :: Num => Int -> a -> Int diff --git a/tests/typecheck/should_fail/tcfail065.stderr b/tests/typecheck/should_fail/tcfail065.stderr index c680e8264d4e17d12e296a1962c7b1e75d5f169b..8599dfeb2adc949469a46b518892123096942569 100644 --- a/tests/typecheck/should_fail/tcfail065.stderr +++ b/tests/typecheck/should_fail/tcfail065.stderr @@ -1,14 +1,14 @@ tcfail065.hs:29:20: - Couldn't match expected type `x' with actual type `x1' - `x1' is a rigid type variable bound by + Couldn't match expected type ‛x’ with actual type ‛x1’ + ‛x1’ is a rigid type variable bound by the type signature for setX :: x1 -> X x -> X x at tcfail065.hs:29:3 - `x' is a rigid type variable bound by + ‛x’ is a rigid type variable bound by the instance declaration at tcfail065.hs:28:10 Relevant bindings include setX :: x1 -> X x -> X x (bound at tcfail065.hs:29:3) x :: x1 (bound at tcfail065.hs:29:8) - In the first argument of `X', namely `x' + In the first argument of ‛X’, namely ‛x’ In the expression: X x - In an equation for `setX': setX x (X _) = X x + In an equation for ‛setX’: setX x (X _) = X x diff --git a/tests/typecheck/should_fail/tcfail067.stderr b/tests/typecheck/should_fail/tcfail067.stderr index 9e47a0bebc2e282a0ac4927b59f8c7a843730911..ebe87035d1cd3075f9ec19d431e5bc26f66b9865 100644 --- a/tests/typecheck/should_fail/tcfail067.stderr +++ b/tests/typecheck/should_fail/tcfail067.stderr @@ -3,24 +3,24 @@ tcfail067.hs:1:14: Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. tcfail067.hs:12:16: - No instance for (Ord a) arising from a use of `SubRange' + No instance for (Ord a) arising from a use of ‛SubRange’ Possible fix: add (Ord a) to the context of the type signature for subRangeValue :: SubRange a -> a In the pattern: SubRange (lower, upper) value - In an equation for `subRangeValue': + In an equation for ‛subRangeValue’: subRangeValue (SubRange (lower, upper) value) = value tcfail067.hs:15:11: - No instance for (Ord a) arising from a use of `SubRange' + No instance for (Ord a) arising from a use of ‛SubRange’ Possible fix: add (Ord a) to the context of the type signature for subRange :: SubRange a -> (a, a) In the pattern: SubRange r value - In an equation for `subRange': subRange (SubRange r value) = r + In an equation for ‛subRange’: subRange (SubRange r value) = r tcfail067.hs:46:12: - Could not deduce (Ord a) arising from a use of `SubRange' + Could not deduce (Ord a) arising from a use of ‛SubRange’ from the context (Show a) bound by the type signature for showRange :: Show a => SubRange a -> String @@ -29,35 +29,35 @@ tcfail067.hs:46:12: add (Ord a) to the context of the type signature for showRange :: Show a => SubRange a -> String In the pattern: SubRange (lower, upper) value - In an equation for `showRange': + In an equation for ‛showRange’: showRange (SubRange (lower, upper) value) = show value ++ " :" ++ show lower ++ ".." ++ show upper tcfail067.hs:61:12: - Could not deduce (Show a) arising from a use of `numSubRangeNegate' + Could not deduce (Show a) arising from a use of ‛numSubRangeNegate’ from the context (Num a) bound by the instance declaration at tcfail067.hs:60:10-34 Possible fix: add (Show a) to the context of the instance declaration In the expression: numSubRangeNegate - In an equation for `negate': negate = numSubRangeNegate - In the instance declaration for `Num (SubRange a)' + In an equation for ‛negate’: negate = numSubRangeNegate + In the instance declaration for ‛Num (SubRange a)’ tcfail067.hs:65:19: - Could not deduce (Ord a) arising from a use of `SubRange' + Could not deduce (Ord a) arising from a use of ‛SubRange’ from the context (Num a) bound by the instance declaration at tcfail067.hs:60:10-34 Possible fix: add (Ord a) to the context of the instance declaration In the expression: SubRange (fromInteger a, fromInteger a) (fromInteger a) - In an equation for `fromInteger': + In an equation for ‛fromInteger’: fromInteger a = SubRange (fromInteger a, fromInteger a) (fromInteger a) - In the instance declaration for `Num (SubRange a)' + In the instance declaration for ‛Num (SubRange a)’ tcfail067.hs:74:5: - Could not deduce (Ord a) arising from a use of `SubRange' + Could not deduce (Ord a) arising from a use of ‛SubRange’ from the context (Num a) bound by the type signature for numSubRangeBinOp :: Num a => @@ -69,7 +69,7 @@ tcfail067.hs:74:5: numSubRangeBinOp :: Num a => (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a In the expression: SubRange (result, result) result - In an equation for `numSubRangeBinOp': + In an equation for ‛numSubRangeBinOp’: numSubRangeBinOp op a b = SubRange (result, result) result where diff --git a/tests/typecheck/should_fail/tcfail068.stderr b/tests/typecheck/should_fail/tcfail068.stderr index 687c8eaca7680935c93ca820de72bec9a2ed90d8..4e889720e10001600c11a2eeca63878a574abce6 100644 --- a/tests/typecheck/should_fail/tcfail068.stderr +++ b/tests/typecheck/should_fail/tcfail068.stderr @@ -5,10 +5,10 @@ tcfail068.hs:14:9: bound by the type signature for itgen :: Constructed a => (Int, Int) -> a -> IndTree s a at tcfail068.hs:11:10-55 - `s1' is a rigid type variable bound by + ‛s1’ is a rigid type variable bound by a type expected by the context: GHC.ST.ST s1 (IndTree s a) at tcfail068.hs:13:9 - `s' is a rigid type variable bound by + ‛s’ is a rigid type variable bound by the type signature for itgen :: Constructed a => (Int, Int) -> a -> IndTree s a at tcfail068.hs:11:10 @@ -17,9 +17,9 @@ tcfail068.hs:14:9: Relevant bindings include itgen :: (Int, Int) -> a -> IndTree s a (bound at tcfail068.hs:12:1) - In the return type of a call of `newSTArray' - In the first argument of `runST', namely - `(newSTArray ((1, 1), n) x)' + In the return type of a call of ‛newSTArray’ + In the first argument of ‛runST’, namely + ‛(newSTArray ((1, 1), n) x)’ In the expression: runST (newSTArray ((1, 1), n) x) tcfail068.hs:19:21: @@ -29,12 +29,12 @@ tcfail068.hs:19:21: itiap :: Constructed a => (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a at tcfail068.hs:16:10-75 - `s' is a rigid type variable bound by + ‛s’ is a rigid type variable bound by the type signature for itiap :: Constructed a => (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a at tcfail068.hs:16:10 - `s1' is a rigid type variable bound by + ‛s1’ is a rigid type variable bound by a type expected by the context: GHC.ST.ST s1 (IndTree s a) at tcfail068.hs:18:9 Expected type: STArray s1 (Int, Int) a @@ -43,11 +43,11 @@ tcfail068.hs:19:21: itiap :: (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a (bound at tcfail068.hs:17:1) arr :: IndTree s a (bound at tcfail068.hs:17:11) - In the first argument of `readSTArray', namely `arr' - In the first argument of `(>>=)', namely `readSTArray arr i' - In the first argument of `runST', namely - `(readSTArray arr i - >>= \ val -> writeSTArray arr i (f val) >> return arr)' + In the first argument of ‛readSTArray’, namely ‛arr’ + In the first argument of ‛(>>=)’, namely ‛readSTArray arr i’ + In the first argument of ‛runST’, namely + ‛(readSTArray arr i + >>= \ val -> writeSTArray arr i (f val) >> return arr)’ tcfail068.hs:24:35: Could not deduce (s ~ s1) @@ -56,12 +56,12 @@ tcfail068.hs:24:35: itrap :: Constructed a => ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a at tcfail068.hs:23:10-87 - `s' is a rigid type variable bound by + ‛s’ is a rigid type variable bound by the type signature for itrap :: Constructed a => ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a at tcfail068.hs:23:10 - `s1' is a rigid type variable bound by + ‛s1’ is a rigid type variable bound by a type expected by the context: GHC.ST.ST s1 (IndTree s a) at tcfail068.hs:24:29 Expected type: GHC.ST.ST s1 (IndTree s a) @@ -75,8 +75,8 @@ tcfail068.hs:24:35: (bound at tcfail068.hs:29:9) itrap' :: Int -> Int -> GHC.ST.ST s (IndTree s a) (bound at tcfail068.hs:26:9) - In the return type of a call of itrap' - In the first argument of `runST', namely `(itrap' i k)' + In the return type of a call of ‛itrap'’ + In the first argument of ‛runST’, namely ‛(itrap' i k)’ In the expression: runST (itrap' i k) tcfail068.hs:36:46: @@ -92,7 +92,7 @@ tcfail068.hs:36:46: -> IndTree s b -> (c, IndTree s b) at tcfail068.hs:(34,15)-(35,62) - `s' is a rigid type variable bound by + ‛s’ is a rigid type variable bound by the type signature for itrapstate :: Constructed b => ((Int, Int), (Int, Int)) @@ -103,7 +103,7 @@ tcfail068.hs:36:46: -> IndTree s b -> (c, IndTree s b) at tcfail068.hs:34:15 - `s1' is a rigid type variable bound by + ‛s1’ is a rigid type variable bound by a type expected by the context: GHC.ST.ST s1 (c, IndTree s b) at tcfail068.hs:36:40 Expected type: GHC.ST.ST s1 (c, IndTree s b) @@ -122,6 +122,6 @@ tcfail068.hs:36:46: (bound at tcfail068.hs:41:9) itrapstate' :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b) (bound at tcfail068.hs:38:9) - In the return type of a call of itrapstate' - In the first argument of `runST', namely `(itrapstate' i k s)' + In the return type of a call of ‛itrapstate'’ + In the first argument of ‛runST’, namely ‛(itrapstate' i k s)’ In the expression: runST (itrapstate' i k s) diff --git a/tests/typecheck/should_fail/tcfail069.stderr b/tests/typecheck/should_fail/tcfail069.stderr index 4c40526b5b2e4ba379c2d03a587dad06209fa166..7c793c49ba32f8abcf09bb9335fa95fac59a214e 100644 --- a/tests/typecheck/should_fail/tcfail069.stderr +++ b/tests/typecheck/should_fail/tcfail069.stderr @@ -1,7 +1,7 @@ tcfail069.hs:21:7: - Couldn't match expected type `([Int], [Int])' - with actual type `[t0]' + Couldn't match expected type ‛([Int], [Int])’ + with actual type ‛[t0]’ In the pattern: [] In a case alternative: [] -> error "foo" In the expression: case (list1, list2) of { [] -> error "foo" } diff --git a/tests/typecheck/should_fail/tcfail070.stderr b/tests/typecheck/should_fail/tcfail070.stderr index 76e9feb51594f9fa05e623e62aad730e1532f64a..bc0590aae8f4495655f64e37b9e2e52d0bfe3c22 100644 --- a/tests/typecheck/should_fail/tcfail070.stderr +++ b/tests/typecheck/should_fail/tcfail070.stderr @@ -1,5 +1,5 @@ - -tcfail070.hs:15:15: - `[Int]' is applied to too many type arguments - In the type `[Int] Bool' - In the type declaration for `State' + +tcfail070.hs:15:15: + ‛[Int]’ is applied to too many type arguments + In the type ‛[Int] Bool’ + In the type declaration for ‛State’ diff --git a/tests/typecheck/should_fail/tcfail072.stderr b/tests/typecheck/should_fail/tcfail072.stderr index a71b0effda90de1e2fde365ec420ad0a45155cee..b533d3650920b0e326024c29b2055f9dc1c6f66a 100644 --- a/tests/typecheck/should_fail/tcfail072.stderr +++ b/tests/typecheck/should_fail/tcfail072.stderr @@ -1,16 +1,16 @@ - -tcfail072.hs:23:13: - Could not deduce (Ord q0) arising from a use of `g' - from the context (Ord p, Ord q) - bound by the type signature for - g :: (Ord p, Ord q) => AB p q -> Bool - at tcfail072.hs:22:6-38 - The type variable `q0' is ambiguous - Note: there are several potential instances: - instance Integral a => Ord (GHC.Real.Ratio a) - -- Defined in `GHC.Real' - instance Ord () -- Defined in `GHC.Classes' - instance (Ord a, Ord b) => Ord (a, b) -- Defined in `GHC.Classes' - ...plus 22 others - In the expression: g A - In an equation for `g': g (B _ _) = g A + +tcfail072.hs:23:13: + Could not deduce (Ord q0) arising from a use of ‛g’ + from the context (Ord p, Ord q) + bound by the type signature for + g :: (Ord p, Ord q) => AB p q -> Bool + at tcfail072.hs:22:6-38 + The type variable ‛q0’ is ambiguous + Note: there are several potential instances: + instance Integral a => Ord (GHC.Real.Ratio a) + -- Defined in ‛GHC.Real’ + instance Ord () -- Defined in ‛GHC.Classes’ + instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‛GHC.Classes’ + ...plus 22 others + In the expression: g A + In an equation for ‛g’: g (B _ _) = g A diff --git a/tests/typecheck/should_fail/tcfail073.stderr b/tests/typecheck/should_fail/tcfail073.stderr index 3ac8e21e0f9cf54a90530046e8bb0a7c5f1a89be..16bcdf4c0faab10fa409b06e1775dea208ae2c04 100644 --- a/tests/typecheck/should_fail/tcfail073.stderr +++ b/tests/typecheck/should_fail/tcfail073.stderr @@ -2,4 +2,4 @@ tcfail073.hs:8:10: Duplicate instance declarations: instance Eq a => Eq (a, b) -- Defined at tcfail073.hs:8:10 - instance (Eq a, Eq b) => Eq (a, b) -- Defined in `GHC.Classes' + instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‛GHC.Classes’ diff --git a/tests/typecheck/should_fail/tcfail076.stderr b/tests/typecheck/should_fail/tcfail076.stderr index 5e8361aa66aae192fe7243da9e0a5ea4f66a5da6..c5bd8a5bc8af8466952dc38f932f34aa42aede4c 100644 --- a/tests/typecheck/should_fail/tcfail076.stderr +++ b/tests/typecheck/should_fail/tcfail076.stderr @@ -1,10 +1,10 @@ tcfail076.hs:18:82: - Couldn't match type `res' with `res1' - `res' is a rigid type variable bound by + Couldn't match type ‛res’ with ‛res1’ + ‛res’ is a rigid type variable bound by a type expected by the context: (a -> m res) -> m res at tcfail076.hs:18:28 - `res1' is a rigid type variable bound by + ‛res1’ is a rigid type variable bound by a type expected by the context: (b -> m res1) -> m res1 at tcfail076.hs:18:64 Expected type: m res1 @@ -12,6 +12,6 @@ tcfail076.hs:18:82: Relevant bindings include cont :: a -> m res (bound at tcfail076.hs:18:37) cont' :: b -> m res1 (bound at tcfail076.hs:18:73) - In the return type of a call of `cont' + In the return type of a call of ‛cont’ In the expression: cont a - In the first argument of `KContT', namely `(\ cont' -> cont a)' + In the first argument of ‛KContT’, namely ‛(\ cont' -> cont a)’ diff --git a/tests/typecheck/should_fail/tcfail077.stderr b/tests/typecheck/should_fail/tcfail077.stderr index 105604f66c8f7e4b91a814a2e62731589b4de41c..3f25950faf46506d7473ea6f948e2433d7115e26 100644 --- a/tests/typecheck/should_fail/tcfail077.stderr +++ b/tests/typecheck/should_fail/tcfail077.stderr @@ -1,2 +1,2 @@ -tcfail077.hs:8:3: `op2' is not a (visible) method of class `Foo' +tcfail077.hs:8:3: ‛op2’ is not a (visible) method of class ‛Foo’ diff --git a/tests/typecheck/should_fail/tcfail078.stderr b/tests/typecheck/should_fail/tcfail078.stderr index 714e2807be161636d0d226a87914cb60620020e4..b3fabd30b9c8b3bea8443c70f3f2e965786e56e6 100644 --- a/tests/typecheck/should_fail/tcfail078.stderr +++ b/tests/typecheck/should_fail/tcfail078.stderr @@ -1,4 +1,4 @@ tcfail078.hs:5:6: - `Integer' is applied to too many type arguments - In the type signature for `f': f :: Integer i => i + ‛Integer’ is applied to too many type arguments + In the type signature for ‛f’: f :: Integer i => i diff --git a/tests/typecheck/should_fail/tcfail079.stderr b/tests/typecheck/should_fail/tcfail079.stderr index a7b9b7cb3f5e0365fc99d1955ad0817ba93a7f7d..4cce1a69ba6b72c0686d506a8d7da2d9e7a2baf2 100644 --- a/tests/typecheck/should_fail/tcfail079.stderr +++ b/tests/typecheck/should_fail/tcfail079.stderr @@ -1,6 +1,6 @@ tcfail079.hs:9:27: - Expecting a lifted type, but `Int#' is unlifted - In the type `Int#' - In the definition of data constructor `Unboxed' - In the newtype declaration for `Unboxed' + Expecting a lifted type, but ‛Int#’ is unlifted + In the type ‛Int#’ + In the definition of data constructor ‛Unboxed’ + In the newtype declaration for ‛Unboxed’ diff --git a/tests/typecheck/should_fail/tcfail080.stderr b/tests/typecheck/should_fail/tcfail080.stderr index 31ad5462131aa54fc0b31db5df3c90e4ca6ada57..23afa16ba3308164d36943bbb619f3ab4323b399 100644 --- a/tests/typecheck/should_fail/tcfail080.stderr +++ b/tests/typecheck/should_fail/tcfail080.stderr @@ -1,13 +1,13 @@ - -tcfail080.hs:27:1: - Could not deduce (Collection c0 a) - arising from the ambiguity check for `q' - from the context (Collection c a) - bound by the inferred type for `q': Collection c a => a -> Bool - at tcfail080.hs:27:1-27 - The type variable `c0' is ambiguous - When checking that `q' - has the inferred type `forall (c :: * -> *) a. - Collection c a => - a -> Bool' - Probable cause: the inferred type is ambiguous + +tcfail080.hs:27:1: + Could not deduce (Collection c0 a) + arising from the ambiguity check for ‛q’ + from the context (Collection c a) + bound by the inferred type for ‛q’: Collection c a => a -> Bool + at tcfail080.hs:27:1-27 + The type variable ‛c0’ is ambiguous + When checking that ‛q’ + has the inferred type ‛forall (c :: * -> *) a. + Collection c a => + a -> Bool’ + Probable cause: the inferred type is ambiguous diff --git a/tests/typecheck/should_fail/tcfail082.stderr b/tests/typecheck/should_fail/tcfail082.stderr index 4fd34e6022bca51aa0ec4b85e1753d6a760a02f6..b34c6d1ecaff53b5508744fdd436d072fe9ef91c 100644 --- a/tests/typecheck/should_fail/tcfail082.stderr +++ b/tests/typecheck/should_fail/tcfail082.stderr @@ -1,4 +1,4 @@ tcfail082.hs:2:1: - Failed to load interface for `Data82' + Failed to load interface for ‛Data82’ Use -v to see a list of the files searched for. diff --git a/tests/typecheck/should_fail/tcfail083.stderr b/tests/typecheck/should_fail/tcfail083.stderr index 07717e090bfd3fc6c7c52a5c7d0023e39143cf3d..dc4ce59e9c474bd28ad35bb7b1f081dd2f610c44 100644 --- a/tests/typecheck/should_fail/tcfail083.stderr +++ b/tests/typecheck/should_fail/tcfail083.stderr @@ -1,20 +1,20 @@ - -tcfail083.hs:8:39: - Constructor `Bar' does not have field `baz' - In the pattern: Bar {flag = f, baz = b} - In the pattern: State {bar = Bar {flag = f, baz = b}} - In an equation for `display': - display (State {bar = Bar {flag = f, baz = b}}) = print (f, b) - -tcfail083.hs:8:53: - No instance for (Show t0) arising from a use of `print' - The type variable `t0' is ambiguous - Relevant bindings include b :: t0 (bound at tcfail083.hs:8:45) - Note: there are several potential instances: - instance Show Bar -- Defined at tcfail083.hs:3:43 - instance Show Double -- Defined in `GHC.Float' - instance Show Float -- Defined in `GHC.Float' - ...plus 24 others - In the expression: print (f, b) - In an equation for `display': - display (State {bar = Bar {flag = f, baz = b}}) = print (f, b) + +tcfail083.hs:8:39: + Constructor ‛Bar’ does not have field ‛baz’ + In the pattern: Bar {flag = f, baz = b} + In the pattern: State {bar = Bar {flag = f, baz = b}} + In an equation for ‛display’: + display (State {bar = Bar {flag = f, baz = b}}) = print (f, b) + +tcfail083.hs:8:53: + No instance for (Show t0) arising from a use of ‛print’ + The type variable ‛t0’ is ambiguous + Relevant bindings include b :: t0 (bound at tcfail083.hs:8:45) + Note: there are several potential instances: + instance Show Bar -- Defined at tcfail083.hs:3:43 + instance Show Double -- Defined in ‛GHC.Float’ + instance Show Float -- Defined in ‛GHC.Float’ + ...plus 24 others + In the expression: print (f, b) + In an equation for ‛display’: + display (State {bar = Bar {flag = f, baz = b}}) = print (f, b) diff --git a/tests/typecheck/should_fail/tcfail084.stderr b/tests/typecheck/should_fail/tcfail084.stderr index 1a7e8c3e28a61ce15986b4b1b4a5f0e338683565..cfa0ff4835e06b978313776368d06d42d931108f 100644 --- a/tests/typecheck/should_fail/tcfail084.stderr +++ b/tests/typecheck/should_fail/tcfail084.stderr @@ -1,5 +1,5 @@ tcfail084.hs:10:5: - Constructor `F' does not have field `y' + Constructor ‛F’ does not have field ‛y’ In the expression: F {y = 2} - In an equation for `z': z = F {y = 2} + In an equation for ‛z’: z = F {y = 2} diff --git a/tests/typecheck/should_fail/tcfail085.stderr b/tests/typecheck/should_fail/tcfail085.stderr index c500e7a1800ed198bdcb81fa1580845a630772b0..feb7c6daf31a6895e152009c51b1fb5fc8a72637 100644 --- a/tests/typecheck/should_fail/tcfail085.stderr +++ b/tests/typecheck/should_fail/tcfail085.stderr @@ -1,5 +1,5 @@ tcfail085.hs:9:5: - Constructor `F' does not have the required strict field(s): y + Constructor ‛F’ does not have the required strict field(s): y In the expression: F {x = 2} - In an equation for `z': z = F {x = 2} + In an equation for ‛z’: z = F {x = 2} diff --git a/tests/typecheck/should_fail/tcfail086.stderr b/tests/typecheck/should_fail/tcfail086.stderr index 1aa420928d0b91be3f1850d58ffe663c4534f68e..ebf4d4e8e6e4512bc25b779eb6805469d99d2704 100644 --- a/tests/typecheck/should_fail/tcfail086.stderr +++ b/tests/typecheck/should_fail/tcfail086.stderr @@ -1,6 +1,6 @@ - -tcfail086.hs:6:38: - Can't make a derived instance of `Eq Ex': - Constructor `Ex' must have a Haskell-98 type - Possible fix: use a standalone deriving declaration instead - In the data declaration for `Ex' + +tcfail086.hs:6:38: + Can't make a derived instance of ‛Eq Ex’: + Constructor ‛Ex’ must have a Haskell-98 type + Possible fix: use a standalone deriving declaration instead + In the data declaration for ‛Ex’ diff --git a/tests/typecheck/should_fail/tcfail088.stderr b/tests/typecheck/should_fail/tcfail088.stderr index 1bf22ffaa83afe9f7ae1f8dbea0c840684a392ea..1c303d9a653d3ec2b5ddd5a2b3ec6160fcbe4fbe 100644 --- a/tests/typecheck/should_fail/tcfail088.stderr +++ b/tests/typecheck/should_fail/tcfail088.stderr @@ -1,4 +1,4 @@ tcfail088.hs:9:19: Illegal polymorphic or qualified type: forall s. T s a - In the instance declaration for `Ord (forall s. T s a)' + In the instance declaration for ‛Ord (forall s. T s a)’ diff --git a/tests/typecheck/should_fail/tcfail090.stderr b/tests/typecheck/should_fail/tcfail090.stderr index 3096b226c8aaa0c60a073bb9439d7455634ce3c0..622e1814018020f4a325630793fe8479f07e35c5 100644 --- a/tests/typecheck/should_fail/tcfail090.stderr +++ b/tests/typecheck/should_fail/tcfail090.stderr @@ -1,8 +1,8 @@ tcfail090.hs:8:9: - Couldn't match kind `*' with `#' + Couldn't match kind ‛*’ with ‛#’ When matching types a0 :: * ByteArray# :: # In the expression: undefined - In an equation for `die': die _ = undefined + In an equation for ‛die’: die _ = undefined diff --git a/tests/typecheck/should_fail/tcfail092.stderr b/tests/typecheck/should_fail/tcfail092.stderr index 2ba048bb2668f659e544f70925fd59b05182b9f3..d1079d879e4dac03fb1bd281faea9adba5a1f0a9 100644 --- a/tests/typecheck/should_fail/tcfail092.stderr +++ b/tests/typecheck/should_fail/tcfail092.stderr @@ -1,3 +1,3 @@ tcfail092.hs:7:27: - Duplicate binding in parallel list comprehension for: `a' + Duplicate binding in parallel list comprehension for: ‛a’ diff --git a/tests/typecheck/should_fail/tcfail097.stderr b/tests/typecheck/should_fail/tcfail097.stderr index e7dadd4a6c50a485da17f8c09c85380a2dd6a834..7b2b3aed89c28b6519fc398a63f3e3985ed5b94d 100644 --- a/tests/typecheck/should_fail/tcfail097.stderr +++ b/tests/typecheck/should_fail/tcfail097.stderr @@ -1,9 +1,9 @@ - -tcfail097.hs:5:6: - Could not deduce (Eq a0) arising from the ambiguity check for `f' - from the context (Eq a) - bound by the type signature for f :: Eq a => Int -> Int - at tcfail097.hs:5:6-23 - The type variable `a0' is ambiguous - In the ambiguity check for: forall a. Eq a => Int -> Int - In the type signature for `f': f :: Eq a => Int -> Int + +tcfail097.hs:5:6: + Could not deduce (Eq a0) arising from the ambiguity check for ‛f’ + from the context (Eq a) + bound by the type signature for f :: Eq a => Int -> Int + at tcfail097.hs:5:6-23 + The type variable ‛a0’ is ambiguous + In the ambiguity check for: forall a. Eq a => Int -> Int + In the type signature for ‛f’: f :: Eq a => Int -> Int diff --git a/tests/typecheck/should_fail/tcfail098.stderr b/tests/typecheck/should_fail/tcfail098.stderr index 8853e693263608fe904ed9786e64ffab40bc4257..cfb7aaf9b4a5b7120ba2eaadfdfc39ab630b5372 100644 --- a/tests/typecheck/should_fail/tcfail098.stderr +++ b/tests/typecheck/should_fail/tcfail098.stderr @@ -1,10 +1,10 @@ - -tcfail098.hs:12:10: - Could not deduce (Bar a0) - arising from the ambiguity check for an instance declaration - from the context (Bar a) - bound by an instance declaration: Bar a => Bar Bool - at tcfail098.hs:12:10-26 - The type variable `a0' is ambiguous - In the ambiguity check for: forall a. Bar a => Bar Bool - In the instance declaration for `Bar Bool' + +tcfail098.hs:12:10: + Could not deduce (Bar a0) + arising from the ambiguity check for an instance declaration + from the context (Bar a) + bound by an instance declaration: Bar a => Bar Bool + at tcfail098.hs:12:10-26 + The type variable ‛a0’ is ambiguous + In the ambiguity check for: forall a. Bar a => Bar Bool + In the instance declaration for ‛Bar Bool’ diff --git a/tests/typecheck/should_fail/tcfail099.stderr b/tests/typecheck/should_fail/tcfail099.stderr index 45531250b3d2300c201d414758cfee3a3763755d..f4b77b770a1e3844473deac0ebf5b275d3fbaf4d 100644 --- a/tests/typecheck/should_fail/tcfail099.stderr +++ b/tests/typecheck/should_fail/tcfail099.stderr @@ -1,16 +1,16 @@ tcfail099.hs:9:20: - Couldn't match expected type `a' with actual type `t' - because type variable `a' would escape its scope + Couldn't match expected type ‛a’ with actual type ‛t’ + because type variable ‛a’ would escape its scope This (rigid, skolem) type variable is bound by a pattern with constructor C :: forall a. (a -> Int) -> DS, - in an equation for `call' + in an equation for ‛call’ at tcfail099.hs:9:7-9 Relevant bindings include call :: DS -> t -> Int (bound at tcfail099.hs:9:1) f :: a -> Int (bound at tcfail099.hs:9:9) arg :: t (bound at tcfail099.hs:9:12) - In the first argument of `f', namely `arg' + In the first argument of ‛f’, namely ‛arg’ In the expression: f arg - In an equation for `call': call (C f) arg = f arg + In an equation for ‛call’: call (C f) arg = f arg diff --git a/tests/typecheck/should_fail/tcfail100.stderr b/tests/typecheck/should_fail/tcfail100.stderr index 885c8220b936b01269c319e616d9f7fd29920160..1e780767012a70c992abe68e9e85ad341ad84752 100644 --- a/tests/typecheck/should_fail/tcfail100.stderr +++ b/tests/typecheck/should_fail/tcfail100.stderr @@ -1,4 +1,4 @@ - -tcfail100.hs:7:1: - Type synonym `A' should have 1 argument, but has been given none - In the type declaration for `B' + +tcfail100.hs:7:1: + Type synonym ‛A’ should have 1 argument, but has been given none + In the type declaration for ‛B’ diff --git a/tests/typecheck/should_fail/tcfail101.stderr b/tests/typecheck/should_fail/tcfail101.stderr index 5cca6de0a3fcc19c64bee369926260a8afde3c4c..f9b3f2f71f9c5de912aec8735bf8e164f8ce64a3 100644 --- a/tests/typecheck/should_fail/tcfail101.stderr +++ b/tests/typecheck/should_fail/tcfail101.stderr @@ -1,4 +1,4 @@ tcfail101.hs:9:6: - Type synonym `A' should have 1 argument, but has been given none - In the type signature for `f': f :: T A + Type synonym ‛A’ should have 1 argument, but has been given none + In the type signature for ‛f’: f :: T A diff --git a/tests/typecheck/should_fail/tcfail102.stderr b/tests/typecheck/should_fail/tcfail102.stderr index 516734b05d80d6530474ea0106a52c4aa94cfccf..1009fb4ccae64fa0f09cb98494f905e9f2856046 100644 --- a/tests/typecheck/should_fail/tcfail102.stderr +++ b/tests/typecheck/should_fail/tcfail102.stderr @@ -3,11 +3,11 @@ tcfail102.hs:1:14: Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. tcfail102.hs:9:15: - Could not deduce (Integral (Ratio a)) arising from a use of `p' + Could not deduce (Integral (Ratio a)) arising from a use of ‛p’ from the context (Integral a) bound by the type signature for f :: Integral a => P (Ratio a) -> P (Ratio a) at tcfail102.hs:8:6-45 - In the `p' field of a record + In the ‛p’ field of a record In the expression: x {p = p x} - In an equation for `f': f x = x {p = p x} + In an equation for ‛f’: f x = x {p = p x} diff --git a/tests/typecheck/should_fail/tcfail103.stderr b/tests/typecheck/should_fail/tcfail103.stderr index ea873e637feb2d6d54cd9b891c91ea90ad3852e9..ba581be12faf4af7c2c3bd2161acd4ee030f9f34 100644 --- a/tests/typecheck/should_fail/tcfail103.stderr +++ b/tests/typecheck/should_fail/tcfail103.stderr @@ -1,9 +1,9 @@ tcfail103.hs:15:23: - Couldn't match type `t' with `s' - `t' is a rigid type variable bound by + Couldn't match type ‛t’ with ‛s’ + ‛t’ is a rigid type variable bound by the type signature for f :: ST t Int at tcfail103.hs:10:5 - `s' is a rigid type variable bound by + ‛s’ is a rigid type variable bound by the type signature for g :: ST s Int at tcfail103.hs:13:14 Expected type: STRef s Int Actual type: STRef t Int @@ -11,6 +11,6 @@ tcfail103.hs:15:23: f :: ST t Int (bound at tcfail103.hs:11:1) v :: STRef t Int (bound at tcfail103.hs:12:5) g :: ST s Int (bound at tcfail103.hs:15:9) - In the first argument of `readSTRef', namely `v' + In the first argument of ‛readSTRef’, namely ‛v’ In the expression: readSTRef v - In an equation for `g': g = readSTRef v + In an equation for ‛g’: g = readSTRef v diff --git a/tests/typecheck/should_fail/tcfail104.stderr b/tests/typecheck/should_fail/tcfail104.stderr index 5e6fc3bb1f461b1f70cb2f45a6269506afae07d0..a32e413f6bca0b8d1fc199dd3c72dce06e0b2a8d 100644 --- a/tests/typecheck/should_fail/tcfail104.stderr +++ b/tests/typecheck/should_fail/tcfail104.stderr @@ -1,15 +1,15 @@ tcfail104.hs:16:19: - Couldn't match expected type `Char -> Char' - with actual type `forall a. a -> a' + Couldn't match expected type ‛Char -> Char’ + with actual type ‛forall a. a -> a’ In the expression: x In the expression: (\ x -> x) In the expression: if v then (\ (x :: forall a. a -> a) -> x) else (\ x -> x) tcfail104.hs:22:39: - Couldn't match expected type `forall a. a -> a' - with actual type `a0 -> a0' + Couldn't match expected type ‛forall a. a -> a’ + with actual type ‛a0 -> a0’ In the expression: x In the expression: (\ (x :: forall a. a -> a) -> x) In the expression: diff --git a/tests/typecheck/should_fail/tcfail106.stderr b/tests/typecheck/should_fail/tcfail106.stderr index b08c7dfe892eccdab6e108c4ba7887b434fe3af8..2eeaf7197970de6d7a48d77fb6d06a429a8e013c 100644 --- a/tests/typecheck/should_fail/tcfail106.stderr +++ b/tests/typecheck/should_fail/tcfail106.stderr @@ -2,4 +2,4 @@ tcfail106.hs:14:10: No instance for (S Int) arising from the superclasses of an instance declaration - In the instance declaration for `D Int' + In the instance declaration for ‛D Int’ diff --git a/tests/typecheck/should_fail/tcfail107.stderr b/tests/typecheck/should_fail/tcfail107.stderr index 92a89b75449447cbc8bb5486ccf4e45dab4337e6..b658814776eb2bb2ce24a122d547a042b9a42f5e 100644 --- a/tests/typecheck/should_fail/tcfail107.stderr +++ b/tests/typecheck/should_fail/tcfail107.stderr @@ -1,5 +1,5 @@ tcfail107.hs:13:9: - Type synonym `Const' should have 2 arguments, but has been given 1 - In the type signature for `test': + Type synonym ‛Const’ should have 2 arguments, but has been given 1 + In the type signature for ‛test’: test :: Thing (Const Int) -> Thing (Const Int) diff --git a/tests/typecheck/should_fail/tcfail108.stderr b/tests/typecheck/should_fail/tcfail108.stderr index 56c97c20ddb1505af195fb5338895d27ab958480..f3c24156316e7d28fbe0ab65dc583593f4eeceff 100644 --- a/tests/typecheck/should_fail/tcfail108.stderr +++ b/tests/typecheck/should_fail/tcfail108.stderr @@ -4,4 +4,4 @@ tcfail108.hs:7:10: (Use -XFlexibleContexts to permit this) In the context: (Eq (f (Rec f))) While checking an instance declaration - In the instance declaration for `Eq (Rec f)' + In the instance declaration for ‛Eq (Rec f)’ diff --git a/tests/typecheck/should_fail/tcfail109.stderr b/tests/typecheck/should_fail/tcfail109.stderr index 54558154090ab6d3a953b25af23e2b8a753a07c9..4b596071867090345445c364f0cdebea2d824329 100644 --- a/tests/typecheck/should_fail/tcfail109.stderr +++ b/tests/typecheck/should_fail/tcfail109.stderr @@ -2,4 +2,4 @@ tcfail109.hs:16:10: No instance for (Eq Stupid) arising from the superclasses of an instance declaration - In the instance declaration for `Collects Bool Stupid' + In the instance declaration for ‛Collects Bool Stupid’ diff --git a/tests/typecheck/should_fail/tcfail110.stderr b/tests/typecheck/should_fail/tcfail110.stderr index 91ba52195d0b949cd3259868b061a434f4204a3a..840dc29deea3ba76a9a04a5654aaae7e63528c34 100644 --- a/tests/typecheck/should_fail/tcfail110.stderr +++ b/tests/typecheck/should_fail/tcfail110.stderr @@ -1,6 +1,6 @@ tcfail110.hs:8:30: - Expecting one more argument to `Foo a' - Expected a type, but `Foo a' has kind `* -> *' - In the type signature for `bar': + Expecting one more argument to ‛Foo a’ + Expected a type, but ‛Foo a’ has kind ‛* -> *’ + In the type signature for ‛bar’: bar :: String -> (forall a. Foo a) -> IO () diff --git a/tests/typecheck/should_fail/tcfail112.stderr b/tests/typecheck/should_fail/tcfail112.stderr index 602c1e4b699dfb3557d86937efdc5ee4008a5e82..70cd77bca3a24a43fa1c535ec735e4b16b0e7074 100644 --- a/tests/typecheck/should_fail/tcfail112.stderr +++ b/tests/typecheck/should_fail/tcfail112.stderr @@ -1,15 +1,15 @@ tcfail112.hs:11:6: - Constructor `S' does not have the required strict field(s): y + Constructor ‛S’ does not have the required strict field(s): y In the expression: S {} - In an equation for `s1': s1 = S {} + In an equation for ‛s1’: s1 = S {} tcfail112.hs:12:6: - Constructor `S' does not have the required strict field(s): y + Constructor ‛S’ does not have the required strict field(s): y In the expression: S {x = 3} - In an equation for `s2': s2 = S {x = 3} + In an equation for ‛s2’: s2 = S {x = 3} tcfail112.hs:14:6: - Constructor `T' does not have the required strict field(s) + Constructor ‛T’ does not have the required strict field(s) In the expression: T {} - In an equation for `t': t = T {} + In an equation for ‛t’: t = T {} diff --git a/tests/typecheck/should_fail/tcfail113.stderr b/tests/typecheck/should_fail/tcfail113.stderr index 2584b46bda44559ed8c44d1dd2427824f30c94da..f9314f5dcc38c44e286d868da987d99171446e28 100644 --- a/tests/typecheck/should_fail/tcfail113.stderr +++ b/tests/typecheck/should_fail/tcfail113.stderr @@ -1,14 +1,14 @@ tcfail113.hs:12:7: - Expecting one more argument to `Maybe' - Expected kind `*', but `Maybe' has kind `* -> *' - In the type signature for `f': f :: [Maybe] + Expecting one more argument to ‛Maybe’ + Expected kind ‛*’, but ‛Maybe’ has kind ‛* -> *’ + In the type signature for ‛f’: f :: [Maybe] tcfail113.hs:15:8: - The first argument of `T' should have kind `* -> *', - but `Int' has kind `*' - In the type signature for `g': g :: T Int + The first argument of ‛T’ should have kind ‛* -> *’, + but ‛Int’ has kind ‛*’ + In the type signature for ‛g’: g :: T Int tcfail113.hs:18:6: - `Int' is applied to too many type arguments - In the type signature for `h': h :: Int Int + ‛Int’ is applied to too many type arguments + In the type signature for ‛h’: h :: Int Int diff --git a/tests/typecheck/should_fail/tcfail114.stderr b/tests/typecheck/should_fail/tcfail114.stderr index 601feff85b6d4a1ae3e39c9c206199e4799f7537..41c8a65cec06d48857335b56f030238d7c585d8c 100644 --- a/tests/typecheck/should_fail/tcfail114.stderr +++ b/tests/typecheck/should_fail/tcfail114.stderr @@ -1,5 +1,5 @@ tcfail114.hs:11:20: - `foo' is not a record selector + ‛foo’ is not a record selector In the expression: undefined {foo = ()} - In an equation for `test': test = undefined {foo = ()} + In an equation for ‛test’: test = undefined {foo = ()} diff --git a/tests/typecheck/should_fail/tcfail116.stderr b/tests/typecheck/should_fail/tcfail116.stderr index 8e7372413a3d8480df11989f12a852ef392304b8..d49438dd97ad1a2a491206436a6b29736ab3b221 100644 --- a/tests/typecheck/should_fail/tcfail116.stderr +++ b/tests/typecheck/should_fail/tcfail116.stderr @@ -1,6 +1,6 @@ tcfail116.hs:5:1: - The class method `bug' + The class method ‛bug’ mentions none of the type variables of the class Foo a When checking the class method: bug :: () - In the class declaration for `Foo' + In the class declaration for ‛Foo’ diff --git a/tests/typecheck/should_fail/tcfail117.stderr b/tests/typecheck/should_fail/tcfail117.stderr index c7be9199c5913098eec30a1c99bc2562825b5164..40a14e7f20283359bb15d829047f986965577365 100644 --- a/tests/typecheck/should_fail/tcfail117.stderr +++ b/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 -XGeneralizedNewtypeDeriving 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: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 -XGeneralizedNewtypeDeriving 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’ diff --git a/tests/typecheck/should_fail/tcfail119.stderr b/tests/typecheck/should_fail/tcfail119.stderr index 1984617b2b32f43d4cd0625abd52a6d909e3bc1d..45a1bc7707c02a256851f0c5c5ae0d7a959d9da8 100644 --- a/tests/typecheck/should_fail/tcfail119.stderr +++ b/tests/typecheck/should_fail/tcfail119.stderr @@ -1,5 +1,5 @@ tcfail119.hs:11:8: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the pattern: "Foo" - In an equation for `b': b x "Foo" = () + In an equation for ‛b’: b x "Foo" = () diff --git a/tests/typecheck/should_fail/tcfail121.stderr b/tests/typecheck/should_fail/tcfail121.stderr index 700dbb861a48f900931bb96e2b66ade06b25a413..7ac388aa165963b02c79c4f6a2d5ce3f86ed7a5c 100644 --- a/tests/typecheck/should_fail/tcfail121.stderr +++ b/tests/typecheck/should_fail/tcfail121.stderr @@ -1,13 +1,12 @@ tcfail121.hs:13:9: - Overlapping instances for Foo [a] - arising from a use of `op' + Overlapping instances for Foo [a] arising from a use of ‛op’ Matching instances: instance [overlap ok] Foo a => Foo [a] -- Defined at tcfail121.hs:9:10 instance [overlap ok] Foo [Int] -- Defined at tcfail121.hs:10:10 - (The choice depends on the instantiation of `a' + (The choice depends on the instantiation of ‛a’ To pick the first instance above, use -XIncoherentInstances when compiling the other instance declarations) In the expression: op x - In an equation for `foo': foo x = op x + In an equation for ‛foo’: foo x = op x diff --git a/tests/typecheck/should_fail/tcfail122.stderr b/tests/typecheck/should_fail/tcfail122.stderr index d0833211620d6082aea2618fac8104fa5dbf3168..ec0f6a33bd1f3a398068c8aa9de1c511b297fbc2 100644 --- a/tests/typecheck/should_fail/tcfail122.stderr +++ b/tests/typecheck/should_fail/tcfail122.stderr @@ -1,6 +1,6 @@ tcfail122.hs:8:9: - Couldn't match kind `* -> *' with `*' + Couldn't match kind ‛* -> *’ with ‛*’ When matching types d0 :: * -> * b :: * @@ -11,7 +11,7 @@ tcfail122.hs:8:9: In the expression: [undefined :: forall a b. a b, undefined :: forall (c :: (* -> *) -> *) (d :: * -> *). c d] - In an equation for `foo': + In an equation for ‛foo’: foo = [undefined :: forall a b. a b, undefined :: forall (c :: (* -> *) -> *) (d :: * -> *). c d] diff --git a/tests/typecheck/should_fail/tcfail123.stderr b/tests/typecheck/should_fail/tcfail123.stderr index 1ca291fd964a92adaa1d5f9b46771e82a4abf632..2a70414aafeb5942aef0939b66e06759310434d6 100644 --- a/tests/typecheck/should_fail/tcfail123.stderr +++ b/tests/typecheck/should_fail/tcfail123.stderr @@ -1,9 +1,9 @@ tcfail123.hs:11:9: - Couldn't match kind `*' with `#' + Couldn't match kind ‛*’ with ‛#’ When matching types t0 :: * GHC.Prim.Int# :: # - In the first argument of `f', namely `3#' + In the first argument of ‛f’, namely ‛3#’ In the expression: f 3# - In an equation for `h': h v = f 3# + In an equation for ‛h’: h v = f 3# diff --git a/tests/typecheck/should_fail/tcfail125.stderr b/tests/typecheck/should_fail/tcfail125.stderr index addd093bff0660d58aaaf5eb865ab6a6dc9bf61a..592698f7d43a40e1345f312d0b5b24ac0d56915e 100644 --- a/tests/typecheck/should_fail/tcfail125.stderr +++ b/tests/typecheck/should_fail/tcfail125.stderr @@ -3,9 +3,9 @@ tcfail125.hs:1:14: Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. tcfail125.hs:11:4: - No instance for (Show a) arising from a use of `LiftObs' + No instance for (Show a) arising from a use of ‛LiftObs’ Possible fix: add (Show a) to the context of the type signature for f :: Obs a -> String In the pattern: LiftObs _ _ - In an equation for `f': f (LiftObs _ _) = "yes" + In an equation for ‛f’: f (LiftObs _ _) = "yes" diff --git a/tests/typecheck/should_fail/tcfail127.stderr b/tests/typecheck/should_fail/tcfail127.stderr index 021120314ffc25f7e493c5ceab620d6fd6079d44..c7d41534aaeec081f0e43add47bdea812b82c48e 100644 --- a/tests/typecheck/should_fail/tcfail127.stderr +++ b/tests/typecheck/should_fail/tcfail127.stderr @@ -2,4 +2,4 @@ tcfail127.hs:3:8: Illegal polymorphic or qualified type: Num a => a -> a Perhaps you intended to use -XImpredicativeTypes - In the type signature for `foo': foo :: IO (Num a => a -> a) + In the type signature for ‛foo’: foo :: IO (Num a => a -> a) diff --git a/tests/typecheck/should_fail/tcfail128.stderr b/tests/typecheck/should_fail/tcfail128.stderr index 9a1564fb85eb08ba1d036e7a1b6e5287826fd38e..38ae102d99255b6d404da4f803d8d7e493599edb 100644 --- a/tests/typecheck/should_fail/tcfail128.stderr +++ b/tests/typecheck/should_fail/tcfail128.stderr @@ -1,21 +1,21 @@ - -tcfail128.hs:18:16: - No instance for (Data.Array.Base.MArray b0 FlatVector IO) - arising from a use of `thaw' - The type variable `b0' is ambiguous - Note: there is a potential instance available: - instance Data.Array.Base.MArray GHC.IOArray.IOArray e IO - -- Defined in `Data.Array.Base' - In a stmt of a 'do' block: v <- thaw tmp - In the expression: - do { let sL = ... - dim = length sL - ....; - v <- thaw tmp; - return () } - In an equation for `main': - main - = do { let sL = ... - ....; - v <- thaw tmp; - return () } + +tcfail128.hs:18:16: + No instance for (Data.Array.Base.MArray b0 FlatVector IO) + arising from a use of ‛thaw’ + The type variable ‛b0’ is ambiguous + Note: there is a potential instance available: + instance Data.Array.Base.MArray GHC.IOArray.IOArray e IO + -- Defined in ‛Data.Array.Base’ + In a stmt of a 'do' block: v <- thaw tmp + In the expression: + do { let sL = ... + dim = length sL + ....; + v <- thaw tmp; + return () } + In an equation for ‛main’: + main + = do { let sL = ... + ....; + v <- thaw tmp; + return () } diff --git a/tests/typecheck/should_fail/tcfail129.stderr b/tests/typecheck/should_fail/tcfail129.stderr index f6ee765ce411f7aeab742d608195a99bd3b0e74d..0bffcbf76fdc68b741140e1562228de835760170 100644 --- a/tests/typecheck/should_fail/tcfail129.stderr +++ b/tests/typecheck/should_fail/tcfail129.stderr @@ -1,12 +1,12 @@ tcfail129.hs:12:21: - Type synonym `Foo' should have 1 argument, but has been given none + Type synonym ‛Foo’ should have 1 argument, but has been given none In an expression type signature: Bar Foo In the expression: undefined :: Bar Foo - In an equation for `blah': blah = undefined :: Bar Foo + In an equation for ‛blah’: blah = undefined :: Bar Foo tcfail129.hs:17:22: - Type synonym `Foo1' should have 1 argument, but has been given none + Type synonym ‛Foo1’ should have 1 argument, but has been given none In an expression type signature: Bar1 Foo1 In the expression: undefined :: Bar1 Foo1 - In an equation for `blah1': blah1 = undefined :: Bar1 Foo1 + In an equation for ‛blah1’: blah1 = undefined :: Bar1 Foo1 diff --git a/tests/typecheck/should_fail/tcfail130.stderr b/tests/typecheck/should_fail/tcfail130.stderr index 3534dba6794839857c308d3d094a83e71fce2962..37f3614b5f74f6ba0723ab0ccfc6a81a95dd58ef 100644 --- a/tests/typecheck/should_fail/tcfail130.stderr +++ b/tests/typecheck/should_fail/tcfail130.stderr @@ -1,6 +1,5 @@ tcfail130.hs:10:7: - Unbound implicit parameter (?x::Int) - arising from a use of `woggle' + Unbound implicit parameter (?x::Int) arising from a use of ‛woggle’ In the expression: woggle 3 - In an equation for `foo': foo = woggle 3 + In an equation for ‛foo’: foo = woggle 3 diff --git a/tests/typecheck/should_fail/tcfail131.stderr b/tests/typecheck/should_fail/tcfail131.stderr index db2a954d57b012dfdd318079510fd98ce09b8838..7cdcb6f2f928644c1524de13f6fdc0bc55675e0d 100644 --- a/tests/typecheck/should_fail/tcfail131.stderr +++ b/tests/typecheck/should_fail/tcfail131.stderr @@ -4,11 +4,11 @@ tcfail131.hs:7:9: from the context (Num b) bound by the type signature for g :: Num b => b -> b at tcfail131.hs:6:8-22 - `b' is a rigid type variable bound by + ‛b’ is a rigid type variable bound by the type signature for g :: Num b => b -> b at tcfail131.hs:6:8 Relevant bindings include g :: b -> b (bound at tcfail131.hs:7:3) x :: b (bound at tcfail131.hs:7:5) - In the return type of a call of `f' + In the return type of a call of ‛f’ In the expression: f x x - In an equation for `g': g x = f x x + In an equation for ‛g’: g x = f x x diff --git a/tests/typecheck/should_fail/tcfail132.hs b/tests/typecheck/should_fail/tcfail132.hs index cc933dc6ee38bb75d9e3682c9b5c22dda33bf9d3..dd8d644abc75d2fae3996e6de74c99b6134d67b2 100644 --- a/tests/typecheck/should_fail/tcfail132.hs +++ b/tests/typecheck/should_fail/tcfail132.hs @@ -4,7 +4,7 @@ -- Kind error: Expecting kind `k_a1JA -> k_a1JE -> k_a1JI -> *', -- but `DUnit t' has kind `k_a1JA -> k_a1JE -> *' -- --- as we couldn't tidy kinds, becuase they didn't have OccNames. +-- as we couldn't tidy kinds, because they didn't have OccNames. -- This test recalls the bad error message. module ShouldFail where diff --git a/tests/typecheck/should_fail/tcfail132.stderr b/tests/typecheck/should_fail/tcfail132.stderr index 91228b86b53ee6d309fc8277d101565eb54482c3..8440cc89abbbe29f342bbc9ee5ad2922eb25317e 100644 --- a/tests/typecheck/should_fail/tcfail132.stderr +++ b/tests/typecheck/should_fail/tcfail132.stderr @@ -1,6 +1,6 @@ tcfail132.hs:17:37: - The first argument of `T' should have kind `* -> * -> * -> *', - but `Object f' f t' has kind `* -> * -> *' - In the type `T (Object f' f t) (DUnit t)' - In the type declaration for `LiftObject' + The first argument of ‛T’ should have kind ‛* -> * -> * -> *’, + but ‛Object f' f t’ has kind ‛* -> * -> *’ + In the type ‛T (Object f' f t) (DUnit t)’ + In the type declaration for ‛LiftObject’ diff --git a/tests/typecheck/should_fail/tcfail133.stderr b/tests/typecheck/should_fail/tcfail133.stderr index 4a7c564b3b6d0cc9ad7423d402ff13b8fc74f622..72eafd88d74312c96f63959698e8e6eb63c24ee5 100644 --- a/tests/typecheck/should_fail/tcfail133.stderr +++ b/tests/typecheck/should_fail/tcfail133.stderr @@ -1,26 +1,26 @@ - -tcfail133.hs:2:61: Warning: - -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. - -tcfail133.hs:68:7: - No instance for (Show s0) arising from a use of `show' - The type variable `s0' is ambiguous - Note: there are several potential instances: - instance Show Zero -- Defined at tcfail133.hs:8:29 - instance Show One -- Defined at tcfail133.hs:9:28 - instance (Show a, Show b, Number a, Digit b) => Show (a :@ b) - -- Defined at tcfail133.hs:11:54 - ...plus 26 others - In the expression: show - In the expression: show $ add (One :@ Zero) (One :@ One) - In an equation for `foo': - foo = show $ add (One :@ Zero) (One :@ One) - -tcfail133.hs:68:14: - No instance for (AddDigit (Zero :@ (One :@ One)) One s0) - arising from a use of `add' - In the second argument of `($)', namely - `add (One :@ Zero) (One :@ One)' - In the expression: show $ add (One :@ Zero) (One :@ One) - In an equation for `foo': - foo = show $ add (One :@ Zero) (One :@ One) + +tcfail133.hs:2:61: Warning: + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. + +tcfail133.hs:68:7: + No instance for (Show s0) arising from a use of ‛show’ + The type variable ‛s0’ is ambiguous + Note: there are several potential instances: + instance Show Zero -- Defined at tcfail133.hs:8:29 + instance Show One -- Defined at tcfail133.hs:9:28 + instance (Show a, Show b, Number a, Digit b) => Show (a :@ b) + -- Defined at tcfail133.hs:11:54 + ...plus 26 others + In the expression: show + In the expression: show $ add (One :@ Zero) (One :@ One) + In an equation for ‛foo’: + foo = show $ add (One :@ Zero) (One :@ One) + +tcfail133.hs:68:14: + No instance for (AddDigit (Zero :@ (One :@ One)) One s0) + arising from a use of ‛add’ + In the second argument of ‛($)’, namely + ‛add (One :@ Zero) (One :@ One)’ + In the expression: show $ add (One :@ Zero) (One :@ One) + In an equation for ‛foo’: + foo = show $ add (One :@ Zero) (One :@ One) diff --git a/tests/typecheck/should_fail/tcfail134.stderr b/tests/typecheck/should_fail/tcfail134.stderr index 721a2f3312113493e6e073b9a478b9d5e3c7d440..7ba96200922755e9cbabbd2c2e0bc4b167bda402 100644 --- a/tests/typecheck/should_fail/tcfail134.stderr +++ b/tests/typecheck/should_fail/tcfail134.stderr @@ -1,6 +1,6 @@ tcfail134.hs:5:33: - Expecting one more argument to `XML' - Expected a type, but `XML' has kind `* -> Constraint' - In the type `a -> XML' - In the class declaration for `XML' + Expecting one more argument to ‛XML’ + Expected a type, but ‛XML’ has kind ‛* -> Constraint’ + In the type ‛a -> XML’ + In the class declaration for ‛XML’ diff --git a/tests/typecheck/should_fail/tcfail135.stderr b/tests/typecheck/should_fail/tcfail135.stderr index 6e6379f63e51cf1c8c02f1ce978d4b71d97ec0b8..33712e3a98676a7f45948b5cdaf02ce3a3a05901 100644 --- a/tests/typecheck/should_fail/tcfail135.stderr +++ b/tests/typecheck/should_fail/tcfail135.stderr @@ -1,6 +1,6 @@ tcfail135.hs:6:23: - Expecting one more argument to `f' - Expected a type, but `f' has kind `k0 -> *' - In the type `f a -> f' - In the class declaration for `Foo' + Expecting one more argument to ‛f’ + Expected a type, but ‛f’ has kind ‛k0 -> *’ + In the type ‛f a -> f’ + In the class declaration for ‛Foo’ diff --git a/tests/typecheck/should_fail/tcfail136.stderr b/tests/typecheck/should_fail/tcfail136.stderr index 745aac23cf92b0092edfa307c6eb23b48849ebad..c2cb9d9cf81d28c4bea1dc261a05fb61e1b80109 100644 --- a/tests/typecheck/should_fail/tcfail136.stderr +++ b/tests/typecheck/should_fail/tcfail136.stderr @@ -1,7 +1,7 @@ tcfail136.hs:9:35: - Expecting one more argument to `SymDict' - Expected a type, but `SymDict' has kind `* -> *' - In the type `SymDict' - In the definition of data constructor `SymTable' - In the data declaration for `SymTable' + Expecting one more argument to ‛SymDict’ + Expected a type, but ‛SymDict’ has kind ‛* -> *’ + In the type ‛SymDict’ + In the definition of data constructor ‛SymTable’ + In the data declaration for ‛SymTable’ diff --git a/tests/typecheck/should_fail/tcfail137.stderr b/tests/typecheck/should_fail/tcfail137.stderr index b84fff1dfaa32d438821a848209edbcb2774caed..05890e0b7d3d90a0554f9c729b09e40dfc741b91 100644 --- a/tests/typecheck/should_fail/tcfail137.stderr +++ b/tests/typecheck/should_fail/tcfail137.stderr @@ -3,6 +3,6 @@ tcfail137.hs:1:14: Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. tcfail137.hs:8:5: - No instance for (Floating Bool) arising from a use of `Test' + No instance for (Floating Bool) arising from a use of ‛Test’ In the expression: Test [False, True] - In an equation for `x': x = Test [False, True] + In an equation for ‛x’: x = Test [False, True] diff --git a/tests/typecheck/should_fail/tcfail139.stderr b/tests/typecheck/should_fail/tcfail139.stderr index 91559a9f680ff0d90310a9266f75ed05aea4eca0..bfdc89b4fddb31f3cb3c8787cf90b8604569b691 100644 --- a/tests/typecheck/should_fail/tcfail139.stderr +++ b/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 -XTypeSynonymInstances if you want to disable this.) - In the instance declaration for `Bounded Foo' + Illegal instance declaration for ‛Bounded Foo’ + (All instance types must be of the form (T t1 ... tn) + where T is not a synonym. + Use -XTypeSynonymInstances if you want to disable this.) + In the instance declaration for ‛Bounded Foo’ diff --git a/tests/typecheck/should_fail/tcfail140.stderr b/tests/typecheck/should_fail/tcfail140.stderr index 4315837a2e436779ce62ff2f5ab179367a1a673a..aff19cb16abaafb82b5229d4a184c65e0e749abc 100644 --- a/tests/typecheck/should_fail/tcfail140.stderr +++ b/tests/typecheck/should_fail/tcfail140.stderr @@ -1,38 +1,38 @@ tcfail140.hs:10:7: - Couldn't match expected type `a0 -> t' with actual type `Int' + Couldn't match expected type ‛a0 -> t’ with actual type ‛Int’ Relevant bindings include bar :: t (bound at tcfail140.hs:10:1) - The function `f' is applied to two arguments, - but its type `Int -> Int' has only one + The function ‛f’ is applied to two arguments, + but its type ‛Int -> Int’ has only one In the expression: f 3 9 - In an equation for `bar': bar = f 3 9 + In an equation for ‛bar’: bar = f 3 9 tcfail140.hs:12:10: - Couldn't match expected type `a1 -> t1' with actual type `Int' + Couldn't match expected type ‛a1 -> t1’ with actual type ‛Int’ Relevant bindings include rot :: t -> t1 (bound at tcfail140.hs:12:1) - The operator `f' takes two arguments, - but its type `Int -> Int' has only one + The operator ‛f’ takes two 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 + In an equation for ‛rot’: rot xs = 3 `f` 4 tcfail140.hs:14:15: - Couldn't match expected type `a -> b' with actual type `Int' + Couldn't match expected type ‛a -> b’ with actual type ‛Int’ Relevant bindings include bot :: [a] -> [b] (bound at tcfail140.hs:14:1) xs :: [a] (bound at tcfail140.hs:14:5) - The operator `f' takes two arguments, - but its type `Int -> Int' has only one - In the first argument of `map', namely `(3 `f`)' + The operator ‛f’ takes two arguments, + but its type ‛Int -> Int’ has only one + In the first argument of ‛map’, namely ‛(3 `f`)’ In the expression: map (3 `f`) xs tcfail140.hs:16:8: - Constructor `Just' should have 1 argument, but has been given none + Constructor ‛Just’ should have 1 argument, but has been given none In the pattern: Just In the expression: (\ Just x -> x) :: Maybe a -> a In the expression: ((\ Just x -> x) :: Maybe a -> a) (Just 1) tcfail140.hs:19:1: - Couldn't match expected type `t0 -> Bool' with actual type `Int' - The equation(s) for `g' have two arguments, - but its type `Int -> Int' has only one + Couldn't match expected type ‛t0 -> Bool’ with actual type ‛Int’ + The equation(s) for ‛g’ have two arguments, + but its type ‛Int -> Int’ has only one diff --git a/tests/typecheck/should_fail/tcfail142.stderr b/tests/typecheck/should_fail/tcfail142.stderr index e0ec8f4ca17f1173f40e07c791055f95bb8b780c..767598e2b71de757d5df5b61aa8921a1fb3965b0 100644 --- a/tests/typecheck/should_fail/tcfail142.stderr +++ b/tests/typecheck/should_fail/tcfail142.stderr @@ -1,10 +1,10 @@ - -tcfail142.hs:18:8: - Could not deduce (Bar a0 r) - arising from the ambiguity check for `bar' - from the context (Bar a r) - bound by the type signature for bar :: Bar a r => r -> () - at tcfail142.hs:18:8-25 - The type variable `a0' is ambiguous - In the ambiguity check for: forall r a. Bar a r => r -> () - In the type signature for `bar': bar :: Bar a r => r -> () + +tcfail142.hs:18:8: + Could not deduce (Bar a0 r) + arising from the ambiguity check for ‛bar’ + from the context (Bar a r) + bound by the type signature for bar :: Bar a r => r -> () + at tcfail142.hs:18:8-25 + The type variable ‛a0’ is ambiguous + In the ambiguity check for: forall r a. Bar a r => r -> () + In the type signature for ‛bar’: bar :: Bar a r => r -> () diff --git a/tests/typecheck/should_fail/tcfail143.stderr b/tests/typecheck/should_fail/tcfail143.stderr index 846f8c025231447634f07fb2c1b4332102de5ca6..dadccbe78175fc1c21ba39dadc5b4de324114ab0 100644 --- a/tests/typecheck/should_fail/tcfail143.stderr +++ b/tests/typecheck/should_fail/tcfail143.stderr @@ -1,11 +1,11 @@ tcfail143.hs:29:9: - Couldn't match type `S Z' with `Z' + Couldn't match type ‛S Z’ with ‛Z’ When using functional dependencies to combine MinMax a Z Z a, - arising from the dependency `a b -> c d' + arising from the dependency ‛a b -> c d’ in the instance declaration at tcfail143.hs:11:10 MinMax (S Z) Z Z Z, - arising from a use of `extend' at tcfail143.hs:29:9-16 + arising from a use of ‛extend’ at tcfail143.hs:29:9-16 In the expression: n1 `extend` n0 - In an equation for `t2': t2 = n1 `extend` n0 + In an equation for ‛t2’: t2 = n1 `extend` n0 diff --git a/tests/typecheck/should_fail/tcfail146.stderr b/tests/typecheck/should_fail/tcfail146.stderr index 5b835c1a37cc96322630ae863346a9e377987e1b..b62824e8cb50681c6508f771bf6eaf6456c4b5b8 100644 --- a/tests/typecheck/should_fail/tcfail146.stderr +++ b/tests/typecheck/should_fail/tcfail146.stderr @@ -1,6 +1,6 @@ tcfail146.hs:7:22: - Expected a type, but `SClass a' has kind `Constraint' - In the type `SClass a' - In the definition of data constructor `SCon' - In the data declaration for `SData' + Expected a type, but ‛SClass a’ has kind ‛Constraint’ + In the type ‛SClass a’ + In the definition of data constructor ‛SCon’ + In the data declaration for ‛SData’ diff --git a/tests/typecheck/should_fail/tcfail147.stderr b/tests/typecheck/should_fail/tcfail147.stderr index cda7223923a7fb677fe3e84aa07a3f965b0e31ec..b7e75b06b2db9f1f5c8faa6c964af416304eb741 100644 --- a/tests/typecheck/should_fail/tcfail147.stderr +++ b/tests/typecheck/should_fail/tcfail147.stderr @@ -1,7 +1,7 @@ tcfail147.hs:7:19: - Expecting one more argument to `XClass' - Expected a type, but `XClass' has kind `k0 -> Constraint' - In the type `XClass' - In the definition of data constructor `XCon' - In the data declaration for `XData' + Expecting one more argument to ‛XClass’ + Expected a type, but ‛XClass’ has kind ‛k0 -> Constraint’ + In the type ‛XClass’ + In the definition of data constructor ‛XCon’ + In the data declaration for ‛XData’ diff --git a/tests/typecheck/should_fail/tcfail148.stderr b/tests/typecheck/should_fail/tcfail148.stderr index 22073f51c291dd9212e5ab292e7742ecb2a4961e..cfa81e5b0a73d79c00119506d206822fdab50fda 100644 --- a/tests/typecheck/should_fail/tcfail148.stderr +++ b/tests/typecheck/should_fail/tcfail148.stderr @@ -1,7 +1,7 @@ - -tcfail148.hs:5:28: - Expecting one more argument to `List' - Expected a type, but `List' has kind `* -> *' - In the type `List' - In the definition of data constructor `Cons' - In the data declaration for `List' + +tcfail148.hs:5:28: + Expecting one more argument to ‛List’ + Expected a type, but ‛List’ has kind ‛* -> *’ + In the type ‛List’ + In the definition of data constructor ‛Cons’ + In the data declaration for ‛List’ diff --git a/tests/typecheck/should_fail/tcfail151.stderr b/tests/typecheck/should_fail/tcfail151.stderr index f1884f3d3219ab878e9229375cd28cd6a91ea4e8..d0dd7960b54c144dc2801261e9fc83be672f5d29 100644 --- a/tests/typecheck/should_fail/tcfail151.stderr +++ b/tests/typecheck/should_fail/tcfail151.stderr @@ -1,8 +1,8 @@ - -tcfail151.hs:1:14: Warning: - -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. - -tcfail151.hs:8:6: - Expecting one more argument to `Name a' - Expected a constraint, but `Name a' has kind `* -> Constraint' - In the data declaration for `Exp' + +tcfail151.hs:1:14: Warning: + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. + +tcfail151.hs:8:6: + Expecting one more argument to ‛Name a’ + Expected a constraint, but ‛Name a’ has kind ‛* -> Constraint’ + In the data declaration for ‛Exp’ diff --git a/tests/typecheck/should_fail/tcfail152.stderr b/tests/typecheck/should_fail/tcfail152.stderr index 24a872c9ee007d9bcad9b7235a58f85795b7cd06..507587d072de6c83ecc60cac2a06c6334ba1a7f1 100644 --- a/tests/typecheck/should_fail/tcfail152.stderr +++ b/tests/typecheck/should_fail/tcfail152.stderr @@ -1,7 +1,7 @@ tcfail152.hs:10:14: - No instance for (Integral a) arising from a use of `toInteger' + No instance for (Integral a) arising from a use of ‛toInteger’ Possible fix: - add (Integral a) to the context of the data constructor `C' + add (Integral a) to the context of the data constructor ‛C’ In the expression: toInteger x - In an equation for `test': test (C x) = toInteger x + In an equation for ‛test’: test (C x) = toInteger x diff --git a/tests/typecheck/should_fail/tcfail153.stderr b/tests/typecheck/should_fail/tcfail153.stderr index 2647156f8757157dca5d3ff26cc76dbfe6087099..ba1da78d4e6e18c558dc061167397fa82c663121 100644 --- a/tests/typecheck/should_fail/tcfail153.stderr +++ b/tests/typecheck/should_fail/tcfail153.stderr @@ -1,16 +1,16 @@ tcfail153.hs:6:7: - Couldn't match type `a' with `Bool' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛Bool’ + ‛a’ is a rigid type variable bound by the type signature for f :: a -> [a] at tcfail153.hs:5:6 Expected type: [a] Actual type: [Bool] Relevant bindings include f :: a -> [a] (bound at tcfail153.hs:6:1) x :: a (bound at tcfail153.hs:6:3) - In the return type of a call of `g' + In the return type of a call of ‛g’ In the expression: g x - In an equation for `f': + In an equation for ‛f’: f x = g x where diff --git a/tests/typecheck/should_fail/tcfail154.stderr b/tests/typecheck/should_fail/tcfail154.stderr index ca8a2978f17b565c881d10bf665690147d0f695f..8977eacc74a7a928180c90a6ed21ae14ffa034d0 100644 --- a/tests/typecheck/should_fail/tcfail154.stderr +++ b/tests/typecheck/should_fail/tcfail154.stderr @@ -1,6 +1,6 @@ - -tcfail154.hs:12:10: - Variable `a' occurs more often than in the instance head - in the constraint: C a a - (Use -XUndecidableInstances to permit this) - In the instance declaration for `Eq (T a)' + +tcfail154.hs:12:10: + Variable ‛a’ occurs more often than in the instance head + in the constraint: C a a + (Use -XUndecidableInstances to permit this) + In the instance declaration for ‛Eq (T a)’ diff --git a/tests/typecheck/should_fail/tcfail155.stderr b/tests/typecheck/should_fail/tcfail155.stderr index 1b5f1f3b0ea3c19ca7d32588eb8df2a05981ab8a..58426f4150724ea2bcbdb256e2ed2b58636ea946 100644 --- a/tests/typecheck/should_fail/tcfail155.stderr +++ b/tests/typecheck/should_fail/tcfail155.stderr @@ -1,6 +1,6 @@ - -tcfail155.hs:8:6: - Data constructor `P' returns type `L2' - instead of an instance of its parent type `T a' - In the definition of data constructor `P' - In the data declaration for `T' + +tcfail155.hs:8:6: + Data constructor ‛P’ returns type ‛L2’ + instead of an instance of its parent type ‛T a’ + In the definition of data constructor ‛P’ + In the data declaration for ‛T’ diff --git a/tests/typecheck/should_fail/tcfail156.stderr b/tests/typecheck/should_fail/tcfail156.stderr index d93549e13683e45dc105eb251c83361782298458..7e84020fb202875d688479797ca33b148b430682 100644 --- a/tests/typecheck/should_fail/tcfail156.stderr +++ b/tests/typecheck/should_fail/tcfail156.stderr @@ -1,6 +1,6 @@ tcfail156.hs:7:26: A newtype constructor cannot have an existential context, - but `Foo' does - In the definition of data constructor `Foo' - In the newtype declaration for `Foo' + but ‛Foo’ does + In the definition of data constructor ‛Foo’ + In the newtype declaration for ‛Foo’ diff --git a/tests/typecheck/should_fail/tcfail157.stderr b/tests/typecheck/should_fail/tcfail157.stderr index 304b76511a39444d4c9df1ea3581a5a62b3ffae7..cfca878ed00d7331dba862f66f9d5e5d572fe172 100644 --- a/tests/typecheck/should_fail/tcfail157.stderr +++ b/tests/typecheck/should_fail/tcfail157.stderr @@ -1,12 +1,12 @@ - -tcfail157.hs:27:10: - Variable `b' occurs more often than in the instance head - in the constraint: E m a b - (Use -XUndecidableInstances to permit this) - In the instance declaration for `Foo m (a -> ())' - -tcfail157.hs:27:10: - Variable `b' occurs more often than in the instance head - in the constraint: Foo m b - (Use -XUndecidableInstances to permit this) - In the instance declaration for `Foo m (a -> ())' + +tcfail157.hs:27:10: + Variable ‛b’ occurs more often than in the instance head + in the constraint: E m a b + (Use -XUndecidableInstances to permit this) + In the instance declaration for ‛Foo m (a -> ())’ + +tcfail157.hs:27:10: + Variable ‛b’ occurs more often than in the instance head + in the constraint: Foo m b + (Use -XUndecidableInstances to permit this) + In the instance declaration for ‛Foo m (a -> ())’ diff --git a/tests/typecheck/should_fail/tcfail158.stderr b/tests/typecheck/should_fail/tcfail158.stderr index 46385716fb91864ba73215f30fdf1990599e7616..47e05a5c775a0cafc3391705e11c60ac090470e8 100644 --- a/tests/typecheck/should_fail/tcfail158.stderr +++ b/tests/typecheck/should_fail/tcfail158.stderr @@ -1,5 +1,5 @@ tcfail158.hs:14:19: - Expecting one more argument to `Val v' - Expected a type, but `Val v' has kind `* -> *' - In the type signature for `bar': bar :: forall v. Val v + Expecting one more argument to ‛Val v’ + Expected a type, but ‛Val v’ has kind ‛* -> *’ + In the type signature for ‛bar’: bar :: forall v. Val v diff --git a/tests/typecheck/should_fail/tcfail159.stderr b/tests/typecheck/should_fail/tcfail159.stderr index 3576c7e24a39ee79836d39355c30f7e0ccabe6bc..3ff73d8c7280671b5c65d5b1cca34eb4578020fe 100644 --- a/tests/typecheck/should_fail/tcfail159.stderr +++ b/tests/typecheck/should_fail/tcfail159.stderr @@ -1,6 +1,6 @@ tcfail159.hs:9:11: - Couldn't match kind `*' with `#' + Couldn't match kind ‛*’ with ‛#’ When matching types t0 :: * (# Int, Int #) :: # diff --git a/tests/typecheck/should_fail/tcfail160.stderr b/tests/typecheck/should_fail/tcfail160.stderr index 1be65a603828f8f3d35b12e81e1fd5b9398a896b..4d3a01fe17d6288b25aaaa1dc973b0d81a9dd06d 100644 --- a/tests/typecheck/should_fail/tcfail160.stderr +++ b/tests/typecheck/should_fail/tcfail160.stderr @@ -1,5 +1,5 @@ tcfail160.hs:7:8: - The first argument of `T' should have kind `* -> *', - but `Int' has kind `*' - In the type signature for `g': g :: T Int + The first argument of ‛T’ should have kind ‛* -> *’, + but ‛Int’ has kind ‛*’ + In the type signature for ‛g’: g :: T Int diff --git a/tests/typecheck/should_fail/tcfail161.stderr b/tests/typecheck/should_fail/tcfail161.stderr index 21d8c1b0608426ca1f8f97ec88276a4930f4182b..79ca81dfaa6f1195225a2ecd6899d6057959938f 100644 --- a/tests/typecheck/should_fail/tcfail161.stderr +++ b/tests/typecheck/should_fail/tcfail161.stderr @@ -1,5 +1,5 @@ tcfail161.hs:5:7: - Expecting one more argument to `Maybe' - Expected kind `*', but `Maybe' has kind `* -> *' - In the type signature for `f': f :: [Maybe] + Expecting one more argument to ‛Maybe’ + Expected kind ‛*’, but ‛Maybe’ has kind ‛* -> *’ + In the type signature for ‛f’: f :: [Maybe] diff --git a/tests/typecheck/should_fail/tcfail162.stderr b/tests/typecheck/should_fail/tcfail162.stderr index 2563233b783416fd4cb63f117fad51df209fe77c..c14956e6b3917d3696089bcac82b36fa48de2689 100644 --- a/tests/typecheck/should_fail/tcfail162.stderr +++ b/tests/typecheck/should_fail/tcfail162.stderr @@ -1,7 +1,7 @@ - -tcfail162.hs:10:33: - Expecting one more argument to `ForeignPtr' - Expected a type, but `ForeignPtr' has kind `* -> *' - In the type `ForeignPtr' - In the definition of data constructor `Foo' - In the data declaration for `Foo' + +tcfail162.hs:10:33: + Expecting one more argument to ‛ForeignPtr’ + Expected a type, but ‛ForeignPtr’ has kind ‛* -> *’ + In the type ‛ForeignPtr’ + In the definition of data constructor ‛Foo’ + In the data declaration for ‛Foo’ diff --git a/tests/typecheck/should_fail/tcfail164.stderr b/tests/typecheck/should_fail/tcfail164.stderr index 65f9c9f9ac74507f47600ddf7f8519d6a457ac57..4a3be9027bb0f90d2e824453912e7c2767d3c1f8 100644 --- a/tests/typecheck/should_fail/tcfail164.stderr +++ b/tests/typecheck/should_fail/tcfail164.stderr @@ -4,12 +4,12 @@ tcfail164.hs:11:5: Specify the type by giving a type signature e.g. (tagToEnum# x) :: Bool In the expression: tagToEnum# 0# - In an equation for `f': f = tagToEnum# 0# + In an equation for ‛f’: f = tagToEnum# 0# tcfail164.hs:17:34: Bad call to tagToEnum# at type Int Result type must be an enumeration type In the expression: tagToEnum# value# - In an equation for `readUnboxable': + In an equation for ‛readUnboxable’: readUnboxable (I# value#) = tagToEnum# value# - In the instance declaration for `Unboxable Int' + In the instance declaration for ‛Unboxable Int’ diff --git a/tests/typecheck/should_fail/tcfail165.stderr b/tests/typecheck/should_fail/tcfail165.stderr index 878a707120d35b9fb97952dd3aecbd7150bfac77..09f359f834f3a1924e8063fb4f010317f5603dbd 100644 --- a/tests/typecheck/should_fail/tcfail165.stderr +++ b/tests/typecheck/should_fail/tcfail165.stderr @@ -1,11 +1,11 @@ tcfail165.hs:15:23: - Couldn't match expected type `forall a. Show a => a -> String' - with actual type `b0 -> String' - In the second argument of `putMVar', namely - `(show :: forall b. Show b => b -> String)' + Couldn't match expected type ‛forall a. Show a => a -> String’ + with actual type ‛b0 -> String’ + In the second argument of ‛putMVar’, namely + ‛(show :: forall b. Show b => b -> String)’ In a stmt of a 'do' block: - putMVar var (show :: forall b. Show b => b -> String) + putMVar var (show :: forall b. Show b => b -> String) In the expression: do { var <- newEmptyMVar :: IO (MVar (forall a. Show a => a -> String)); diff --git a/tests/typecheck/should_fail/tcfail167.stderr b/tests/typecheck/should_fail/tcfail167.stderr index f62f524ebda3efd1b3179326266f747820725747..1613d4efadd23932e752247f7c1843527a04cfa6 100644 --- a/tests/typecheck/should_fail/tcfail167.stderr +++ b/tests/typecheck/should_fail/tcfail167.stderr @@ -1,9 +1,9 @@ tcfail167.hs:14:14: - Couldn't match type `Char' with `Float' + Couldn't match type ‛Char’ with ‛Float’ Inaccessible code in a pattern with constructor C2 :: T Float, - in an equation for `inaccessible' + in an equation for ‛inaccessible’ In the pattern: C2 - In an equation for `inaccessible': inaccessible C2 = ' ' + In an equation for ‛inaccessible’: inaccessible C2 = ' ' diff --git a/tests/typecheck/should_fail/tcfail168.stderr b/tests/typecheck/should_fail/tcfail168.stderr index a6a5064562b729dec79aa3a22a2477ae5259813e..99cd5a129f70ebc4df17368c9b7fbfeaee129920 100644 --- a/tests/typecheck/should_fail/tcfail168.stderr +++ b/tests/typecheck/should_fail/tcfail168.stderr @@ -1,7 +1,7 @@ tcfail168.hs:7:11: - Couldn't match expected type `IO a0' - with actual type `Char -> IO ()' + Couldn't match expected type ‛IO a0’ + with actual type ‛Char -> IO ()’ In a stmt of a 'do' block: putChar In the expression: do { putChar; @@ -9,7 +9,7 @@ tcfail168.hs:7:11: putChar 'a'; putChar 'a'; .... } - In an equation for `foo': + In an equation for ‛foo’: foo = do { putChar; putChar 'a'; diff --git a/tests/typecheck/should_fail/tcfail170.stderr b/tests/typecheck/should_fail/tcfail170.stderr index 914ab0cde0327fc42cc3a2ad34f6c427080d3c14..7e8f0116ecf1be47d54d5bb3d477fc9dcbab2ee3 100644 --- a/tests/typecheck/should_fail/tcfail170.stderr +++ b/tests/typecheck/should_fail/tcfail170.stderr @@ -1,6 +1,6 @@ tcfail170.hs:7:10: - Illegal instance declaration for `C [p] [q]' - (the Coverage Condition fails for one of the functional dependencies; - Use -XUndecidableInstances to permit this) - In the instance declaration for `C [p] [q]' + Illegal instance declaration for ‛C [p] [q]’ + (the Coverage Condition fails for one of the functional dependencies; + Use -XUndecidableInstances to permit this) + In the instance declaration for ‛C [p] [q]’ diff --git a/tests/typecheck/should_fail/tcfail171.stderr b/tests/typecheck/should_fail/tcfail171.stderr index 79ed5f80b7e41d9bd5cdb3b52d331f85b775cad3..e42b06ad08b967c286de302eb76ec18ea8109c9d 100644 --- a/tests/typecheck/should_fail/tcfail171.stderr +++ b/tests/typecheck/should_fail/tcfail171.stderr @@ -1,8 +1,8 @@ tcfail171.hs:9:10: - No instance for (PrintfArg a) arising from a use of `printf' + No instance for (PrintfArg a) arising from a use of ‛printf’ Possible fix: add (PrintfArg a) to the context of the type signature for phex :: a -> b In the expression: printf "0x%x" x - In an equation for `phex': phex x = printf "0x%x" x + In an equation for ‛phex’: phex x = printf "0x%x" x diff --git a/tests/typecheck/should_fail/tcfail173.stderr b/tests/typecheck/should_fail/tcfail173.stderr index 4bda7d5c4cedccb34e1160ed6d5b51883611a2a4..362f3ca288c35730ac8abb2f4ef53f265c8a8582 100644 --- a/tests/typecheck/should_fail/tcfail173.stderr +++ b/tests/typecheck/should_fail/tcfail173.stderr @@ -1,4 +1,4 @@ tcfail173.hs:5:12: - Illegal declaration of a type or class operator `<.>' + Illegal declaration of a type or class operator ‛<.>’ Use -XTypeOperators to declare operators in type and declarations diff --git a/tests/typecheck/should_fail/tcfail174.stderr b/tests/typecheck/should_fail/tcfail174.stderr index d093e32385e9c2668e62b6d4866035124fe77f8e..56442b867f0f69fe6377fc09e3601c9fb262cb48 100644 --- a/tests/typecheck/should_fail/tcfail174.stderr +++ b/tests/typecheck/should_fail/tcfail174.stderr @@ -1,7 +1,7 @@ tcfail174.hs:9:10: - Couldn't match expected type `forall a. a -> a' - with actual type `a0 -> a0' - In the first argument of `Base', namely `id' + Couldn't match expected type ‛forall a. a -> a’ + with actual type ‛a0 -> a0’ + In the first argument of ‛Base’, namely ‛id’ In the expression: Base id - In an equation for `g': g = Base id + In an equation for ‛g’: g = Base id diff --git a/tests/typecheck/should_fail/tcfail175.stderr b/tests/typecheck/should_fail/tcfail175.stderr index 65f4cb9e4d1c1901bbfce5f423525e69b63c6089..6d0c103153d21914e80de8fccebe4b77eeb1510d 100644 --- a/tests/typecheck/should_fail/tcfail175.stderr +++ b/tests/typecheck/should_fail/tcfail175.stderr @@ -1,10 +1,10 @@ tcfail175.hs:11:1: - Couldn't match expected type `String -> String -> String' - with actual type `a' - `a' is a rigid type variable bound by + Couldn't match expected type ‛String -> String -> String’ + with actual type ‛a’ + ‛a’ is a rigid type variable bound by the type signature for evalRHS :: Int -> a at tcfail175.hs:10:12 Relevant bindings include evalRHS :: Int -> a (bound at tcfail175.hs:11:1) - The equation(s) for `evalRHS' have three arguments, - but its type `Int -> a' has only one + The equation(s) for ‛evalRHS’ have three arguments, + but its type ‛Int -> a’ has only one diff --git a/tests/typecheck/should_fail/tcfail176.stderr b/tests/typecheck/should_fail/tcfail176.stderr index f804b000cf3d0e55da61752e5ed56cea6e0991be..cb829b43afaa705b6ad3d67c688a4b946b763eb3 100644 --- a/tests/typecheck/should_fail/tcfail176.stderr +++ b/tests/typecheck/should_fail/tcfail176.stderr @@ -1,6 +1,6 @@ tcfail176.hs:7:21: - Data constructor `Bug' returns type `Maybe a' - instead of an instance of its parent type `Bug a' - In the definition of data constructor `Bug' - In the newtype declaration for `Bug' + Data constructor ‛Bug’ returns type ‛Maybe a’ + instead of an instance of its parent type ‛Bug a’ + In the definition of data constructor ‛Bug’ + In the newtype declaration for ‛Bug’ diff --git a/tests/typecheck/should_fail/tcfail177.stderr b/tests/typecheck/should_fail/tcfail177.stderr index dc622daafaa017dda39e3a182b10046db1494008..5ef31f8d340a09588ea944fa0e0659e5c19d559e 100644 --- a/tests/typecheck/should_fail/tcfail177.stderr +++ b/tests/typecheck/should_fail/tcfail177.stderr @@ -1,171 +1,171 @@ tcfail177.hs:10:12: - Couldn't match expected type `Bool' with actual type `Int' - In the return type of a call of `foo' + Couldn't match expected type ‛Bool’ with actual type ‛Int’ + In the return type of a call of ‛foo’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] - In an equation for `allTests': + In an equation for ‛allTests’: allTests = foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", ....] tcfail177.hs:20:13: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:20:20: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:20:27: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:21:13: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:21:20: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:21:27: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:22:13: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:22:20: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:22:27: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:23:13: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:23:20: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:23:27: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:24:13: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:24:20: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:24:27: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:25:13: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:25:20: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] tcfail177.hs:25:27: - Couldn't match expected type `Bool' with actual type `[Char]' + Couldn't match expected type ‛Bool’ with actual type ‛[Char]’ In the expression: "Two" - In the first argument of `foo', namely - `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]' + In the first argument of ‛foo’, namely + ‛[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]’ In the expression: foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....] diff --git a/tests/typecheck/should_fail/tcfail178.stderr b/tests/typecheck/should_fail/tcfail178.stderr index b0b6360df7803208e9edbab5f6c6522fea68578f..fe0ffa71c6e3532c79e5b44bdb634844ac5529d0 100644 --- a/tests/typecheck/should_fail/tcfail178.stderr +++ b/tests/typecheck/should_fail/tcfail178.stderr @@ -1,16 +1,16 @@ tcfail178.hs:15:7: - Couldn't match type `()' with `[a]' + Couldn't match type ‛()’ with ‛[a]’ Expected type: Bool -> [a] Actual type: Bool -> () Relevant bindings include c :: [a] (bound at tcfail178.hs:15:1) - In the first argument of `a', namely `y' + In the first argument of ‛a’, namely ‛y’ In the expression: a y - In an equation for `c': c = a y + In an equation for ‛c’: c = a y tcfail178.hs:18:7: - Couldn't match expected type `Bool -> [a]' with actual type `()' + Couldn't match expected type ‛Bool -> [a]’ with actual type ‛()’ Relevant bindings include d :: [a] (bound at tcfail178.hs:18:1) - In the first argument of `a', namely `()' + In the first argument of ‛a’, namely ‛()’ In the expression: a () - In an equation for `d': d = a () + In an equation for ‛d’: d = a () diff --git a/tests/typecheck/should_fail/tcfail179.stderr b/tests/typecheck/should_fail/tcfail179.stderr index ed0325acdce3f069a9ab60b0dc0d9f30984deb7c..89cd80437159599189ffa37c0a26440b12bd010b 100644 --- a/tests/typecheck/should_fail/tcfail179.stderr +++ b/tests/typecheck/should_fail/tcfail179.stderr @@ -1,18 +1,18 @@ tcfail179.hs:14:39: - Couldn't match expected type `s' with actual type `x' - `x' is a rigid type variable bound by + Couldn't match expected type ‛s’ with actual type ‛x’ + ‛x’ is a rigid type variable bound by a pattern with constructor T :: forall s x. (s -> (x -> s) -> (x, s, Int)) -> T s, in a case alternative at tcfail179.hs:14:14 - `s' is a rigid type variable bound by + ‛s’ is a rigid type variable bound by the type signature for run :: T s -> Int at tcfail179.hs:12:8 Relevant bindings include run :: T s -> Int (bound at tcfail179.hs:13:1) ts :: T s (bound at tcfail179.hs:13:5) g :: s -> (x -> s) -> (x, s, Int) (bound at tcfail179.hs:14:16) x :: x (bound at tcfail179.hs:14:26) - In the first argument of `g', namely `x' + In the first argument of ‛g’, namely ‛x’ In the expression: g x id In a pattern binding: (x, _, b) = g x id diff --git a/tests/typecheck/should_fail/tcfail180.stderr b/tests/typecheck/should_fail/tcfail180.stderr index 96d76100eac001428a93739a094f944aea1c5ae2..8baeb4ed51c7152a20b87247248c8f27b293e379 100644 --- a/tests/typecheck/should_fail/tcfail180.stderr +++ b/tests/typecheck/should_fail/tcfail180.stderr @@ -1,6 +1,6 @@ tcfail180.hs:10:9: - Couldn't match expected type `f0 b0' with actual type `Bool' + Couldn't match expected type ‛f0 b0’ with actual type ‛Bool’ In the pattern: True In a case alternative: True -> () In the expression: case p of { True -> () } diff --git a/tests/typecheck/should_fail/tcfail181.hs b/tests/typecheck/should_fail/tcfail181.hs index 01d06599ef76fd34d3e19f0247ac888dee56be4f..ca96a2c07ec3b2ab7e79aca5b79845c594d006db 100644 --- a/tests/typecheck/should_fail/tcfail181.hs +++ b/tests/typecheck/should_fail/tcfail181.hs @@ -4,7 +4,7 @@ -- (Monad GHC.Prim.Any1, Monad m) => -- t -> Something (m Bool) e -- --- The stupid 'GHC.Prim.Any1' arose becuase of type ambiguity +-- The stupid 'GHC.Prim.Any1' arose because of type ambiguity -- which should be reported, and wasn't. module ShouldFail where diff --git a/tests/typecheck/should_fail/tcfail181.stderr b/tests/typecheck/should_fail/tcfail181.stderr index d6e622cb306d0ea452e55732a6ff90cf9708dd15..33b75ff75e66cc809df54fe52ccd8a352227dca8 100644 --- a/tests/typecheck/should_fail/tcfail181.stderr +++ b/tests/typecheck/should_fail/tcfail181.stderr @@ -1,15 +1,15 @@ - -tcfail181.hs:17:9: - Could not deduce (Monad m0) arising from a use of `foo' - from the context (Monad m) - bound by the inferred type of - wog :: Monad m => t -> Something (m Bool) e - at tcfail181.hs:17:1-30 - The type variable `m0' is ambiguous - Note: there are several potential instances: - instance Monad ((->) r) -- Defined in `GHC.Base' - instance Monad IO -- Defined in `GHC.Base' - instance Monad [] -- Defined in `GHC.Base' - In the expression: foo - In the expression: foo {bar = return True} - In an equation for `wog': wog x = foo {bar = return True} + +tcfail181.hs:17:9: + Could not deduce (Monad m0) arising from a use of ‛foo’ + from the context (Monad m) + bound by the inferred type of + wog :: Monad m => t -> Something (m Bool) e + at tcfail181.hs:17:1-30 + The type variable ‛m0’ is ambiguous + Note: there are several potential instances: + instance Monad ((->) r) -- Defined in ‛GHC.Base’ + instance Monad IO -- Defined in ‛GHC.Base’ + instance Monad [] -- Defined in ‛GHC.Base’ + In the expression: foo + In the expression: foo {bar = return True} + In an equation for ‛wog’: wog x = foo {bar = return True} diff --git a/tests/typecheck/should_fail/tcfail182.stderr b/tests/typecheck/should_fail/tcfail182.stderr index e021987234ec58513df4fe781a2423b74e6c9872..36768f67442873f689c7a66fa8e27706d5b8d806 100644 --- a/tests/typecheck/should_fail/tcfail182.stderr +++ b/tests/typecheck/should_fail/tcfail182.stderr @@ -1,8 +1,8 @@ tcfail182.hs:9:3: - Couldn't match expected type `Prelude.Maybe a' - with actual type `Maybe t0' + Couldn't match expected type ‛Prelude.Maybe a’ + with actual type ‛Maybe t0’ Relevant bindings include f :: Prelude.Maybe a -> Int (bound at tcfail182.hs:9:1) In the pattern: Foo - In an equation for `f': f Foo = 3 + In an equation for ‛f’: f Foo = 3 diff --git a/tests/typecheck/should_fail/tcfail184.stderr b/tests/typecheck/should_fail/tcfail184.stderr index 20920d822b398fb6000a486d53511a8d01ebd4f4..cfb89422dc7f3ab1c2a266fbec89b50572775f6f 100644 --- a/tests/typecheck/should_fail/tcfail184.stderr +++ b/tests/typecheck/should_fail/tcfail184.stderr @@ -1,7 +1,7 @@ - -tcfail184.hs:8:19: - Illegal polymorphic or qualified type: - forall a. Ord a => [a] -> [a] - Perhaps you intended to use -XRankNTypes or -XRank2Types - In the definition of data constructor `MkSwizzle' - In the newtype declaration for `Swizzle' + +tcfail184.hs:8:19: + Illegal polymorphic or qualified type: + forall a. Ord a => [a] -> [a] + Perhaps you intended to use -XRankNTypes or -XRank2Types + In the definition of data constructor ‛MkSwizzle’ + In the newtype declaration for ‛Swizzle’ diff --git a/tests/typecheck/should_fail/tcfail185.stderr b/tests/typecheck/should_fail/tcfail185.stderr index 1e4c8d718f058fbb84caa3b1907651f22431e293..f46211e4fa4fea644fb57d1ac99f0b9084d5798e 100644 --- a/tests/typecheck/should_fail/tcfail185.stderr +++ b/tests/typecheck/should_fail/tcfail185.stderr @@ -1,17 +1,17 @@ tcfail185.hs:7:46: - Couldn't match expected type `Int -> Int' with actual type `Bool' + Couldn't match expected type ‛Int -> Int’ with actual type ‛Bool’ In the expression: x In the expression: - let - y1 = y - y2 = y1 - y3 = y2 - .... - in x + let + y1 = y + y2 = y1 + y3 = y2 + .... + in x In the expression: - \ x y - -> let - y1 = ... - .... - in x + \ x y + -> let + y1 = ... + .... + in x diff --git a/tests/typecheck/should_fail/tcfail186.stderr b/tests/typecheck/should_fail/tcfail186.stderr index b22e672ae637a5671a39824eed82d00be89db65e..f9ced11d3617271b456e13e47f8681abdf1ac78a 100644 --- a/tests/typecheck/should_fail/tcfail186.stderr +++ b/tests/typecheck/should_fail/tcfail186.stderr @@ -1,8 +1,8 @@ tcfail186.hs:7:9: - Couldn't match type `[Char]' with `Int' + Couldn't match type ‛[Char]’ with ‛Int’ Expected type: PhantomSyn a0 Actual type: [Char] - In the first argument of `f', namely `"hoo"' + In the first argument of ‛f’, namely ‛"hoo"’ In the expression: f "hoo" - In an equation for `foo': foo = f "hoo" + In an equation for ‛foo’: foo = f "hoo" diff --git a/tests/typecheck/should_fail/tcfail187.stderr b/tests/typecheck/should_fail/tcfail187.stderr index 07a741d025411048abbe65f9bea1e7883b9bf8dd..10a9115ff5745df48d37787083c7f4cd9e7ebb05 100644 --- a/tests/typecheck/should_fail/tcfail187.stderr +++ b/tests/typecheck/should_fail/tcfail187.stderr @@ -1,5 +1,5 @@ tcfail187.hs:7:6: - Constructor `:::' should have no arguments, but has been given 2 + Constructor ‛:::’ should have no arguments, but has been given 2 In the pattern: x ::: y - In an equation for `foo': foo (x ::: y) = () + In an equation for ‛foo’: foo (x ::: y) = () diff --git a/tests/typecheck/should_fail/tcfail189.stderr b/tests/typecheck/should_fail/tcfail189.stderr index 6364cc2d5bdcb73129cc03e2eafdcf67caeaf871..a7105907a720919f2082f729f24193b01441ace9 100644 --- a/tests/typecheck/should_fail/tcfail189.stderr +++ b/tests/typecheck/should_fail/tcfail189.stderr @@ -1,9 +1,9 @@ tcfail189.hs:10:31: - Couldn't match type `[a0]' with `a -> a1' + Couldn't match type ‛[a0]’ with ‛a -> a1’ Expected type: (a -> a1) -> [a] -> [[a]] Actual type: [a0] -> [a0] - In the return type of a call of `take' - Probable cause: `take' is applied to too many arguments + In the return type of a call of ‛take’ + Probable cause: ‛take’ is applied to too many arguments In the expression: take 2 In a stmt of a list comprehension: then group by x using take 2 diff --git a/tests/typecheck/should_fail/tcfail190.stderr b/tests/typecheck/should_fail/tcfail190.stderr index db2d842f583440b7770b312847b3046ecaf29344..df56a79a73f227e697e91780b3698f7d1c5a751a 100644 --- a/tests/typecheck/should_fail/tcfail190.stderr +++ b/tests/typecheck/should_fail/tcfail190.stderr @@ -1,6 +1,6 @@ tcfail190.hs:14:31: - No instance for (Ord Unorderable) arising from a use of `groupWith' + No instance for (Ord Unorderable) arising from a use of ‛groupWith’ In the expression: groupWith In a stmt of a list comprehension: then group by x using groupWith In the expression: diff --git a/tests/typecheck/should_fail/tcfail191.stderr b/tests/typecheck/should_fail/tcfail191.stderr index a276a04eaebafbb7e15390d69a6c06176cf691a4..b84f6f770106f19b71b7b6880f2c0cb48f86f1f2 100644 --- a/tests/typecheck/should_fail/tcfail191.stderr +++ b/tests/typecheck/should_fail/tcfail191.stderr @@ -1,10 +1,10 @@ tcfail191.hs:11:26: - Couldn't match type `a' with `[a]' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛[a]’ + ‛a’ is a rigid type variable bound by a type expected by the context: [a] -> [[a]] at tcfail191.hs:11:9 Expected type: [a] -> [[a]] Actual type: [a] -> [a] - In the return type of a call of `take' + In the return type of a call of ‛take’ In the expression: take 5 In a stmt of a list comprehension: then group using take 5 diff --git a/tests/typecheck/should_fail/tcfail192.stderr b/tests/typecheck/should_fail/tcfail192.stderr index caf7ef1401716f1fcd2179e6472c541a0b311256..0fcced9cc345a6784cb6b0ad700aa849954bb4b3 100644 --- a/tests/typecheck/should_fail/tcfail192.stderr +++ b/tests/typecheck/should_fail/tcfail192.stderr @@ -1,10 +1,10 @@ tcfail192.hs:10:26: - Couldn't match type `a' with `[a]' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛[a]’ + ‛a’ is a rigid type variable bound by a type expected by the context: [a] -> [[a]] at tcfail192.hs:10:9 Expected type: [a] -> [[a]] Actual type: [a] -> [a] - In the return type of a call of `take' + In the return type of a call of ‛take’ In the expression: take 5 In a stmt of a list comprehension: then group using take 5 diff --git a/tests/typecheck/should_fail/tcfail193.stderr b/tests/typecheck/should_fail/tcfail193.stderr index 47375e84011a727905b40b863484241de01e8497..9c9e94b1505d2a0f9cd09e4b908d38a6c2977bee 100644 --- a/tests/typecheck/should_fail/tcfail193.stderr +++ b/tests/typecheck/should_fail/tcfail193.stderr @@ -1,7 +1,7 @@ tcfail193.hs:10:31: - Couldn't match type `a' with `[a]' - `a' is a rigid type variable bound by + Couldn't match type ‛a’ with ‛[a]’ + ‛a’ is a rigid type variable bound by a type expected by the context: [a] -> [a] at tcfail193.hs:10:26 Expected type: [a] -> [a] Actual type: [a] -> [[a]] diff --git a/tests/typecheck/should_fail/tcfail194.stderr b/tests/typecheck/should_fail/tcfail194.stderr index 7190a884ca45584633d90e1a6f95784a18c27787..9140c16427c07a7d375e585710447b2207815853 100644 --- a/tests/typecheck/should_fail/tcfail194.stderr +++ b/tests/typecheck/should_fail/tcfail194.stderr @@ -1,10 +1,10 @@ tcfail194.hs:9:29: - Couldn't match type `[a0]' with `a -> t' + Couldn't match type ‛[a0]’ with ‛a -> t’ Expected type: (a -> t) -> [a] -> [a] Actual type: [a0] -> [a0] Relevant bindings include z :: [t] (bound at tcfail194.hs:9:1) - In the return type of a call of `take' - Probable cause: `take' is applied to too many arguments + In the return type of a call of ‛take’ + Probable cause: ‛take’ is applied to too many arguments In the expression: take 5 In a stmt of a list comprehension: then take 5 by x diff --git a/tests/typecheck/should_fail/tcfail195.stderr b/tests/typecheck/should_fail/tcfail195.stderr index d690ebac822c7a62b936253a4dea0e398173a596..4800e75642c22f671b2905c7efe7050b719cd528 100644 --- a/tests/typecheck/should_fail/tcfail195.stderr +++ b/tests/typecheck/should_fail/tcfail195.stderr @@ -1,5 +1,5 @@ - -tcfail195.hs:6:3: - Illegal polymorphic or qualified type: forall a. a - In the definition of data constructor `Foo' - In the data declaration for `Foo' + +tcfail195.hs:6:3: + Illegal polymorphic or qualified type: forall a. a + In the definition of data constructor ‛Foo’ + In the data declaration for ‛Foo’ diff --git a/tests/typecheck/should_fail/tcfail196.stderr b/tests/typecheck/should_fail/tcfail196.stderr index ea6f16fd989248ac16efb67149c31e4e8f570f49..ffedbdf1b9ba8ef6142cee68cf2c7b736e291e73 100644 --- a/tests/typecheck/should_fail/tcfail196.stderr +++ b/tests/typecheck/should_fail/tcfail196.stderr @@ -1,5 +1,5 @@ tcfail196.hs:5:8: Illegal polymorphic or qualified type: forall a. a - In the type signature for `bar': + In the type signature for ‛bar’: bar :: Num (forall a. a) => Int -> Int diff --git a/tests/typecheck/should_fail/tcfail197.stderr b/tests/typecheck/should_fail/tcfail197.stderr index 464dacb078ab6417a82db4dbeccda319b55631ad..30bf9583fa0d739e51abd54e95af398b87c1a565 100644 --- a/tests/typecheck/should_fail/tcfail197.stderr +++ b/tests/typecheck/should_fail/tcfail197.stderr @@ -2,4 +2,4 @@ tcfail197.hs:5:8: Illegal polymorphic or qualified type: forall a. a Perhaps you intended to use -XImpredicativeTypes - In the type signature for `foo': foo :: [forall a. a] -> Int + In the type signature for ‛foo’: foo :: [forall a. a] -> Int diff --git a/tests/typecheck/should_fail/tcfail198.stderr b/tests/typecheck/should_fail/tcfail198.stderr index 22a09f59f7bb4822ec77c6d30c794a670c743870..a2c66aa4bf101bb7dcca118c1935e35bc7a76b7e 100644 --- a/tests/typecheck/should_fail/tcfail198.stderr +++ b/tests/typecheck/should_fail/tcfail198.stderr @@ -1,7 +1,7 @@ tcfail198.hs:6:36: - Couldn't match expected type `a1' with actual type `a' - because type variable `a1' would escape its scope + Couldn't match expected type ‛a1’ with actual type ‛a’ + because type variable ‛a1’ would escape its scope This (rigid, skolem) type variable is bound by an expression type signature: a1 at tcfail198.hs:6:36-41 @@ -10,5 +10,5 @@ tcfail198.hs:6:36: x :: a (bound at tcfail198.hs:6:19) xs :: [a] (bound at tcfail198.hs:6:21) In the expression: x :: a - In the second argument of `(++)', namely `[x :: a]' + In the second argument of ‛(++)’, namely ‛[x :: a]’ In the expression: xs ++ [x :: a] diff --git a/tests/typecheck/should_fail/tcfail199.stderr b/tests/typecheck/should_fail/tcfail199.stderr index 6866a2645273cf747011cce3b8a6045899286d28..3e1df5e8068a4a4cbd02ebaa778e8c4a1b3d00f7 100644 --- a/tests/typecheck/should_fail/tcfail199.stderr +++ b/tests/typecheck/should_fail/tcfail199.stderr @@ -1,5 +1,5 @@ tcfail199.hs:5:1: - Couldn't match expected type `IO t0' with actual type `[Char]' + Couldn't match expected type ‛IO t0’ with actual type ‛[Char]’ In the expression: main - When checking the type of the function `main' + When checking the type of the function ‛main’ diff --git a/tests/typecheck/should_fail/tcfail200.stderr b/tests/typecheck/should_fail/tcfail200.stderr index 731f906fdb685b86990ae800cbe6c0be98790d2d..57c174d109a2e09cb65926a49a7594f71f436200 100644 --- a/tests/typecheck/should_fail/tcfail200.stderr +++ b/tests/typecheck/should_fail/tcfail200.stderr @@ -1,9 +1,9 @@ tcfail200.hs:5:15: - Couldn't match kind `*' with `#' + Couldn't match kind ‛*’ with ‛#’ When matching types t1 :: * GHC.Prim.Int# :: # In the expression: 1# In the expression: (1#, 'c') - In an equation for `x': x = (1#, 'c') + In an equation for ‛x’: x = (1#, 'c') diff --git a/tests/typecheck/should_fail/tcfail201.stderr b/tests/typecheck/should_fail/tcfail201.stderr index 4d93f9fadd7fcd0149b6aaba3f8992dc24e3280a..ada710e43b3aacba1c70ea056aceeff7908a9f63 100644 --- a/tests/typecheck/should_fail/tcfail201.stderr +++ b/tests/typecheck/should_fail/tcfail201.stderr @@ -1,7 +1,7 @@ tcfail201.hs:17:27: - Couldn't match expected type `a' with actual type `HsDoc t0' - `a' is a rigid type variable bound by + Couldn't match expected type ‛a’ with actual type ‛HsDoc t0’ + ‛a’ is a rigid type variable bound by the type signature for gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b) -> (forall g. g -> c g) -> a -> c a diff --git a/tests/typecheck/should_fail/tcfail203.stderr b/tests/typecheck/should_fail/tcfail203.stderr index 29cf84095b0451da3d4d7c1cb0837fe081cc16cc..7635b68b4b48dac8d1e2fd9648718ef1bdc5cdae 100644 --- a/tests/typecheck/should_fail/tcfail203.stderr +++ b/tests/typecheck/should_fail/tcfail203.stderr @@ -1,35 +1,35 @@ -tcfail203.hs:28:11: - Warning: Pattern bindings containing unlifted types should use an outermost bang pattern: - (I# x) = 5 - In an equation for `fail2': +tcfail203.hs:28:11: Warning: + Pattern bindings containing unlifted types should use an outermost bang pattern: + (I# x) = 5 + In an equation for ‛fail2’: fail2 = 'a' where (I# x) = 5 -tcfail203.hs:31:11: - Warning: Pattern bindings containing unlifted types should use an outermost bang pattern: - (b, I# x) = (True, 5) - In an equation for `fail3': +tcfail203.hs:31:11: Warning: + Pattern bindings containing unlifted types should use an outermost bang pattern: + (b, I# x) = (True, 5) + In an equation for ‛fail3’: fail3 = 'a' where (b, I# x) = (True, 5) -tcfail203.hs:40:11: - Warning: Pattern bindings containing unlifted types should use an outermost bang pattern: - (I# !x) = 5 - In an equation for `fail6': +tcfail203.hs:40:11: Warning: + Pattern bindings containing unlifted types should use an outermost bang pattern: + (I# !x) = 5 + In an equation for ‛fail6’: fail6 = 'a' where (I# !x) = 5 -tcfail203.hs:43:11: - Warning: Pattern bindings containing unlifted types should use an outermost bang pattern: - (b, !(I# x)) = (True, 5) - In an equation for `fail7': +tcfail203.hs:43:11: Warning: + Pattern bindings containing unlifted types should use an outermost bang pattern: + (b, !(I# x)) = (True, 5) + In an equation for ‛fail7’: fail7 = 'a' where diff --git a/tests/typecheck/should_fail/tcfail204.stderr b/tests/typecheck/should_fail/tcfail204.stderr index e9d9bb739d98648ca7662ed5c9f148945a850986..bfbac5443233b26d3e9d4dbb2c822225605fc8bb 100644 --- a/tests/typecheck/should_fail/tcfail204.stderr +++ b/tests/typecheck/should_fail/tcfail204.stderr @@ -1,13 +1,13 @@ -tcfail204.hs:10:15: - Warning: Defaulting the following constraint(s) to type `Double' - (Fractional a0) arising from the literal `6.3' - at tcfail204.hs:10:15-17 - (RealFrac a0) arising from a use of `ceiling' - at tcfail204.hs:10:7-13 - In the first argument of `ceiling', namely `6.3' +tcfail204.hs:10:15: Warning: + Defaulting the following constraint(s) to type ‛Double’ + (Fractional a0) + arising from the literal ‛6.3’ at tcfail204.hs:10:15-17 + (RealFrac a0) + arising from a use of ‛ceiling’ at tcfail204.hs:10:7-13 + In the first argument of ‛ceiling’, namely ‛6.3’ In the expression: ceiling 6.3 - In an equation for `foo': foo = ceiling 6.3 + In an equation for ‛foo’: foo = ceiling 6.3 <no location info>: Failing due to -Werror. diff --git a/tests/typecheck/should_fail/tcfail206.stderr b/tests/typecheck/should_fail/tcfail206.stderr index b5b9aef83019cc7b121a1679b186ff7efabafe24..d503b1620758dd76367c0d90817726af3bec67fc 100644 --- a/tests/typecheck/should_fail/tcfail206.stderr +++ b/tests/typecheck/should_fail/tcfail206.stderr @@ -1,28 +1,28 @@ tcfail206.hs:5:5: - Couldn't match type `Bool' with `Int' + Couldn't match type ‛Bool’ with ‛Int’ Expected type: Bool -> (Int, Bool) Actual type: Bool -> (Bool, Bool) In the expression: (, True) - In an equation for `a': a = (, True) + In an equation for ‛a’: a = (, True) tcfail206.hs:8:5: - Couldn't match type `(t0, Int)' with `Bool -> (Int, Bool)' + Couldn't match type ‛(t0, Int)’ with ‛Bool -> (Int, Bool)’ Expected type: Int -> Bool -> (Int, Bool) Actual type: Int -> (t0, Int) In the expression: (1,) - In an equation for `b': b = (1,) + In an equation for ‛b’: b = (1,) tcfail206.hs:14:5: - Couldn't match type `Bool' with `Int' + Couldn't match type ‛Bool’ with ‛Int’ Expected type: Bool -> (# Int, Bool #) Actual type: Bool -> (# Bool, Bool #) In the expression: (# , True #) - In an equation for `d': d = (# , True #) + In an equation for ‛d’: d = (# , True #) tcfail206.hs:17:5: - Couldn't match type `(# a0, Int #)' with `Bool -> (# Int, Bool #)' + Couldn't match type ‛(# a0, Int #)’ with ‛Bool -> (# Int, Bool #)’ Expected type: Int -> Bool -> (# Int, Bool #) Actual type: Int -> (# a0, Int #) In the expression: (# 1, #) - In an equation for `e': e = (# 1, #) + In an equation for ‛e’: e = (# 1, #) diff --git a/tests/typecheck/should_fail/tcfail207.stderr b/tests/typecheck/should_fail/tcfail207.stderr index 3e96a0994e9c75a9196bed5636333978cce49f3b..f647a324ba9fecec900e84bf054b1e3d99dfa6af 100644 --- a/tests/typecheck/should_fail/tcfail207.stderr +++ b/tests/typecheck/should_fail/tcfail207.stderr @@ -1,16 +1,16 @@ tcfail207.hs:5:7: - Couldn't match expected type `[Int] -> [Int]' - with actual type `[a1]' - In the return type of a call of `take' - Probable cause: `take' is applied to too many arguments + Couldn't match expected type ‛[Int] -> [Int]’ + with actual type ‛[a1]’ + In the return type of a call of ‛take’ + Probable cause: ‛take’ is applied to too many arguments In the expression: take x [] - In an equation for `f': f x = take x [] + In an equation for ‛f’: f x = take x [] tcfail207.hs:9:5: - Couldn't match expected type `[Int]' - with actual type `[a0] -> [a0]' - In the return type of a call of `take' - Probable cause: `take' is applied to too few arguments + Couldn't match expected type ‛[Int]’ + with actual type ‛[a0] -> [a0]’ + In the return type of a call of ‛take’ + Probable cause: ‛take’ is applied to too few arguments In the expression: take 3 - In an equation for `g': g = take 3 + In an equation for ‛g’: g = take 3 diff --git a/tests/typecheck/should_fail/tcfail208.stderr b/tests/typecheck/should_fail/tcfail208.stderr index d3172b6a913a6f6a8fd3c890b6cd18a2097f727b..7419e90c523b89d0937ded10320baa51fe5e5471 100644 --- a/tests/typecheck/should_fail/tcfail208.stderr +++ b/tests/typecheck/should_fail/tcfail208.stderr @@ -1,9 +1,9 @@ tcfail208.hs:4:19: - Could not deduce (Eq (m a)) arising from a use of `==' + Could not deduce (Eq (m a)) arising from a use of ‛==’ from the context (Monad m, Eq a) bound by the type signature for f :: (Monad m, Eq a) => a -> m a -> Bool at tcfail208.hs:3:6-40 In the expression: (return x == y) - In an equation for `f': f x y = (return x == y) + In an equation for ‛f’: f x y = (return x == y) diff --git a/tests/typecheck/should_fail/tcfail209.stderr b/tests/typecheck/should_fail/tcfail209.stderr index d0a59e9701553c6b3d2373b2fc99ca739cee0cf3..65bc8de455b1e9dfff246c76e6752324f156cc0d 100644 --- a/tests/typecheck/should_fail/tcfail209.stderr +++ b/tests/typecheck/should_fail/tcfail209.stderr @@ -1,5 +1,5 @@ - -tcfail209.hs:3:1: - Illegal constraint synonym of kind: `* -> Constraint' - (Use -XConstraintKinds to permit this) - In the type declaration for `Showish' + +tcfail209.hs:3:1: + Illegal constraint synonym of kind: ‛* -> Constraint’ + (Use -XConstraintKinds to permit this) + In the type declaration for ‛Showish’ diff --git a/tests/typecheck/should_fail/tcfail209a.stderr b/tests/typecheck/should_fail/tcfail209a.stderr index 1b56c86728f82e1d12906e6d7faa9e0dad019b63..9acacaaacfe9d6e4e1ca6463e0201abd3a0e919b 100644 --- a/tests/typecheck/should_fail/tcfail209a.stderr +++ b/tests/typecheck/should_fail/tcfail209a.stderr @@ -2,5 +2,5 @@ tcfail209a.hs:3:6: Illegal tuple constraint: (Show a, Num a) (Use -XConstraintKinds to permit this) - In the type signature for `g': + In the type signature for ‛g’: g :: ((Show a, Num a), Eq a) => a -> a diff --git a/tests/typecheck/should_fail/tcfail210.stderr b/tests/typecheck/should_fail/tcfail210.stderr index 95aba8e61b47272dedac96175cd617bc0c9309d9..9b998d425efe5da6e20845a61fbe5218089b68a1 100644 --- a/tests/typecheck/should_fail/tcfail210.stderr +++ b/tests/typecheck/should_fail/tcfail210.stderr @@ -1,3 +1,3 @@ tcfail210.hs:4:31: - Not in scope: type constructor or class `Constraint' + Not in scope: type constructor or class ‛Constraint’ diff --git a/tests/typecheck/should_fail/tcfail211.stderr b/tests/typecheck/should_fail/tcfail211.stderr index 81e04d670d680748cb3b6000528ee9165912d202..491349b1237ef0e0ab4ff254ad0ba25a19234fe3 100644 --- a/tests/typecheck/should_fail/tcfail211.stderr +++ b/tests/typecheck/should_fail/tcfail211.stderr @@ -1,7 +1,6 @@ tcfail211.hs:16:13: - Unbound implicit parameter (?imp::Int) - arising from a use of `test' - In the first argument of `print', namely `test' + Unbound implicit parameter (?imp::Int) arising from a use of ‛test’ + In the first argument of ‛print’, namely ‛test’ In the expression: print test - In an equation for `use': use = print test + In an equation for ‛use’: use = print test diff --git a/tests/typecheck/should_fail/tcfail212.stderr b/tests/typecheck/should_fail/tcfail212.stderr index a94496181b38f024311544e3690b0f16abd68375..b116fd1d9580ae72e6c08565d06994114b176b59 100644 --- a/tests/typecheck/should_fail/tcfail212.stderr +++ b/tests/typecheck/should_fail/tcfail212.stderr @@ -1,10 +1,10 @@ tcfail212.hs:10:7: - Expecting one more argument to `Maybe' - The first argument of a tuple should have kind `*', - but `Maybe' has kind `* -> *' - In the type signature for `f': f :: (Maybe, Either Int) + Expecting one more argument to ‛Maybe’ + The first argument of a tuple should have kind ‛*’, + but ‛Maybe’ has kind ‛* -> *’ + In the type signature for ‛f’: f :: (Maybe, Either Int) tcfail212.hs:13:7: - Expecting a lifted type, but `Int#' is unlifted - In the type signature for `g': g :: (Int#, Int#) + Expecting a lifted type, but ‛Int#’ is unlifted + In the type signature for ‛g’: g :: (Int#, Int#) diff --git a/tests/typecheck/should_fail/tcfail213.stderr b/tests/typecheck/should_fail/tcfail213.stderr index 92087113890b34de7ef4e045be41ca5c709442c5..bef0507b8b9bb9a03fdde1256b8e1bef73527838 100644 --- a/tests/typecheck/should_fail/tcfail213.stderr +++ b/tests/typecheck/should_fail/tcfail213.stderr @@ -1,7 +1,7 @@ - -tcfail213.hs:8:1: - Illegal constraint `F a' in a superclass/instance context - (Use -XUndecidableInstances to permit this) - In the context: (F a) - While checking the super-classes of class `C' - In the class declaration for `C' + +tcfail213.hs:8:1: + Illegal constraint ‛F a’ in a superclass/instance context + (Use -XUndecidableInstances to permit this) + In the context: (F a) + While checking the super-classes of class ‛C’ + In the class declaration for ‛C’ diff --git a/tests/typecheck/should_fail/tcfail214.stderr b/tests/typecheck/should_fail/tcfail214.stderr index d8df299f568c0dc63180439ddcd2103d024dfc77..983d4b39a10314e579ccb051361dbadce09d1a68 100644 --- a/tests/typecheck/should_fail/tcfail214.stderr +++ b/tests/typecheck/should_fail/tcfail214.stderr @@ -1,7 +1,7 @@ - -tcfail214.hs:9:10: - Illegal constraint `F a' in a superclass/instance context - (Use -XUndecidableInstances to permit this) - In the context: (F a) - While checking an instance declaration - In the instance declaration for `C [a]' + +tcfail214.hs:9:10: + Illegal constraint ‛F a’ in a superclass/instance context + (Use -XUndecidableInstances to permit this) + In the context: (F a) + While checking an instance declaration + In the instance declaration for ‛C [a]’ diff --git a/tests/typecheck/should_fail/tcfail215.stderr b/tests/typecheck/should_fail/tcfail215.stderr index 75c894eda684c25cfc821df917bbce5ee84f526e..a9fe4da24e17d7f78b76c6a2c70fcde7a7941aed 100644 --- a/tests/typecheck/should_fail/tcfail215.stderr +++ b/tests/typecheck/should_fail/tcfail215.stderr @@ -1,4 +1,4 @@ tcfail215.hs:8:15: - Expecting a lifted type, but `Int#' is unlifted - In the type signature for `foo': foo :: ?x :: Int# => Int + Expecting a lifted type, but ‛Int#’ is unlifted + In the type signature for ‛foo’: foo :: ?x :: Int# => Int diff --git a/tests/typecheck/should_fail/tcfail216.stderr b/tests/typecheck/should_fail/tcfail216.stderr index bcb07b8f152251cfb1bb0942e1d03596c8985bce..11b077e7e11c47fa66cb01fa21a3ef0868c289e1 100644 --- a/tests/typecheck/should_fail/tcfail216.stderr +++ b/tests/typecheck/should_fail/tcfail216.stderr @@ -1,4 +1,4 @@ tcfail216.hs:5:1: Cycle in class declaration (via superclasses): A -> A - In the class declaration for `A' + In the class declaration for ‛A’ diff --git a/tests/typecheck/should_fail/tcfail217.stderr b/tests/typecheck/should_fail/tcfail217.stderr index 79f3b0e0a97059b2c73d4265b7e130c0eb5ead97..64584169e9c4f69186b416b0d0fc0fd98a8b98cd 100644 --- a/tests/typecheck/should_fail/tcfail217.stderr +++ b/tests/typecheck/should_fail/tcfail217.stderr @@ -1,4 +1,4 @@ tcfail217.hs:7:1: Cycle in class declaration (via superclasses): A -> Aish -> A - In the class declaration for `A' + In the class declaration for ‛A’ diff --git a/tests/typecheck/should_run/T1735_Help/Basics.hs b/tests/typecheck/should_run/T1735_Help/Basics.hs index c7fad91395976b77db23f97473040b8933b4518b..d444db70583fb7196b6dacf6aab30646d68b684c 100644 --- a/tests/typecheck/should_run/T1735_Help/Basics.hs +++ b/tests/typecheck/should_run/T1735_Help/Basics.hs @@ -21,11 +21,6 @@ module T1735_Help.Basics ( import Data.Typeable import T1735_Help.Context -#ifdef __HADDOCK__ -data Proxy -#else -data Proxy (a :: * -> *) -#endif ------------------------------------------------------------------------------ -- The ingenious Data class @@ -61,14 +56,14 @@ class (Typeable a, Sat (ctx a)) => Data ctx a dataTypeOf _ _ = undefined -- | Mediate types and unary type constructors - dataCast1 :: Typeable1 t + dataCast1 :: Typeable t => Proxy ctx -> (forall b. Data ctx b => w (t b)) -> Maybe (w a) dataCast1 _ _ = Nothing -- | Mediate types and binary type constructors - dataCast2 :: Typeable2 t + dataCast2 :: Typeable t => Proxy ctx -> (forall b c. (Data ctx b, Data ctx c) => w (t b c)) -> Maybe (w a) diff --git a/tests/typecheck/should_run/T3731.hs b/tests/typecheck/should_run/T3731.hs index af858e570a2a7e6f663b21fe31aee5bd32920ebe..3024629eca19820ddf7a0bc9a92483a9fa56bb78 100644 --- a/tests/typecheck/should_run/T3731.hs +++ b/tests/typecheck/should_run/T3731.hs @@ -13,7 +13,6 @@ import Data.Typeable class Sat a where dict :: a -data Proxy (a :: * -> *) class ( Sat (ctx a)) => Data ctx a where gunfold :: Proxy ctx diff --git a/tests/typecheck/should_run/T6117.stdout b/tests/typecheck/should_run/T6117.stdout new file mode 100644 index 0000000000000000000000000000000000000000..a32a4347a4ec2c9f9a91b2f40ecca8701af1b22a --- /dev/null +++ b/tests/typecheck/should_run/T6117.stdout @@ -0,0 +1 @@ +1234567890 diff --git a/tests/typecheck/should_run/all.T b/tests/typecheck/should_run/all.T index 4c9d7abffb0f54db09941a4679bee8ba9dd99338..b5ffa8c0e37fc24db7b891d3d3534b92857e0b54 100755 --- a/tests/typecheck/should_run/all.T +++ b/tests/typecheck/should_run/all.T @@ -16,7 +16,7 @@ test('Defer01', normal, compile_and_run, ['']) # ----------------------------------------------------------------------------- # Skip everything else if fast is on -def f(opts): +def f(name, opts): if config.fast: opts.skip = 1 setTestOpts(f) @@ -38,7 +38,8 @@ test('tcrun020', normal, compile_and_run, ['']) # Doesn't work with External Core due to datatype with no constructors test('tcrun021', expect_fail_for(['extcore','optextcore']), compile_and_run, ['-package containers']) -test('tcrun022', compose(omit_ways(['ghci']),only_compiler_types(['ghc'])), compile_and_run, ['-O']) +test('tcrun022', [omit_ways(['ghci']),only_compiler_types(['ghc'])], + compile_and_run, ['-O']) test('tcrun023', normal, compile_and_run, ['-O']) test('tcrun024', normal, compile_and_run, ['-O']) test('tcrun025', extra_clean(['TcRun025_B.hi', 'TcRun025_B.o']), @@ -70,11 +71,16 @@ test('tcrun043', normal, compile_and_run, ['']) test('tcrun044', normal, compile_and_run, ['']) test('tcrun045', normal, compile_and_run, ['']) test('tcrun046', normal, compile_and_run, ['']) -test('tcrun047', compose(omit_ways(['ghci']),only_compiler_types(['ghc'])), compile_and_run, ['']) -test('tcrun048', compose(omit_ways(['ghci']),only_compiler_types(['ghc'])), compile_and_run, ['']) -test('tcrun049', compose(omit_ways(['ghci']),only_compiler_types(['ghc'])), compile_and_run, ['']) -test('tcrun050', compose(omit_ways(['ghci']),only_compiler_types(['ghc'])), compile_and_run, ['']) -test('tcrun051', compose(omit_ways(['ghci']),only_compiler_types(['ghc'])), compile_and_run, ['']) +test('tcrun047', [omit_ways(['ghci']), only_compiler_types(['ghc'])], + compile_and_run, ['']) +test('tcrun048', [omit_ways(['ghci']), only_compiler_types(['ghc'])], + compile_and_run, ['']) +test('tcrun049', [omit_ways(['ghci']), only_compiler_types(['ghc'])], + compile_and_run, ['']) +test('tcrun050', [omit_ways(['ghci']), only_compiler_types(['ghc'])], + compile_and_run, ['']) +test('tcrun051', [omit_ways(['ghci']), only_compiler_types(['ghc'])], + compile_and_run, ['']) test('church', normal, compile_and_run, ['']) test('testeq2', normal, compile_and_run, ['']) @@ -92,10 +98,12 @@ test('T4809', reqlib('mtl'), compile_and_run, ['']) test('T2722', normal, compile_and_run, ['']) test('mc17', normal, compile_and_run, ['']) test('T5759', normal, compile_and_run, ['']) -test('T5573a', compose(omit_ways(['ghci']),only_compiler_types(['ghc'])), compile_and_run, ['']) -test('T5573b', compose(omit_ways(['ghci']),only_compiler_types(['ghc'])), compile_and_run, ['']) +test('T5573a', [omit_ways(['ghci']), only_compiler_types(['ghc'])], + compile_and_run, ['']) +test('T5573b', [omit_ways(['ghci']), only_compiler_types(['ghc'])], + compile_and_run, ['']) test('T7023', normal, compile_and_run, ['']) test('T7126', normal, compile_and_run, ['']) -test('T6117', expect_broken(6117), compile_and_run, ['']) +test('T6117', normal, compile_and_run, ['']) test('T5751', normal, compile_and_run, ['']) test('T5913', normal, compile_and_run, ['']) diff --git a/tests/typecheck/should_run/tcrun035.stderr b/tests/typecheck/should_run/tcrun035.stderr index f0fc2d53b7673fb660fb7c7c6b5fe893752d2252..9c7a3c748857ff28be50d48dd6a7e526292a1dd0 100644 --- a/tests/typecheck/should_run/tcrun035.stderr +++ b/tests/typecheck/should_run/tcrun035.stderr @@ -1,11 +1,11 @@ - -tcrun035.hs:13:7: - Couldn't match type `IO a' - with `forall (m :: * -> *). Monad m => m a' - Expected type: (forall (m :: * -> *). Monad m => m a) -> IO a - Actual type: IO a -> IO a - Relevant bindings include - foo :: (forall (m :: * -> *). Monad m => m a) -> IO a - (bound at tcrun035.hs:13:1) - In the expression: id . id - In an equation for `foo': foo = id . id + +tcrun035.hs:13:7: + Couldn't match type ‛IO a’ + with ‛forall (m :: * -> *). Monad m => m a’ + Expected type: (forall (m :: * -> *). Monad m => m a) -> IO a + Actual type: IO a -> IO a + Relevant bindings include + foo :: (forall (m :: * -> *). Monad m => m a) -> IO a + (bound at tcrun035.hs:13:1) + In the expression: id . id + In an equation for ‛foo’: foo = id . id diff --git a/tests/typecheck/testeq1/test.T b/tests/typecheck/testeq1/test.T index dbb63fb9f8c6b14d199160897c1667f015214da3..c1b97e90febe0d720f8eaf1bfc6e3061ced1bb73 100644 --- a/tests/typecheck/testeq1/test.T +++ b/tests/typecheck/testeq1/test.T @@ -1,6 +1,6 @@ test('typecheck.testeq1', - [skip_if_fast, + [when(fast(), skip), extra_clean(['Main.hi', 'Main.o', 'TypeCast.hi', 'TypeCast.o', 'FakePrelude.hi', 'FakePrelude.o', diff --git a/timeout/timeout.py b/timeout/timeout.py index 76660a739056a9ff762f6f2afa36f8920c9a2dde..6a57ac2f8212c2327a3a44ef17e2a53b1d0d190d 100644 --- a/timeout/timeout.py +++ b/timeout/timeout.py @@ -1,46 +1,53 @@ #!/usr/bin/env python -import errno -import os -import signal -import sys -import time +try: -secs = int(sys.argv[1]) -cmd = sys.argv[2] + import errno + import os + import signal + import sys + import time -def killProcess(pid): - os.killpg(pid, signal.SIGKILL) - for x in range(10): - try: - time.sleep(0.3) - r = os.waitpid(pid, os.WNOHANG) - if r == (0, 0): - os.killpg(pid, signal.SIGKILL) - else: - return - except OSError, e: - if e.errno == errno.ECHILD: - return - else: - raise e + secs = int(sys.argv[1]) + cmd = sys.argv[2] -pid = os.fork() -if pid == 0: - # child - os.setpgrp() - os.execvp('/bin/sh', ['/bin/sh', '-c', cmd]) -else: - # parent - def handler(signum, frame): - sys.stderr.write('Timeout happened...killing process...\n') - killProcess(pid) - sys.exit(99) - old = signal.signal(signal.SIGALRM, handler) - signal.alarm(secs) - (pid2, res) = os.waitpid(pid, 0) - if (os.WIFEXITED(res)): - sys.exit(os.WEXITSTATUS(res)) + def killProcess(pid): + os.killpg(pid, signal.SIGKILL) + for x in range(10): + try: + time.sleep(0.3) + r = os.waitpid(pid, os.WNOHANG) + if r == (0, 0): + os.killpg(pid, signal.SIGKILL) + else: + return + except OSError, e: + if e.errno == errno.ECHILD: + return + else: + raise e + + pid = os.fork() + if pid == 0: + # child + os.setpgrp() + os.execvp('/bin/sh', ['/bin/sh', '-c', cmd]) else: - sys.exit(res) + # parent + def handler(signum, frame): + sys.stderr.write('Timeout happened...killing process...\n') + killProcess(pid) + sys.exit(99) + old = signal.signal(signal.SIGALRM, handler) + signal.alarm(secs) + (pid2, res) = os.waitpid(pid, 0) + if (os.WIFEXITED(res)): + sys.exit(os.WEXITSTATUS(res)) + else: + sys.exit(res) + +except KeyboardInterrupt: + sys.exit(98) +except: + raise