This file contains hidden or 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
{ stdenv | |
, haskellPackages | |
}: | |
let | |
ghc = haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [ | |
yi | |
yi-frontend-pango | |
yi-keymap-emacs | |
yi-misc-modes |
This file contains hidden or 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 Either(object): | |
pass | |
class Left(Either): | |
def __init__(self, v): self.v = v | |
def is_left(self): return True | |
def is_right(self): return False | |
def value(self): return self.v | |
class Right(Either): |
This file contains hidden or 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
{ pkgs, ... }: | |
{ | |
imports = [ /etc/nixos/hardware-configuration.nix ]; | |
boot = { | |
kernelParams = [ "quiet" "splash" "acpi_osi=Linux" ]; | |
loader = { | |
systemd-boot.enable = true; |
This file contains hidden or 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
{ pkgs, ... }: | |
{ | |
imports = [ /etc/nixos/hardware-configuration.nix ]; | |
boot = { | |
kernelParams = [ "quiet" "splash" "acpi_osi=Linux" ]; | |
loader = { | |
systemd-boot.enable = true; |
This file contains hidden or 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
{ pkgs, ... }: | |
pkgs.lib.filter (x: false) |
This file contains hidden or 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
{ pkgs, ... }: | |
_: | |
[] |
This file contains hidden or 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
{ pkgs, ... }: | |
{ | |
imports = [ /etc/nixos/hardware-configuration.nix ]; | |
boot = { | |
kernelParams = [ "quiet" "splash" "acpi_osi=Linux" ]; | |
loader = { | |
systemd-boot.enable = true; |
This file contains hidden or 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
ncurses = (pkgs.ncurses.overrideAttrs (oldAttrs: { | |
configureFlags = oldAttrs.configureFlags ++ | |
pkgs.lib.optionals pkgs.targetPlatform.isMinGW [ | |
"--enable-sp-funcs" | |
"--enable-term-driver" | |
]; | |
preFixup = pkgs.lib.optionalString (!pkgs.hostPlatform.isCygwin && !enableStatic) '' | |
rm "$out"/lib/*.a | |
''; |
This file contains hidden or 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
let (Just requestVerification) = loginPage ^. responseBody | |
. to parseTags | |
. to (find (~== "<input name='__RequestVerificationToken'>")) | |
& mapped | |
%~ fromAttrib "__RequestVerificationToken" |
This file contains hidden or 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
use std::cmp; | |
use std::mem; | |
/// Position within a line | |
pub type Pos = usize; | |
/// Text zipper | |
pub struct Zip<'a> { | |
/// Lines before the current line | |
prev: Vec<&'a str>, |