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
module BF where | |
data Token : Set where | |
Plus : Token | |
Minus : Token | |
Less : Token | |
More : Token | |
Period : Token | |
Comma : Token | |
Open : Token |
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
warning: Nix search path entry ‘/home/nathan/.nix-defexpr/channels/nixpkgs’ does not exist, ignoring | |
these derivations will be built: | |
/nix/store/7rxarwnalkax5v5fvf1hxrnwql0y3dl9-python2.7-pytest-3.0.7.drv | |
/nix/store/268bwg3nylw2f0v895231msmqxrpknpl-python2.7-Babel-2.3.4.drv | |
/nix/store/g10lnnhpq883v5x7dhrlylqvnpy2377b-python2.7-six-1.10.0.drv | |
/nix/store/1d404igglldx5n0qmdr2m3ccmhz6lw3j-python2.7-unittest2-1.1.0.drv | |
/nix/store/cp6j75wd7wkgi16i23pls9qrdjxc0mkd-python2.7-funcsigs-1.0.2.drv | |
/nix/store/ji8ljdzkqsgvxw5s5kl6fz7h04pzjc68-python2.7-mock-2.0.0.drv | |
/nix/store/5h39f0abz2rbzm97igw8z1b14mhlhmwb-python2.7-apipkg-1.4.drv | |
/nix/store/x77ysrxl9m7vw7bjzj469mvm6v0xsivf-python2.7-execnet-1.4.1.drv |
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 PostfixOperators #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
module Main where | |
import Control.Lens | |
import Control.Monad.State | |
import Prelude hiding ((++)) | |
(++) :: (Num a, MonadState s m) => LensLike' ((,) a) s a -> m 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
module Cat where | |
open import Relation.Binary | |
open import Relation.Binary.PropositionalEquality | |
open import Level | |
record Category (o a ℓ : Level) : Set (suc (o ⊔ a ⊔ ℓ)) where | |
infix 4 _≈_ | |
infixr 9 _∘_ | |
field |
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
module Foo where | |
import Paths_haddock_fail (getDataDir) | |
{-# ANN module (const () getDataDir) #-} |
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
module Bogosort where | |
import Control.Monad.Primitive | |
import Control.Monad.ST | |
import Control.Monad.ST.Unsafe | |
import Control.Monad.Trans.State.Strict | |
import Data.Monoid | |
import qualified Data.Vector as V | |
import qualified Data.Vector.Generic.Mutable as VGM | |
import Data.Vector.Generic.Mutable (MVector) |
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 RecordWildCards #-} | |
{-# LANGUAGE ViewPatterns #-} | |
module Main where | |
import Data.Maybe | |
import Data.Time.Clock | |
import Data.Time.Clock.POSIX | |
import Network.URI | |
import Text.RSS |
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
module Data.UnionFind.Group where | |
import Control.Monad | |
import Control.Monad.Primitive | |
import Data.Group | |
import Data.Primitive | |
data UFG' m g = UFG' | |
{ operator :: g | |
, root :: UFG m g |
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
# invoke as jq -f bf.jq -rS --arg program [PROGRAM] - | |
# interactivity is not supported | |
# try: | |
# $ echo "" | jq -f bf.jq -RrS --arg program '++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.' | |
def increment: .tape.head+=1; | |
def decrement: .tape.head-=1; | |
def shiftleft: | |
.tape.left=[.tape.head]+.tape.left | |
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
module Main where | |
import qualified Data.ByteString.Char8 as B -- bad | |
import qualified Graphics.UI.Gtk as Gtk | |
import System.Environment | |
import qualified System.GIO as GIO | |
updateImage :: Gtk.ImageClass o => o -> Maybe GIO.File -> Maybe GIO.File -> GIO.FileMonitorEvent -> IO () | |
updateImage image (Just file) _ GIO.FileMonitorEventChanged = do | |
pixbuf <- Gtk.pixbufNewFromFile . B.unpack $ GIO.filePath file |