Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dylan Yudaken
GHC
Commits
948c82d8
Commit
948c82d8
authored
Jul 12, 2011
by
dterei
Browse files
More THREAD fixes to safe haskell tests
parent
f4ce3b24
Changes
4
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06_A.hs
View file @
948c82d8
...
...
@@ -17,7 +17,7 @@ newMinList n = MinList n []
insertMinList
::
Ord
a
=>
MinList
a
->
a
->
MinList
a
insertMinList
s
@
(
MinList
m
xs
)
n
|
n
>
m
=
MinList
m
(
n
:
xs
)
|
otherwise
=
s
|
otherwise
=
s
printIntMinList
::
MinList
Int
->
IO
()
printIntMinList
(
MinList
min
xs
)
=
putStrLn
$
"MinList Int :: MinList "
++
show
min
++
" "
++
show
xs
...
...
testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07.hs
View file @
948c82d8
...
...
@@ -12,7 +12,7 @@
-- API of Y1.
module
Main
where
import
SafeLang0
6
_A
import
SafeLang0
7
_A
class
IntIso
t
where
intIso
::
c
t
->
c
Int
...
...
@@ -39,4 +39,3 @@ main = do
printIntMinList
a1
printIntMinList
a2
testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07.stderr
View file @
948c82d8
...
...
@@ -2,8 +2,6 @@
<no location info>:
Warning: -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving
SafeLang07.hs:23:45:
Can't make a derived instance of `IntIso (Down a)':
`IntIso' is not a derivable class
Try -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension
In the newtype declaration for `Down'
SafeLang07.hs:15:1:
Failed to load interface for `SafeLang07_A'
Use -v to see a list of the files searched for.
testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07_A.hs
0 → 100644
View file @
948c82d8
{-# LANGUAGE Trustworthy #-}
-- | Here we expose a MinList API that only allows elements
-- to be inserted into a list if they are at least greater
-- than an initial element the list is created with.
module
SafeLang07_A
(
MinList
,
newMinList
,
insertMinList
,
printIntMinList
)
where
data
MinList
a
=
MinList
a
[
a
]
newMinList
::
Ord
a
=>
a
->
MinList
a
newMinList
n
=
MinList
n
[]
insertMinList
::
Ord
a
=>
MinList
a
->
a
->
MinList
a
insertMinList
s
@
(
MinList
m
xs
)
n
|
n
>
m
=
MinList
m
(
n
:
xs
)
|
otherwise
=
s
printIntMinList
::
MinList
Int
->
IO
()
printIntMinList
(
MinList
min
xs
)
=
putStrLn
$
"MinList Int :: MinList "
++
show
min
++
" "
++
show
xs
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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