diff options
Diffstat (limited to 'testsuite/tests/ghc-regress/ghci/scripts/T5045.hs')
-rw-r--r-- | testsuite/tests/ghc-regress/ghci/scripts/T5045.hs | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/testsuite/tests/ghc-regress/ghci/scripts/T5045.hs b/testsuite/tests/ghc-regress/ghci/scripts/T5045.hs deleted file mode 100644 index a63bead315..0000000000 --- a/testsuite/tests/ghc-regress/ghci/scripts/T5045.hs +++ /dev/null @@ -1,44 +0,0 @@ -{-# LANGUAGE Arrows, FunctionalDependencies, FlexibleContexts, - MultiParamTypeClasses, RecordWildCards #-} - -module T5045 where - -import Control.Arrow - -class (Control.Arrow.Arrow a') => ArrowAddReader r a a' | a -> a' where - elimReader :: a e b -> a' (e, r) b - -newtype ByteString = FakeByteString String - -pathInfo :: Monad m => m String -pathInfo = undefined - -requestMethod :: Monad m => m String -requestMethod = undefined - -getInputsFPS :: Monad m => m [(String, ByteString)] -getInputsFPS = undefined - -class HTTPRequest r s | r -> s where - httpGetPath :: r -> String - httpSetPath :: r -> String -> r - httpGetMethod :: r -> String - httpGetInputs :: r -> [(String, s)] - -data CGIDispatch = CGIDispatch { - dispatchPath :: String, - dispatchMethod :: String, - dispatchInputs :: [(String, ByteString)] } - -instance HTTPRequest CGIDispatch ByteString where - httpGetPath = dispatchPath - httpSetPath r s = r { dispatchPath = s } - httpGetMethod = dispatchMethod - httpGetInputs = dispatchInputs - -runDispatch :: (Arrow a, ArrowAddReader CGIDispatch a a', Monad m) => a b c -> m (a' b c) -runDispatch a = do - dispatchPath <- pathInfo - dispatchMethod <- requestMethod - dispatchInputs <- getInputsFPS - return $ proc b -> (| elimReader (a -< b) |) CGIDispatch { .. } |