Commit 6d0aa9ff authored by thomie's avatar thomie

Testsuite: delete Windows line endings [skip ci] (#11631)

parent 28620ba6
-- !!! testing hGetLine -- !!! testing hGetLine
import System.IO import System.IO
-- one version of 'cat' -- one version of 'cat'
main = do main = do
let loop h = do b <- hIsEOF h let loop h = do b <- hIsEOF h
if b then return () if b then return ()
else do l <- hGetLine h; putStrLn l; loop h else do l <- hGetLine h; putStrLn l; loop h
loop stdin loop stdin
h <- openFile "hGetLine001.hs" ReadMode h <- openFile "hGetLine001.hs" ReadMode
hSetBinaryMode stdout True hSetBinaryMode stdout True
hSetBuffering h NoBuffering hSetBuffering h NoBuffering
loop h loop h
hSeek h AbsoluteSeek 0 hSeek h AbsoluteSeek 0
hSetBuffering h LineBuffering hSetBuffering h LineBuffering
loop h loop h
hSeek h AbsoluteSeek 0 hSeek h AbsoluteSeek 0
hSetBuffering h (BlockBuffering (Just 83)) hSetBuffering h (BlockBuffering (Just 83))
loop h loop h
-- !!! testing hGetLine -- !!! testing hGetLine
import System.IO import System.IO
-- one version of 'cat' -- one version of 'cat'
main = do main = do
let loop h = do b <- hIsEOF h let loop h = do b <- hIsEOF h
if b then return () if b then return ()
else do l <- hGetLine h; putStrLn l; loop h else do l <- hGetLine h; putStrLn l; loop h
loop stdin loop stdin
h <- openFile "hGetLine001.hs" ReadMode h <- openFile "hGetLine001.hs" ReadMode
hSetBinaryMode stdout True hSetBinaryMode stdout True
hSetBuffering h NoBuffering hSetBuffering h NoBuffering
loop h loop h
hSeek h AbsoluteSeek 0 hSeek h AbsoluteSeek 0
hSetBuffering h LineBuffering hSetBuffering h LineBuffering
loop h loop h
hSeek h AbsoluteSeek 0 hSeek h AbsoluteSeek 0
hSetBuffering h (BlockBuffering (Just 83)) hSetBuffering h (BlockBuffering (Just 83))
loop h loop h
-- !!! testing hGetLine -- !!! testing hGetLine
import System.IO import System.IO
-- one version of 'cat' -- one version of 'cat'
main = do main = do
let loop h = do b <- hIsEOF h let loop h = do b <- hIsEOF h
if b then return () if b then return ()
else do l <- hGetLine h; putStrLn l; loop h else do l <- hGetLine h; putStrLn l; loop h
loop stdin loop stdin
h <- openFile "hGetLine001.hs" ReadMode h <- openFile "hGetLine001.hs" ReadMode
hSetBinaryMode stdout True hSetBinaryMode stdout True
hSetBuffering h NoBuffering hSetBuffering h NoBuffering
loop h loop h
hSeek h AbsoluteSeek 0 hSeek h AbsoluteSeek 0
hSetBuffering h LineBuffering hSetBuffering h LineBuffering
loop h loop h
hSeek h AbsoluteSeek 0 hSeek h AbsoluteSeek 0
hSetBuffering h (BlockBuffering (Just 83)) hSetBuffering h (BlockBuffering (Just 83))
loop h loop h
-- !!! testing hGetLine -- !!! testing hGetLine
import System.IO import System.IO
-- one version of 'cat' -- one version of 'cat'
main = do main = do
let loop h = do b <- hIsEOF h let loop h = do b <- hIsEOF h
if b then return () if b then return ()
else do l <- hGetLine h; putStrLn l; loop h else do l <- hGetLine h; putStrLn l; loop h
loop stdin loop stdin
h <- openFile "hGetLine001.hs" ReadMode h <- openFile "hGetLine001.hs" ReadMode
hSetBinaryMode stdout True hSetBinaryMode stdout True
hSetBuffering h NoBuffering hSetBuffering h NoBuffering
loop h loop h
hSeek h AbsoluteSeek 0 hSeek h AbsoluteSeek 0
hSetBuffering h LineBuffering hSetBuffering h LineBuffering
loop h loop h
hSeek h AbsoluteSeek 0 hSeek h AbsoluteSeek 0
hSetBuffering h (BlockBuffering (Just 83)) hSetBuffering h (BlockBuffering (Just 83))
loop h loop h
Left openFile003Dir: openFile: permission denied (Permission denied) Left openFile003Dir: openFile: permission denied (Permission denied)
Left openFile003Dir: openFile: permission denied (Permission denied) Left openFile003Dir: openFile: permission denied (Permission denied)
Left openFile003Dir: openFile: permission denied (Permission denied) Left openFile003Dir: openFile: permission denied (Permission denied)
Left openFile003Dir: openFile: permission denied (Permission denied) Left openFile003Dir: openFile: permission denied (Permission denied)
sind 1.0e20 sind 1.0e20
-0.7304509250633894 -0.7304509250633894
-0.7469218912594929 -0.7469218912594929
(-6579317027855829,-53) (-6579317027855829,-53)
(-6727674302302237,-53) (-6727674302302237,-53)
cosd 1.0e20 cosd 1.0e20
-0.6829651865754496 -0.6829651865754496
-0.6649117899070088 -0.6649117899070088
(-6151603519536432,-53) (-6151603519536432,-53)
(-5988992978518909,-53) (-5988992978518909,-53)
tand 1.0e20 tand 1.0e20
1.0695287833425957 1.0695287833425957
1.123339821307656 1.123339821307656
(4816729430123734,-52) (4816729430123734,-52)
(5059072800651599,-52) (5059072800651599,-52)
Done Done
arrowfail002.hs:6:17: error: Variable not in scope: x :: Int arrowfail002.hs:6:17: error: Variable not in scope: x :: Int
install1: install1:
bin bin
test-1.0 test-1.0
install2: install2:
bin bin
test-1.0 test-1.0
dist: dist:
build build
package.conf.inplace package.conf.inplace
setup-config setup-config
src src
test-1.0.tar.gz test-1.0.tar.gz
Before Before
After 2000 , 2001 After 2000 , 2001
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 type declaration for `DList'
T2604.hs:9:38:
Can't make a derived instance of `Typeable (NList a)'
(even with cunning newtype deriving):
You need -XDeriveDataTypeable to derive an instance for this class
In the newtype declaration for `NList'
T9968a.hs:8:13: error: T9968a.hs:8:13: error:
• Can't make a derived instance of ‘Bifunctor Blah’: • Can't make a derived instance of ‘Bifunctor Blah’:
‘Bifunctor’ is not a standard derivable class (Eq, Show, etc.) ‘Bifunctor’ is not a standard derivable class (Eq, Show, etc.)
The last argument of class ‘Bifunctor’ does not have kind * or (* -> *) The last argument of class ‘Bifunctor’ does not have kind * or (* -> *)
• In the data declaration for ‘Blah’ • In the data declaration for ‘Blah’
drvfail006.hs:9:45: drvfail006.hs:9:45:
Can't make a derived instance of `MonadState T' Can't make a derived instance of `MonadState T'
(even with cunning newtype deriving): (even with cunning newtype deriving):
`MonadState' does not have arity 1 `MonadState' does not have arity 1
In the newtype declaration for `T' In the newtype declaration for `T'
show (:=:) = (:=:) show (:=:) = (:=:)
read (show (:=:)) :: T = (:=:) read (show (:=:)) :: T = (:=:)
#include <stdio.h> #include <stdio.h>
void __attribute__((stdcall)) test(int arg) void __attribute__((stdcall)) test(int arg)
{ {
printf("The argument passed was %i\n", arg ); printf("The argument passed was %i\n", arg );
} }
#include <stdio.h> #include <stdio.h>
void __attribute__((stdcall)) test(int arg) void __attribute__((stdcall)) test(int arg)
{ {
printf("The argument passed was %i\n", arg ); printf("The argument passed was %i\n", arg );
} }
#include <stdio.h> #include <stdio.h>
void __attribute__((stdcall)) test(int arg) void __attribute__((stdcall)) test(int arg)
{ {
printf("The argument passed was %i\n", arg ); printf("The argument passed was %i\n", arg );
} }
#include <stdio.h> #include <stdio.h>
void __attribute__((stdcall)) test(int arg) void __attribute__((stdcall)) test(int arg)
{ {
printf("The argument passed was %i\n", arg ); printf("The argument passed was %i\n", arg );
} }
#include "ffi014_cbits.h" #include "ffi014_cbits.h"
void callC( FUNC* f) { void callC( FUNC* f) {
int i; int i;
for(i=0;i<1000;i++) f(); for(i=0;i<1000;i++) f();
} }
typedef void FUNC(); typedef void FUNC();
void callC( FUNC* f); void callC( FUNC* f);
T3163.hs:8:5: error: T3163.hs:8:5: error:
• Illegal polymorphic type: forall s. s • Illegal polymorphic type: forall s. s
• In the definition of data constructor ‘Unreached’ • In the definition of data constructor ‘Unreached’
In the data type declaration for ‘Taker’ In the data type declaration for ‘Taker’
(True,[A1],False,B2 "hello" B1,[B1,B2 A1 B1,B2 A1 (B2 A1 B1)],False,C2 "hello" C1,True,E1 ["hello"]) (True,[A1],False,B2 "hello" B1,[B1,B2 A1 B1,B2 A1 (B2 A1 B1)],False,C2 "hello" C1,True,E1 ["hello"])
Test10278.hs:9:27: error: Test10278.hs:9:27: error:
Not in scope: type constructor or class ‘Tower’ Not in scope: type constructor or class ‘Tower’
Test10278.hs:9:39: error: Test10278.hs:9:39: error:
Not in scope: type constructor or class ‘Tower’ Not in scope: type constructor or class ‘Tower’
Test10278.hs:10:34: error: Test10278.hs:10:34: error:
Not in scope: type constructor or class ‘Tower’ Not in scope: type constructor or class ‘Tower’
Test10278.hs:10:46: error: Test10278.hs:10:46: error:
Not in scope: type constructor or class ‘Tower’ Not in scope: type constructor or class ‘Tower’
fromList "abc" fromList "abc"
l = Data.Sequence.Seq (Data.Sequence.Deep l = Data.Sequence.Seq (Data.Sequence.Deep
3 (Data.Sequence.One (Data.Sequence.Elem 'a')) Data.Sequence.Empty 3 (Data.Sequence.One (Data.Sequence.Elem 'a')) Data.Sequence.Empty
(Data.Sequence.Two (Data.Sequence.Two
(Data.Sequence.Elem 'b') (Data.Sequence.Elem 'c'))) (Data.Sequence.Elem 'b') (Data.Sequence.Elem 'c')))
l = fromList "abc" l = fromList "abc"
Bar.hs:3:7: error: Variable not in scope: nonexistent Bar.hs:3:7: error: Variable not in scope: nonexistent
-- See Trac #11098 -- See Trac #11098
:set -XTemplateHaskell :set -XTemplateHaskell
:set -XNamedWildCards :set -XNamedWildCards
:set -XScopedTypeVariables :set -XScopedTypeVariables
:m +Data.Char :m +Data.Char
:m +Language.Haskell.TH :m +Language.Haskell.TH
runQ [d|foo :: a -> a;foo x = x|] runQ [d|foo :: a -> a;foo x = x|]
runQ $ fmap (filter (not . isDigit) . show) [d|foo :: _a -> _a; foo x = x|] runQ $ fmap (filter (not . isDigit) . show) [d|foo :: _a -> _a; foo x = x|]
runQ [d|foo :: forall _a . _a -> _a ; foo x = x|] runQ [d|foo :: forall _a . _a -> _a ; foo x = x|]
<interactive>:1:1: error: Variable not in scope: α <interactive>:1:1: error: Variable not in scope: α
:set -XTemplateHaskell :set -XTemplateHaskell
Language.Haskell.TH.runQ [d| instance Monad ((,) a) where { return = undefined; (>>=) = undefined } |] Language.Haskell.TH.runQ [d| instance Monad ((,) a) where { return = undefined; (>>=) = undefined } |]
:set -XTemplateHaskell :set -XTemplateHaskell
Language.Haskell.TH.runQ $ [d| f = undefined; class Foo x where { f :: x -> x }; instance Foo Int where { f = id } |] Language.Haskell.TH.runQ $ [d| f = undefined; class Foo x where { f :: x -> x }; instance Foo Int where { f = id } |]
:{ :{
let { a = True let { a = True
; b = False ; b = False
} }
:} :}
print (a,b) print (a,b)
:{ :{
:type :type
id id
:} :}
<interactive>:1:1: error: Variable not in scope: map <interactive>:1:1: error: Variable not in scope: map
<interactive>:1:1: error: Variable not in scope: x <interactive>:1:1: error: Variable not in scope: x
"First" "First"
"First" "First"
"First" "First"
"Fourth" "Fourth"
T11361a.hs:7:3: error: T11361a.hs:7:3: error:
• Kind mis-match on LHS of default declaration for ‘F’ • Kind mis-match on LHS of default declaration for ‘F’
• In the default type instance declaration for ‘F’ • In the default type instance declaration for ‘F’
In the class declaration for ‘C’ In the class declaration for ‘C’
SimpleFail15.hs:5:8: error: SimpleFail15.hs:5:8: error:
• Illegal qualified type: (a ~ b) => t • Illegal qualified type: (a ~ b) => t
Perhaps you intended to use RankNTypes or Rank2Types Perhaps you intended to use RankNTypes or Rank2Types
• In the type signature: • In the type signature:
foo :: (a, b) -> (a ~ b => t) -> (a, b) foo :: (a, b) -> (a ~ b => t) -> (a, b)
T10899.hs:7:3: error: T10899.hs:7:3: error:
• Illegal polymorphic type: forall (m :: * -> *). m a • Illegal polymorphic type: forall (m :: * -> *). m a
• In the class declaration for ‘C’ • In the class declaration for ‘C’
T11136.hs:7:3: error: T11136.hs:7:3: error:
• Number of parameters must match family declaration; expected 1 • Number of parameters must match family declaration; expected 1
• In the default type instance declaration for ‘D’ • In the default type instance declaration for ‘D’
In the class declaration for ‘C’ In the class declaration for ‘C’
mod110.hs:11:10: error: mod110.hs:11:10: error:
Ambiguous occurrence ‘Eq’ Ambiguous occurrence ‘Eq’
It could refer to either ‘Prelude.Eq’, It could refer to either ‘Prelude.Eq’,
imported from ‘Prelude’ at mod110.hs:4:1-14 imported from ‘Prelude’ at mod110.hs:4:1-14
(and originally defined in ‘GHC.Classes’) (and originally defined in ‘GHC.Classes’)
or ‘M.Eq’, defined at mod110.hs:7:1 or ‘M.Eq’, defined at mod110.hs:7:1
mod120.hs:5:5: error: Data constructor not in scope: Foo mod120.hs:5:5: error: Data constructor not in scope: Foo
mod138.hs:7:5: error: Variable not in scope: isLatin1 mod138.hs:7:5: error: Variable not in scope: isLatin1
mod151.hs:2:20: error: mod151.hs:2:20: error:
Ambiguous occurrence ‘id’ Ambiguous occurrence ‘id’
It could refer to either ‘Prelude.id’, It could refer to either ‘Prelude.id’,
imported from ‘Prelude’ at mod151.hs:2:8 imported from ‘Prelude’ at mod151.hs:2:8
(and originally defined in ‘GHC.Base’) (and originally defined in ‘GHC.Base’)
or ‘M.id’, defined at mod151.hs:2:30 or ‘M.id’, defined at mod151.hs:2:30
mod152.hs:2:26: error: mod152.hs:2:26: error:
Ambiguous occurrence ‘id’ Ambiguous occurrence ‘id’
It could refer to either ‘Prelude.id’, It could refer to either ‘Prelude.id’,
imported from ‘Prelude’ at mod152.hs:2:8 imported from ‘Prelude’ at mod152.hs:2:8
(and originally defined in ‘GHC.Base’) (and originally defined in ‘GHC.Base’)
or ‘M.id’, defined at mod152.hs:2:36 or ‘M.id’, defined at mod152.hs:2:36
mod153.hs:2:11: error: mod153.hs:2:11: error:
Ambiguous occurrence ‘id’ Ambiguous occurrence ‘id’
It could refer to either ‘Prelude.id’, It could refer to either ‘Prelude.id’,
imported from ‘Prelude’ at mod153.hs:2:8 imported from ‘Prelude’ at mod153.hs:2:8
(and originally defined in ‘GHC.Base’) (and originally defined in ‘GHC.Base’)
or ‘M.id’, defined at mod153.hs:2:21 or ‘M.id’, defined at mod153.hs:2:21
mod158.hs:12:5: error: Data constructor not in scope: C mod158.hs:12:5: error: Data constructor not in scope: C
exit(1) exit(1)
mod48.hs:5:3: error: mod48.hs:5:3: error:
Pattern bindings (except simple variables) not allowed in class declaration: Pattern bindings (except simple variables) not allowed in class declaration:
(x, y) = error "foo" (x, y) = error "foo"
mod98.hs:3:1: error: mod98.hs:3:1: error:
Invalid type signature: M.x :: ... Invalid type signature: M.x :: ...
Should be of form <variable> :: <type> Should be of form <variable> :: <type>
NoPatternSynonyms.hs:3:1: error: NoPatternSynonyms.hs:3:1: error:
Invalid type signature: pattern P :: ... Invalid type signature: pattern P :: ...
Perhaps you meant to use PatternSynonyms? Perhaps you meant to use PatternSynonyms?