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
ZFC.idr:60:7:Incomplete term $ {a = (c ** (b : A) -> (underscore ** ({__pi_arg46} : member {univ = A} {{@@instanceZFC.ZF#Set univ {univ = A} {{c}}}} b c) -> (underscore ** (\ z : A => (b ** (underscore ** member {univ = A} {{@@instanceZFC.ZF#Set univ {univ = A} {{c}}}} z b))) b)))} {b = A} (getWitness {a = A} {P = \ c : A => (b : A) -> (underscore ** ({__pi_arg46} : member {univ = A} {{@@instanceZFC.ZF#Set univ {univ = A} {{c}}}} b c) -> (underscore ** (\ z : A => (b ** (underscore ** member {univ = A} {{@@instanceZFC.ZF#Set univ {univ = A} {{c}}}} z b))) b))}) (Separation {univ = A} {{c}} ($ {a = (c ** (z : A) -> ({__pi_arg44} : (b ** (underscore ** member {univ = A} {{@@instanceZFC.ZF#Set univ {univ = A} {{c}}}} z b))) -> member {univ = A} {{@@instanceZFC.ZF#Set univ {univ = A} {{c}}}} z c)} {b = A} (getWitness {a = A} {P = \ c : A => (z : A) -> ({__pi_arg44} : (b ** (underscore ** member {univ = A} {{@@instanceZFC.ZF#Set univ {univ = A} {{c}}}} z b))) -> member {univ = A} {{@@instanceZFC.ZF#Set univ {univ |
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 EmptyDataDecls, GADTs, TypeOperators #-} | |
module Rules where | |
import Prelude hiding (pred) | |
data Term a where | |
Var :: String -> Term a | |
App :: Term (a -> b) -> Term a -> Term b | |
instance Show (Term a) where | |
showsPrec _ (Var s) = showString s |
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 ConstraintKinds, DataKinds, FlexibleContexts, FlexibleInstances #-} | |
{-# LANGUAGE GADTs, MultiParamTypeClasses, PolyKinds, RankNTypes #-} | |
{-# LANGUAGE TypeFamilies, TypeOperators, UndecidableInstances #-} | |
module Monadish where | |
import Control.Monad.Trans | |
import Control.Monad.Trans.Maybe | |
class Category cat where | |
identity :: cat a a | |
(@@) :: cat b c -> cat a b -> cat a 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
module DummyMonad where | |
data DM a = DM | |
instance Functor DM where | |
fmap _ DM = DM | |
instance Monad DM where | |
return _ = DM | |
DM >>= _ = DM |
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 FlexibleContexts, MultiParamTypeClasses #-} | |
{-# LANGUAGE NoMonomorphismRestriction, TupleSections #-} | |
module Main where | |
import Data.Complex | |
import Data.List | |
import Diagrams.Animation | |
import Diagrams.Backend.Cairo.CmdLine | |
import Diagrams.Prelude | |
main :: IO () |
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
plusCommutative :: SNat n -> SNat m -> Eql (n :+: m) (m :+: n) | |
plusCommutative SZ SZ = Eql | |
plusCommutative SZ (SS m) = | |
case plusZR (SS m) of | |
Eql -> Eql | |
plusCommutative (SS n) m = | |
case plusCommutative n m of | |
Eql -> case sAndPlusOne (m %+ n) of | |
Eql -> case plusAssociative m n sOne of | |
Eql -> case sAndPlusOne n of |
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
cabal update && cabal install ghc-mod && cd ~/Library/Haskell/ghc-7.4.1/lib/ghc-mod-1.12.3/share/ && make EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs && cp *.el *.elc ~/.emacs.d/elisp/ |
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 NoMonomorphismRestriction #-} | |
module Main where | |
import Diagrams.Backend.Cairo.CmdLine | |
import Diagrams.Prelude | |
import Diagrams.TwoD | |
main :: IO () | |
main = defaultMain $ pad 1.1 $ frame $ | |
koch 4 # triangulate # lw 1 # lc black |
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
module CellularAutomaton where | |
import Control.Arrow | |
import Control.DeepSeq | |
import Data.Char | |
import Data.Maybe | |
import Numeric | |
data OneDAutomaton s = ODA { left :: [s] | |
, right :: [s] | |
} |