diff options
author | David Terei <davidterei@gmail.com> | 2011-07-20 11:09:03 -0700 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2011-07-20 11:26:35 -0700 |
commit | 16514f272fb42af6e9c7674a9bd6c9dce369231f (patch) | |
tree | e4f332b45fe65e2a7a2451be5674f887b42bf199 /testsuite/tests/ghc-regress/ghci/scripts/T5045.hs | |
parent | ebd422aed41048476aa61dd4c520d43becd78682 (diff) | |
download | haskell-16514f272fb42af6e9c7674a9bd6c9dce369231f.tar.gz |
Move tests from tests/ghc-regress/* to just tests/*
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 { .. } |