This file contains hidden or 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, UndecidableInstances, ContextConstraints #-} | |
{- in response to http://www.reddit.com/r/haskell/comments/bxdi2/ask_what_would_be_your_dream_xs/c0p1r55 -} | |
import Control.Monad | |
class Func m where | |
func :: m Int -> m Int | |
instance (Monad m) => Func m where |
This file contains hidden or 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 TemplateHaskell | |
, QuasiQuotes | |
, OverloadedStrings | |
, TypeFamilies | |
#-} | |
import Yesod | |
import Yesod.Handler | |
import Data.Maybe |
This file contains hidden or 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 hidden or 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 = (+) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
OlderNewer