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
| {- | |
| This file demonstrates a technique for making working with de Bruijn-indexed | |
| terms easier that I learnt from the paper /The Linearity Monad/ by Jennifer | |
| Paykin and Steve Zdancewic. After defining well-typed terms `Γ ⊢ τ` using de Bruijn | |
| indices, we define an auxiliary function `lam` that takes in the variable term explicitly: | |
| > lam : {V : Type} {Γ : Cxt V} {τ σ : Ty V} | |
| > → (({Δ : Cxt V} → {{IsExt Δ (Γ , τ)}} → Δ ⊢ τ) | |
| > → (Γ , τ) ⊢ σ) | |
| > → Γ ⊢ τ ⇒ σ |
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
| {-# OPTIONS --postfix-projections #-} | |
| module tuple where | |
| ------------------------------------------------------------------------------ | |
| -- |
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 | |
| BlockArguments | |
| , ImplicitParams | |
| , LambdaCase | |
| , OverloadedStrings | |
| , PatternSynonyms | |
| , Strict | |
| , UnicodeSyntax | |
| #-} | |
| {-# options_ghc -Wincomplete-patterns -Wunused-imports #-} |
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 C : sig | |
| type t | |
| val empty : t | |
| val one : char -> t | |
| val union : t -> t -> t | |
| val inter : t -> t -> t | |
| val top : t | |
| val mem : char -> t -> bool | |
| val make : (char -> bool) -> t | |
| val equal : t -> t -> bool |
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
| {-# OPTIONS --cubical #-} | |
| module natmod where | |
| open import Cubical.Foundations.Prelude | |
| data Ctx : Type | |
| data _⊢_ : Ctx → Ctx → Type | |
| data Ty : Ctx → Type | |
| data Tm : Ctx → Type | |
| -- This is halfway between EAT and GAT. | |
| -- GAT is hard! Why is EAT so easy? |
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 PatternSynonyms #-} | |
| type Ix = Int | |
| type Lvl = Int | |
| type ULvl = Int | |
| data Sort = Type ULvl | Prop | |
| deriving (Show, Eq) | |
| data SortType = SType | SProp |
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
| # source:http://reocities.com/SiliconValley/heights/7052/opcode.txt | |
| From: [email protected] (Mark Hopkins) | |
| Newsgroups: alt.lang.asm | |
| Subject: A Summary of the 80486 Opcodes and Instructions | |
| (1) The 80x86 is an Octal Machine | |
| This is a follow-up and revision of an article posted in alt.lang.asm on | |
| 7-5-92 concerning the 80x86 instruction encoding. | |
| The only proper way to understand 80x86 coding is to realize that ALL 80x86 |
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
| #lang racket | |
| (require cpsc411/compiler-lib) | |
| (module+ a | |
| ;; Compiler style | |
| (define (expand e) | |
| (define (expand-expr e) | |
| (match e | |
| [`(and ,e1 ,e2) |
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
| ;; Exporting free identifier table operations that close over a global map | |
| #lang racket/base | |
| (require racket/list | |
| syntax/id-table) | |
| (provide env-ref env-has-id? env-add!) | |
| (define id-table (make-free-id-table)) |
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 PrettyParseError ( | |
| prettyParseError, | |
| PrettyParseErrorOptions(PrettyParseErrorOptions), | |
| prettyParseErrorDefaults | |
| ) where | |
| import Data.List (intercalate, nub) | |
| import Text.Parsec | |
| import Text.Parsec.Error | |
| import Text.Parsec.Pos |
NewerOlder