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 Data.Aeson.Types | |
import Data.Aeson | |
import qualified Data.Vector as V | |
import qualified Data.ByteString.Lazy as L | |
import Data.HashMap.Strict | |
import qualified Data.Text as T | |
-- this is backward maybe -- also doesn't crack open the Values |
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 GADTs #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE DataKinds#-} | |
{-# LANGUAGE KindSignatures#-} | |
module RedBlackTree where | |
data Nat = Zero | Succ Nat deriving (Eq, Ord, Show) | |
type One = Succ Zero |
OlderNewer