## TL;DR
It would be really nice to have a set of GraphQL Documents which collectively express the entire GraphQL grammar. This would include atypical constructions such as random insertions of comma characters as whitespace.
## Problem Statement
{-# LANGUAGE RecordWildCards #-} | |
{-# LANGUAGE BlockArguments #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
module RecursionSchemes where | |
-------------------------------------------------------------------------------- | |
import Data.Smash | |
import Data.Function ((&)) |
module Main where | |
import Data.Foldable | |
import Data.List | |
import qualified Data.Map.Strict as M | |
-- https://en.wikipedia.org/wiki/Square_lattice | |
-- https://en.wikipedia.org/wiki/Ulam_spiral | |
data Dir a = U a | D a | L a | R a |
module Main where | |
import Control.Monad | |
import Control.Monad.Logic | |
import Control.Monad.Logic.Class | |
import Control.Monad.Trans.Class | |
import Control.Monad.Trans.Reader | |
import Control.Applicative | |
import Data.List |
\documentclass[tikz,convert={outfile=\jobname.svg}]{standalone} | |
%\usetikzlibrary{...}% tikz package already loaded by 'tikz' option | |
\begin{document} | |
\begin{tikzpicture}% Example: | |
\[\begin{tikzcd} | |
{(f a \oplus f b) \oplus f c} && {fa \oplus (fb \oplus fc)} & {} \\ | |
\\ | |
{f (a \otimes b) \oplus f c} && {f a \oplus f (b \otimes c)} \\ | |
\\ |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE DeriveFoldable #-} | |
{-# LANGUAGE DeriveTraversable #-} | |
module FreerMonad where | |
import Data.Bifunctor (first) | |
import Data.Functor.Sum | |
import Data.Functor.Contravariant | |
import Data.Functor.Contravariant.Coyoneda | |
import Data.Functor.Kan.Lan |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { Provider, connect } from 'react-redux'; | |
import { createStore } from 'redux'; | |
import * as R from 'ramda'; | |
const EMPTY = ''; | |
const ACTION = { | |
ADDITEM : 'addItem', |
module Main | |
main = print "hi, I'm an example of bidirectional typechecking" | |
type Var = String | |
data Term | |
= Var Var | |
| Abs Var Term | |
| App Term Term |
-- Notes on comonadic signal generation | |
time :: Store Double Double | |
time = store id 0 | |
sineStore :: Double -> Store Double Double | |
sineStore freq = store sine 0 | |
where | |
sine :: Double -> Double | |
sine t = sin (2 * pi * t * freq) |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE InstanceSigs #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
module SemiRepresentable where | |
import qualified Data.Map as M | |
import Numeric.Natural | |
import qualified Data.Set as S | |
import Data.These |