I hereby claim:
- I am k0001 on github.
- I am renzo (https://keybase.io/renzo) on keybase.
- I have a public key ASA-EE5TKMJ3WFx_6BgPON5xiD8UwJwk8qceGYxYLTq5IQo
To claim this, I am signing this object:
| I've done something like this in the past: I installed the test executables | |
| somewhere in $out (although presumably one could use an output different | |
| than $out). You will need to change `testTarget` and/or `checkPhase` as well, | |
| so as to prevent the tests from being run with Nix. Then, once the thing is | |
| installed, you just execute /nix/store/whatever/libexec/tests/foo-tests. | |
| postInstall = '' | |
| if [ "$doCheck" = "1" ]; then | |
| mkdir -p $out/libexec/tests | |
| cp ./dist/build/foo-tests $out/libexec/tests/foo-tests |
| > (||) <$> (putStrLn "x" >> pure True) <*> (putStrLn "y" >> pure False) | |
| x | |
| y | |
| True | |
| > let mor = \ma mb -> ma >>= \a -> if a then pure True else mb | |
| > :t mor | |
| mor :: Monad m => m Bool -> m Bool -> m Bool |
| diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix | |
| index 961b6aca4f0..3f83c6868e7 100644 | |
| --- a/nixos/modules/module-list.nix | |
| +++ b/nixos/modules/module-list.nix | |
| @@ -735,4 +735,5 @@ | |
| ./virtualisation/xe-guest-utilities.nix | |
| ./virtualisation/openstack/keystone.nix | |
| ./virtualisation/openstack/glance.nix | |
| + ./services/web-servers/foo.nix | |
| ] |
I hereby claim:
To claim this, I am signing this object:
| {-# language ConstraintKinds #-} | |
| {-# language DataKinds #-} | |
| {-# language GADTs #-} | |
| {-# language KindSignatures #-} | |
| {-# language RankNTypes #-} | |
| {-# language ScopedTypeVariables #-} | |
| {-# language TypeOperators #-} | |
| import Control.Monad (guard) | |
| import Data.Proxy (Proxy(Proxy)) |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TypeInType #-} | |
| {-# LANGUAGE KindSignatures #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE PolyKinds #-} | |
| import Data.Kind (Type) | |
| import GHC.TypeLits (Nat) |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE TypeInType #-} | |
| {-# LANGUAGE TypeSynonymInstances #-} | |
| import Data.Kind (Type) | |
| import GHC.TypeLits (Nat) | |
| class Starring ka | |
| instance Starring Type |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TypeInType #-} | |
| import Data.Kind | |
| import GHC.Exts (Constraint) | |
| import GHC.TypeLits (Nat) | |
| type family StarMaker k :: Constraint where | |
| StarMaker Type = () | |
| StarMaker (_ -> x) = StarMaker x |
| #! /usr/bin/env nix-shell | |
| #! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/d2c451f967e344df14e63985963e57fb64a6c58d.tar.gz | |
| #! nix-shell -i bash -p xz | |
| # Outputs a xz tarball of all run-time and build-time dependencies | |
| # of the given nix store paths that are provided as arguments. | |
| function fexport() | |
| { | |
| set -x | |
| nix-store --export $(nix-store -qR --include-outputs $(nix-store -qd "$@")) \ |
| -- | How do I write inductive instances for n-arity functions? Does this have a | |
| -- name? How can I add functional dependencies to 'MapLast'? | |
| class MapLast s t a b where | |
| mapLast :: (a -> b) -> (s -> t) | |
| instance MapLast a b a b where | |
| mapLast = ($) | |
| instance MapLast (z -> a) (z -> b) a b where | |
| mapLast = (.) | |
| instance MapLast (y -> z -> a) (y -> z -> b) a b where | |
| mapLast = (.) . (.) |