Commit 1a8269a3 authored by Ian Lynagh's avatar Ian Lynagh

Remove NewQualifiedOperators tests (extension no longer supported)

parent 4181ff31
......@@ -76,7 +76,6 @@ test('read061', normal, compile, [''])
test('read062', normal, compile, [''])
test('read063', normal, compile, [''])
test('read064', normal, compile, [''])
test('read065', omit_ways(['optc', 'profc']), compile, [''])
test('read066', normal, compile, [''])
test('read067', normal, compile, [''])
test('read068', normal, compile, [''])
......
{-# LANGUAGE NewQualifiedOperators,TypeOperators #-}
-- tests for new qualified operator syntax
module Test where
-- test the different combinations of qualification/infix for varsyms
(*!*) :: Int -> Int -> Int
0 *!* b = b
(*!*) a b = a + b
f3 = (
1 *!* 2,
(*!*) 1 2,
Test.(*!*) 1 2,
-- 1 `(*!*)` 2,
1 `Test.(*!*)` 2
)
-- test the different combinations of qualification/infix for type and
-- data constructors.
data a :- b = a :- b
data (:--) a b = (:--) a b
f5 :: (
Int :-- Float,
(:--) Int Float,
Test.(:--) Int Float,
-- Int `(:--)` Float,
Int `Test.(:--)` Float
)
f5 = (
1 :-- 1.0,
(:--) 1 1.0,
Test.(:--) 1 1.0,
-- 1 `(:--)` 1.0,
1 `Test.(:--)` 1.0
)
-- sections
subtract :: Int -> Int -> Int
subtract y = (`Prelude.(-)` y)
minus :: Int -> Int -> Int
minus y = (y `Prelude.(-)`)
-- infix qualified ops retain their precedence and associativity
f1 :: Int -> Int -> Int
f1 x y = x `Prelude.(*)` y `Prelude.(+)` x `Prelude.(*)` y
-- misc tests
f2 = [False..] -- means qualified '.' in Haskell 98
read065.hs:1:14:
Warning: -XNewQualifiedOperators is deprecated: The new qualified operator syntax was rejected by Haskell'
......@@ -48,7 +48,6 @@ test('readFail041', normal, compile_fail, [''])
test('readFail042', normal, compile_fail, [''])
test('readFail043', normal, compile_fail, [''])
test('readFail044', normal, compile_fail, [''])
test('readFail045', normal, compile_fail, [''])
test('readFail046', normal, compile_fail, [''])
test('T3095', normal, compile_fail, [''])
test('T3153', normal, compile_fail, [''])
......
{-# LANGUAGE NewQualifiedOperators #-}
-- tests for new qualified operator syntax
module ShouldFail where
add x y = x `Prelude.+` y
readFail045.hs:1:14:
Warning: -XNewQualifiedOperators is deprecated: The new qualified operator syntax was rejected by Haskell'
readFail045.hs:6:21: parse error on input `.+'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment