Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
f3262fe8
Commit
f3262fe8
authored
Jul 29, 2014
by
Gergő Érdi
Browse files
Add test cases for explicitly-bidirectional pattern synonym
parent
32bf8a5f
Changes
6
Hide whitespace changes
Inline
Side-by-side
testsuite/.gitignore
View file @
f3262fe8
...
...
@@ -1068,6 +1068,8 @@ mk/ghcconfig_*_inplace_bin_ghc-stage2.exe.mk
/tests/parser/unicode/1744
/tests/parser/unicode/T1744
/tests/parser/unicode/utf8_024
/tests/patsyn/should_run/bidir-explicit
/tests/patsyn/should_run/bidir-explicit-scope
/tests/patsyn/should_run/eval
/tests/patsyn/should_run/ex-prov
/tests/patsyn/should_run/ex-prov-run
...
...
testsuite/tests/patsyn/should_run/all.T
View file @
f3262fe8
test
('
eval
',
normal
,
compile_and_run
,
[''])
test
('
match
',
normal
,
compile_and_run
,
[''])
test
('
ex-prov-run
',
normal
,
compile_and_run
,
[''])
test
('
bidir-explicit
',
normal
,
compile_and_run
,
[''])
test
('
bidir-explicit-scope
',
normal
,
compile_and_run
,
[''])
testsuite/tests/patsyn/should_run/bidir-explicit-scope.hs
0 → 100644
View file @
f3262fe8
{-# LANGUAGE PatternSynonyms #-}
module
Main
where
pattern
First
x
<-
x
:
_
where
First
x
=
foo
[
x
,
x
,
x
]
foo
::
[
a
]
->
[
a
]
foo
xs
@
(
First
x
)
=
replicate
(
length
xs
+
1
)
x
main
=
mapM_
print
$
First
()
testsuite/tests/patsyn/should_run/bidir-explicit-scope.stdout
0 → 100644
View file @
f3262fe8
()
()
()
()
testsuite/tests/patsyn/should_run/bidir-explicit.hs
0 → 100644
View file @
f3262fe8
{-# LANGUAGE PatternSynonyms #-}
module
Main
where
pattern
First
x
<-
x
:
_
where
First
x
=
[
x
]
main
=
mapM_
print
$
First
()
testsuite/tests/patsyn/should_run/bidir-explicit.stdout
0 → 100644
View file @
f3262fe8
()
Write
Preview
Markdown
is supported
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