Skip to content

Instantly share code, notes, and snippets.

{-#LANGUAGE PolyKinds, TypeFamilies, TypeOperators, ConstraintKinds, UndecidableInstances, FlexibleInstances, FunctionalDependencies, MultiParamTypeClasses, TypeOperators, KindSignatures #-}
import qualified Prelude ((.), id, String)
import Data.Proxy
import GHC.Exts
import GHC.TypeLits
class SmallCategory cat where
name :: Proxy cat -> Prelude.String
id ::(Objects cat a, CategoryMorphism cat morph) => morph a a
type Objects cat :: a -> Constraint
newtype TermFormerID = TermFormerID Natural deriving (Eq, Show)
-- Used for dynamic sequences of name usage. For example, memory locations in an imperitive program. Models binding arities.
data BindingToken a = Create Name
| Destroy Name
| RawTerm a
| Constant a deriving (Eq, Show, Functor, Foldable, Traversable)
data NominalTerm a = Atom Name
| Variable Permutation Name
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
let
inherit (nixpkgs) pkgs;
ghc = pkgs.haskell.packages.${compiler}.ghcWithPackages (ps: with ps;
[mtl lens parsec QuickCheck ansi-wl-pprint text text-format alex
happy monad-logger hlint unordered-containers ekg haskeline
/*smartcheck*/ sbv tasty optparse-applicative configurator ]);
texlive = pkgs.texLiveFull;
emacs = let withGTK3 = true; in pkgs.emacsWithPackages (with
pkgs.emacsPackagesNg; [ghc-mod haskell-mode structured-haskell-mode]);
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((nil
(eval progn
(setq default-directory
(locate-dominating-file buffer-file-name ".dir-locals.el"))
(load-file "./shell.el"))))
{-# LANGUAGE TemplateHaskell, TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
--------------------------------------------------------------------------------
-- |
-- Module : Examples.Common
-- Copyright : (c) 2011 Patrick Bahr, Tom Hvitved
-- License : BSD3
-- Maintainer : Tom Hvitved <hvitved@diku.dk>
-- Stability : experimental
-- Portability : non-portable (GHC Extensions)
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
let
inherit (nixpkgs) pkgs;
ghc = pkgs.haskell.packages.${compiler}.ghcWithPackages (ps: with ps;
[ ghc-mod mtl lens parsec QuickCheck ansi-wl-pprint text text-format annotated-wl-pprint cabal-install
alex zippers compdata
happy monad-logger hlint unordered-containers ekg haskeline
smartcheck sbv tasty optparse-applicative configurator
leksah data-category
structured-haskell-mode]);
class Uniplate on where
-- | The underlying method in the class.
-- Taking a value, the function should return all the immediate children
-- of the same type, and a function to replace them.
--
-- Given @uniplate x = (cs, gen)@
--
-- @cs@ should be a @Str on@, constructed of @Zero@, @One@ and @Two@,
-- containing all @x@'s direct children of the same type as @x@. @gen@
-- should take a @Str on@ with exactly the same structure as @cs@,
{-# LANGUAGE CPP, TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, UndecidableInstances, DataKinds, InstanceSigs, RankNTypes, NamedFieldPuns#-}
--{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
--
-- Module : System
-- Copyright :
-- License : AllRightsReserved
--
-- Maintainer : Sophie Taylor
-- Stability : Non-existant
{-# LANGUAGE CPP, TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, UndecidableInstances, DataKinds, InstanceSigs, RankNTypes, NamedFieldPuns#-}
-----------------------------------------------------------------------------
--
-- Module : System
-- Copyright :
-- License : AllRightsReserved
--
-- Maintainer : Sophie Taylor
-- Stability : Non-existant
-- Portability : Tested on GHC 7.6.1
{ config, pkgs, ... }:
{
imports = [ ./default.nix /root/nixcfg/core.nix ];
services = {
example = {
enable = true;
};
};
environment.systemPackages = with pkgs; [ wget tcpdump ltrace gdb ];