Skip to content

Instantly share code, notes, and snippets.

{-# 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: its.out.of.tune.this.my.music@gmail.com
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
@tokiwoousaka
tokiwoousaka / gist:b471aa0efed725c6a05d
Created July 18, 2015 12:37
Haskellでポーカーを作ろう:プロトタイプdiff
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 "-- またねノシノシ")
@tokiwoousaka
tokiwoousaka / gist:34c865acdfdec625b10c
Last active August 29, 2015 14:24
skeleton使ってみた
{-# 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'
@tokiwoousaka
tokiwoousaka / gist:a169a696af5d3a1cdb7c
Last active August 29, 2015 14:23
2015/6/20 第一回 まったりテキサス・ホールデム会

2015/6/20 第一回 まったりテキサス・ホールデム会

ちゅーんさん宅でのポーカー記録。

参加者

  • ちゅーん(@its_out_of_tune)
  • ぽんこつ(@ponkotuy)
  • ピザ充(@PizzaMitsuru)