diff options
author | Seraphime Kirkovski <kirkseraph@gmail.com> | 2016-06-06 12:29:38 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-06-06 15:07:18 +0200 |
commit | a90085bd45239fffd65c01c24752a9bbcef346f1 (patch) | |
tree | 41a85ba36720d8fba0a3296ea7a844dd9fc0042a /libraries/base/GHC/Exception.hs | |
parent | 48e9a1f5521fa3185510d144dd28a87e452ce134 (diff) | |
download | haskell-a90085bd45239fffd65c01c24752a9bbcef346f1.tar.gz |
Add @since annotations to base instances
Add @since annotations to instances in `base`.
Test Plan:
* ./validate # some commets shouldn't break the build
* review the annotations for absurdities.
Reviewers: ekmett, goldfire, RyanGlScott, austin, hvr, bgamari
Reviewed By: RyanGlScott, hvr, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2277
GHC Trac Issues: #11767
Diffstat (limited to 'libraries/base/GHC/Exception.hs')
-rw-r--r-- | libraries/base/GHC/Exception.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libraries/base/GHC/Exception.hs b/libraries/base/GHC/Exception.hs index aeaef20805..d2b5e209cc 100644 --- a/libraries/base/GHC/Exception.hs +++ b/libraries/base/GHC/Exception.hs @@ -50,6 +50,7 @@ encapsulated in a @SomeException@. -} data SomeException = forall e . Exception e => SomeException e +-- | @since 3.0 instance Show SomeException where showsPrec p (SomeException e) = showsPrec p e @@ -154,6 +155,7 @@ class (Typeable e, Show e) => Exception e where displayException :: e -> String displayException = show +-- | @since 3.0 instance Exception SomeException where toException se = se fromException = Just @@ -173,8 +175,10 @@ pattern ErrorCall :: String -> ErrorCall pattern ErrorCall err <- ErrorCallWithLocation err _ where ErrorCall err = ErrorCallWithLocation err "" +-- | @since 4.0.0.0 instance Exception ErrorCall +-- | @since 4.0.0.0 instance Show ErrorCall where showsPrec _ (ErrorCallWithLocation err "") = showString err showsPrec _ (ErrorCallWithLocation err loc) = showString (err ++ '\n' : loc) @@ -239,8 +243,10 @@ divZeroException = toException DivideByZero overflowException = toException Overflow ratioZeroDenomException = toException RatioZeroDenominator +-- | @since 4.0.0.0 instance Exception ArithException +-- | @since 4.0.0.0 instance Show ArithException where showsPrec _ Overflow = showString "arithmetic overflow" showsPrec _ Underflow = showString "arithmetic underflow" |