View Woes.lhs
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
Servant woes for future me to figure out | |
======================================== | |
```sh | |
stack ghci Woes.lhs \ | |
--package servant \ | |
--package servant-client-core \ | |
--package servant-client \ | |
--package text | |
``` |
View GCLI.hs
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
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE DerivingStrategies #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE ScopedTypeVariables #-} |
View type.hs
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
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE StandaloneKindSignatures #-} | |
{-# LANGUAGE TypeFamilyDependencies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
import Prelude (Bool (True, False)) | |
import Data.Kind (Type) |
View example.ts
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
import { stretch, stretchP } from './implementation'; | |
interface IApplication { | |
wow: boolean; | |
great: string; | |
} | |
function stretchExample0(cond: boolean): IApplication { | |
// Reach for an `IApplication`, but start with `{}`. | |
const app = stretch<IApplication>() |
View functors.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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define Functor(T, A, B) Functor##T##A##B | |
#define Functorable(T, A, B) Functorable##T##A##B | |
#define DefineFunctorOf(ReturnT, A, B) \ | |
typedef struct \ | |
{ \ |
View itrbench.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
#include "iterator.h" | |
#include "maybe.h" | |
#include "typeclass.h" | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <inttypes.h> | |
#include <time.h> | |
#include <unistd.h> |
View yes.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
#include <stdio.h> | |
#define sleeping int | |
#define with main | |
#define mother (void) | |
#define theresa { | |
#define drifting char* | |
#define a = | |
#define brahmin ; | |
#define you puts |
View host.json
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
{ | |
"name": "pingpong", | |
"description": "Native messaging host example", | |
"path": "path/to/release_executable", | |
"type": "stdio", | |
"allowed_origins": [ | |
"chrome-extension://extension_id/" | |
] | |
} |
View host.json
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
{ | |
"name": "pingpong", | |
"description": "Native messaging host example", | |
"path": "path/to/release_executable", | |
"type": "stdio", | |
"allowed_origins": [ | |
"chrome-extension://extension_id/" | |
] | |
} | |
View strfuncs.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
#include<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> | |
#include "strfuncs.h" | |
#include "strfuncsdef.h" | |
// Append given char to given string | |
// Returns NULL on failure | |
static char* str_append(char element, char* str, size_t end_index, size_t* size) | |
{ |
NewerOlder