ちゅーんさん宅でのポーカー記録。
- ちゅーん(@its_out_of_tune)
- ぽんこつ(@ponkotuy)
- ピザ充(@PizzaMitsuru)
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| module Main where | |
| data a :=: b where | |
| Refl :: a :=: a | |
| symmetric :: a :=: b -> b :=: a | |
| symmetric ab = case ab of |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| module Game.Bucephalus | |
| ( module Game.Bucephalus.Object | |
| , module Game.Bucephalus.Figure | |
| , BucephalusState(..) | |
| , BucephalusFrame | |
| , BucephalusOptions | |
| ---- | |
| , toBucephalusFramefromReader |
| module Main where | |
| data Nop a | |
| instance Monad Nop where | |
| (>>=) = undefined | |
| return = undefined | |
| runNop :: Nop a -> () | |
| runNop _ = () |
| name: draw-poker | |
| version: 0.1.0.0 | |
| synopsis: playing draw poker | |
| description: for blog entry | |
| homepage: http://tune.hateblo.jp/entry/2015/05/12/023112 | |
| license: BSD3 | |
| license-file: LICENSE | |
| author: Tokiwo Ousaka | |
| maintainer: [email protected] | |
| category: Game |
| module Lib where | |
| import Control.Lens | |
| data Foo = Foo { a :: Int, b :: String, c :: Char } deriving Show | |
| data Bar = Bar { x :: Int, y :: String } deriving Show | |
| constructBar :: Lens Foo Foo Bar Bar | |
| constructBar = lens getFoo2Bar setFooFromBar | |
| getFoo2Bar :: Foo -> Bar |
| -- Initial draw-poker.cabal generated by cabal init. For further | |
| -- documentation, see http://haskell.org/cabal/users-guide/ | |
| name: draw-poker | |
| version: 0.1.0.0 | |
| synopsis: playing draw poker | |
| description: for blog entry | |
| homepage: http://tune.hateblo.jp/entry/2015/05/12/023112 | |
| license: BSD3 | |
| license-file: LICENSE |
| main :: IO () | |
| main = do | |
| putStrLn "------------------" | |
| putStrLn "-- simple poker --" | |
| putStrLn "------------------" | |
| deck <- shuffleM allCards | |
| case getHand deck of | |
| Nothing -> error "予期せぬエラー : getHand in simpleGame" | |
| Just res -> matchPoker res | |
| ynQuestion "-- もっかいやる?" main (putStrLn "-- またねノシノシ") |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| module MonadSkeletonTest where | |
| import Control.Monad.Skeleton | |
| import Control.Monad.State | |
| data MyProgBase a where |
| Module PlayGround1. | |
| Inductive nat : Type := | |
| | O : nat | |
| | S : nat -> nat. | |
| Definition pred (n : nat) : nat := | |
| match n with | |
| | O => O | |
| | S n' => n' |