Continuation of Encoding Overlapping, Extensible Isomorphisms: encoding "open kinds" to better express some awkward type classes.
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
\[ | |
\begin{tikzcd} | |
&C | |
\arrow[ld, "\pi_X"'] | |
\arrow[rd, "\pi_Y"] | |
\\ | |
P \langle X X \rangle | |
\arrow[dr, "{P \langle id, f \rangle}"'] | |
&&P \langle Y, Y \rangle | |
\arrow[dl, "{P \langle f, id \rangle}"] |
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
{ | |
"title": "Cabal file", | |
"type": "object", | |
"properties": { | |
"license-files": { | |
"description": "One or more files containing the precise copyright license for the package.", | |
"items": { | |
"type": "string" | |
}, | |
"type": "array" |
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 | |
PolyKinds | |
, RankNTypes | |
, TypeFamilies | |
, TypeOperators | |
, TypeApplications | |
, FlexibleInstances | |
, ScopedTypeVariables | |
, AllowAmbiguousTypes | |
, MultiParamTypeClasses |
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 NoImplicitPrelude #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Protolude | |
import qualified Web.Scotty as Sc | |
import qualified Data.Text as Txt | |
import qualified Network.Wai.Middleware.Gzip as Sc |
I made a way to get more free stuff and free stuff is good.
The current implementation of deriveVia
is here, it works with all the examples here. Needs GHC 8.2 and th-desugar.
for new Haskellers to get pampered by their compiler. For the price of a line or two the compiler offers to do your job, to write uninteresting code for you (in the form of type classes) such as equality, comparison, serialization, ... in the case of 3-D vectors
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, PolyKinds, ScopedTypeVariables, UndecidableInstances, | |
FlexibleInstances, FlexibleContexts, GADTs, TypeFamilies, RankNTypes, | |
LambdaCase, TypeOperators, ConstraintKinds #-} | |
import GHC.TypeLits | |
import Data.Proxy | |
import Data.Singletons.Prelude | |
import Data.Singletons.Decide | |
import Data.Constraint |
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
;; 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 |
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
#!/bin/bash | |
echo '#!/bin/bash' | |
echo '' | |
echo 'failed_items=""' | |
echo 'function install_package() {' | |
echo 'echo EXECUTING: brew install $1 $2' | |
echo 'brew install $1 $2' | |
echo '[ $? -ne 0 ] && $failed_items="$failed_items $1" # package failed to install.' | |
echo '}' |
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 RankNTypes #-} | |
{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-unused-do-bind -fno-warn-unused-imports -fno-warn-orphans #-} | |
-- | |
-- Random walk emitter with go and stop button | |
-- | |
module Main where | |
import Control.Applicative |
NewerOlder