Skip to content

Instantly share code, notes, and snippets.

@Gabriella439
Gabriella439 / shell.nix
Created February 10, 2022 16:27
nix-shell for GHC development
# This was only tested against revision ac2d18a7353cd3ac1ba4b5993f2776fe0c5eedc9
# of https://gitlab.haskell.org/ghc/ghc
let
nixpkgs = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/7e003d7fb9eff8ecb84405360c75c716cdd1f79f.tar.gz";
sha256 = "08y8pmz7xa58mrk52nafgnnrryxsmya9qaab3nccg18jifs5gyal";
};
config.allowBroken = true;
@Gabriella439
Gabriella439 / lost-time.md
Created February 9, 2022 13:05
Making up for lost time

Making up for lost time

I'm writing this fresh after waking up from a nightmare that captures my insecurities related to transitioning later in life. I'll begin by sharing the dream followed by my interpretation.

The dream

Normally dreams can be tricky to interpret but in this case my dream left a pretty clear signpost to guide the interpretation: the nightmare begins right after explaining to someone that I'm trans.

In my nightmare I'm in middle school and I have to head back home, but I'm unable to take my normal bus home because I got back late from a field trip. On top of that I'm having to carry home more baggage than usual: In addition to my backpack I'm also carrying my cello and also someone else's duffel bag that they left behind at school.

@Gabriella439
Gabriella439 / lfp.md
Last active March 18, 2022 17:39
Introduction for "Lightweight Functional Programming Specification"

Lightweight Functional Programming specification

The purpose of this document is to specify a baseline set of functional programming features that users can request and that programming languages can advertise support for. This feature set strives to be "JSON-like" and "purely functional".

The goals of this specification are (in descending order of importance):

  • Cultivate a portable functional programming style
@Gabriella439
Gabriella439 / default.nix
Last active January 16, 2025 05:52
neovim + haskell-language-server setup
# nix-env --install --file ./default.nix
let
nixpkgs = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/c473cc8714710179df205b153f4e9fa007107ff9.tar.gz";
sha256 = "0q7rnlp1djxc9ikj89c0ifzihl4wfvri3q1bvi75d2wrz844b4lq";
};
config = {
allowUnfree = true;
};
@Gabriella439
Gabriella439 / init.vim
Created January 9, 2022 16:26
First draft of init.vim for haskell-language-server
call plug#begin()
Plug 'neovim/nvim-lspconfig'
call plug#end()
lua << EOF
require('lspconfig').hls.setup({
settings = {
haskell = {
formattingProvider = 'stylish-haskell',
},
@Gabriella439
Gabriella439 / default.nix
Created January 7, 2022 16:14
Nix build of vscode with haskell-language-server
let
nixpkgs = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/c473cc8714710179df205b153f4e9fa007107ff9.tar.gz";
sha256 = "0q7rnlp1djxc9ikj89c0ifzihl4wfvri3q1bvi75d2wrz844b4lq";
};
config = {
allowUnfree = true;
};
@Gabriella439
Gabriella439 / Setuph.s
Created December 27, 2021 18:38
Minimal reproduction for Cabal bug report
import Distribution.Simple
main = defaultMain
@Gabriella439
Gabriella439 / default.nix
Last active December 15, 2021 04:41
How to build ghcid using nixpkgs
let
nixpkgs = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/c473cc8714710179df205b153f4e9fa007107ff9.tar.gz";
sha256 = "0q7rnlp1djxc9ikj89c0ifzihl4wfvri3q1bvi75d2wrz844b4lq";
};
compiler = "ghc921";
overlay = pkgsNew: pkgsOld: {
ghcid = pkgsNew.haskell.packages."${compiler}".ghcid;
@Gabriella439
Gabriella439 / .stylish-haskell.yaml
Last active January 4, 2022 23:54
Files related to Haskell code formatting livestream
steps:
- module_header:
open_bracket: next_line
separate_lists: false
sort: false
- imports:
align: group
pad_module_names: false
long_list_align: new_line_multiline
separate_lists: false
@Gabriella439
Gabriella439 / Main.hs
Created November 4, 2021 00:27
lucid example
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE RecordWildCards #-}
module Main where
import Data.Foldable (traverse_)
import Data.Map (Map)
import Data.Text (Text)