Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (18 sloc) 0.566 kb
{-# LANGUAGE ScopedTypeVariables #-}
module GHCChoice where
import Control.Exception
import CoreMonad
import Exception
import GHC
----------------------------------------------------------------
(||>) :: Ghc a -> Ghc a -> Ghc a
x ||> y = x `gcatch` (\(_ :: IOException) -> y)
----------------------------------------------------------------
{-| Go to the next 'Ghc' monad by throwing 'AltGhcgoNext'.
-}
goNext :: Ghc a
goNext = liftIO . throwIO $ userError "goNext"
{-| Run any one 'Ghc' monad.
-}
runAnyOne :: [Ghc a] -> Ghc a
runAnyOne = foldr (||>) goNext
Jump to Line
Something went wrong with that request. Please try again.