Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,253
Issues
4,253
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
395
Merge Requests
395
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
e5cda42f
Commit
e5cda42f
authored
Jul 23, 2011
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://darcs.haskell.org/testsuite
parents
8b9fffbf
da1938c1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
5 deletions
+53
-5
testsuite/tests/annotations/should_run/annrun01.hs
testsuite/tests/annotations/should_run/annrun01.hs
+7
-5
testsuite/tests/dph/diophantine/dph-diophantine.T
testsuite/tests/dph/diophantine/dph-diophantine.T
+1
-0
testsuite/tests/simplCore/should_compile/T5303.hs
testsuite/tests/simplCore/should_compile/T5303.hs
+44
-0
testsuite/tests/simplCore/should_compile/all.T
testsuite/tests/simplCore/should_compile/all.T
+1
-0
No files found.
testsuite/tests/annotations/should_run/annrun01.hs
View file @
e5cda42f
...
...
@@ -16,29 +16,31 @@ import qualified Language.Haskell.TH as TH
import
Data.List
import
Data.Function
main
::
IO
()
main
=
defaultErrorHandler
defaultLogAction
$
runGhc
(
Just
cTop
)
$
do
liftIO
$
putStrLn
"Initializing Package Database"
dflags
<-
getSessionDynFlags
let
dflags'
=
dflags
setSessionDynFlags
dflags'
let
mod_nm
=
mkModuleName
"Annrun01_Help"
liftIO
$
putStrLn
"Setting Target"
setTargets
[
Target
(
TargetModule
mod_nm
)
True
Nothing
]
liftIO
$
putStrLn
"Loading Targets"
load
LoadAllTargets
liftIO
$
putStrLn
"Finding Module"
mod
<-
findModule
mod_nm
Nothing
liftIO
$
putStrLn
"Getting Module Info"
Just
mod_info
<-
getModuleInfo
mod
liftIO
$
putStrLn
"Showing Details For Module"
showTargetAnns
(
ModuleTarget
mod
)
liftIO
$
putStrLn
"Showing Details For Exports"
mapM
(
showTargetAnns
.
NamedTarget
)
$
sortBy
(
compare
`
on
`
getOccName
)
$
modInfoExports
mod_info
let
exports
=
sortBy
(
compare
`
on
`
getOccName
)
$
modInfoExports
mod_info
mapM_
(
showTargetAnns
.
NamedTarget
)
exports
showTargetAnns
::
CoreAnnTarget
->
Ghc
()
showTargetAnns
target
=
do
...
...
testsuite/tests/dph/diophantine/dph-diophantine.T
View file @
e5cda42f
...
...
@@ -4,6 +4,7 @@ test ('dph-diophantine-opt'
,
skip_if_fast
,
reqlib
('
dph-par
')
,
reqlib
('
dph-prim-par
')
,
expect_broken
(
5065
)
,
only_ways
(['
normal
',
'
threaded1
',
'
threaded2
'])
]
,
multimod_compile_and_run
,
[
'
Main
'
...
...
testsuite/tests/simplCore/should_compile/T5303.hs
0 → 100644
View file @
e5cda42f
{-# LANGUAGE KindSignatures, GADTs, TypeFamilies, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-}
module
T5303
(
showContextSeries
)
where
import
Control.Monad.State.Strict
(
StateT
)
import
Control.Monad.Trans
(
lift
)
data
Tree
m
=
Tree
{}
data
FL
(
a
::
*
->
*
->
*
)
x
z
where
(
:>:
)
::
a
x
y
->
FL
a
y
z
->
FL
a
x
z
NilFL
::
FL
a
x
x
class
(
Functor
m
,
Monad
m
)
=>
ApplyMonad
m
(
state
::
(
*
->
*
)
->
*
)
class
Apply
(
p
::
*
->
*
->
*
)
where
type
ApplyState
p
::
(
*
->
*
)
->
*
apply
::
ApplyMonad
m
(
ApplyState
p
)
=>
p
x
y
->
m
()
class
(
Functor
m
,
Monad
m
,
ApplyMonad
(
ApplyMonadOver
m
state
)
state
)
=>
ApplyMonadTrans
m
(
state
::
(
*
->
*
)
->
*
)
where
type
ApplyMonadOver
m
state
::
*
->
*
runApplyMonad
::
(
ApplyMonadOver
m
state
)
x
->
state
m
->
m
(
x
,
state
m
)
instance
(
Functor
m
,
Monad
m
)
=>
ApplyMonadTrans
m
Tree
where
type
ApplyMonadOver
m
Tree
=
TreeMonad
m
runApplyMonad
=
virtualTreeMonad
instance
(
Functor
m
,
Monad
m
)
=>
ApplyMonad
(
TreeMonad
m
)
Tree
-- | Internal state of the 'TreeIO' monad. Keeps track of the current Tree
-- content, unsync'd changes and a current working directory (of the monad).
data
TreeState
m
=
TreeState
{
tree
::
!
(
Tree
m
)
}
type
TreeMonad
m
=
StateT
(
TreeState
m
)
m
type
TreeIO
=
TreeMonad
IO
virtualTreeMonad
::
(
Functor
m
,
Monad
m
)
=>
TreeMonad
m
a
->
Tree
m
->
m
(
a
,
Tree
m
)
virtualTreeMonad
action
t
=
undefined
applyToState
::
forall
p
m
x
y
.
(
Apply
p
,
ApplyMonadTrans
m
(
ApplyState
p
))
=>
p
x
y
->
(
ApplyState
p
)
m
->
m
((
ApplyState
p
)
m
)
applyToState
_
_
=
snd
`
fmap
`
runApplyMonad
undefined
undefined
showContextSeries
::
(
Apply
p
,
ApplyState
p
~
Tree
)
=>
FL
p
x
y
->
TreeIO
()
showContextSeries
(
p
:>:
_
)
=
(
undefined
>>=
lift
.
applyToState
p
)
>>
return
()
testsuite/tests/simplCore/should_compile/all.T
View file @
e5cda42f
...
...
@@ -123,3 +123,4 @@ test('T5168',
['
$MAKE -s --no-print-directory T5168
'])
test
('
T5329
',
normal
,
compile
,
[''])
test
('
T5303
',
reqlib
('
mtl
'),
compile
,
[''])
# Coercion-optimiation test
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