- 🎨 when improving the format/structure of the code
- 🚀 when improving performance
- ✏️ when writing docs
- 💡 new idea
- 🚧 work in progress
- ➕ when adding feature
- ➖ when removing feature
- 🔈 when adding logging
- 🔇 when reducing logging
- 🐛 when fixing a bug
module FizzBuzzC | |
%default total | |
-- Dependently typed FizzBuzz, constructively | |
-- A number is fizzy if it is evenly divisible by 3 | |
data Fizzy : Nat -> Type where | |
ZeroFizzy : Fizzy 0 | |
Fizz : Fizzy n -> Fizzy (3 + n) |
A quick dive into GHC's codebase (compiler/typecheck/TcUnify.hs
) and searching for "but its type" gives me this (inside a where clause):
mk_ctxt :: TidyEnv -> TcM (TidyEnv, MsgDoc)
mk_ctxt env = do { (env', ty) <- zonkTidyTcType env orig_ty
; let (args, _) = tcSplitFunTys ty
n_actual = length args
(env'', orig_ty') = tidyOpenType env' orig_ty
; return (env'', mk_msg orig_ty' ty n_actual) }
mk_msg orig_ty ty n_args
Emacs packages, features, files, layers, extensions, auto-loading, require
,
provide
, use-package
… All these terms getting you confused? Let’s clear up
a few things.
Emacs files contains code that can be evaluated. When evaluated, the functions, macros and modes defined in that file become available to the current Emacs session. Henceforth, this will be termed as loading a file.
One major problem is to ensure that all the correct files are loaded, and in the
-- build with cabal file: | |
-- name: aeson-ex | |
-- version: 0.1 | |
-- build-type: Simple | |
-- | |
-- executable aeson_ex | |
-- hs-source-dirs: src | |
-- main-is: Main.hs | |
-- build-depends: base >= 4, |
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
query
mutation
Reference implementation also adds the third type: subscription
. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
otto | |
https://ottoproject.io/ | |
https://github.com/hashicorp/otto | |
deis | |
https://deis.com/ | |
https://github.com/deis/deis | |
has 5 full-time devs | |
flynn |
{-# LANGUAGE DefaultSignatures #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
module GenericsTypeName | |
( TypeName(..) | |
, readBS | |
) where | |
import Data.ByteString (ByteString) |
;; 1. place this in ~/.emacs.d/private/intero/packages.el | |
;; 2. add intero, syntax-checking and auto-completion to your | |
;; ~/.spacemacs layer configuration & remove the haskell layer | |
;; if you were using that before | |
;; 3. make sure you have stack installed http://haskellstack.org | |
;; 4. fire up emacs & open up a stack project's source files |
#!/usr/bin/env bash | |
############################################################################## | |
# | |
# check-commit-signature | |
# ---------------------- | |
# A server-side update git hook for checking the GPG signature of a pushed | |
# commit. | |
# | |
# To enable this hook, rename this file to "update". | |
# |