From 8fe2bbe9502b4accafb14a4234f264f4457f3ff2 Mon Sep 17 00:00:00 2001 From: David Terei Date: Wed, 12 Nov 2014 18:39:01 -0800 Subject: Update userguide for new `-fwarn-trustworthy-safe` flag. --- docs/users_guide/7.10.1-notes.xml | 30 ++++++++++++++++++++++++++++++ docs/users_guide/flags.xml | 21 +++++++++++++++++++-- docs/users_guide/safe_haskell.xml | 11 ++++++++++- 3 files changed, 59 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/users_guide/7.10.1-notes.xml b/docs/users_guide/7.10.1-notes.xml index 7c1e65a250..2e509e1e2d 100644 --- a/docs/users_guide/7.10.1-notes.xml +++ b/docs/users_guide/7.10.1-notes.xml @@ -90,6 +90,36 @@ specifying flag. + + + A new warning flag, + has been added and is turned on with + . It warns when a module that is + compiled with is actually + infered as an module. This lets the + module author know that they can tighten their Safe Haskell + bounds if desired. + + + + + The and + that warn if a module was + infered as Safe or Unsafe have been improved to work with + all Safe Haskell module types. Previously, they only worked + for unmarked modules where the compiler was infering the + modules Safe Haskell type. They now work even for modules + marked as or + . This is useful either to have + GHC check your assumptions, or to generate a list of + reasons easily why a module is regarded as Unsafe. + + + For many use cases, the new + flag is better + suited than either of these two. + + and diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml index 2c0e54883a..33af295f1b 100644 --- a/docs/users_guide/flags.xml +++ b/docs/users_guide/flags.xml @@ -1565,7 +1565,10 @@ warn if the module being compiled is regarded to be unsafe. Should be used to check the safety status of modules when using safe - inference. + inference. Works on all module types, even those using explicit + Safe Haskell modes (such as + ) and so can be used to have the + compiler check any assumptions made. dynamic @@ -1574,7 +1577,21 @@ warn if the module being compiled is regarded to be safe. Should be used to check the safety status of modules when using safe - inference. + inference. Works on all module types, even those using explicit + Safe Haskell modes (such as + ) and so can be used to have the + compiler check any assumptions made. + dynamic + + + + + + warn if the module being compiled is marked as + but it could instead be marked as + , a more informative bound. Can be used to + detect once a Safe Haskell bound can be improved as dependencies + are updated. dynamic diff --git a/docs/users_guide/safe_haskell.xml b/docs/users_guide/safe_haskell.xml index 10d0a638f0..634482a42c 100644 --- a/docs/users_guide/safe_haskell.xml +++ b/docs/users_guide/safe_haskell.xml @@ -705,7 +705,7 @@ - And two warning flags: + And three warning flags: @@ -724,6 +724,15 @@ when using safe inference. + + -fwarn-trustworthy-safe + -fwarn-trustworthy-safe + Issue a warning if the module being compiled is marked as + but it could instead be marked as + , a more informative bound. Can be used to + detect once a Safe Haskell bound can be improved as dependencies are + updated. + -- cgit v1.2.1