Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
4671b8bc
Commit
4671b8bc
authored
Sep 16, 1999
by
sof
Browse files
[project @ 1999-09-16 17:38:12 by sof]
Bunch of H98 tests I had lying about
parent
e65ffcc4
Changes
14
Hide whitespace changes
Inline
Side-by-side
ghc/tests/rename/should_compile/Makefile
View file @
4671b8bc
...
...
@@ -5,6 +5,7 @@ include $(TOP)/mk/should_compile.mk
SRC_HC_OPTS
+=
-noC
-dcore-lint
rn017_HC_OPTS
=
-hi
-hi-with-exports
rn025_HC_OPTS
=
-hi
-hi-with-exports
include
$(TOP)/mk/target.mk
...
...
ghc/tests/rename/should_compile/rn025.hs
0 → 100644
View file @
4671b8bc
-- !!! Re-exporting a module whose contents is partially hidden.
module
ShouldSucceed
(
module
List
)
where
import
List
hiding
(
sort
)
ghc/tests/rename/should_compile/rn025.stderr
0 → 100644
View file @
4671b8bc
ghc: module version changed to 1; reason: no old .hi file
__export List delete deleteBy deleteFirstsBy elemIndex elemIndices find findIndex findIndices genericDrop genericIndex genericLength genericReplicate genericSplitAt genericTake group groupBy inits insert insertBy intersect intersectBy intersperse isPrefixOf isSuffixOf mapAccumL mapAccumR maximumBy minimumBy nub nubBy partition sortBy tails transpose unfoldr union unionBy unzzip4 unzzip5 unzzip6 unzzip7 zrzr zzip4 zzip5 zzip6 zzip7 zzipWith4 zzipWith5 zzipWith6 zzipWith7;
__export PrelBase ZMZN{ZMZN ZC} foldr map zpzp;
__export PrelList all and any break concat concatMap cycle drop dropWhile elem filter foldl foldl1 foldr1 head init iterate last length lookup maximum minimum notElem null or repeat replicate reverse scanl scanl1 scanr scanr1 span splitAt tail take takeWhile unzzip unzzip3 znzn zzip zzip3 zzipWith zzipWith3;
__export PrelShow lines unlines unwords words;
__export Prelude product sum;
ghc/tests/rename/should_compile/rn026.hs
0 → 100644
View file @
4671b8bc
-- !!! Checking that more than imported module can share a local
-- !!! local alias.
module
ShouldSucceed
where
import
qualified
List
as
X
import
qualified
Maybe
as
X
x
::
Ord
a
=>
[
a
]
->
[
a
]
x
=
X
.
sort
y
::
Maybe
a
->
Bool
y
=
X
.
isJust
ghc/tests/rename/should_compile/rn027.hs
0 → 100644
View file @
4671b8bc
-- !!! Checking that an imported module may still have
-- !!! a local alias without having used 'qualified'.
module
ShouldSucceed
where
import
List
as
X
import
Maybe
as
X
x
::
Ord
a
=>
[
a
]
->
[
a
]
x
=
X
.
sort
y
::
Maybe
a
->
Bool
y
=
X
.
isJust
ghc/tests/rename/should_compile/rn028.hs
0 → 100644
View file @
4671b8bc
-- !!! Checking that a toplevel declaration 'f' in module M is accessible
-- !!! as both 'f' and 'M.f' within the scope of M. Similarly for imported
-- !!! entities.
module
ShouldSucceed
where
import
List
(
sort
)
x
::
Int
x
=
2
y
::
Int
y
=
x
z
::
Int
z
=
ShouldSucceed
.
x
sortOf
::
Ord
a
=>
[
a
]
->
[
a
]
sortOf
=
List
.
sort
ghc/tests/rename/should_compile/rn029.hs
0 → 100644
View file @
4671b8bc
-- !!! Checking that lazy name clashing work.
module
ShouldSucceed
where
import
List
(
sort
)
ShouldSucceed
.
sort
::
Int
ShouldSucceed
.
sort
=
3
ghc/tests/rename/should_compile/rn030.hs
0 → 100644
View file @
4671b8bc
-- !!! Checking that more than imported module can share a local
-- !!! local alias.
module
ShouldSucceed
where
import
qualified
List
as
X
import
qualified
Maybe
as
X
x
::
Ord
a
=>
[
a
]
->
[
a
]
x
=
X
.
sort
y
::
Maybe
a
->
Bool
y
=
X
.
isJust
ghc/tests/rename/should_compile/rn031.hs
0 → 100644
View file @
4671b8bc
-- !!! Checking that an imported module may still have
-- !!! a local alias without having used 'qualified'.
module
ShouldSucceed
where
import
List
as
X
import
Maybe
as
X
x
::
Ord
a
=>
[
a
]
->
[
a
]
x
=
X
.
sort
y
::
Maybe
a
->
Bool
y
=
isJust
ghc/tests/rename/should_compile/rn032.hs
0 → 100644
View file @
4671b8bc
-- !!! Checking that a toplevel declaration 'f' in module M is accessible
-- !!! as both 'f' and 'M.f' within the scope of M. Similarly for imported
-- !!! entities.
module
ShouldSucceed
where
import
List
(
sort
)
x
::
Int
x
=
2
y
::
Int
y
=
x
z
::
Int
z
=
ShouldSucceed
.
x
sortOf
::
Ord
a
=>
[
a
]
->
[
a
]
sortOf
=
List
.
sort
ghc/tests/rename/should_compile/rn033.hs
0 → 100644
View file @
4671b8bc
-- !!! Checking that lazy name clashing work.
module
ShouldSucceed
where
import
List
(
sort
)
ShouldSucceed
.
sort
::
Int
ShouldSucceed
.
sort
=
3
ghc/tests/rename/should_compile/rn034.hs
0 → 100644
View file @
4671b8bc
-- !!! Checking that empty declarations are permitted.
module
ShouldSucceed
where
class
Foo
a
where
class
Foz
a
x
=
2
where
y
=
3
instance
Foo
Int
where
ghc/tests/rename/should_compile/rn035.hs
0 → 100644
View file @
4671b8bc
-- !!! Checking what's legal in the body of a class declaration.
module
ShouldSucceed
where
class
Foo
a
where
{
(
--<>--
)
::
a
->
a
->
Int
;
infixl
5
--<>--
;
(
--<>--
)
_
_
=
2
;
-- empty decl at the end.
};
ghc/tests/rename/should_compile/rn036.hs
0 → 100644
View file @
4671b8bc
-- !!! Checking that qualified method names are legal in instance body.
module
ShouldSucceed
where
import
Prelude
hiding
(
Eq
,
(
==
))
import
Prelude
as
P
(
Eq
,(
==
))
data
Foo
=
Foo
Int
Integer
instance
P
.
Eq
Foo
where
(
Foo
a1
b1
)
P
.==
(
Foo
a2
b2
)
=
a1
P
.==
a2
&&
b1
P
.==
b2
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment