Skip to content

Commit 3493724

Browse files
committed
Add example
1 parent 4ed3e27 commit 3493724

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

bin/run

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/env bash
2+
set -eu
3+
4+
W=/workspace/agda
5+
# Create container
6+
C=$(docker container create --rm -w $W ghcr.io/codewars/agda:latest agda --verbose=0 --include-path=. --library=standard-library --library=cubical ExampleTest.agda)
7+
8+
# Copy files from the current directory
9+
# example/Example.agda
10+
# example/ExampleTest.agda
11+
docker container cp example/. $C:$W
12+
13+
# Run tests
14+
docker container start --attach $C

example/Example.agda

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{-# OPTIONS --safe #-}
2+
module Example where
3+
open import Agda.Builtin.Equality
4+
5+
_⇆_ : {A : Set} {a b c : A} a ≡ b b ≡ c a ≡ c
6+
refl ⇆ refl = refl

example/ExampleTest.agda

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{-# OPTIONS --safe #-}
2+
module ExampleTest where
3+
open import Agda.Builtin.Equality
4+
open import Example
5+
6+
check : {A : Set} {a b c : A} a ≡ b b ≡ c a ≡ c
7+
check = _⇆_

0 commit comments

Comments
 (0)