This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE PackageImports #-} | |
module Network.Wai.Util where | |
import Control.Concurrent | |
import Control.Concurrent.MVar | |
import Control.Exception (finally) | |
import "mtl" Control.Monad.Trans | |
import qualified Data.ByteString as B | |
import qualified Data.ByteString.Char8 as B8 | |
import qualified Data.ByteString.Lazy as L |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Data.IORef as I | |
import qualified Control.Exception as E | |
import Control.Concurrent | |
import Control.Exception | |
import Control.Monad | |
import Network.Socket | |
main :: IO () | |
main = do | |
mgr <- initialize 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Concurrent | |
import Control.Exception | |
import Control.Monad | |
import Network.Socket | |
import Timeout | |
main = do | |
mgr <- initialize 1 | |
forever $ do | |
threadDelay 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Concurrent | |
import Control.Exception | |
import Control.Monad | |
import Network.Socket | |
main = forever $ do | |
pair <- try $ socketPair AF_UNIX Stream defaultProtocol | |
case pair of | |
Left e -> do | |
let _ = e :: SomeException |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
<html> | |
<head> | |
<title></title> | |
<script src="http://trentrichardson.com/examples/timepicker/js/jquery-1.4.4.min.js" | |
type="text/javascript"> | |
</script> | |
<script src= | |
"http://trentrichardson.com/examples/timepicker/js/jquery-ui-1.8.6.custom.min.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE QuasiQuotes | |
, TemplateHaskell | |
, OverloadedStrings | |
, TypeFamilies | |
#-} | |
import Yesod | |
import Yesod.Form | |
import Yesod.Form.Jquery | |
import Control.Applicative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE QuasiQuotes | |
, OverloadedStrings | |
, TypeFamilies | |
#-} | |
import Yesod | |
import Control.Applicative | |
data Test = Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE QuasiQuotes, OverloadedStrings, TemplateHaskell, TypeFamilies #-} | |
import Control.Applicative | |
import Yesod | |
import Yesod.Form.Core | |
data CommentForm = CommentForm | |
{ user :: String | |
, comment :: Textarea | |
, isHtml :: Bool | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleInstances | |
, FlexibleContexts | |
, MultiParamTypeClasses | |
, TypeSynonymInstances | |
, FunctionalDependencies | |
, UndecidableInstances | |
#-} | |
module CombineForm where | |
import Yesod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE MultiParamTypeClasses | |
, FlexibleInstances | |
, TypeFamilies | |
#-} | |
class Add a b where | |
add :: a -> b -> a | |
instance Num a => Add a a where | |
add = (+) |
NewerOlder