diff options
| author | John J. Camilleri <john@johnjcamilleri.com> | 2020-09-14 22:42:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-14 22:42:37 +0200 |
| commit | 6c54e5b63cb563d780843a1970cba0718a5203f8 (patch) | |
| tree | ed6777f6cb20f9212fa29ce68fac7e22745c707c /src/compiler/GF/CompileInParallel.hs | |
| parent | bca0691cb028fe33ae1b77e71752d4e937490ff1 (diff) | |
| parent | 8bcdeedba01847325cc89378fed114bc0561bd4d (diff) | |
Merge pull request #71 from anka-213/fix-newer-cabal
Fix support for newer stackage snapshots
Diffstat (limited to 'src/compiler/GF/CompileInParallel.hs')
| -rw-r--r-- | src/compiler/GF/CompileInParallel.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/GF/CompileInParallel.hs b/src/compiler/GF/CompileInParallel.hs index 68ac7aa4a..ed498a690 100644 --- a/src/compiler/GF/CompileInParallel.hs +++ b/src/compiler/GF/CompileInParallel.hs @@ -20,6 +20,8 @@ import GF.Infra.Ident(moduleNameS) import GF.Text.Pretty import GF.System.Console(TermColors(..),getTermColors) import qualified Data.ByteString.Lazy as BS +-- Control.Monad.Fail import will become redundant in GHC 8.8+ +import qualified Control.Monad.Fail as Fail -- | Compile the given grammar files and everything they depend on, -- like 'batchCompile'. This function compiles modules in parallel. @@ -256,6 +258,9 @@ instance Output m => Output (CollectOutput m) where putStrLnE s = CO (return (putStrLnE s,())) putStrE s = CO (return (putStrE s,())) +instance Fail.MonadFail m => Fail.MonadFail (CollectOutput m) where + fail = CO . fail + instance ErrorMonad m => ErrorMonad (CollectOutput m) where raise e = CO (raise e) handle (CO m) h = CO $ handle m (unCO . h) |
