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, UndecidableInstances#-} | |
module SmokeTest where | |
import Control.Monad | |
import Control.Applicative | |
import System.IO | |
import Test.QuickCheck | |
import Test.QuickCheck.Poly | |
class Variant a where |
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, UndecidableInstances#-} | |
module SmokeTest where | |
import Control.Monad | |
import Control.Applicative | |
import System.IO | |
import Test.QuickCheck | |
import Test.QuickCheck.Poly | |
class Variant a where |
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
instance Yesod App where | |
errorHandler (InternalError e) = do | |
$(logWarn) e | |
applyLayout "My Internal Server Error." [hamlet| <h1> my internal server error|] | |
where applyLayout :: Yesod master => Html -> HtmlUrl (Route master) -> GHandler sub master ChooseRep | |
applyLayout title body = fmap chooseRep $ defaultLayout $ do | |
setTitle title | |
toWidget body |
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
問題13 | |
リストのリストを取って、要素のリストを連結する関数concat :: [[a]] -> [a]は 第6章の演習問題で定義した。これをfoldrを使って実装した関数concatRを 定義せよ。さらに、foldlを使って実装した関数concatLを定義せよ。 | |
以下の実行例で自分の定義が正しいことを確認せよ。 | |
> concatR [[1,2],[3],[],[4,5]] | |
[1,2,3,4,5] | |
> concatL [[1,2],[3],[],[4,5]] | |
[1,2,3,4,5] | |
> concatR [] |
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
=============================== | |
Short Trip Plan to Atsugi | |
Date : 2012/March/03 (Sat) | |
∬ ∬ | |
。。 ・・ 。。 ・。。。 ∬ | |
o0o゚゚ ∧_∧ ゚゚oo | |
。oO ( (( (_, ・ω・) )) ) O0o |