Skip to content

Instantly share code, notes, and snippets.

@johnmpost
johnmpost / library.ts
Created June 9, 2024 22:49
client-server api architecture using @effect/schema and integrating with @tanstack/react-query
import { pipe, Schema, Ef, A, O, flow } from "./toolbox";
import { CannotConnectToHost } from "./errors";
import {
useMutation,
UseMutationOptions,
useQuery,
UseQueryOptions,
QueryKey,
} from "@tanstack/react-query";
@TikhonJelvis
TikhonJelvis / shell.nix
Last active October 18, 2020 03:24
A simple shell.nix for a Haskell project that calls cabal2nix for you.
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
# Build a default.nix file from our .cabal file:
here = ./.;
project = pkgs.stdenv.mkDerivation ({
name = "default.nix";