Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
5335e569
Commit
5335e569
authored
Sep 04, 2013
by
dreixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn manual Typeable instances into errors; fixes #8132
parent
d02a50ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
compiler/typecheck/TcInstDcls.lhs
compiler/typecheck/TcInstDcls.lhs
+2
-2
No files found.
compiler/typecheck/TcInstDcls.lhs
View file @
5335e569
...
...
@@ -409,7 +409,7 @@ tcInstDecls1 tycl_decls inst_decls deriv_decls
-- Remove any handwritten instance of poly-kinded Typeable and warn
; dflags <- getDynFlags
; when (wopt Opt_WarnTypeableInstances dflags) $
mapM_ (
addWarn
Tc . instMsg) typeable_instances
mapM_ (
failWith
Tc . instMsg) typeable_instances
-- Check that if the module is compiled with -XSafe, there are no
-- hand written instances of old Typeable as then unsafe casts could be
...
...
@@ -444,7 +444,7 @@ tcInstDecls1 tycl_decls inst_decls deriv_decls
typInstErr = ptext $ sLit $ "Can't create hand written instances of Typeable in Safe"
++ " Haskell! Can only derive them"
instMsg i = hang (ptext (sLit $ "Typeable instances can only be derived;
ignoring
"
instMsg i = hang (ptext (sLit $ "Typeable instances can only be derived;
replace
"
++ "the following instance:"))
2 (pprInstance (iSpec i))
...
...
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