Unfortunately "add negative-prim-literal tests" (according to darcs)
depends on "#1318: pre-emptively add test for..."; either the patches
could be reworked, or we could just get that one reviewed and fixed up
first/simultaneously (see my comments in its e-mail)
Sat May 26 10:31:51 EDT 2007 Isaac Dupree <[EMAIL PROTECTED]>
* Add parser/should_run
Sat May 26 10:38:14 EDT 2007 Isaac Dupree <[EMAIL PROTECTED]>
* #1318: pre-emptively add test for Haskell98 treatment of operator "-"
Sat May 26 18:44:05 EDT 2007 Isaac Dupree <[EMAIL PROTECTED]>
* add negative-prim-literal tests
the first for behavior common between their new and old parsings (passes
both),
the second to test the new behavior (fails before, passes after)
New patches:
[Add parser/should_run
Isaac Dupree <[EMAIL PROTECTED]>**20070526143151] {
adddir ./tests/ghc-regress/parser/should_run
addfile ./tests/ghc-regress/parser/should_run/Makefile
hunk ./tests/ghc-regress/parser/should_run/Makefile 1
+TOP=../../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
addfile ./tests/ghc-regress/parser/should_run/all.T
}
[#1318: pre-emptively add test for Haskell98 treatment of operator "-"
Isaac Dupree <[EMAIL PROTECTED]>**20070526143814] {
hunk ./tests/ghc-regress/parser/should_run/all.T 1
+test('read001', normal, compile_and_run, [''])
+# also make sure that a mere -fglasgow-exts doesn't break
+# the default/standard behavior:
+test('read001', only_compiler_types(['ghc']), compile_and_run,
['-fglasgow-exts'])
addfile ./tests/ghc-regress/parser/should_run/read001.hs
hunk ./tests/ghc-regress/parser/should_run/read001.hs 1
+-- !!! Haskell-98 prefix negate operator
+
+-- Make sure the parsing is actually the correct
+-- one by running this after it's compiled.
+
+negatedExpression = - (3 + 4)
+
+negatedTightlyBinding = -3^4
+
+negatedNonSection = (- 3)
+
+negatedNonSectionWithHighPrecedenceOp =
+ let { f = (+); infix 9 `f` } in ( -3 `f` 4 )
+
+negatedNonSectionWithLowPrecedenceOp =
+ let { f = (+); infix 1 `f` } in ( -3 `f` 4 )
+
+negatedRightHandSide =
+-- This is actually not legal syntax: 3 * - 4
+-- However, lower-precedence binary ops work.
+-- (see H98 syntax for exp, or imagine it's because it
+-- would parse differently as 3 * 0 - 4)
+ let { f = (+); infix 1 `f` } in ( 3 `f` - 4 )
+
+
+subtractionNotNegation = 3 -4
+
+negativePattern =
+ case -3 of { (- 3) ->
+ case -4 of { - 4 ->
+ True } }
+-- not legal H98 syntax: case -4 of { _x @ -4 ->
+-- (parentheses needed) case -5 of { ~ -5 ->
+
+subtractionNotNegationPattern =
+ -- defines infix '-' (shadowing Prelude definition)
+ let { 3 -4 = True } in (3 - 4)
+
+precedenceOfNegationCantBeChanged =
+ let { (-) = undefined; infix 9 - } in (- 3 * 4)
+
+negationCantBeQualified =
+ (Prelude.-3) 4
+
+main = do
+ print negatedExpression
+ print negatedTightlyBinding
+ print negatedNonSection
+ print negatedNonSectionWithHighPrecedenceOp
+ print negatedNonSectionWithLowPrecedenceOp
+ print negatedRightHandSide
+ print subtractionNotNegation
+ print negativePattern
+ print subtractionNotNegationPattern
+ print precedenceOfNegationCantBeChanged
+ print negationCantBeQualified
+
addfile ./tests/ghc-regress/parser/should_run/read001.stdout
hunk ./tests/ghc-regress/parser/should_run/read001.stdout 1
+-7
+-81
+-3
+-7
+1
+-1
+-1
+True
+True
+-12
+1
}
[add negative-prim-literal tests
Isaac Dupree <[EMAIL PROTECTED]>**20070526224405
the first for behavior common between their new and old parsings (passes both),
the second to test the new behavior (fails before, passes after)
] {
hunk ./tests/ghc-regress/parser/should_run/all.T 5
+test('read002', normal, compile_and_run, [''])
+test('read003', normal, compile_and_run, [''])
addfile ./tests/ghc-regress/parser/should_run/read002.hs
hunk ./tests/ghc-regress/parser/should_run/read002.hs 1
+{-# OPTIONS_GHC -fglasgow-exts #-}
+-- !!! Negative unboxed literals, part 1
+-- They don't have to be as standards-compliant
+-- or follow so many weird cases as the normal
+-- boxed version. In particular, normal unboxed
+-- subtraction is -#, `minusFloat#`, -##, `minusInteger#`
+-- and unboxed negation is negate{Int,Float,Double}#
+-- . (-) and negate are kind errors. So we will
+-- assume that we don't need to parse infix (-) nicely
+-- when unboxed numbers are involved (even though someone
+-- "could" hide the Prelude's version and define (-) themself).
+-- Also we won't care here whether having a space (- 3#) works.
+
+-- Make sure the parsing is actually the correct
+-- one by running this after it's compiled.
+
+import GHC.Exts
+
+--is floating-point consistently safe to test like this,
+--if we stick to integral values?
+main = do
+ --These work with any ghc
+ print (I# (negateInt# (-3# -# -4#)))
+ print (F# (negateFloat# (-3.0# `minusFloat#` -4.0#)))
+ print (D# (negateDouble# (-3.0## -## -4.0##)))
+ print (I# (-3# ^# 4#)) --different from (boxed) Haskell98 (-3 ^ 4)
+ print ( case -1# of { -1# -> True } )
+ print ( case 1# of { -1# -> True; _ -> False } )
+ print ( case -0# of { 0# -> True } )
+
+infixr 8 ^# --just like ^, binds tighter than - (which is infixl 6)
+( ^# ) :: Int# -> Int# -> Int#
+base ^# 0# = 1#
+base ^# exponent = base *# (base ^# ( exponent -# 1# ))
+
addfile ./tests/ghc-regress/parser/should_run/read002.stdout
hunk ./tests/ghc-regress/parser/should_run/read002.stdout 1
+-1
+-1.0
+-1.0
+81
+True
+False
+True
addfile ./tests/ghc-regress/parser/should_run/read003.hs
hunk ./tests/ghc-regress/parser/should_run/read003.hs 1
+{-# OPTIONS_GHC -fglasgow-exts #-}
+-- !!! Negative unboxed literals, part 2
+
+import GHC.Exts
+
+main = do
+ --Newly implemented: don't parse this as subtraction (Prelude.-):
+ print (I# (negateInt# -3#))
+ print (F# (negateFloat# -3.0#))
+ print (D# (negateDouble# -3.0##))
+ --nor this as let (-) f 1# = ...
+ print (let { f -1# = True } in f (-1#))
+
addfile ./tests/ghc-regress/parser/should_run/read003.stdout
hunk ./tests/ghc-regress/parser/should_run/read003.stdout 1
+3
+3.0
+3.0
+True
}
Context:
[remove unreg "way"; unreg is now all-or-nothing
Simon Marlow <[EMAIL PROTECTED]>**20070525081742]
[Accept output
Pepe Iborra <[EMAIL PROTECTED]>**20070519215040]
[ignore the .ghci file if present in the ghci debugger tests
Pepe Iborra <[EMAIL PROTECTED]>**20070519211700]
[Accept output (source spans)
Ian Lynagh <[EMAIL PROTECTED]>**20070519104909]
[Accept output (... doesn't replace a constructor any more)
Ian Lynagh <[EMAIL PROTECTED]>**20070519103641]
[add a test for printing unboxed fields
Simon Marlow <[EMAIL PROTECTED]>**20070518141526]
[arith011 is no longer broken on x86-64 Linux
Simon Marlow <[EMAIL PROTECTED]>**20070518115502]
[Accept output (src span)
Ian Lynagh <[EMAIL PROTECTED]>**20070517164019]
[bio001 needs profiling
Ian Lynagh <[EMAIL PROTECTED]>**20070517163214]
[Accept output (source spans)
Ian Lynagh <[EMAIL PROTECTED]>**20070517162651]
[move dynbk tests into scripts/ and update them
Simon Marlow <[EMAIL PROTECTED]>**20070517092220]
[move STM-specific tests to the stm package
Simon Marlow <[EMAIL PROTECTED]>**20070517085909]
[make this test work a bit more reliably
Simon Marlow <[EMAIL PROTECTED]>**20070517085853]
[add missing files
Simon Marlow <[EMAIL PROTECTED]>**20070517082938]
[add another exception test
Simon Marlow <[EMAIL PROTECTED]>**20070516133922]
[move the break* tests into scripts/, and update as necessary
Simon Marlow <[EMAIL PROTECTED]>**20070516095924]
[move break1 to scripts/break012
Simon Marlow <[EMAIL PROTECTED]>**20070516090710]
[add missing source file
Simon Marlow <[EMAIL PROTECTED]>**20070516083636]
[add missing source files for tests
Simon Marlow <[EMAIL PROTECTED]>**20070516082958]
[accept output and add a few more tests
Simon Marlow <[EMAIL PROTECTED]>**20070515132532]
[-findexed-types -> -ftype-families
Manuel M T Chakravarty <[EMAIL PROTECTED]>**20070514115132]
[add test for #1277
Simon Marlow <[EMAIL PROTECTED]>**20070511145720]
[Adapt indexed type tests to removal of newtype families
Manuel M T Chakravarty <[EMAIL PROTECTED]>**20070511113521]
[Various indexed types tests fail due to trac #1331
Ian Lynagh <[EMAIL PROTECTED]>*-20070505155605]
[Add tests for -fwarn-implicit-prelude (and -fwarn-unused-imports along with
it) (trac #1317)
Isaac Dupree <[EMAIL PROTECTED]>**20070508221238]
[add a couple more tests
Simon Marlow <[EMAIL PROTECTED]>**20070509133022]
[add test for unicode constructor names in :print
Simon Marlow <[EMAIL PROTECTED]>**20070509104517]
[Add test for full laziness
[EMAIL PROTECTED]
[accept output
Simon Marlow <[EMAIL PROTECTED]>**20070508144310]
[FIX #1159: This test needs to run in a subthread (see comments)
Simon Marlow <[EMAIL PROTECTED]>**20070508130950]
[add test for #1227
Simon Marlow <[EMAIL PROTECTED]>**20070508105325]
[add test for #1253
Simon Marlow <[EMAIL PROTECTED]>**20070507132429]
[add test for #1091
Simon Marlow <[EMAIL PROTECTED]>**20070507113903]
[add basic concurrency/IO test: tests that stdin is non-blocking
Simon Marlow <[EMAIL PROTECTED]>**20070507124521]
[platform-specific output no longer required
Simon Marlow <[EMAIL PROTECTED]>**20070417080859]
[Add a test that 'ghc -e "return ()"' returns successfully
Ian Lynagh <[EMAIL PROTECTED]>**20070506113229]
[Arrow tests are failing core lint; trac #1333
Ian Lynagh <[EMAIL PROTECTED]>**20070505190414]
[sed-o in the testsuite driver
Ian Lynagh <[EMAIL PROTECTED]>**20070505190353]
[dsrun014 is broken (trac #1257, Bytecode generator can't handle unboxed tuples)
Ian Lynagh <[EMAIL PROTECTED]>**20070505172037]
[tc224 (overloaded strings) is broken; trac #1332
Ian Lynagh <[EMAIL PROTECTED]>**20070505161813]
[Various indexed types tests fail due to trac #1331
Ian Lynagh <[EMAIL PROTECTED]>**20070505155605]
[Accept output (mdofail004)
Ian Lynagh <[EMAIL PROTECTED]>**20070505153527]
[Church2 is broken; trac #1330
Ian Lynagh <[EMAIL PROTECTED]>**20070505152441]
[Accept output
Ian Lynagh <[EMAIL PROTECTED]>**20070505150128]
[Accept output
Ian Lynagh <[EMAIL PROTECTED]>**20070505123344]
[Accept output
Ian Lynagh <[EMAIL PROTECTED]>**20070505120131]
[Add output
Ian Lynagh <[EMAIL PROTECTED]>**20070505115657]
[Accept output
Ian Lynagh <[EMAIL PROTECTED]>**20070505114604]
[Partially accept output
Ian Lynagh <[EMAIL PROTECTED]>**20070505113746]
[Accept output
Ian Lynagh <[EMAIL PROTECTED]>**20070505113048]
[Accept output for tcfail004
Ian Lynagh <[EMAIL PROTECTED]>**20070505105852]
[Track ... pretty-printer changes
Ian Lynagh <[EMAIL PROTECTED]>**20070505105355]
[stm is no longer a corelib, so needs to be reqlib'ed now
Ian Lynagh <[EMAIL PROTECTED]>**20070505004835]
[Don't dump stderr/stdout before we've split the ghci output
Ian Lynagh <[EMAIL PROTECTED]>**20070505004802
Fixes some framework failures.
]
[Fix spec001 test
Ian Lynagh <[EMAIL PROTECTED]>**20070505001103]
[Accept output
Ian Lynagh <[EMAIL PROTECTED]>**20070505000818]
[Accept output
Ian Lynagh <[EMAIL PROTECTED]>**20070504235810]
[maessen_hashtab needs QuickCheck
Ian Lynagh <[EMAIL PROTECTED]>**20070504235518]
[regex tests need regex-posix, which is no longer a corelib
Ian Lynagh <[EMAIL PROTECTED]>**20070504232505]
[Fix comment
Ian Lynagh <[EMAIL PROTECTED]>**20070504230405]
[skip cabal02 (cabal-setup isn't in the GHC tree any more)
Ian Lynagh <[EMAIL PROTECTED]>**20070504220048]
[Don't hardcode the version of base in the tests
Ian Lynagh <[EMAIL PROTECTED]>**20070504215708]
[Accept output for tcfail005
Ian Lynagh <[EMAIL PROTECTED]>**20070504092957]
[cg025 requires regex-compat, which is now an extralib
Ian Lynagh <[EMAIL PROTECTED]>**20070503225622]
[Test for Trac #1251
[EMAIL PROTECTED]
[Add test for Trac #1323
[EMAIL PROTECTED]
[Revert mistaken change to all.T
[EMAIL PROTECTED]
[Use letters to allow output to be matched up with the code more easily
Ian Lynagh <[EMAIL PROTECTED]>**20070503192604]
[Remove redundant arch-specific test files
Ian Lynagh <[EMAIL PROTECTED]>**20070503192139]
[Accept output
Ian Lynagh <[EMAIL PROTECTED]>**20070503191615]
[update: we give a diagnostic for an incorrect number in :delete now
Simon Marlow <[EMAIL PROTECTED]>**20070503151724]
[add a history test
Simon Marlow <[EMAIL PROTECTED]>**20070503151700]
[add a :list test
Simon Marlow <[EMAIL PROTECTED]>**20070503150446]
[add a test to demonstrate a new bug
Simon Marlow <[EMAIL PROTECTED]>**20070503131223]
[accept output
Simon Marlow <[EMAIL PROTECTED]>**20070503094206]
[add correct output now this test is fixed
Simon Marlow <[EMAIL PROTECTED]>**20070430110058]
[Add test for Trac #1255
[EMAIL PROTECTED]
[Add test for records and type families
[EMAIL PROTECTED]
[Accept output
Pepe Iborra <[EMAIL PROTECTED]>**20070430171655]
[Adapt some breakpoint tests to the new command syntax
Pepe Iborra <[EMAIL PROTECTED]>**20070430171643]
[add test for a new assertion failure
Simon Marlow <[EMAIL PROTECTED]>**20070427144739]
[modify test to reproduce a new bug
Simon Marlow <[EMAIL PROTECTED]>**20070426153744]
[add another test, and accept some output
Simon Marlow <[EMAIL PROTECTED]>**20070426152639]
[Fix the test I just added
Pepe Iborra <[EMAIL PROTECTED]>**20070426101615
:break qsort sets a breakpoint in the outer expression, before any variable
has been bound. Once you :step the things are bound
]
[Added a :break test
Pepe Iborra <[EMAIL PROTECTED]>**20070426085538]
[Disable the monomorphism restriction warnings in all tests
Pepe Iborra <[EMAIL PROTECTED]>**20070426084918]
[Accept output
Pepe Iborra <[EMAIL PROTECTED]>**20070425175248]
[add some :show bindings
Simon Marlow <[EMAIL PROTECTED]>**20070425130058]
[add test for a new bug
Simon Marlow <[EMAIL PROTECTED]>**20070425130031]
[this test requires an extra :step now
Simon Marlow <[EMAIL PROTECTED]>**20070425125920]
[New test covering bug discovered by Nicolas Frisby in TcUnify.boxySplitTyConApp
[EMAIL PROTECTED]
[move some dynbrk tests into the scripts/ directory
Simon Marlow <[EMAIL PROTECTED]>**20070423152829]
[add dynbrk tests, and a few more breakpoint tests
Simon Marlow <[EMAIL PROTECTED]>**20070423152031]
[Adapt commands to the new ghci debugger command-set
Pepe Iborra <[EMAIL PROTECTED]>**20070420170414]
[Accept output
Pepe Iborra <[EMAIL PROTECTED]>**20070420170311]
[Add test suggested by Doaitse Swierestra
[EMAIL PROTECTED]
[Update output
Ian Lynagh <[EMAIL PROTECTED]>**20070417151616]
[Add a test for use of fail for trac #1265
Tyson Whitehead <[EMAIL PROTECTED]>**20070410140653]
[Differentiate between use of fail and failure of code (i.e., an exception is
thrown)
Tyson Whitehead <[EMAIL PROTECTED]>**20070410140308]
[Use $(PYTHON) rather than assuming python will find it
Ian Lynagh <[EMAIL PROTECTED]>**20070417130516]
[Generate conc068 input in a more portable manner
Thorkil Naur <[EMAIL PROTECTED]>**20070417063754
The earlier method with 'yes .. | head ..' does not work on PPC Mac OS X.
]
[TAG 2007-04-17
Ian Lynagh <[EMAIL PROTECTED]>**20070417125057]
Patch bundle hash:
f20bd9a3b556ce014bc9e1b13bc6165413851aa0
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc