| ... | @@ -60,11 +60,14 @@ pre 8.0 |
... | @@ -60,11 +60,14 @@ pre 8.0 |
|
|
|
|
|
|
|
</th>
|
|
</th>
|
|
|
<th>
|
|
<th>
|
|
|
|
|
|
|
–
|
|
–
|
|
|
|
|
|
|
|
|
|
|
|
|
</th>
|
|
</th>
|
|
|
<th>```
|
|
<th>
|
|
|
|
|
|
|
|
```
|
|
|
instance Monad Foo where
|
|
instance Monad Foo where
|
|
|
...
|
|
...
|
|
|
fail = ...
|
|
fail = ...
|
| ... | @@ -79,7 +82,9 @@ do Just x <- ... |
... | @@ -79,7 +82,9 @@ do Just x <- ... |
|
|
|
|
|
|
|
|
|
|
|
|
</th>
|
|
</th>
|
|
|
<th>- Module `Control.Monad.Fail` with class `MonadFail` and method `fail`, distinct from `Prelude`’s `fail` added.
|
|
<th>
|
|
|
|
|
|
|
|
- Module `Control.Monad.Fail` with class `MonadFail` and method `fail`, distinct from `Prelude`’s `fail` added.
|
|
|
- Language extension `-XMonadFailDesugaring` to change the desugaring to use that `fail`
|
|
- Language extension `-XMonadFailDesugaring` to change the desugaring to use that `fail`
|
|
|
- (Some warnings, off by default, are added)
|
|
- (Some warnings, off by default, are added)
|
|
|
|
|
|
| ... | @@ -101,10 +106,14 @@ do Just x <- ... |
... | @@ -101,10 +106,14 @@ do Just x <- ... |
|
|
|
|
|
|
|
|
|
|
|
|
</th>
|
|
</th>
|
|
|
<th>- Warn by default when a `MonadFail` instance is not in scope where do-notation desugars to `fail`.
|
|
<th>
|
|
|
|
|
|
|
|
- Warn by default when a `MonadFail` instance is not in scope where do-notation desugars to `fail`.
|
|
|
|
|
|
|
|
</th>
|
|
</th>
|
|
|
<th>```
|
|
<th>
|
|
|
|
|
|
|
|
```
|
|
|
import qualified Control.Monad.Fail as Fail
|
|
import qualified Control.Monad.Fail as Fail
|
|
|
|
|
|
|
|
instance Monad Foo where
|
|
instance Monad Foo where
|
| ... | @@ -125,11 +134,15 @@ do Just x <- ... |
... | @@ -125,11 +134,15 @@ do Just x <- ... |
|
|
|
|
|
|
|
|
|
|
|
|
</th>
|
|
</th>
|
|
|
<th>- `-XMonadFailDesugaring` is the default now
|
|
<th>
|
|
|
|
|
|
|
|
- `-XMonadFailDesugaring` is the default now
|
|
|
- Explicit definitions of `Monad.fail` cause warnings now.
|
|
- Explicit definitions of `Monad.fail` cause warnings now.
|
|
|
|
|
|
|
|
</th>
|
|
</th>
|
|
|
<th>```
|
|
<th>
|
|
|
|
|
|
|
|
```
|
|
|
{-# LANGUAGE MonadFailDesugaring #-}
|
|
{-# LANGUAGE MonadFailDesugaring #-}
|
|
|
import qualified Control.Monad.Fail as Fail
|
|
import qualified Control.Monad.Fail as Fail
|
|
|
|
|
|
| ... | @@ -147,7 +160,9 @@ do Just x <- ... |
... | @@ -147,7 +160,9 @@ do Just x <- ... |
|
|
|
|
|
|
|
|
|
|
|
|
</th>
|
|
</th>
|
|
|
<th>- `-XMonadFailDesugaring` is unconditionally true
|
|
<th>
|
|
|
|
|
|
|
|
- `-XMonadFailDesugaring` is unconditionally true
|
|
|
- `Monad.fail is removed`
|
|
- `Monad.fail is removed`
|
|
|
|
|
|
|
|
</th>
|
|
</th>
|
| ... | | ... | |