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 | |
``` |
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 #-} |
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) |
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>() |
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 \ | |
{ \ |
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> |
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 |
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/" | |
] | |
} |
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/" | |
] | |
} | |
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