Skip to content

Instantly share code, notes, and snippets.

View abakst's full-sized avatar

Alexander Bakst abakst

View GitHub Profile
(define (gather-packages package)
(define (%gather-packages lst package)
(let ((pkg (if (package? package)
package
(name->package package))))
(let ((sub-packages (%record-ref pkg 2)))
(if (null? sub-packages)
(cons pkg lst)
(append (cons pkg lst)
(concatenate (map (lambda (child)
(define (gather-packages package)
(define (%gather-packages lst package)
(let ((pkg (if (package? package)
package
(name->package package))))
(let ((sub-packages (%record-ref pkg 2)))
(if (null? sub-packages)
(cons pkg lst)
(append (cons pkg lst)
(concatenate (map (lambda (child)
\documentclass{article}
\usepackage{fullpage}
\usepackage{enumerate}
\usepackage{listings}
\usepackage{xspace}
\newcommand{\question}[1] {\subsection*{Question #1}}
\newcommand{\ie}{\emph{i.e.\@\xspace}}
\begin{document}
\title{CSE 221 Homework}
module Foo() where
{-@
data Message = Ping { pingPid :: Pid }
| Pong { pongPid :: Pid }
@-}
data Message = Ping Pid
| Pong Pid
module Foo where
import Language.Haskell.Liquid.Prelude
{-@
data Message = Ping { pingPid :: {v:Pid | validPid v} }
| Pong { pongPid :: {v:Pid | validPid v} }
@-}
data Message = Ping Pid
| Pong Pid
fn main() {
let mut x = 1;
let mut y = 0;
{
let z = alias(&mut x,&mut y);
*z = 1;
}
println!("y is now {}", y);
}

Keybase proof

I hereby claim:

  • I am abakst on github.
  • I am abakst (https://keybase.io/abakst) on keybase.
  • I have a public key ASAlnfMUrWPpcpCkisfrewWuk0WKBH7DaJtOqnu6PclmsQo

To claim this, I am signing this object:

; No segfault if the below line is uncommented
;(set-option :produce-proofs true)
;
; success
(set-option :produce-models true)
; success
(set-option :pp.decimal true)
; success
(set-option :global-declarations true)
; success