| |- Designates a table
|-- Followed by a space will create a horizontal line
- you can navigate them intuitively with tab return etc
Name Age Gavin 100
| { | |
| description = "A nixos cloudinit base image without nixos-infect"; | |
| inputs = { | |
| nixpkgs.url = "github:nixos/nixpkgs"; | |
| }; | |
| outputs = { self, nixpkgs }: | |
| let | |
| system = "x86_64-linux"; |
| { pkgs, inputs, ... }: | |
| let | |
| extra = inputs.local.devShell."${pkgs.system}".buildInputs; | |
| in | |
| { | |
| packages = [ pkgs.git ] ++ extra; | |
| } |
| # local -n <- introduce a reference | |
| # requires bash >= 4.3 for nameref | |
| function split { | |
| local str="$1" | |
| local sep="$2" | |
| local -n array=$3 | |
| IFS="$sep" read -ra array <<< "$str" | |
| } | |
| function join { |
| module Eval where | |
| import Control.Monad.Identity | |
| import Control.Monad.Error | |
| import Control.Monad.Reader | |
| import Control.Monad.State | |
| import Control.Monad.Writer | |
| import Data.Maybe | |
| import qualified Data.Map as Map |
| # If GUIX_PROFILE is set while sourcing the profile, the variables will | |
| # refer to that instead of just the latest generation of the profile. | |
| GUIX_PROFILE="${HOME}/.guix-profile" | |
| if [[ -L "${GUIX_PROFILE}" ]]; then | |
| . "${GUIX_PROFILE}/etc/profile" | |
| fi | |
| # Make sure the Guix from "guix pull" appears first in PATH. | |
| export PATH="${HOME}/.config/guix/current/bin:${PATH}" | |
| export INFOPATH="$HOME/.config/guix/current/share/info:$INFOPATH" |
| data TisAnInteger = TisAn Integer | |
| instance Eq TisAnInteger where | |
| TisAn i == TisAn i' = i == i' | |
| data TwoIntegers = Two Integer Integer | |
| instance Eq TwoIntegers where | |
| Two x y == Two x' y' = x == x' && y == y' | |
| data StringOrInt = TisAnInt Int | TisAString String | |
| instance Eq StringOrInt where |