Skip to content

Instantly share code, notes, and snippets.

lkuper@mitzi:~$ cabal --version
cabal-install version 0.14.0
using version 1.14.0 of the Cabal library
lkuper@mitzi:~$ which cabal
/usr/local/bin/cabal
lkuper@mitzi:~$ /usr/local/bin/cabal --version
cabal-install version 1.18.0.1
using version 1.18.0 of the Cabal library
lkuper@mitzi:~$ ~/.cabal/bin/cabal --version
cabal-install version 1.18.0.1
enum Color { cyan, magenta, yellow, black }
impl Eq for Color {
fn eq(&self, other: &Color) -> bool {
match (*self, *other) {
(cyan, cyan) => { true }
(magenta, magenta) => { true }
(yellow, yellow) => { true }
(black, black) => { true }
_ => { false }
enum Color { cyan, magenta, yellow, black }
impl Eq for Color {
fn eq(&self, other: &Color) -> bool {
match (*self, *other) {
(cyan, cyan) => { true }
(magenta, magenta) => { true }
(yellow, yellow) => { true }
(black, black) => { true }
_ => { false }
enum Color { cyan, magenta, yellow, black }
impl Eq for Color {
fn eq(&self, other: &Color) -> bool {
match (*self, *other) {
(cyan, cyan) => { true }
(magenta, magenta) => { true }
(yellow, yellow) => { true }
(black, black) => { true }
_ => { false }
// Putting #[no_implicit_prelude] on this mod, because we want to
// define and use our own `equals`.
#[no_implicit_prelude]
pub mod default_methods_example {
// Explicitly import this stuff.
use std::clone::Clone;
use std::io::println;
lkuper@mitzi:~/repos/rust$ make check
cfg: build triple x86_64-unknown-linux-gnu
cfg: host triples x86_64-unknown-linux-gnu
cfg: target triples x86_64-unknown-linux-gnu
cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE)
cfg: host for x86_64-unknown-linux-gnu is x86_64
cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu
cfg: using gcc
cfg: no llnextgen found, omitting grammar-verification
cfg: including dist rules
(defn not-membero [elem ls]
(conde
[(emptyo ls)] ;; just succeed if ls is empty
[(fresh [a d]
(conso a d ls)
(!= a elem)
(not-membero elem d))]))
open import Preliminaries
module lecture.Lecture3Start where
open Vector using (Vec ; [] ; _::_)
open Nat using (_+_)
open List using (_++_ ; [_] ; ++-assoc)
String = List Char
GHCi, version 7.4.2: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :set -package Agda-2.3.0
cannot satisfy -package Agda-2.3.0
(use -v for more information)
Prelude> :mod + Agda.Interaction.GhciTop
<no location info>:
lkuper@lenny:/boot$ ls -la
total 220522
drwxr-xr-x 4 root root 2048 Jun 25 15:26 .
drwxr-xr-x 24 root root 4096 Jun 25 15:26 ..
-rw-r--r-- 1 root root 844882 Oct 9 2012 abi-3.5.0-17-generic
-rw-r--r-- 1 root root 844937 Oct 19 2012 abi-3.5.0-18-generic
-rw-r--r-- 1 root root 845342 Nov 13 2012 abi-3.5.0-19-generic
-rw-r--r-- 1 root root 848069 Dec 11 2012 abi-3.5.0-21-generic
-rw-r--r-- 1 root root 848290 Jan 24 08:38 abi-3.5.0-23-generic
-rw-r--r-- 1 root root 849836 Feb 6 21:13 abi-3.5.0-24-generic