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 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 |
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
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 |
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
{ 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]); |
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
;;; 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")))) |
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 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) |
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
{ 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]); |
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
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@, |
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 CPP, TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, UndecidableInstances, DataKinds, InstanceSigs, RankNTypes, NamedFieldPuns#-} | |
--{-# LANGUAGE NoImplicitPrelude #-} | |
----------------------------------------------------------------------------- | |
-- | |
-- Module : System | |
-- Copyright : | |
-- License : AllRightsReserved | |
-- | |
-- Maintainer : Sophie Taylor | |
-- Stability : Non-existant |
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 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 |
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
{ config, pkgs, ... }: | |
{ | |
imports = [ ./default.nix /root/nixcfg/core.nix ]; | |
services = { | |
example = { | |
enable = true; | |
}; | |
}; | |
environment.systemPackages = with pkgs; [ wget tcpdump ltrace gdb ]; |
OlderNewer