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 GeneralizedNewtypeDeriving #-} | |
import Data.Map.Strict (Map) | |
import qualified Data.Map.Strict as M | |
import MonadLib | |
type Tables t a = (PrefixMap t a, InfixMap t a) | |
newtype PrattM t r a = PrattM | |
{ runPrattM :: ReaderT (Tables t r) (StateT [t] (ExceptionT String Id)) a |
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
require 'csv' | |
require 'set' | |
module Tokile | |
YELLOW = "\x1b[33m" | |
GREEN = "\x1b[32m" | |
CLEAR = "\x1b[39m" | |
UP = "\033[F" |
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 #-} | |
module Main where | |
import Control.Applicative ((<|>)) | |
import qualified Data.SCargot as SCargot | |
import qualified Data.SCargot.Language.Basic as SCargot | |
import Data.SCargot.Repr.Basic | |
import Data.Text (Text) | |
import qualified Text.Parsec as Parsec |
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
#![feature(unboxed_closures)] | |
#![feature(core)] | |
#![feature(io)] | |
use std::old_io::stdio::{stdin}; | |
use std::collections::HashMap; | |
// This is our toy state example. | |
#[derive(Debug)] | |
struct State { |
OlderNewer