Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
9fb15842
Commit
9fb15842
authored
Sep 09, 2013
by
jpm@cs.ox.ac.uk
Browse files
Remove -fwarn-typeable-instances
parent
2cec084e
Changes
5
Hide whitespace changes
Inline
Side-by-side
compiler/main/DynFlags.hs
View file @
9fb15842
...
...
@@ -451,7 +451,6 @@ data WarningFlag =
|
Opt_WarnUnsupportedCallingConventions
|
Opt_WarnUnsupportedLlvmVersion
|
Opt_WarnInlineRuleShadowing
|
Opt_WarnTypeableInstances
deriving
(
Eq
,
Show
,
Enum
)
data
Language
=
Haskell98
|
Haskell2010
...
...
@@ -2506,8 +2505,7 @@ fWarningFlags = [
(
"warn-pointless-pragmas"
,
Opt_WarnPointlessPragmas
,
nop
),
(
"warn-unsupported-calling-conventions"
,
Opt_WarnUnsupportedCallingConventions
,
nop
),
(
"warn-inline-rule-shadowing"
,
Opt_WarnInlineRuleShadowing
,
nop
),
(
"warn-unsupported-llvm-version"
,
Opt_WarnUnsupportedLlvmVersion
,
nop
),
(
"warn-typeable-instances"
,
Opt_WarnTypeableInstances
,
nop
)
]
(
"warn-unsupported-llvm-version"
,
Opt_WarnUnsupportedLlvmVersion
,
nop
)
]
-- | These @-\<blah\>@ flags can all be reversed with @-no-\<blah\>@
negatableFlags
::
[
FlagSpec
GeneralFlag
]
...
...
@@ -2918,7 +2916,6 @@ standardWarnings
Opt_WarnWrongDoBind
,
Opt_WarnUnsupportedCallingConventions
,
Opt_WarnDodgyForeignImports
,
Opt_WarnTypeableInstances
,
Opt_WarnInlineRuleShadowing
,
Opt_WarnAlternativeLayoutRuleTransitional
,
Opt_WarnUnsupportedLlvmVersion
...
...
compiler/typecheck/TcInstDcls.lhs
View file @
9fb15842
...
...
@@ -406,14 +406,13 @@ tcInstDecls1 tycl_decls inst_decls deriv_decls
; return (gbl_env, emptyBag, emptyValBindsOut) }
else tcDeriving tycl_decls inst_decls deriv_decls
-- Remove any handwritten instance of poly-kinded Typeable and warn
; dflags <- getDynFlags
; when (wopt Opt_WarnTypeableInstances dflags) $
mapM_ (failWithTc . instMsg) typeable_instances
-- Fail if there are any handwritten instance of poly-kinded Typeable
; mapM_ (failWithTc . 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
-- performed. Derived instances are OK.
; dflags <- getDynFlags
; when (safeLanguageOn dflags) $
mapM_ (\x -> when (typInstCheck x)
(addErrAt (getSrcSpan $ iSpec x) typInstErr))
...
...
docs/users_guide/flags.xml
View file @
9fb15842
...
...
@@ -1502,14 +1502,6 @@
<entry><option>
-fno-warn-warnings-deprecations
</option></entry>
</row>
<row>
<entry><option>
-fwarn-typeable-instances
</option></entry>
<entry>
warn if there are any handwritten
<literal>
Typeable
</literal>
instances (see
<xref
linkend=
"deriving-typeable"
/>
)
</entry>
<entry>
dynamic
</entry>
<entry><option>
-fno-warn-typeable-instances
</option></entry>
</row>
</tbody>
</tgroup>
</informaltable>
...
...
docs/users_guide/glasgow_exts.xml
View file @
9fb15842
...
...
@@ -3503,7 +3503,7 @@ See also <xref linkend="auto-derive-typeable"/>.
</para>
<para>
Also since GHC 7.8.1, handwritten (ie. not derived) instances of
<literal>
Typeable
</literal>
are forbidden, and will
be ignored with a warning
.
<literal>
Typeable
</literal>
are forbidden, and will
result in an error
.
</para>
</listitem>
...
...
docs/users_guide/using.xml
View file @
9fb15842
...
...
@@ -974,7 +974,6 @@ test.hs:(5,4)-(6,7):
<option>
-fwarn-wrong-do-bind
</option>
,
<option>
-fwarn-unsupported-calling-conventions
</option>
,
<option>
-fwarn-dodgy-foreign-imports
</option>
,
<option>
-fwarn-typeable-instances
</option>
,
<option>
-fwarn-inline-rule-shadowing
</option>
, and
<option>
-fwarn-unsupported-llvm-version
</option>
.
The following flags are simple ways to select standard
...
...
@@ -1739,19 +1738,6 @@ f "2" = 2
</listitem>
</varlistentry>
<varlistentry>
<term><option>
-fwarn-typeable-instances
</option>
:
</term>
<listitem>
<indexterm><primary><option>
-fwarn-typeable-instances
</option></primary></indexterm>
<indexterm><primary>
typeable instances, warning
</primary></indexterm>
<para>
Report handwritten (ie. not derived) instances of the
<literal>
Typeable
</literal>
class. These are ignore by the compiler;
only derived instances of
<literal>
Typeable
</literal>
are allowed.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
If you're feeling really paranoid, the
...
...
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