This file contains hidden or 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
| default: quick | |
| quick: | |
| pdflatex paper.tex | |
| full: | |
| pdflatex paper.tex | |
| bibtex paper | |
| pdflatex paper.tex | |
| pdflatex paper.tex |
This file contains hidden or 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 GADTs, TypeFamilies, EmptyDataDecls #-} | |
| {- | |
| A Haskell-based implementation of the monadic semantics for the | |
| simply-typed Call-By-Name computational lambda calculus, following | |
| Moggi's 'Computational lambda-calculus and monads' (1989) (technical report version) | |
| but for the typed calculus (rather than untyped as in this paper). | |
| Category theory seminar, Programming Languages and Systems group, |
This file contains hidden or 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
| % Highlight comments in darkgreen | |
| \definecolor{darkgreen}{rgb}{0,0.5,0} | |
| \newcommand{\commenthighlight}{\color{darkgreen}\quad-{}- } | |
| \let\onelinecomment=\commenthighlight | |
| % Highlight constructors in darkblue | |
| \definecolor{darkblue}{rgb}{0,0,0.5} | |
| \renewcommand{\Conid}[1]{\textcolor{darkblue}{\textit{#1}}} |
This file contains hidden or 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 Category where | |
| open import Level | |
| open import Relation.Binary.PropositionalEquality | |
| open Level | |
| record Category {lobj : Level} {larr : Level} : Set (suc (lobj ⊔ larr)) where | |
| field obj : Set lobj | |
| arr : (src : obj) -> (trg : obj) -> Set larr |
This file contains hidden or 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
| class Pretty t where | |
| type ExtraInfo t | |
| pprint :: FortranVersion -> t -> ExtraInfo t -> Doc | |
| instance Pretty (Expression a) where | |
| type ExtraInfo (Expression a) = () | |
| pprint v e () = ... | |
| instance Pretty (Block a) where | |
| type ExtraInfo (Block a) = Int -- indent level |
This file contains hidden or 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 CatToMon where | |
| open import Data.Product | |
| open import Data.Sum | |
| open import Data.Unit | |
| open import Data.Empty | |
| open import Level | |
| open import Relation.Binary.PropositionalEquality | |
| open import Relation.Nullary.Decidable | |
| open import Relation.Binary |
This file contains hidden or 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
| {- | |
| Proof of concept for adding linearity constraints on the communication-patterns | |
| of Cloud Haskell. | |
| Uses the 'effect-monad' package for embedding effect systems in Haskell types: | |
| cabal install effect-monad | |
| -} |
This file contains hidden or 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
| define :sequence do |xs,tp| | |
| xs.each do |ys| | |
| in_thread do | |
| if (ys[0] == :zawa || ys[0] == :tb303 || ys[0] == :pulse || ys[0] == :s) then | |
| synth = ys[0] | |
| zs = ys[1..-1] | |
| else | |
| synth = :tri | |
| zs = ys | |
| end |
This file contains hidden or 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
| instance (Arbitrary a) => Arbitrary (Matrix a) where | |
| -- NB: for square matrices | |
| arbitrary = sized (\n -> do xs <- vectorOf (n*n) arbitrary | |
| return $ matrix n n (\(i, j) -> xs !! ((i-1)*n + (j-1)))) |
This file contains hidden or 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
| * https://www.haskell.org/ghc/docs/7.8.2/html/users_guide/prof-compiler-options.html | |
| GHC profiling options | |
| * http://lambdor.net/?p=258 | |
| Describes how to install profile libraries | |
| * http://www.haskell.org/pipermail/haskell-cafe/2009-April/060482.html |