Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # This code is an example for a tutorial on Ubuntu Unity/Gnome AppIndicators: | |
| # http://candidtim.github.io/appindicator/2014/09/13/ubuntu-appindicator-step-by-step.html | |
| import os | |
| import signal | |
| import json | |
| from urllib2 import Request, urlopen, URLError | |
| from gi.repository import Gtk as gtk |
I hereby claim:
To claim this, I am signing this object:
| module ULC where | |
| import Data.Set as S | |
| import Data.Map.Lazy as M | |
| --untyped lambda calculus - variables are numbers now as it's easier for renaming | |
| data Term | |
| = Var Int | |
| | Abs Int Term | |
| | App Term Term |
| module SystemT where | |
| import Data.Map as M | |
| import Data.Set as S | |
| data T | |
| = TNat | |
| | TArr T T | |
| deriving (Eq, Ord) |
| {-# LANGUAGE DeriveFunctor, GeneralizedNewtypeDeriving #-} | |
| {-# LANGUAGE FlexibleContexts, LambdaCase #-} | |
| -- | A humane representation of binding. | |
| module ABT ( FreeVar (..) | |
| , Operator (..) | |
| , ABT | |
| , View (..) | |
| , view | |
| , fold |
| {-# LANGUAGE DeriveTraversable #-} | |
| {-# LANGUAGE DeriveFoldable #-} | |
| {-# LANGUAGE DeriveFunctor #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| {-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
| module PatCompile where | |
| import Bound | |
| import Bound.Var | |
| import Bound.Scope | |
| import Control.Monad (ap) |
| {-# LANGUAGE LambdaCase, DeriveFunctor #-} | |
| module LambdaPi where | |
| import Bound | |
| import Control.Applicative | |
| import Control.Monad | |
| import Control.Monad.Gen | |
| import Control.Monad.Reader | |
| import qualified Data.Map as M | |
| import Data.Maybe | |
| import Prelude.Extras |
| --Roughly based on https://github.com/Gabriel439/Haskell-Morte-Library/blob/master/src/Morte/Core.hs by Gabriel Gonzalez et al. | |
| data Expr = Star | Box | Var Int | Lam Int Expr Expr | Pi Int Expr Expr | App Expr Expr deriving (Show, Eq) | |
| subst v e (Var v') | v == v' = e | |
| subst v e (Lam v' ta b ) | v == v' = Lam v' (subst v e ta) b | |
| subst v e (Lam v' ta b ) = Lam v' (subst v e ta) (subst v e b ) | |
| subst v e (Pi v' ta tb) | v == v' = Pi v' (subst v e ta) tb | |
| subst v e (Pi v' ta tb) = Pi v' (subst v e ta) (subst v e tb) | |
| subst v e (App f a ) = App (subst v e f ) (subst v e a ) |
| {-# LANGUAGE BangPatterns #-} | |
| {-# LANGUAGE DeriveFunctor #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE RecordWildCards #-} | |
| import Control.Comonad | |
| import Control.Comonad.Cofree | |
| import Control.Monad | |
| import Control.Monad.ST |