View qlcplus.nix
#{ stdenv, fetchurl, qtbase, qtmultimedia, qttools, alsa-lib, libusb }:
with import <nixpkgs> {};
# TODO: disable some plugins
stdenv.mkDerivation {
name = "qlcplus-4.11.0";
src = ./qlcplus-QLC-_4.11.0;
buildInputs = [ qt5.qtbase qt5.qtscript qt5.qtmultimedia qt5.qttools alsaLib libusb libudev qt5.qmakeHook ];
nativeBuildInputs = [ pkgconfig ];
View website.nix
{ stdenv }:
stdenv.mkDerivation
{ name = "website";
src = ../code;
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out
cp -r * $out/
ln -s /data/files $out
View Alloc.hs
module Alloc where
import Data.List
import Control.Arrow
data Allocs = Allocs {checkouts :: [Int], checkins :: [Int]} deriving (Eq, Show)
allocs :: [[Int]] -> (Int, [Allocs])
allocs = first length . mapAccumL f []
View Bot.hs
module Bot where
import Control.Monad.Reader
import Control.Monad.Cont
import Data.List
data Command
= NoAction
| Fire
| Accelerate
View gpretty.hs
{-# language TypeSynonymInstances, FlexibleInstances, DeriveDataTypeable #-}
module GPretty where
import Data.Data
import Data.Typeable
import Data.Generics.Aliases
data Tree a = Node a [Tree a]
deriving (Show, Data, Typeable)
View folds.hs
{-# LANGUAGE ViewPatterns, GADTs, KindSignatures, ScopedTypeVariables #-}
import Data.List
foldr2 :: (a -> b -> b) -> b -> [a] -> b
foldr2 f b [] = b
foldr2 f b (x:xs) = f x (foldr2 f b xs)
foldr3 :: ((a,b)->b,()->b) -> [a] -> b
foldr3 (f,b) [] = b ()
foldr3 (f,b) (x:xs) = f (x, foldr3 (f,b) xs)
View Puzzle.hs
{-# LANGUAGE ExistentialQuantification, MultiParamTypeClasses #-}
module Puzzle where
import Data.List
--------------------------------------------------------------------------------
-- Specific to this puzzle
main :: IO ()
View Coded.hs
module Main where
import Control.Monad
import Control.Monad.Logic
import Control.Monad.State.Strict
import qualified Data.Map as M
type BindingT k v = StateT (M.Map k v)
bind :: (Ord k, Eq v, Monad m) => k -> v -> BindingT k v m ()
View Coded.hs
{-# LANGUAGE DeriveFunctor, DeriveTraversable, DeriveFoldable #-}
module Coded where
import Control.Unification
import Control.Unification.IntVar
import Control.Monad.Logic
import Data.Functor.Fixedpoint
import Data.List
import Data.Foldable
import Data.Traversable
View JSONParse.hs
--------------------------------------------------------------------
-- |
-- Module : Text.JSON.Parsec
-- Copyright : (c) Galois, Inc. 2007-2009
--
-- Maintainer: Sigbjorn Finne <sof@galois.com>
-- Stability : provisional
-- Portability: portable
--
-- Parse JSON values using the Parsec combinators.