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
$ nix-env -f "<nixpkgs>" -qaP -A haskell.compiler | |
haskell.compiler.ghc8101 ghc-8.10.1 | |
haskell.compiler.integer-simple.ghc8101 ghc-8.10.1 | |
haskell.compiler.ghc8102 ghc-8.10.2 | |
haskell.compiler.integer-simple.ghc8102 ghc-8.10.2 | |
haskell.compiler.ghc8102Binary ghc-8.10.2-binary | |
haskell.compiler.ghc8102BinaryMinimal ghc-8.10.2-binary | |
haskell.compiler.integer-simple.ghc8103 ghc-8.10.3 | |
haskell.compiler.ghc8103 ghc-8.10.3 | |
haskell.compiler.native-bignum.ghcHEAD ghc-8.11.20200824 |
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
#! /usr/bin/env nix-shell | |
#! nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [scotty text relude co-log])" -i "runghc -Wall" | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DerivingVia #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE InstanceSigs #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE PatternSynonyms #-} |
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
#! /usr/bin/env nix-shell | |
#! nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [fgl])" -i "runghc -Wall" | |
{-# LANGUAGE ScopedTypeVariables #-} | |
import qualified Data.Graph.Inductive.Graph as G | |
import qualified Data.Graph.Inductive.NodeMap as GM | |
import Data.Graph.Inductive.PatriciaTree (Gr) | |
type Graph = Gr String Integer |
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
module Main where | |
import Prelude | |
import Effect (Effect) | |
import Control.Monad.Except.Trans (throwError) | |
import Effect.Console (log) | |
import Control.Alt ((<|>)) | |
import Data.Generic.Rep as GR | |
import Foreign (Foreign, ForeignError(..), fail) | |
import Foreign as Foreign |
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
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
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
{ | |
description = "Nix. All. The. Things."; | |
inputs = { | |
home-manager = { | |
url = "github:rycee/home-manager"; | |
inputs.nixpkgs.follows = "/unstable"; | |
}; | |
nixpkgs = { |
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
local a = vim.api | |
local test_data = { "foo", "bar", "bax" } | |
local test_options = { | |
height = 75, | |
width = 100, | |
relative = "editor", | |
anchor = "NW", | |
style = "minimal", |
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
Maybe I'll turn this into a blog post at some point. Right now I just want some | |
clarity and peace of mind, so I'll dump my thoughts into this Gist. | |
Diagnostics information in Neovim can either come from one or several related | |
files, or the entire project. An example of the former would be the module | |
you're currently working on and all its dependencies. Regardless of which type | |
of diagnostics you prefer, I think it's safe to assume that you want to be able | |
to use both. Sometimes a change compiles in the scope of a single module but | |
not in the context of the entire project, since usages of the changed module | |
need to update their interface definitions or something like that. |
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
#!/bin/sh | |
# https://en.wikipedia.org/wiki/Percent-encoding | |
# https://stackoverflow.com/questions/38015239/url-encoding-a-string-in-shell-script-in-a-portable-way | |
# https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html#The-LANGUAGE-variable | |
# "The variable LANGUAGE is ignored if the locale is set to ‘C’" | |
# Not entirely sure why this is done to be honest | |
LANG=C; |
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
let | |
pkgs = import <nixpkgs> {}; | |
cinaps = pkgs.ocaml-ng.ocamlPackages_4_09.buildDunePackage rec { | |
pname = "cinaps"; | |
version = "latest"; | |
src = pkgs.fetchFromGitHub { | |
owner = "ocaml-ppx"; | |
repo = "cinaps"; | |
rev = "e3183c4733d0577d4d54211cafa4a52dfe5dd235"; |