Skip to content

Instantly share code, notes, and snippets.

View masaeedu's full-sized avatar

Asad Saeeduddin masaeedu

  • Montreal, QC, Canada
View GitHub Profile
@masaeedu
masaeedu / fp.nix
Last active August 13, 2020 09:41
fp.nix
{ pkgs }:
let
lib = pkgs.lib;
trace = builtins.trace;
show = builtins.toJSON;
perturb =
let
nix = pkgs.fetchurl {
@masaeedu
masaeedu / multicategory.agda
Last active August 23, 2020 01:16
multicategory.agda
module multicategory where
open import Level
open import Data.List
open import Data.Product
open import Function
open import Agda.Builtin.Equality
data Pullback {ℓ} {a b c : Set ℓ} (f : a → c) (g : b → c) : Set ℓ
where
module Categories where
open import Level
open import Function hiding (id; _∘_)
open import Data.List
open import Data.Bool
open import Data.Product

Keybase proof

I hereby claim:

  • I am masaeedu on github.
  • I am masaeedu (https://keybase.io/masaeedu) on keybase.
  • I have a public key ASBe0DwlBA8JuW1EKQW4eiCL4MVe9K-N9w8IXcVi0PlfSgo

To claim this, I am signing this object:

type AccessorAndId<D> =
| {accessor: keyof D}
| {id: string; accessor: AccessorFunction<D>}
export type Column<D = any> = Partial<Column.Basics> &
Partial<
Column.CellProps & Column.FilterProps & Column.FooterProps & Column.HeaderProps
> &
AccessorAndId<D> & {
/**
* Property name as string or Accessor
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedLists #-}
{-# OPTIONS_GHC -Wall #-}
module Lib where
import Control.Category ((<<<))
import Data.Function (fix)
import Data.Map (Map)
import qualified Data.Map.Lazy as Map

Thank you for the helpful response and pointers. I think I need to take my time to sort this out, thanks a lot and I'll come back with a better understanding, hopefully!

I did my homework. Now I'm not so certain about everything, so please take this with a grain of salt.

Typescript's generic functions seem to act like they're contravariant over the type parameter's type bound. I'm not entirely sure though.

Playground Link

// Assignment succeeds with F<unknown> -> F<string>