Commit 3dc12025 authored by thomie's avatar thomie
Browse files

Testsuite: tabs -> spaces [skip ci]

parent cf6e6569
......@@ -9,8 +9,8 @@ f y = y
f z = z
g x y z | True = f z
| True = f z
| True = f z
| True = f z
| True = f z
g x y z | True = f z
| True = f z
| True = f z
| True = f z
| True = f z
......@@ -2,7 +2,7 @@
--
module ShouldCompile where
f [] y True = []
f x a@(y,ys) ~z = []
f (x:x1:x2:x3) ~(y,ys) z = []
f x y True = []
f [] y True = []
f x a@(y,ys) ~z = []
f (x:x1:x2:x3) ~(y,ys) z = []
f x y True = []
......@@ -6,4 +6,4 @@ module ShouldCompile where
nodups [] = []
nodups [x] = [x]
nodups (y:x:xs) | y == x = nodups (x:xs)
| True = y : nodups (x:xs)
| True = y : nodups (x:xs)
......@@ -3,13 +3,13 @@
module ShouldCompile where
z = [ (a,b,c,d,e,f,g,h,i,j) | a <- "12",
b <- "12",
c <- "12",
d <- "12",
e <- "12",
f <- "12",
g <- "12",
h <- "12",
i <- "12",
j <- "12"
b <- "12",
c <- "12",
d <- "12",
e <- "12",
f <- "12",
g <- "12",
h <- "12",
i <- "12",
j <- "12"
]
......@@ -8,8 +8,8 @@ b = "b"
c = a:b
d = b ++ b
b1 = "" -- examples from the Haskell report
b2 = "\&" -- the same thing
b1 = "" -- examples from the Haskell report
b2 = "\&" -- the same thing
b3 = "\SO\&H" ++ "\137\&9"
a000 = '\NUL'
......@@ -51,21 +51,21 @@ a134 = '\\'
a177 = '\DEL'
ascii = "\NUL\SOH\STX\ETX\EOT\ENQ\ACK\BEL\
\\BS\HT\LF\VT\FF\CR\SO\SI\
\\DLE\DC1\DC2\DC3\DC4\NAK\SYN\ETB\
\\CAN\EM\SUB\ESC\FS\GS\RS\US\
\\SP!\"#$%&'\
\()*+,-./\
\01234567\
\89:;<=>?\
\@ABCDEFG\
\HIJKLMNO\
\PQRSTUVW\
\XYZ[\\]^_\
\`abcdefg\
\hijklmno\
\pqrstuvw\
\xyz{|}~\DEL"
\\BS\HT\LF\VT\FF\CR\SO\SI\
\\DLE\DC1\DC2\DC3\DC4\NAK\SYN\ETB\
\\CAN\EM\SUB\ESC\FS\GS\RS\US\
\\SP!\"#$%&'\
\()*+,-./\
\01234567\
\89:;<=>?\
\@ABCDEFG\
\HIJKLMNO\
\PQRSTUVW\
\XYZ[\\]^_\
\`abcdefg\
\hijklmno\
\pqrstuvw\
\xyz{|}~\DEL"
na200 = '\o200'
na250 = '\o250'
......
......@@ -4,12 +4,12 @@ module ShouldCompile where
f x y z =
case ( x ++ x ++ x ++ x ++ x ) of
[] -> []
[a] -> error "2"
[a,b,c] ->
case ( (y,z,y,z) ) of
-- (True, _, False, _) | True == False -> z
-- (True, _, False, _) | True == False -> z
_ -> z
[] -> []
[a] -> error "2"
[a,b,c] ->
case ( (y,z,y,z) ) of
-- (True, _, False, _) | True == False -> z
-- (True, _, False, _) | True == False -> z
_ -> z
(a:bs) -> error "4"
(a:bs) -> error "4"
......@@ -4,9 +4,9 @@ module ShouldCompile where
f x y z
= let
a = x : []
b = x : a
c = y (let d = (z, z) in d)
result = (c, b)
a = x : []
b = x : a
c = y (let d = (z, z) in d)
result = (c, b)
in
result
result
......@@ -5,7 +5,7 @@ module ShouldCompile where
-- exprs
f x y z = [x,y,z,x,y,z]
f2 x y = []
f2 x y = []
g1 x y = ()
......@@ -13,30 +13,30 @@ g1 x y = ()
and probably won't in the near future, so this test is only a reminder.
g x y z = (x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z) -- hey, we love big tuples
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z,
x,y,z,x,y,z) -- hey, we love big tuples
-}
-- pats
......
......@@ -13,8 +13,8 @@ b ~(~x: ~xs: ~ys) = []
c ~x ~ _ ~11111 ~3.14159265 = x
d 11 = 4
d 12 = 3
d 11 = 4
d 12 = 3
d ~(n+4) = 2
d ~(n+43) = 1
d ~(n+999) = 0
......@@ -33,25 +33,25 @@ g ~(~(~(~([])))) = []
(~x: ~xs: ~ys) = []
(x2 : xs2: ys2) | eq2 = []
| eq3 = [x2]
| eq4 = [x2]
| True = []
where
eq2 = (2::Int) == (4::Int)
eq3 = (3::Int) == (3::Int)
eq4 = (4::Int) == (2::Int)
| eq3 = [x2]
| eq4 = [x2]
| True = []
where
eq2 = (2::Int) == (4::Int)
eq3 = (3::Int) == (3::Int)
eq4 = (4::Int) == (2::Int)
(x3,y3) | x3 > 3 = (4, 5)
| x3 <= 3 = (2, 3)
-- above: x & y should both be \bottom.
(x4,(y4,(z4,a4))) | eq2 = ('a',('a',('a','a')))
| eq3 = ('b',('b',('b','b')))
| eq4 = ('c',('c',('c','c')))
| True = ('d',('d',('d','d')))
where
eq2 = (2::Int) == (4::Int)
eq3 = (3::Int) == (3::Int)
eq4 = (4::Int) == (2::Int)
| eq3 = ('b',('b',('b','b')))
| eq4 = ('c',('c',('c','c')))
| True = ('d',('d',('d','d')))
where
eq2 = (2::Int) == (4::Int)
eq3 = (3::Int) == (3::Int)
eq4 = (4::Int) == (2::Int)
......@@ -3,6 +3,6 @@
module ShouldCompile where
f x y z | x == y = []
| x /= z = []
| True = []
| False = []
| x /= z = []
| True = []
| False = []
......@@ -14,10 +14,10 @@ g 22222222222222222222222 2.22222222222222222 = []
g 33333333333333333333333 3.33333333333333333 = []
g 44444444444444444444444 4.44444444444444444 = []
h 'a' "" = []
h '\'' "foo" = []
h '"' ('b':'a':'r':[]) = []
h '\o250' blob = []
h 'a' "" = []
h '\'' "foo" = []
h '"' ('b':'a':'r':[]) = []
h '\o250' blob = []
i 1 1.1 = []
i 2 2.2 = []
......@@ -27,8 +27,8 @@ i 2 2.20000 = []
{-
j one@1 oneone@1.1
| ((fromFloat oneone) - (fromIntegral (fromInt one)))
/= (fromIntegral (fromInt 0)) = []
/= (fromIntegral (fromInt 0)) = []
j two@2 twotwo@2.2
| ((fromFloat twotwo) * (fromIntegral (fromInt 2)))
== (fromIntegral (fromInt 4.4)) = []
== (fromIntegral (fromInt 4.4)) = []
-}
......@@ -2,6 +2,6 @@
--
module ShouldCompile where
f x = g (x == x) x
g b x = abs (f x)
--g b x = (f x) + (f x)
f x = g (x == x) x
g b x = abs (f x)
--g b x = (f x) + (f x)
......@@ -6,8 +6,8 @@ module ShouldCompile where
-- when the first row of pats doesn't have convenient
-- variables to grab...
mAp f [] = []
mAp f (x:xs) = f x : mAp f xs
mAp f [] = []
mAp f (x:xs) = f x : mAp f xs
True |||| _ = True
False |||| x = x
True |||| _ = True
False |||| x = x
......@@ -5,5 +5,5 @@ module ShouldCompile where
f x = y
where (y,z) | y < z = (0,1)
| y > z = (1,2)
| True = (2,3)
| y > z = (1,2)
| True = (2,3)
......@@ -3,9 +3,9 @@
module ShouldCompile where
flatten :: Int -- Indentation
-> Bool -- True => just had a newline
-> Float -- Current seq to flatten
flatten :: Int -- Indentation
-> Bool -- True => just had a newline
-> Float -- Current seq to flatten
-> [(Int,Float)]-- Work list with indentation
-> String
......
......@@ -15,9 +15,9 @@ clen CNil = 0#
clen (CCons _ cl) = 1# +# (clen cl)
main = putStr (case len4_twice of
8# -> "bingo\n"
_ -> "oops\n")
8# -> "bingo\n"
_ -> "oops\n")
where
list4 = mk 4#
!len4 = clen list4
!len4_twice = len4 +# len4
list4 = mk 4#
!len4 = clen list4
!len4_twice = len4 +# len4
......@@ -8,8 +8,8 @@ Date: 10 Mar 1992 17:17:21 GMT
Will,
I have just started using Haskell at York and have found a compilation
error in the code below which disappears when the last line is
I have just started using Haskell at York and have found a compilation
error in the code below which disappears when the last line is
commented out
-}
......@@ -33,11 +33,11 @@ Dave
-----------------------------------------------------------------------
David Cattrall Telephone +44 904 432777
Department of Computer Science
University of York JANET: dmc@uk.ac.york.minster
David Cattrall Telephone +44 904 432777
Department of Computer Science
University of York JANET: dmc@uk.ac.york.minster
YORK Y01 5DD
United Kingdom UUNET: uucp!ukc!minster!dmc
United Kingdom UUNET: uucp!ukc!minster!dmc
-----------------------------------------------------------------------
-}
......
......@@ -8,11 +8,11 @@ module ShouldCompile where
main = print ((4::Int) ^^^^ (6::Int))
(^^^^) :: (Num a, Integral b) => a -> b -> a
x ^^^^ 0 = 1
x ^^^^ (n+1) = f x n x
where f _ 0 y = y
f x n y = g x n where
g x n | even n = g (x*x) (n `quot` 2)
| otherwise = f x (n-1) (x*y)
_ ^^^^ _ = error "(^^^^){Prelude}: negative exponent"
(^^^^) :: (Num a, Integral b) => a -> b -> a
x ^^^^ 0 = 1
x ^^^^ (n+1) = f x n x
where f _ 0 y = y
f x n y = g x n where
g x n | even n = g (x*x) (n `quot` 2)
| otherwise = f x (n-1) (x*y)
_ ^^^^ _ = error "(^^^^){Prelude}: negative exponent"
{-# LANGUAGE DatatypeContexts #-}
{- In 2.05 this one crashed with
Fail: "basicTypes/Id.lhs", line 990: incomplete pattern(s)
to match in function "dataConFieldLabels"
Fail: "basicTypes/Id.lhs", line 990: incomplete pattern(s)
to match in function "dataConFieldLabels"
Reason: dsExpr (RecordCon ...) didn't extract
the constructor properly.
Reason: dsExpr (RecordCon ...) didn't extract
the constructor properly.
-}
module ShouldCompile where
......
......@@ -6,9 +6,9 @@ module Foo where
g :: Int -> Int
g (x+1) = x
g y = y
g _ = 0 -- Overlapped
g y = y
g _ = 0 -- Overlapped
h :: Int -> Int
h (x+1) = x
h _ = 0 -- Not overlapped
h _ = 0 -- Not overlapped
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