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.Monad | |
import Control.Concurrent | |
import Control.Concurrent.STM | |
import System.Random | |
import Text.Printf | |
-- Forks | |
type Fork = TMVar Int | |
newFork :: Int -> IO Fork |
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 OverloadedStrings #-} | |
import Pipes | |
import Pipes.Group | |
import qualified Pipes.Prelude as P | |
import qualified Pipes.ByteString as PB | |
import qualified Pipes.Attoparsec as PA | |
import Data.Aeson | |
import Data.Aeson.Parser | |
import Data.Aeson.Types | |
import Data.Monoid |
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
data Primitive = Num | |
|Chr | |
|Str | |
|Cnd Bool deriving (Show) | |
data T = K Int | R Int | |
-- >>> :set -XDataKinds | |
-- >>> :t Num | |
-- Num :: Primitive | |
-- >>> :k Num |
OlderNewer