on 4bef2ee help sign in
.travis.yml+30−57
since splitsnapshots
unifiedsplit
@@ -1,4 +1,5 @@
1−dist: xenial
1+dist: trusty
2+sudo: false
2
3
3language: c
4language: c
4
5
@@ -8,37 +9,26 @@ env:
8
9
9matrix:
10matrix:
10 include:
11 include:
11− - env: CABALVER="2.4" GHCVER="8.6.5" STACKVER="15.4" STYLISH=YES
12+ - env: CABALVER="1.24" GHCVER="8.0.1" STACKVER="7.14" STYLISH=YES
12− addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.5,hscolour], sources: [hvr-ghc]}}
13+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,hscolour], sources: [hvr-ghc]}}
13− - env: CABALVER="2.4" GHCVER="8.2.2" TESTS="lib_doc doc"
14+ - env: CABALVER="1.22" GHCVER="7.10.3" TESTS="lib_doc doc"
14− compiler: ": #GHC 8.2.2"
15+ compiler: ": #GHC 7.10.3"
15− addons: {apt: {packages: [cabal-install-2.4,ghc-8.2.2,cppcheck,hscolour], sources: [hvr-ghc]}}
16+ addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,cppcheck,hscolour], sources: [hvr-ghc]}}
16− - env: CABALVER="2.4" GHCVER="8.2.2" TESTS="test_js"
17+ - env: CABALVER="1.22" GHCVER="7.10.3" TESTS="test_js"
17− compiler: ": #GHC 8.2.2"
18+ compiler: ": #GHC 7.10.3"
18− addons: {apt: {packages: [cabal-install-2.4,ghc-8.2.2,cppcheck,hscolour], sources: [hvr-ghc]}}
19+ addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,cppcheck,hscolour], sources: [hvr-ghc]}}
19− - env: CABALVER="2.4" GHCVER="8.2.2" TESTS="test_c"
20+ - env: CABALVER="1.22" GHCVER="7.10.3" TESTS="test_c"
20− compiler: ": #GHC 8.2.2"
21+ compiler: ": #GHC 7.10.3"
21− addons: {apt: {packages: [cabal-install-2.4,ghc-8.2.2,cppcheck,hscolour], sources: [hvr-ghc]}}
22+ addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,cppcheck,hscolour], sources: [hvr-ghc]}}
22− - env: CABALVER="2.4" GHCVER="8.4.4" TESTS="lib_doc doc"
23+ - env: CABALVER="1.24" GHCVER="8.0.1" TESTS="lib_doc doc"
23− compiler: ": #GHC 8.4.4"
24+ compiler: ": #GHC 8.0.1"
24− addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4,cppcheck,hscolour], sources: [hvr-ghc]}}
25+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,cppcheck,hscolour], sources: [hvr-ghc]}}
25− - env: CABALVER="2.4" GHCVER="8.4.4" TESTS="test_js"
26+ - env: CABALVER="1.24" GHCVER="8.0.1" TESTS="test_js"
26− compiler: ": #GHC 8.4.4"
27+ compiler: ": #GHC 8.0.1"
27− addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4,cppcheck,hscolour], sources: [hvr-ghc]}}
28− - env: CABALVER="2.4" GHCVER="8.4.4" TESTS="test_c"
29− compiler: ": #GHC 8.4.4"
30− addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4,cppcheck,hscolour], sources: [hvr-ghc]}}
31− - env: CABALVER="3.0" GHCVER="8.8.3" TESTS="lib_doc doc"
32− compiler: ": #GHC 8.8.3"
33− addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}}
28+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,cppcheck,hscolour], sources: [hvr-ghc]}}
34− - env: CABALVER="3.0" GHCVER="8.8.3" TESTS="test_js"
29+ - env: CABALVER="1.24" GHCVER="8.0.1" TESTS="test_c"
35− compiler: ": #GHC 8.8.3"
36− addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}}
37− - env: CABALVER="3.0" GHCVER="8.8.3" TESTS="test_c"
38− compiler: ": #GHC 8.8.3"
30+ compiler: ": #GHC 8.0.1"
39− addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}}
31+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,cppcheck,hscolour], sources: [hvr-ghc]}}
40− - env: CABALVER="3.0" GHCVER="8.8.3" IDRIS2=YES
41− addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3], sources: [hvr-ghc]}}
42 fast-finish: true
32 fast-finish: true
43
33
44cache:
34cache:
@@ -57,7 +47,7 @@ before_install:
57 - unset CC
47 - unset CC
58 - if [[ $TRAVIS_OS_NAME == 'linux' ]];
48 - if [[ $TRAVIS_OS_NAME == 'linux' ]];
59 then
49 then
60− export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.cabal/bin:$HOME/opt/scheme/bin/:$PATH;
50+ export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.cabal/bin:$PATH;
61 export SED=sed;
51 export SED=sed;
62 export ZCAT=zcat;
52 export ZCAT=zcat;
63 fi
53 fi
@@ -72,21 +62,6 @@ before_install:
72 export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH;
62 export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH;
73 fi
63 fi
74 - if [ -n "$STYLISH" ]; then ./stylize.sh; exit $?; fi
64 - if [ -n "$STYLISH" ]; then ./stylize.sh; exit $?; fi
75− - if [ -n "$IDRIS2" ];
76− then
77− git clone https://github.com/edwinb/Idris2 &&
78− wget https://github.com/cisco/ChezScheme/archive/v9.5.2.tar.gz &&
79− tar xvzf v9.5.2.tar.gz &&
80− cd ChezScheme-9.5.2 &&
81− ./configure --threads --installprefix=$HOME/opt/scheme &&
82− make -j install &&
83− cd .. &&
84− cabal v1-update &&
85− travis_wait cabal v1-install &&
86− cd Idris2 &&
87− make idris2 && make base && make contrib;
88− exit $?;
89− fi
90
65
91install:
66install:
92 - which cabal
67 - which cabal
@@ -104,7 +79,7 @@ install:
104 # causing cabal's default configuration (jobs: $ncpus)
79 # causing cabal's default configuration (jobs: $ncpus)
105 # to run into the GHC #9221 bug which can result in longer build-times.
80 # to run into the GHC #9221 bug which can result in longer build-times.
106 - $SED -i -r 's/(^jobs:).*/\1 2/' $HOME/.cabal/config
81 - $SED -i -r 's/(^jobs:).*/\1 2/' $HOME/.cabal/config
107− - cabal v1-install -f FFI --only-dependencies --enable-tests --dry -v > installplan.txt
82+ - cabal install -f FFI --only-dependencies --enable-tests --dry -v > installplan.txt
108 - $SED -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
83 - $SED -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
109 # check whether current requested install-plan matches cached package-db snapshot
84 # check whether current requested install-plan matches cached package-db snapshot
110 - if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;
85 - if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;
@@ -117,7 +92,7 @@ install:
117 echo "cabal build-cache MISS";
92 echo "cabal build-cache MISS";
118 rm -rf $HOME/.cabsnap;
93 rm -rf $HOME/.cabsnap;
119 mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
94 mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
120− cabal v1-install -f FFI --only-dependencies --enable-tests;
95+ cabal install -f FFI --only-dependencies --enable-tests;
121 fi
96 fi
122 # snapshot package-db on cache miss
97 # snapshot package-db on cache miss
123 - if [ ! -d $HOME/.cabsnap ];
98 - if [ ! -d $HOME/.cabsnap ];
@@ -128,30 +103,28 @@ install:
128 cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
103 cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
129 fi
104 fi
130
105
131−
132before_script:
106before_script:
133 - ORIGINAL_DIR=$(pwd)
107 - ORIGINAL_DIR=$(pwd)
134− - cabal v1-sdist
108+ - cabal sdist
135 - cd ..
109 - cd ..
136 - tar -xf ${ORIGINAL_DIR}/dist/${PKGNAME}*.tar.gz
110 - tar -xf ${ORIGINAL_DIR}/dist/${PKGNAME}*.tar.gz
137 - cd ${PKGNAME}*
111 - cd ${PKGNAME}*
138script:
112script:
139− - export LD_PRELOAD=/opt/ghc/${GHCVER}/lib/ghc-${GHCVER}/rts/libffi.so.7
140###
113###
141 - echo 'Configure...' && echo -en 'travis_fold:start:script.configure\\r'
114 - echo 'Configure...' && echo -en 'travis_fold:start:script.configure\\r'
142− - cabal v1-configure -f FFI -f CI --enable-tests
115+ - cabal configure -f FFI -f CI --enable-tests
143 - echo -en 'travis_fold:end:script.configure\\r'
116 - echo -en 'travis_fold:end:script.configure\\r'
144###
117###
145 - echo 'Build...' && echo -en 'travis_fold:start:script.build\\r'
118 - echo 'Build...' && echo -en 'travis_fold:start:script.build\\r'
146− - cabal v1-build
119+ - cabal build
147 - echo -en 'travis_fold:end:script.build\\r'
120 - echo -en 'travis_fold:end:script.build\\r'
148###
121###
149 - echo 'Copy...' && echo -en 'travis_fold:start:script.copy\\r'
122 - echo 'Copy...' && echo -en 'travis_fold:start:script.copy\\r'
150− - cabal v1-copy
123+ - cabal copy
151 - echo -en 'travis_fold:end:script.copy\\r'
124 - echo -en 'travis_fold:end:script.copy\\r'
152###
125###
153 - echo 'Register...' && echo -en 'travis_fold:start:script.register\\r'
126 - echo 'Register...' && echo -en 'travis_fold:start:script.register\\r'
154− - cabal v1-register
127+ - cabal register
155 - echo -en 'travis_fold:end:script.register\\r'
128 - echo -en 'travis_fold:end:script.register\\r'
156###
129###
157 - echo 'Cppcheck...' && echo -en 'travis_fold:start:script.cppcheck\\r'
130 - echo 'Cppcheck...' && echo -en 'travis_fold:start:script.cppcheck\\r'
CHANGELOG.md+1−30
@@ -1,33 +1,4 @@
1−# New since last release
2−+ Updated to work with GHC 8.8 and cabal 3.0
3−
4−# New in 1.3.2
1+# New in 1.3.*
5−+ Documentation added to proof section
6−
7−## Library updates
8−+ `openFile` opens the file in binary mode on Windows.
9−+ Added library functions `clockTime` and `fRemove`
10−
11−## Tool updates
12−+ Modules no longer require building if imports have changed but all
13− interfaces (i.e. types for names declared `export` and definitions of names
14− declared `public export`) are unchanged.
15−+ The result of calling `:doc` now details the accessbility of items as well as their totality.
16−
17−## Miscellaneous updates
18−+ Compiler flag `--optimise-nat-like-types` enables compilation
19− of `Nat`-like type families to big integers. A type family
20− is `Nat`-like if, after erasure, it has two constructors,
21− one nullary, the other one with exactly one recursive field.
22−
23−# New in 1.3.1
24−
25−## Tool updates
26−+ Fixes for building with GHC 8.6
27−+ Fix for megaparsec update
28−+ Some fixes for memory allocation issues in the C back end
29−
30−# New in 1.3.0
31
2
32## Language updates
3## Language updates
33+ Old 'induction' tactics and eliminator generation functionality ('%elim', '%case', 'elim_for') is no longer supported.
4+ Old 'induction' tactics and eliminator generation functionality ('%elim', '%case', 'elim_for') is no longer supported.
CITATION.md+1−1
@@ -17,7 +17,7 @@ If you use `Idris` in your work we would prefer it if you would use the followin
17 pages = {552--593},
17 pages = {552--593},
18 numpages = {42},
18 numpages = {42},
19 doi = {10.1017/S095679681300018X},
19 doi = {10.1017/S095679681300018X},
20− URL = {https://journals.cambridge.org/article_S095679681300018X},
20+ URL = {http://journals.cambridge.org/article_S095679681300018X},
21}
21}
22```
22```
23
23
CONTRIBUTING.md+6−6
@@ -6,9 +6,9 @@ Here are a few guidelines that we would like contributors to follow so that we c
6
6
7## Getting Started
7## Getting Started
8
8
9−1. Make sure you are familiar with [Git](https://git-scm.com/book).
9+1. Make sure you are familiar with [Git](http://git-scm.com/book).
101. Make sure you have a [GitHub account](https://github.com/signup/free).
101. Make sure you have a [GitHub account](https://github.com/signup/free).
11−1. Make sure you are familiar with: [Idris](https://eb.host.cs.st-andrews.ac.uk/writings/idris-tutorial.pdf).
11+1. Make sure you are familiar with: [Idris](http://eb.host.cs.st-andrews.ac.uk/writings/idris-tutorial.pdf).
121. Make sure you can install Idris:
121. Make sure you can install Idris:
13 * [Mac OS X](https://github.com/idris-lang/Idris-dev/wiki/Idris-on-OS-X-using-Homebrew)
13 * [Mac OS X](https://github.com/idris-lang/Idris-dev/wiki/Idris-on-OS-X-using-Homebrew)
14 * [Ubuntu](https://github.com/idris-lang/Idris-dev/wiki/Idris-on-Ubuntu)
14 * [Ubuntu](https://github.com/idris-lang/Idris-dev/wiki/Idris-on-Ubuntu)
@@ -72,7 +72,7 @@ We do not want you wasting your time nor duplicating somebody's work!
72
72
73## Making Changes
73## Making Changes
74
74
75−Idris developers and hackers try to adhere to something similar to the [successful git branching model](https://nvie.com/posts/a-successful-git-branching-model/).
75+Idris developers and hackers try to adhere to something similar to the [successful git branching model](http://nvie.com/posts/a-successful-git-branching-model/).
76The steps are described below.
76The steps are described below.
77
77
78### New contributors
78### New contributors
@@ -83,7 +83,7 @@ For those new to the project:
832. Clone your fork to your local machine:
832. Clone your fork to your local machine:
84
84
85```
85```
86−$ git clone git@github.com:<your github user name>/Idris-dev.git
86+$ git clone git@github.com/<your github user name>/Idris-dev.git
87```
87```
88
88
893. Add `idris-lang/Idris-dev` as a remote upstream
893. Add `idris-lang/Idris-dev` as a remote upstream
@@ -175,8 +175,8 @@ To help increase the chance of your pull request being accepted:
175* Idris FAQs: [Official](https://idris.readthedocs.io/en/latest/faq/faq.html); [Unofficial](https://github.com/idris-lang/Idris-dev/wiki/Unofficial-FAQ);
175* Idris FAQs: [Official](https://idris.readthedocs.io/en/latest/faq/faq.html); [Unofficial](https://github.com/idris-lang/Idris-dev/wiki/Unofficial-FAQ);
176* [Idris Manual](https://github.com/idris-lang/Idris-dev/wiki/Manual);
176* [Idris Manual](https://github.com/idris-lang/Idris-dev/wiki/Manual);
177* [Idris Tutorial](https://idris.readthedocs.io/en/latest/tutorial/index.html);
177* [Idris Tutorial](https://idris.readthedocs.io/en/latest/tutorial/index.html);
178−* [Idris News](https://www.idris-lang.org/news/);
178+* [Idris News](http://www.idris-lang.org/news/);
179−* [other Idris docs](https://www.idris-lang.org/documentation/).
179+* [other Idris docs](http://www.idris-lang.org/documentation/).
180* [Using Pull Requests](https://help.github.com/articles/using-pull-requests)
180* [Using Pull Requests](https://help.github.com/articles/using-pull-requests)
181* [General GitHub Documentation](https://help.github.com/).
181* [General GitHub Documentation](https://help.github.com/).
182
182
CONTRIBUTORS−1
@@ -143,7 +143,6 @@ Luke Palmer
143Mark Farrell
143Mark Farrell
144Markus Klink
144Markus Klink
145Markus Pfeiffer
145Markus Pfeiffer
146−Martin Baker
147Mathnerd314
146Mathnerd314
148Mattias Lundell
147Mattias Lundell
149Matvey B. Aksenov
148Matvey B. Aksenov
INSTALL.md+3−31
@@ -70,7 +70,7 @@ NixOS unstable.
70
70
71*Important* Stack will not install any external dependencies required
71*Important* Stack will not install any external dependencies required
72to build Idris. Before you try stack please ensure you have the
72to build Idris. Before you try stack please ensure you have the
73−correct dependencies.
73+correct depenencies.
74
74
75To build Idris with stack use the following command:
75To build Idris with stack use the following command:
76
76
@@ -81,10 +81,7 @@ To install Idris:
81* `stack install`
81* `stack install`
82
82
83Stack will install Idris (and related executables) into `$HOME/.local/bin/`
83Stack will install Idris (and related executables) into `$HOME/.local/bin/`
84−on Unix based systems and an appropriate place on Windows. The libraries that
84+on Unix based systems and an appropriate place on Windows.
85−are included with Idris (e.g. Builtins, Prelude) will 'install' into `<source
86−dir>/.stack_work/install/...` so you'll need to keep your source directory
87−around after you've installed Idris using Stack.
88
85
89Of note: If you haven't used stack before commands will also setup the
86Of note: If you haven't used stack before commands will also setup the
90related infrastructure. For more information about Stack please visit
87related infrastructure. For more information about Stack please visit
@@ -125,29 +122,4 @@ encounter this then the fix is to augment the `PKG_CONFIG_PATH` for
125
122
126```
123```
127PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig stack build
124PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig stack build
128−```
125+```
129−
130−## Issue with GHC on Ubuntu/Fedora
131−
132−There is an upstream issue with GHC on some Ubuntu and Fedora machines.
133−The issue is that for GHC versions greater than 8.4.X linking to libFFI uses the version of libFFI shipped with GHC, instead of the system version.
134−
135−See the following GHC issue page for more information:
136−
137− <https://gitlab.haskell.org/ghc/ghc/issues/15397>
138−
139−This means that an Idris built with `libFFI` support will fail at runtime as the executable would not be able to find the correct `libffi` shared object.
140−This will cause the build to fail.
141−Specifically, one will see an error message along the lines of:
142−
143−> error while loading shared libraries: libffi.so.7: cannot open shared object file: No such file or directory
144−
145−A workround for this bug is to override the used libffi version (this is what we use on CI):
146−
147−```bash
148−export LD_PRELOAD=/opt/ghc/${GHCVER}/lib/ghc-${GHCVER}/rts/libffi.so.7
149−```
150−
151−## GHC 8.6
152−
153−For reasons that haven't been investigated building the Idris compiler with GHC 8.6 leads to a compiler which doesn't pass test.
Makefile+10−10
@@ -15,14 +15,14 @@ endif
15endif
15endif
16
16
17install:
17install:
18− $(CABAL) v1-install $(CABALFLAGS)
18+ $(CABAL) install $(CABALFLAGS)
19
19
20pinstall: CABALFLAGS += --enable-executable-profiling
20pinstall: CABALFLAGS += --enable-executable-profiling
21pinstall: dist/setup-config
21pinstall: dist/setup-config
22− $(CABAL) v1-install $(CABALFLAGS)
22+ $(CABAL) install $(CABALFLAGS)
23
23
24build: dist/setup-config
24build: dist/setup-config
25− $(CABAL) v1-build $(CABALFLAGS)
25+ $(CABAL) build $(CABALFLAGS)
26
26
27test: doc test_c stylize
27test: doc test_c stylize
28
28
@@ -30,15 +30,15 @@ stylize:
30 ./stylize.sh
30 ./stylize.sh
31
31
32test_c:
32test_c:
33− $(CABAL) v1-test $(ARGS) --test-options \
33+ $(CABAL) test $(ARGS) --test-options \
34 "$(TEST-ARGS) --rerun-update +RTS -N$(TEST-JOBS) -RTS"
34 "$(TEST-ARGS) --rerun-update +RTS -N$(TEST-JOBS) -RTS"
35
35
36test_js:
36test_js:
37− $(CABAL) v1-test $(ARGS) --test-options \
37+ $(CABAL) test $(ARGS) --test-options \
38 "$(TEST-ARGS) --node --rerun-update +RTS -N$(TEST-JOBS) -RTS"
38 "$(TEST-ARGS) --node --rerun-update +RTS -N$(TEST-JOBS) -RTS"
39
39
40test_update:
40test_update:
41− $(CABAL) v1-test $(ARGS) --test-options \
41+ $(CABAL) test $(ARGS) --test-options \
42 "$(TEST-ARGS) --accept +RTS -N$(TEST-JOBS) -RTS"
42 "$(TEST-ARGS) --accept +RTS -N$(TEST-JOBS) -RTS"
43
43
44test_clean:
44test_clean:
@@ -49,14 +49,14 @@ lib_clean:
49 $(MAKE) -C libs IDRIS=../../dist/build/idris/idris RTS=../../dist/build/rts/libidris_rts clean
49 $(MAKE) -C libs IDRIS=../../dist/build/idris/idris RTS=../../dist/build/rts/libidris_rts clean
50
50
51relib: lib_clean
51relib: lib_clean
52− $(CABAL) v1-install $(CABALFLAGS)
52+ $(CABAL) install $(CABALFLAGS)
53
53
54linecount:
54linecount:
55 wc -l src/Idris/*.hs src/Idris/Elab/*.hs src/Idris/Core/*.hs src/IRTS/*.hs src/Pkg/*.hs src/Util/*.hs
55 wc -l src/Idris/*.hs src/Idris/Elab/*.hs src/Idris/Core/*.hs src/IRTS/*.hs src/Pkg/*.hs src/Util/*.hs
56
56
57#Note: this doesn't yet link to Hackage properly
57#Note: this doesn't yet link to Hackage properly
58doc: dist/setup-config
58doc: dist/setup-config
59− $(CABAL) v1-haddock --hyperlink-source --html --hoogle --html-location="https://hackage.haskell.org/packages/archive/\$$pkg/latest/doc/html" --haddock-options="--title Idris"
59+ $(CABAL) haddock --hyperlink-source --html --hoogle --html-location="http://hackage.haskell.org/packages/archive/\$$pkg/latest/doc/html" --haddock-options="--title Idris"
60
60
61lib_doc:
61lib_doc:
62 $(MAKE) -C libs IDRIS=../../dist/build/idris/idris doc
62 $(MAKE) -C libs IDRIS=../../dist/build/idris/idris doc
@@ -76,7 +76,7 @@ user_doc_pdf:
76 $(MAKE) -C docs latexpdf
76 $(MAKE) -C docs latexpdf
77
77
78fast:
78fast:
79− $(CABAL) v1-install $(CABALFLAGS) --ghc-option=-O0
79+ $(CABAL) install $(CABALFLAGS) --ghc-option=-O0
80
80
81dist/setup-config:
81dist/setup-config:
82− $(CABAL) v1-configure $(CABALFLAGS)
82+ $(CABAL) configure $(CABALFLAGS)
README.md+4−7
@@ -4,11 +4,11 @@
4[![Appveyor build](https://ci.appveyor.com/api/projects/status/xi8yu81oy1134g7o/branch/master?svg=true)](https://ci.appveyor.com/project/idrislang/idris-dev)
4[![Appveyor build](https://ci.appveyor.com/api/projects/status/xi8yu81oy1134g7o/branch/master?svg=true)](https://ci.appveyor.com/project/idrislang/idris-dev)
5[![Documentation Status](https://readthedocs.org/projects/idris/badge/?version=latest)](https://readthedocs.org/projects/idris/?badge=latest)
5[![Documentation Status](https://readthedocs.org/projects/idris/badge/?version=latest)](https://readthedocs.org/projects/idris/?badge=latest)
6[![Hackage](https://img.shields.io/hackage/v/idris.svg)](https://hackage.haskell.org/package/idris)
6[![Hackage](https://img.shields.io/hackage/v/idris.svg)](https://hackage.haskell.org/package/idris)
7−[![Stackage LTS](https://stackage.org/package/idris/badge/lts)](https://stackage.org/lts/package/idris)
7+[![Stackage LTS](http://stackage.org/package/idris/badge/lts)](http://stackage.org/lts/package/idris)
8−[![Stackage Nightly](https://stackage.org/package/idris/badge/nightly)](https://stackage.org/nightly/package/idris)
8+[![Stackage Nightly](http://stackage.org/package/idris/badge/nightly)](http://stackage.org/nightly/package/idris)
9[![IRC](https://img.shields.io/badge/IRC-%23idris-1e72ff.svg?style=flat)](https://www.irccloud.com/invite?channel=%23idris&hostname=irc.freenode.net&port=6697&ssl=1)
9[![IRC](https://img.shields.io/badge/IRC-%23idris-1e72ff.svg?style=flat)](https://www.irccloud.com/invite?channel=%23idris&hostname=irc.freenode.net&port=6697&ssl=1)
10
10
11−Idris (https://idris-lang.org/) is a general-purpose functional programming
11+Idris (http://idris-lang.org/) is a general-purpose functional programming
12language with dependent types.
12language with dependent types.
13
13
14## Installation Guides.
14## Installation Guides.
@@ -28,7 +28,7 @@ Idris has support for external code generators. Supplied with the distribution
28is a C code generator to compile executables, and a JavaScript code generator
28is a C code generator to compile executables, and a JavaScript code generator
29with support for node.js and browser JavaScript.
29with support for node.js and browser JavaScript.
30
30
31−More information about [code generators can be found on the wiki](https://idris.readthedocs.io/en/latest/reference/codegen.html).
31+More information about [code generators can be found on the wiki](http://idris.readthedocs.io/en/latest/reference/codegen.html).
32
32
33## More Information
33## More Information
34
34
@@ -44,6 +44,3 @@ where some interesting projects are being hosted.
44
44
45For those interested in contributing to Idris directly we kindly ask that
45For those interested in contributing to Idris directly we kindly ask that
46prospective developers please consult the [Contributing Guide](CONTRIBUTING.md) first.
46prospective developers please consult the [Contributing Guide](CONTRIBUTING.md) first.
47−
48−[Idris 2](https://github.com/edwinb/Idris2) is an early preview of the next generation
49−of Idris, implemented in Idris.
Setup.hs+33
@@ -215,6 +215,36 @@ idrisConfigure _ flags pkgdesc local = do
215 autogenComponentModulesDir lbi _ = autogenModulesDir lbi
215 autogenComponentModulesDir lbi _ = autogenModulesDir lbi
216#endif
216#endif
217
217
218+idrisPreSDist args flags = do
219+ let dir = S.fromFlag (S.sDistDirectory flags)
220+ let verb = S.fromFlag (S.sDistVerbosity flags)
221+ generateVersionModule verb "src" True
222+ generateBuildFlagsModule verb "src" []
223+ generateTargetModule verb "src" "./libs"
224+ generateToolchainModule verb "src" Nothing
225+ preSDist simpleUserHooks args flags
226+
227+idrisSDist sdist pkgDesc bi hooks flags = do
228+ pkgDesc' <- addGitFiles pkgDesc
229+ sdist pkgDesc' bi hooks flags
230+ where
231+ addGitFiles :: PackageDescription -> IO PackageDescription
232+ addGitFiles pkgDesc = do
233+ files <- gitFiles
234+ return $ pkgDesc { extraSrcFiles = extraSrcFiles pkgDesc ++ files}
235+ gitFiles :: IO [FilePath]
236+ gitFiles = liftM lines (readProcess "git" ["ls-files"] "")
237+
238+idrisPostSDist args flags desc lbi = do
239+ Control.Exception.catch (do let file = "src" </> "Version_idris" Px.<.> "hs"
240+ let targetFile = "src" </> "Target_idris" Px.<.> "hs"
241+ putStrLn $ "Removing generated modules:\n "
242+ ++ file ++ "\n" ++ targetFile
243+ removeFile file
244+ removeFile targetFile)
245+ (\e -> let e' = (e :: SomeException) in return ())
246+ postSDist simpleUserHooks args flags desc lbi
247+
218#if !(MIN_VERSION_Cabal(2,0,0))
248#if !(MIN_VERSION_Cabal(2,0,0))
219rewriteFileEx :: Verbosity -> FilePath -> String -> IO ()
249rewriteFileEx :: Verbosity -> FilePath -> String -> IO ()
220rewriteFileEx _ = rewriteFile
250rewriteFileEx _ = rewriteFile
@@ -323,5 +353,8 @@ main = defaultMainWithHooks $ simpleUserHooks
323 , postInst = \_ flags pkg local ->
353 , postInst = \_ flags pkg local ->
324 idrisInstall (S.fromFlag $ S.installVerbosity flags)
354 idrisInstall (S.fromFlag $ S.installVerbosity flags)
325 NoCopyDest pkg local
355 NoCopyDest pkg local
356+ , preSDist = idrisPreSDist
357+ , sDistHook = idrisSDist (sDistHook simpleUserHooks)
358+ , postSDist = idrisPostSDist
326 , testHook = idrisTestHook
359 , testHook = idrisTestHook
327 }
360 }
appveyor.yml+4−4
@@ -5,15 +5,15 @@ init:
5
5
6 mkdir C:\ghc
6 mkdir C:\ghc
7
7
8− Invoke-WebRequest "https://downloads.haskell.org/~ghc/8.8.2/ghc-8.8.2-x86_64-unknown-mingw32.tar.xz" -OutFile C:\ghc\ghc.tar.xz -UserAgent "Curl"
8+ Invoke-WebRequest "http://downloads.haskell.org/~ghc/8.2.1/ghc-8.2.1-x86_64-unknown-mingw32.tar.xz" -OutFile C:\ghc\ghc.tar.xz -UserAgent "Curl"
9
9
10 7z x C:\ghc\ghc.tar.xz -oC:\ghc
10 7z x C:\ghc\ghc.tar.xz -oC:\ghc
11
11
12 7z x C:\ghc\ghc.tar -oC:\ghc
12 7z x C:\ghc\ghc.tar -oC:\ghc
13
13
14− $env:PATH="$env:PATH;c:\ghc\ghc-8.8.2\bin;$HOME\AppData\Roaming\cabal\bin"
14+ $env:PATH="$env:PATH;c:\ghc\ghc-8.2.1\bin;$HOME\AppData\Roaming\cabal\bin"
15
15
16− cabal v1-update
16+ cabal update
17
17
18 $env:current_posix=c:\msys64\usr\bin\cygpath -u $(pwd)
18 $env:current_posix=c:\msys64\usr\bin\cygpath -u $(pwd)
19
19
@@ -22,6 +22,6 @@ environment:
22 MSYS2_PATH_TYPE: inherit
22 MSYS2_PATH_TYPE: inherit
23build_script:
23build_script:
24- ps: >-
24- ps: >-
25− c:\msys64\usr\bin\bash -l -c "cd $env:current_posix && cabal v1-install -fffi --enable-tests 2>&1"
25+ c:\msys64\usr\bin\bash -l -c "cd $env:current_posix && cabal install -fffi --enable-tests 2>&1"
26test_script:
26test_script:
27- ps: c:\msys64\usr\bin\bash -l -c "cd $env:current_posix && make test_c 2>&1"
27- ps: c:\msys64\usr\bin\bash -l -c "cd $env:current_posix && make test_c 2>&1"
azure-pipelines.ymldeleted−143
@@ -1,143 +0,0 @@
1−# Starter pipeline
2−# Start with a minimal pipeline that you can customize to build and deploy your code.
3−# Add steps that build, run tests, deploy, and more:
4−# https://aka.ms/yaml
5−jobs:
6− # Test a configuration with the oldest supported GHC
7− - job: Linux_GHC_710
8− pool:
9− vmImage: 'Ubuntu 16.04'
10− steps:
11− - script: |
12− sudo add-apt-repository ppa:hvr/ghc
13− sudo apt-get update
14− sudo apt-get install ghc-7.10.3 cabal-install-2.2
15− sudo update-alternatives --config opt-ghc
16− sudo update-alternatives --config opt-cabal
17− displayName: 'Prepare system'
18− - script: |
19− export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
20− cabal update
21− CABALFLAGS="-fffi -fci" make
22− displayName: 'Build Idris'
23− - script: |
24− export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
25− make test_c
26− displayName: 'Run tests'
27− # Test on Linux
28− - job: Linux
29− pool:
30− vmImage: 'Ubuntu 16.04'
31− steps:
32− - script: |
33− sudo add-apt-repository ppa:hvr/ghc
34− sudo apt-get update
35− sudo apt-get install ghc-8.2.2 cabal-install-2.2
36− sudo update-alternatives --config opt-ghc
37− sudo update-alternatives --config opt-cabal
38− displayName: 'Prepare system'
39− - script: |
40− export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
41− cabal update
42− CABALFLAGS="-fffi -fci" make
43− displayName: 'Build Idris'
44− - script: |
45− export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
46− make test_c
47− displayName: 'Run tests'
48− # Test on MacOS
49− - job: macOS
50− pool:
51− vmImage: 'xcode9-macos10.13'
52− steps:
53− - script: |
54− brew install ghc cabal-install libffi pkgconfig
55− export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH
56− export PATH=$HOME/.cabal/bin:$PATH
57− cabal update
58− CABALFLAGS="-fffi -fci" make
59− make test_c
60− displayName: 'Build idris and run tests'
61− # Test on Windows
62− - job: Windows
63− pool:
64− vmImage: 'vs2017-win2016'
65− steps:
66− - powershell: |
67− choco install cabal -y --no-progress
68− choco install 7zip.portable -y --no-progress
69− choco install msys2 -y --no-progress --params "/InstallDir=C:/msys64/"
70− mkdir C:\ghc
71− Invoke-WebRequest "https://downloads.haskell.org/~ghc/8.4.3/ghc-8.4.3-x86_64-unknown-mingw32.tar.xz" -OutFile C:\ghc\ghc.tar.xz -UserAgent "Curl"
72− 7z x C:\ghc\ghc.tar.xz -oC:\ghc
73− 7z x C:\ghc\ghc.tar -oC:\ghc
74− displayName: "Setting up environment"
75− - powershell: |
76− cabal update
77− $env:PATH="$env:PATH;$HOME\AppData\Roaming\cabal\bin;c:\ghc\ghc-8.4.3\bin"
78− $env:current_posix=c:\msys64\usr\bin\cygpath -u $(pwd)
79− c:\msys64\usr\bin\bash -l -c "echo `$MSYSTEM && echo `$PATH"
80− c:\msys64\usr\bin\bash -l -c "pacman -S make mingw-w64-x86_64-gcc mingw-w64-x86_64-pkg-config mingw-w64-x86_64-libffi --noconfirm 2>&1"
81− c:\msys64\usr\bin\bash -l -c "cd $env:current_posix && cabal install -fffi --enable-test 2>&1"
82− c:\msys64\usr\bin\bash -l -c "cd $env:current_posix && make test_c 2>&1"
83− env:
84− MSYSTEM: MINGW64
85− MSYS2_PATH_TYPE: inherit
86− displayName: "Build and test Idris"
87− # Check styling
88− - job: Stylize
89− pool:
90− vmImage: 'Ubuntu 16.04'
91− steps:
92− - script: |
93− sudo add-apt-repository ppa:hvr/ghc
94− sudo apt-get update
95− sudo apt-get install ghc-8.2.2 cabal-install-2.2
96− sudo update-alternatives --config opt-ghc
97− sudo update-alternatives --config opt-cabal
98− displayName: 'Prepare system'
99− - script: |
100− export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
101− cabal update
102− cabal install stylish-haskell
103− ./stylize.sh
104− displayName: 'Run stylish'
105− # Run tests on the node backend
106− - job: JS
107− pool:
108− vmImage: 'Ubuntu 16.04'
109− steps:
110− - script: |
111− sudo add-apt-repository ppa:hvr/ghc
112− sudo apt-get update
113− sudo apt-get install ghc-8.2.2 cabal-install-2.2
114− sudo update-alternatives --config opt-ghc
115− sudo update-alternatives --config opt-cabal
116− displayName: 'Prepare system'
117− - script: |
118− export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
119− cabal update
120− CABALFLAGS="-fffi -fci" make
121− displayName: 'Build Idris'
122− - script: |
123− export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
124− make test_js
125− displayName: 'Run tests'
126− # Build docs
127− - job: Docs
128− pool:
129− vmImage: 'Ubuntu 16.04'
130− steps:
131− - script: |
132− sudo add-apt-repository ppa:hvr/ghc
133− sudo apt-get update
134− sudo apt-get install ghc-8.2.2 cabal-install-2.2
135− sudo update-alternatives --config opt-ghc
136− sudo update-alternatives --config opt-cabal
137− displayName: 'Prepare system'
138− - script: |
139− export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
140− cabal update
141− CABALFLAGS="-fffi -fci" make
142− make lib_doc doc
143− displayName: 'Build Docs'
benchmarks/pidigits/pidigits.idr+1−1
@@ -3,7 +3,7 @@ import Data.Vect
3
3
4{- Toy program that outputs the n first digits of Pi.
4{- Toy program that outputs the n first digits of Pi.
5
5
6− Inspired from https://www.haskell.org/haskellwiki/Shootout/Pidigits.
6+ Inspired from http://www.haskell.org/haskellwiki/Shootout/Pidigits.
7 The original ns and str lazy lists have been replaced by strict functions.
7 The original ns and str lazy lists have been replaced by strict functions.
8
8
9 Memory usage seems to be excessive. One of the branches of str is tail recursive, and
9 Memory usage seems to be excessive. One of the branches of str is tail recursive, and
config.mk+1−1
@@ -14,7 +14,7 @@ RANLIB ?=ranlib
14CABAL :=cabal
14CABAL :=cabal
15# IDRIS_ENABLE_STATS should not be set in final release
15# IDRIS_ENABLE_STATS should not be set in final release
16# Any flags defined here which alter the RTS API must also be added to src/IRTS/CodegenC.hs
16# Any flags defined here which alter the RTS API must also be added to src/IRTS/CodegenC.hs
17−CFLAGS :=-O2 -Wall -std=c99 -pipe -fdata-sections -ffunction-sections -D_POSIX_C_SOURCE=200809L -DHAS_PTHREAD -DIDRIS_ENABLE_STATS $(CFLAGS)
17+CFLAGS :=-O2 -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -DHAS_PTHREAD -DIDRIS_ENABLE_STATS $(CFLAGS)
18
18
19# CABALFLAGS :=
19# CABALFLAGS :=
20CABALFLAGS += --enable-tests
20CABALFLAGS += --enable-tests
docs/LICENSE+1−1
@@ -7,4 +7,4 @@ rights to Documentation for Idris.
7
7
8More information concerning the CC0 can be found online at:
8More information concerning the CC0 can be found online at:
9
9
10− https://creativecommons.org/publicdomain/zero/1.0/
10+ http://creativecommons.org/publicdomain/zero/1.0/
docs/Makefile+1−1
@@ -9,7 +9,7 @@ BUILDDIR = _build
9
9
10# User-friendly check for sphinx-build
10# User-friendly check for sphinx-build
11ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
11ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12−$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://www.sphinx-doc.org/)
12+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
13endif
13endif
14
14
15# Internal variables.
15# Internal variables.
docs/README.md+3−3
@@ -1,7 +1,7 @@
1# Documentation for the Idris Language.
1# Documentation for the Idris Language.
2
2
3
3
4−This manual has been prepared using ReStructured Text and the [Sphinx Documentation Generator](https://www.sphinx-doc.org) for future inclusion on [Read The Docs](https://www.readthedocs.org).
4+This manual has been prepared using ReStructured Text and the [Sphinx Documentation Generator](http://sphinx-doc.org) for future inclusion on [Read The Docs](http://www.readthedocs.org).
5
5
6## Dependencies
6## Dependencies
7
7
@@ -12,7 +12,7 @@ To build the manual the following dependencies must be met. We assume that you h
12Python should be installed by default on most systems.
12Python should be installed by default on most systems.
13Sphinx can be installed either through your hosts package manager or using pip/easy_install.
13Sphinx can be installed either through your hosts package manager or using pip/easy_install.
14
14
15−*Note* [ReadTheDocs](https://www.readthedocs.org) works with Sphinx
15+*Note* [ReadTheDocs](http://www.readthedocs.org) works with Sphinx
16 `v1.2.2`. If you install a more recent version of sphinx then
16 `v1.2.2`. If you install a more recent version of sphinx then
17 'incorrectly' marked up documentation may get passed the build system
17 'incorrectly' marked up documentation may get passed the build system
18 of readthedocs and be ignored. In the past we had several code-blocks
18 of readthedocs and be ignored. In the past we had several code-blocks
@@ -45,7 +45,7 @@ rights to Documentation for Idris.
45
45
46More information concerning the CC0 can be found online at:
46More information concerning the CC0 can be found online at:
47
47
48− https://creativecommons.org/publicdomain/zero/1.0/
48+ http://creativecommons.org/publicdomain/zero/1.0/
49
49
50
50
51When contributing material to the manual please bear in mind that the work will be licensed as above.
51When contributing material to the manual please bear in mind that the work will be licensed as above.
docs/_static/theme_overrides.cssdeleted−13
@@ -1,13 +0,0 @@
1−/* override table width restrictions */
2−@media screen and (min-width: 767px) {
3−
4− .wy-table-responsive table td {
5− /* !important prevents the common CSS stylesheets from overriding
6− this as on RTD they are loaded after this stylesheet */
7− white-space: normal !important;
8− }
9−
10− .wy-table-responsive {
11− overflow: visible !important;
12− }
13−}
docs/conf.py+5−12
@@ -33,7 +33,7 @@ on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
33# ones.
33# ones.
34extensions = [
34extensions = [
35 'sphinx.ext.todo',
35 'sphinx.ext.todo',
36−# 'sphinx.ext.pngmath', # imgmath is not supported on readthedocs.
36+ 'sphinx.ext.pngmath', # imgmath is not supported on readthedocs.
37 'sphinx.ext.ifconfig',
37 'sphinx.ext.ifconfig',
38]
38]
39
39
@@ -51,7 +51,7 @@ master_doc = 'index'
51
51
52# General information about the project.
52# General information about the project.
53project = u'Idris'
53project = u'Idris'
54−copyright = u'2017-2020, The Idris Community'
54+copyright = u'2017, The Idris Community'
55author = u'The Idris Community'
55author = u'The Idris Community'
56
56
57# The version info for the project you're documenting, acts as replacement for
57# The version info for the project you're documenting, acts as replacement for
@@ -59,9 +59,9 @@ author = u'The Idris Community'
59# built documents.
59# built documents.
60#
60#
61# The short X.Y version.
61# The short X.Y version.
62−version = '1.3'
62+version = '1.2'
63# The full version, including alpha/beta/rc tags.
63# The full version, including alpha/beta/rc tags.
64−release = '1.3.2'
64+release = '1.2.0'
65
65
66# The language for content autogenerated by Sphinx. Refer to documentation
66# The language for content autogenerated by Sphinx. Refer to documentation
67# for a list of supported languages.
67# for a list of supported languages.
@@ -151,12 +151,6 @@ if not on_rtd: # only import and set the theme if we're building docs locally
151# so a file named "default.css" will overwrite the builtin "default.css".
151# so a file named "default.css" will overwrite the builtin "default.css".
152html_static_path = ['_static']
152html_static_path = ['_static']
153
153
154−html_context = {
155− 'css_files': [
156− '_static/theme_overrides.css', # override wide tables in RTD theme
157− ],
158− }
159−
160# Add any extra paths that contain custom files (such as robots.txt or
154# Add any extra paths that contain custom files (such as robots.txt or
161# .htaccess) here, relative to this directory. These files are copied
155# .htaccess) here, relative to this directory. These files are copied
162# directly to the root of the documentation.
156# directly to the root of the documentation.
@@ -251,7 +245,6 @@ latex_elements = {
251# Additional stuff for the LaTeX preamble.
245# Additional stuff for the LaTeX preamble.
252'preamble': r'''
246'preamble': r'''
253\usepackage{lmodern}
247\usepackage{lmodern}
254−\usepackage{textalpha}
255\usepackage[T1]{fontenc}
248\usepackage[T1]{fontenc}
256\usepackage[utf8x]{inputenc}
249\usepackage[utf8x]{inputenc}
257\usepackage{titlesec}
250\usepackage{titlesec}
@@ -301,7 +294,7 @@ latex_elements = {
301# (source start file, target name, title,
294# (source start file, target name, title,
302# author, documentclass [howto, manual, or own class]).
295# author, documentclass [howto, manual, or own class]).
303latex_documents = [
296latex_documents = [
304− # (master_doc, 'idris.tex', u'Documentation for the Idris Language', u'The Idris Community', 'report')
297+ ('index', 'idris-documentation-complete.tex', u'Documentation for the Idris Language', u'The Idris Community', 'report'),
305 ('tutorial/index', 'idris-tutorial.tex', u'The Idris Tutorial', u'The Idris Community', 'howto'),
298 ('tutorial/index', 'idris-tutorial.tex', u'The Idris Tutorial', u'The Idris Community', 'howto'),
306]
299]
307
300
docs/effects/conclusions.rst+1−1
@@ -51,7 +51,7 @@ foundations are also well-studied see [5]_, [6]_, [7]_, [8]_.
51 Programming Languages and Systems (APLAS '09), Zhenjiang Hu
51 Programming Languages and Systems (APLAS '09), Zhenjiang Hu
52 (Ed.). Springer-Verlag, Berlin, Heidelberg,
52 (Ed.). Springer-Verlag, Berlin, Heidelberg,
53 95-110. DOI=10.1007/978-3-642-10672-9_9
53 95-110. DOI=10.1007/978-3-642-10672-9_9
54− https://link.springer.com/chapter/10.1007%2F978-3-642-10672-9_9
54+ http://link.springer.com/chapter/10.1007%2F978-3-642-10672-9_9
55
55
56
56
57.. [4] Ohad Kammar, Sam Lindley, and Nicolas Oury. 2013. Handlers in
57.. [4] Ohad Kammar, Sam Lindley, and Nicolas Oury. 2013. Handlers in
docs/effects/depeff.rst+9−18
@@ -43,8 +43,8 @@ express this as follows:
43
43
44.. code-block:: idris
44.. code-block:: idris
45
45
46− readInt : Eff () [STATE (Vect n Int), STDIO]
46+ readInt : Eff ()[STATE (Vect n Int), STDIO]
47− [STATE (Vect (S n) Int), STDIO]
47+ [STATE (Vect (S n) Int), STDIO]
48 readInt = do let x = trim !getStr
48 readInt = do let x = trim !getStr
49 putM (cast x :: !get)
49 putM (cast x :: !get)
50
50
@@ -153,21 +153,12 @@ file management follows a resource usage protocol with the following
153
153
154- When a file is closed, its handle should no longer be used
154- When a file is closed, its handle should no longer be used
155
155
156−These requirements can be expressed formally by creating a
156+These requirements can be expressed formally in , by creating a
157``FILE_IO`` effect parameterised over a file handle state, which is
157``FILE_IO`` effect parameterised over a file handle state, which is
158either empty, open for reading, or open for writing. The ``FILE_IO``
158either empty, open for reading, or open for writing. The ``FILE_IO``
159−effect’s definition is given below.
159+effect’s definition is given below. Note that this
160−
161−.. note::
162− This effect is mainly for illustrative purposes.
160+effect is mainly for illustrative purposes—typically we would also like
163− Typically we would also like to support random access files and
164− better reporting of error conditions.
161+to support random access files and better reporting of error conditions.
165−
166− Moreover, the ``FILE`` effect in the ``Effect.File`` module of
167− the ``effects`` library uses slightly more complicated types to
168− support erroneous behaviour of each function and to support more
169− compilcated modes of opening, like for reading **and** writing,
170− appending or truncating.
171
162
172.. code-block:: idris
163.. code-block:: idris
173
164
@@ -182,7 +173,7 @@ effect’s definition is given below.
182
173
183 open : (fname : String)
174 open : (fname : String)
184 -> (m : Mode)
175 -> (m : Mode)
185− -> Eff Bool [FILE_IO ()]
176+ -> Eff Bool [FILE_IO ()]
186 (\res => [FILE_IO (case res of
177 (\res => [FILE_IO (case res of
187 True => OpenFile m
178 True => OpenFile m
188 False => ())])
179 False => ())])
@@ -200,7 +191,7 @@ In particular, consider the type of ``open``:
200
191
201 open : (fname : String)
192 open : (fname : String)
202 -> (m : Mode)
193 -> (m : Mode)
203− -> Eff Bool [FILE_IO ()]
194+ -> Eff Bool [FILE_IO ()]
204 (\res => [FILE_IO (case res of
195 (\res => [FILE_IO (case res of
205 True => OpenFile m
196 True => OpenFile m
206 False => ())])
197 False => ())])
@@ -216,7 +207,7 @@ we continue the protocol accordingly.
216
207
217 readFile : Eff (List String) [FILE_IO (OpenFile Read)]
208 readFile : Eff (List String) [FILE_IO (OpenFile Read)]
218 readFile = readAcc [] where
209 readFile = readAcc [] where
219− readAcc : List String -> Eff (List String) [FILE_IO (OpenFile Read)]
210+ readAcc : List String -> Eff (List String) [FILE_IO (OpenFile Read)]
220 readAcc acc = if (not !eof)
211 readAcc acc = if (not !eof)
221 then readAcc (!readLine :: acc)
212 then readAcc (!readLine :: acc)
222 else pure (reverse acc)
213 else pure (reverse acc)
docs/effects/impleff.rst+1−1
@@ -144,7 +144,7 @@ functions in ``Eff``, as follows:
144
144
145**An implementation detail (aside):** The ``call`` function converts
145**An implementation detail (aside):** The ``call`` function converts
146an ``Effect`` to a function in ``Eff``, given a proof that the effect
146an ``Effect`` to a function in ``Eff``, given a proof that the effect
147−is available. This proof can be constructed automatically, since
147+is available. This proof can be constructed automatically by , since
148it is essentially an index into a statically known list of effects:
148it is essentially an index into a statically known list of effects:
149
149
150.. code-block:: idris
150.. code-block:: idris
docs/effects/index.rst+1−1
@@ -25,7 +25,7 @@ A tutorial on the `Effects` package in `Idris`.
25 Idris Community* has waived all copyright and related or neighbouring
25 Idris Community* has waived all copyright and related or neighbouring
26 rights to Documentation for Idris.
26 rights to Documentation for Idris.
27
27
28− More information concerning the CC0 can be found online at: https://creativecommons.org/publicdomain/zero/1.0/
28+ More information concerning the CC0 can be found online at: http://creativecommons.org/publicdomain/zero/1.0/
29
29
30.. toctree::
30.. toctree::
31 :maxdepth: 1
31 :maxdepth: 1
docs/effects/introduction.rst+2−3
@@ -3,7 +3,7 @@ Introduction
3************
3************
4
4
5Pure functional languages with dependent types such as `Idris
5Pure functional languages with dependent types such as `Idris
6−<https://www.idris-lang.org/>`_ support reasoning about programs directly
6+<http://www.idris-lang.org/>`_ support reasoning about programs directly
7in the type system, promising that we can *know* a program will run
7in the type system, promising that we can *know* a program will run
8correctly (i.e. according to the specification in its type) simply
8correctly (i.e. according to the specification in its type) simply
9because it compiles. Realistically, though, things are not so simple:
9because it compiles. Realistically, though, things are not so simple:
@@ -17,8 +17,7 @@ exceptions, and verified resource management.
17This tutorial assumes familiarity with pure programming in Idris,
17This tutorial assumes familiarity with pure programming in Idris,
18as described in Sections 1–6 of the main tutorial [1]_. The examples
18as described in Sections 1–6 of the main tutorial [1]_. The examples
19presented are tested with Idris and can be found in the
19presented are tested with Idris and can be found in the
20−examples directory of the Idris repository. The ``-p effects`` flag
20+examples directory of the Idris repository.
21−is needed when starting Idris.
22
21
23Consider, for example, the following introductory function which
22Consider, for example, the following introductory function which
24illustrates the kind of properties which can be expressed in the type
23illustrates the kind of properties which can be expressed in the type
docs/effects/simpleeff.rst+1−2
@@ -212,8 +212,7 @@ from the result of a dynamic check:
212
212
213.. code-block:: idris
213.. code-block:: idris
214
214
215− data So : Bool -> Type where
215+ data So : Bool -> Type = Oh : So True
216− Oh : So True
217
216
218 choose : (b : Bool) -> Either (So b) (So (not b))
217 choose : (b : Bool) -> Either (So b) (So (not b))
219
218
docs/effects/summary.rst+23−23
@@ -43,16 +43,16 @@ FILE\_IO
43 data OpenFile : Mode -> Type
43 data OpenFile : Mode -> Type
44
44
45 open : (fname : String)
45 open : (fname : String)
46− -> (m : Mode)
46+ -> (m : Mode)
47− -> Eff Bool [FILE_IO ()]
47+ -> Eff Bool [FILE_IO ()]
48− (\res => [FILE_IO (case res of
48+ (\res => [FILE_IO (case res of
49− True => OpenFile m
49+ True => OpenFile m
50− False => ())])
50+ False => ())])
51 close : Eff () [FILE_IO (OpenFile m)] [FILE_IO ()]
51 close : Eff () [FILE_IO (OpenFile m)] [FILE_IO ()]
52
52
53− readLine : Eff String [FILE_IO (OpenFile Read)]
53+ readLine : Eff String [FILE_IO (OpenFile Read)]
54 writeLine : String -> Eff () [FILE_IO (OpenFile Write)]
54 writeLine : String -> Eff () [FILE_IO (OpenFile Write)]
55− eof : Eff Bool [FILE_IO (OpenFile Read)]
55+ eof : Eff Bool [FILE_IO (OpenFile Read)]
56
56
57 Handler FileIO IO where { ... }
57 Handler FileIO IO where { ... }
58
58
@@ -69,9 +69,9 @@ RND
69
69
70 RND : EFFECT
70 RND : EFFECT
71
71
72− srand : Integer -> Eff () [RND]
72+ srand : Integer -> Eff m () [RND]
73− rndInt : Integer -> Integer -> Eff Integer [RND]
73+ rndInt : Integer -> Integer -> Eff m Integer [RND]
74− rndFin : (k : Nat) -> Eff (Fin (S k)) [RND]
74+ rndFin : (k : Nat) -> Eff m (Fin (S k)) [RND]
75
75
76 Handler Random m where { ... }
76 Handler Random m where { ... }
77
77
@@ -86,7 +86,7 @@ SELECT
86
86
87 SELECT : EFFECT
87 SELECT : EFFECT
88
88
89− select : List a -> Eff a [SELECT]
89+ select : List a -> Eff m a [SELECT]
90
90
91 Handler Selection Maybe where { ... }
91 Handler Selection Maybe where { ... }
92 Handler Selection List where { ... }
92 Handler Selection List where { ... }
@@ -102,10 +102,10 @@ STATE
102
102
103 STATE : Type -> EFFECT
103 STATE : Type -> EFFECT
104
104
105− get : Eff x [STATE x]
105+ get : Eff m x [STATE x]
106− put : x -> Eff () [STATE x]
106+ put : x -> Eff m () [STATE x]
107− putM : y -> Eff () [STATE x] [STATE y]
107+ putM : y -> Eff m () [STATE x] [STATE y]
108− update : (x -> x) -> Eff () [STATE x]
108+ update : (x -> x) -> Eff m () [STATE x]
109
109
110 Handler State m where { ... }
110 Handler State m where { ... }
111
111
@@ -121,12 +121,12 @@ STDIO
121
121
122 STDIO : EFFECT
122 STDIO : EFFECT
123
123
124− putChar : Char -> Eff () [STDIO]
124+ putChar : Handler StdIO m => Char -> Eff m () [STDIO]
125− putStr : String -> Eff () [STDIO]
125+ putStr : Handler StdIO m => String -> Eff m () [STDIO]
126− putStrLn : String -> Eff () [STDIO]
126+ putStrLn : Handler StdIO m => String -> Eff m () [STDIO]
127
127
128− getStr : Eff String [STDIO]
128+ getStr : Handler StdIO m => Eff m String [STDIO]
129− getChar : Eff Char [STDIO]
129+ getChar : Handler StdIO m => Eff m Char [STDIO]
130
130
131 Handler StdIO IO where { ... }
131 Handler StdIO IO where { ... }
132 Handler StdIO (IOExcept a) where { ... }
132 Handler StdIO (IOExcept a) where { ... }
@@ -144,9 +144,9 @@ SYSTEM
144
144
145 SYSTEM : EFFECT
145 SYSTEM : EFFECT
146
146
147− getArgs : Eff (List String) [SYSTEM]
147+ getArgs : Handler System e => Eff e (List String) [SYSTEM]
148− time : Eff Int [SYSTEM]
148+ time : Handler System e => Eff e Int [SYSTEM]
149− getEnv : String -> Eff (Maybe String) [SYSTEM]
149+ getEnv : Handler System e => String -> Eff e (Maybe String) [SYSTEM]
150
150
151 Handler System IO where { ... }
151 Handler System IO where { ... }
152 Handler System (IOExcept a) where { ... }
152 Handler System (IOExcept a) where { ... }
docs/elaboratorReflection/elabReflection.rstdeleted−60
@@ -1,60 +0,0 @@
1−Extending Idris using Elaborator Reflection
2−===========================================
3−
4−Idris provides a mechanism to modify the language without having to recompile Idris itself. We can think of this in terms of metaprogramming or domain specific languages or just building in new capabilities.
5−
6−In order to extend the language we need to know something about how Idris is compiled. This page explains only what is needed to customise the elaboration. For more information about the compiler's implementation see `Edwin Brady's 2013 paper`_ and for customising the elaboration process see `Elaborator reflection: extending Idris in Idris`_ and `David Christiansen's PhD thesis`_.
7−
8−Compilation of Idris proceeds through a number of stages.
9−
10−- First, Idris is desugared by inserting placeholders for terms to be guessed by the compiler and replacing certain syntactic forms, such as do-notation, with the functions that implement them.
11−- Then, this desugared Idris is translated into a much simpler core language, called TT. This translation process is called elaboration.
12−- Finally, TT is type checked a second time to rule out errors, and then compiled into the target language.
13−
14−.. image:: ../image/idrisTopLevel.png
15− :width: 484px
16− :height: 147px
17− :alt: diagram illustrating these stages of Idris compilation
18−
19−TT is a core language which is syntactically very simple. This makes it easy for computers to process but very verbose and hard for humans to read. The Idris elaborator is written in Haskell using an elaboration library that was inspired by the tactics in interactive proof assistants such as Coq.
20−
21−.. list-table::
22−
23− * - There are some similarities with a proof assistant but in Idris the elaborator is an interpreter of Idris source in the elaboration monad, where each syntactic construct of Idris is interpreted as a sequence of tactics.
24− - .. image:: ../image/compareToProofAssist.png
25− :width: 206px
26− :height: 112px
27− :alt: diagram comparing elaboration with proof assistant
28−
29−The primitives in the elaboration library are not just useful for the implementors of Idris itself. They can also be used by authors of extensions to the compiler, using a mechanism known as elaborator reflection.
30−During elaboration TT (Raw) structure contains:
31−
32−- holes - placeholders for terms that have not yet been filled in.
33−- guesses - similar to let bindings, except with no reduction rule, so that elaboration programs can control the precise shape of terms that are under construction.
34−
35−For more information about holes and guesses see `Dependently Typed Functional Programs and their Proofs by McBride 1999`_.
36−
37−The following diagram is intended to illustrate a high level view of the tactics and how this eventually results in the TT language being generated. It is not necessary to understand the details at this stage. The intention is to help build up some intuition so that, when we get into the details, we can recognise how this fits into the big picture.
38−
39−.. image:: ../image/elabOverview.png
40− :width: 410px
41− :height: 282px
42− :alt: diagram illustrating overview of TT language being generated from tactics.
43−
44−As already mentioned the TT core language is kept syntactically very simple, for instance, here are the binders in TT with corresponding code and logic type validity rules:
45−
46−.. list-table::
47−
48− * - This diagram illustrates the basis of the compilation process in logic (in this case for binders). It is not necessary to be an expert logician to understand elaborator reflection. However, when learning about tactics, they may appear arbitrary without knowing some theory. For more information about this see `Edwin Brady's 2013 paper`_.
49− - .. image:: ../image/binders.png
50− :width: 310px
51− :height: 203px
52− :alt: diagram illustrating basis of code in logic
53−
54−.. target-notes::
55−.. _`Edwin Brady's 2013 paper`: https://eb.host.cs.st-andrews.ac.uk/drafts/impldtp.pdf
56−.. _`Elaborator reflection: extending Idris in Idris`: https://dl.acm.org/citation.cfm?doid=2951913.2951932
57−.. _`David Christiansen's PhD thesis`: https://davidchristiansen.dk/david-christiansen-phd.pdf
58−.. _`Dependently Typed Functional Programs and their Proofs by McBride 1999`: https://www.era.lib.ed.ac.uk/handle/1842/374
59−
60−
docs/elaboratorReflection/example1.rstdeleted−192
@@ -1,192 +0,0 @@
1−Elaborator Reflection - Identity Example
2−========================================
3−
4−.. list-table::
5−
6− * - This example of elaborator reflection steps through this metaprogram that generates the identity function:
7− - .. code-block:: idris
8−
9− %language ElabReflection
10−
11− idNat : Nat -> Nat
12− idNat = %runElab (do intro `{{x}}
13− fill (Var `{{x}})
14− solve)
15−
16−.. list-table::
17− :widths: 200 100
18−
19− * - At the beginning of executing the elaboration script, the initial state consists of a single hole of type Nat -> Nat.
20−
21− As a first approximation, the state consists of a term with holes in it, an indicator of which hole is focused, a queue of the next holes to focus on, and miscellaneous information like a source of fresh names. The intro tactic modifies this state, replacing the focused hole with a lambda and focusing on the lambda's body.
22− - .. image:: ../image/tree.png
23− :width: 119px
24− :height: 109px
25−
26−The following is a walkthough looking at the state after each tactic:
27−
28−.. list-table::
29−
30− * - Start with the type signature like this:
31− - .. code-block:: idris
32−
33− %language ElabReflection
34−
35− idNat : Nat -> Nat
36− idNat = %runElab (do
37−
38− * - In order to investigate how the program works this table shows the proof state at each stage as the tactics are applied. So here is the proof state at the start:
39− - .. image:: ../image/elabProofStateEx1_1.png
40− :width: 310px
41− :height: 115px
42−
43− * - This table shows the hole types and what they depend on. The aim is to illustrate the types by analogy with proofs, as a line with the premises above it and the conclusion below it.
44− - .. image:: ../image/elabLogicEx1_1.png
45− :width: 277px
46− :height: 15px
47−
48− * - The term is:
49− - ?{hole_0} ≈ ? {hole_2} . {hole_2} . {hole_0}
50−
51− * - It is possible to read the state from the script by calling getEnv, getGoal and getHoles.
52−
53− - The output of these calls contain structures with TT code. To show the results I hacked this: `my code`_. TT code is not really designed to be readable by humans, all the names are fully expanded, everything has a type down to universes (type of types). This is shown here to illustrate the information available.
54−
55− .. code-block:: idris
56−
57− getEnv=[]
58−
59− getGoal=(hole_2, __pi_arg:(Nat.["Nat", "Prelude"]:{
60− type constructor tag=8 number=0}.Type:U=(20:./Prelude/Nat.idr)->.
61− {name ref{type constructor tag=8 number=0}Nat.["Nat","Prelude"]:
62− Type:U=(20:./Prelude/Nat.idr)
63− })
64− })
65−
66− getHoles=[{hole_2},{hole_0}]
67−
68− * - getGuess
69− - error no guess
70−
71− * - Introduce a lambda binding around the current hole and focus on the body.
72− - intro \`{{x}}
73−
74− * - The state now looks like this:
75− - .. image:: ../image/elabProofStateEx1_2.png
76− :width: 312px
77− :height: 84px
78−
79− * - The hole types now looks like this:
80− - .. image:: ../image/elabLogicEx1_2.png
81− :width: 279px
82− :height: 26px
83−
84− * - The term now looks like this:
85− - ?{hole_0} ≈ λ x . ? {hole_2} . {hole_2} . {hole_0}
86−
87− * - Again we can check the state by calling getEnv, getGoal and getHoles: see `my code`_
88−
89− - .. code-block:: idris
90−
91− getEnv=[(x, {λ (Nat.["Nat", "Prelude"]:{
92− type constructor tag=8 number=0}).
93− Type:U=(20:./Prelude/Nat.idr)
94− })]
95−
96− getGoal=(hole_2, {name ref{type constructor tag=8 number=0}
97− Nat.["Nat","Prelude"]:Type:U=(20:./Prelude/Nat.idr)
98− })
99−
100− getHoles=[{hole_2},{hole_0}]
101−
102− * - getGuess
103− - error no guess
104−
105− * - Place a term into a hole, unifying its type
106− - fill (Var \`{{x}})
107−
108− * - The state still looks like this:
109− - .. image:: ../image/elabProofStateEx1_3.png
110− :width: 312px
111− :height: 57px
112−
113− * - The hole types now looks like this:
114− - .. image:: ../image/elabLogicEx1_3.png
115− :width: 290px
116− :height: 26px
117−
118− * - The term now looks like this:
119− - ?{hole_0} ≈ λ x . ?{hole_2} ≈ x . {hole_2} . {hole_0}
120−
121− * - Again we can check the state by calling getEnv, getGoal and getHoles: see `my code`_
122−
123− - .. code-block:: idris
124−
125− getEnv=[(x, {λ (Nat.["Nat", "Prelude"]:
126− {type constructor tag=8 number=0}).
127− Type:U=(20:./Prelude/Nat.idr)
128− })]
129−
130− getGoal=(hole_2, {name ref{type constructor tag=8 number=0}
131− Nat.["Nat","Prelude"]:Type:U=(20:./Prelude/Nat.idr)
132− })
133−
134− getHoles=[{hole_2}, {hole_0}]
135−
136− * - getGuess
137− - .. code-block:: idris
138−
139− {name ref bound x:
140− {name ref{type constructor tag=8 number=0}
141− Nat.["Nat","Prelude"]:Type:U=(20:./Prelude/Nat.idr)
142− }
143− }
144−
145− * - Substitute a guess into a hole.
146− - solve
147−
148− * - The hole types now looks like this:
149− - .. image:: ../image/elabLogicEx1_4.png
150− :width: 131px
151− :height: 14px
152−
153− * - The term now looks like this:
154− - ?{hole_0} ≈ λ x . x . {hole_0}
155−
156− * - getEnv
157−
158− getGoal
159−
160− getHoles
161−
162− - .. code-block:: idris
163−
164− getEnv=[]
165−
166− getGoal=(hole_0, __pi_arg:(Nat.["Nat", "Prelude"]:{
167− type constructor tag=8 number=0}.
168− Type:U=(20:./Prelude/Nat.idr)
169− ->.{name ref
170− {type constructor tag=8 number=0}
171− Nat.["Nat","Prelude"]:Type:U=(20:./Prelude/Nat.idr)
172− })
173− })
174−
175− getHoles=[{hole_0}]
176−
177− * - getGuess
178− - .. code-block:: idris
179−
180− x:({λ (Nat.["Nat", "Prelude"]:{
181− type constructor tag=8 number=0}).
182− Type:U=(20:./Prelude/Nat.idr)
183− }.{
184− name ref bound
185− x:{name ref {type constructor tag=8 number=0}
186− Nat.["Nat","Prelude"]:Type:U=(20:./Prelude/Nat.idr)
187− }
188− })
189− }
190−
191−.. target-notes::
192−.. _`my code`: https://github.com/martinbaker/Idris-dev/blob/uglyTTPrinter/libs/prelude/Language/Reflection/TTPrinter.idr
docs/elaboratorReflection/generatingData.rstdeleted−385
@@ -1,385 +0,0 @@
1−Generating Datatypes and Functions at Compile Time
2−==================================================
3−
4−Program elements, such as datatypes and functions can be constructed at compile-time in the Elab monad.
5−This can allow proofs to be generated for user defined types or it could allow types to be automatically generated to support user defined types.
6−An example is the code, from `Elaborator reflection: extending Idris in Idris`_, that automatically generates accessibility predicates using the Bove-Capretta method.
7−
8−Generating Datatypes
9−--------------------
10−
11−There are two main 'tactics' associated with generating datatypes:
12−
13−- declareDatatype
14−- defineDatatype
15−
16−Which declare and define the datatype as the names suggest.
17−
18−.. list-table::
19−
20− * - These 'tactics' and the data structures associated with them are listed in the tables later on this page, for now, here is a summary:
21− - .. image:: ../image/generateDatatype.png
22− :width: 332px
23− :height: 246px
24− :alt: diagram illustrating data structures associated with declareDatatype defineDatatype.
25−
26−.. list-table::
27−
28− * - As a first example, the following boolean-like type can be constructed. When the compiler has run it will be available to us as if we had compiled it in the usual way:
29− - .. code-block:: idris
30−
31− λΠ> :printdef Two
32− data Two : Type where
33− F : Two
34− T : Two
35−
36−This was generated by the following code:
37−
38−.. code-block:: idris
39−
40− module TwoDef
41− %language ElabReflection
42−
43− addTwo : Elab ()
44− addTwo = do let twoname : TTName = `{{TwoDef.Two}}
45− let F2 = `{{TwoDef.F}}
46− let T2 = `{{TwoDef.T}}
47− declareDatatype $ Declare twoname [] `(Type)
48− defineDatatype $ DefineDatatype twoname [
49− Constructor `{{F}} [] (Var `{{TwoDef.Two}}),
50− Constructor `{{T}} [] (Var `{{TwoDef.Two}})
51− ]
52−
53− %runElab addTwo
54−
55−.. list-table::
56−
57− * - The constructors T and F can be called as would be expected:
58− - .. code-block:: idris
59−
60− λΠ> F
61− F : Two
62− λΠ> T
63− T : Two
64−
65−Generating Functions
66−--------------------
67−
68−There are two main 'tactics' associated with generating functions:
69−
70−- declareType
71−- defineFunction
72−
73−Which declare and define the function as the names suggest.
74−
75−.. list-table::
76−
77− * - These 'tactics' and the data structures associated with them are listed in the tables later on this page, for now, here is a summary:
78− - .. image:: ../image/generateFunction.png
79− :width: 332px
80− :height: 246px
81− :alt: diagram illustrating data structures associated with function declare and define.
82−
83−Note: The left hand side (lhs) and right hand side (rhs) of FunClause typically is of type 'Raw'.
84−
85−.. list-table::
86−
87− * - Bound pattern variables are represented by 'PVar' binders:
88− This diagram shows an example of a possible Raw structure that might be used in a function definition.
89− - .. image:: ../image/generateFunction2.png
90− :width: 264px
91− :height: 239px
92− :alt: diagram illustrating data structures associated with functions.
93−
94−.. list-table::
95−
96− * - Some function definitions can now be added to the above datatype. This is what they will look like:
97− - .. code-block:: idris
98−
99− λΠ> :printdef perm1
100− perm1 : Two -> Two
101− perm1 F = F
102− perm1 T = T
103− λΠ> :printdef perm2
104− perm2 : Two -> Two
105− perm1 F = T
106− perm1 T = F
107−
108−This was generated with the following code:
109−
110−.. code-block:: idris
111−
112− let perm1 = `{{TwoDef.perm1}}
113− declareType (Declare perm1 [MkFunArg `{{code}} (Var twoname) Explicit NotErased] (Var twoname))
114− defineFunction $ DefineFun perm1 [
115− MkFunClause (RApp (Var perm1) (Var `{{TwoDef.F}})) (Var F2),
116− MkFunClause (RApp (Var perm1) (Var `{{TwoDef.T}})) (Var T2)
117− ]
118−
119− let perm2 = `{{TwoDef.perm2}}
120− declareType (Declare perm2 [MkFunArg `{{code}} (Var twoname) Explicit NotErased] (Var twoname))
121− defineFunction $ DefineFun perm2 [
122− MkFunClause (RApp (Var perm1) (Var `{{TwoDef.F}})) (Var T2),
123− MkFunClause (RApp (Var perm1) (Var `{{TwoDef.T}})) (Var F2)
124− ]
125−
126−.. list-table::
127−
128− * - This is what happens when we call the functions:
129− - .. code-block:: idris
130−
131− λΠ> perm1 F
132− F : Two
133− λΠ> perm1 T
134− T : Two
135− λΠ> perm2 F
136− T : Two
137− λΠ> perm2 T
138− F : Two
139−
140−So far these datatypes and functions could have been written, statically, in the usual way. However, it is possible to imagine situations where we may need a lot of functions to be generated automatically at compile time. For example, if we extend this Boolean datatype to a datatype with more simple constructors (a finite set), we could generate a function for every possible permutation of that datatype back to itself.
141−
142−A Different Example which has Type Parameters
143−---------------------------------------------
144−
145−.. list-table::
146−
147− * - Here is an example of a datatype with type parameters:
148− - .. code-block:: idris
149−
150− data N : Nat -> Type where
151− MkN : N x
152− MkN' : (x : Nat) -> N (S x)
153−
154−This was produced by the following code:
155−
156−.. code-block:: idris
157−
158− module DataDef
159− %language ElabReflection
160−
161− addData : Elab ()
162− addData = do
163− let dataname : TTName = `{{DataDef.N}}
164− declareDatatype $ Declare dataname [MkFunArg `{{n}} `(Nat) Explicit NotErased] `(Type)
165− defineDatatype $ DefineDatatype dataname [
166− Constructor `{{MkN}} [MkFunArg `{{x}} `(Nat) Implicit NotErased]
167− (RApp (Var dataname) (Var `{{x}})),
168− Constructor `{{MkN'}} [MkFunArg `{{x}} `(Nat) Explicit NotErased]
169− (RApp (Var dataname) (RApp (Var `{S}) (Var `{{x}})))
170− ]
171−
172− %runElab addData
173−
174−So this declares and defines the following data structure 'N' with a constructor 'MkN' which can have an implicit or an explicit Nat argument. Which can be used like this:
175−
176−.. code-block:: idris
177−
178− λΠ> :t N
179− N : Nat -> Type
180− λΠ> N 2
181− N 2 : Type
182− λΠ> N 0
183− N 0 : Type
184− λΠ> :t MkN
185− MkN : N x
186−
187−Table of 'tactics' for Generating Data and Functions
188−----------------------------------------------------
189−
190−These are the functions that we can use to create data and functions in the Elab monad:
191−
192−.. list-table::
193− :widths: 10 30
194− :stub-columns: 1
195−
196− * - declareType
197− - Add a type declaration to the global context.
198−
199− Signature:
200−
201− declareType : TyDecl -> Elab ()
202− * - defineFunction
203− - Define a function in the global context. The function must have already been declared, either in ordinary Idris code or using `declareType`.
204−
205− Signature:
206−
207− defineFunction : FunDefn Raw -> Elab ()
208−
209− * - declareDatatype
210− - Declare a datatype in the global context. This step only establishes the type constructor; use `defineDatatype` to give it constructors.
211−
212− Signature:
213−
214− declareDatatype : TyDecl -> Elab ()
215−
216− * - defineDatatype
217− - Signature:
218−
219− defineDatatype : DataDefn -> Elab ()
220−
221− * - addImplementation
222− - Register a new implementation for interface resolution.
223−
224− Arguments:
225−
226− - ifaceName the name of the interface for which an implementation is being registered
227− - implName the name of the definition to use in implementation search
228−
229− Signature:
230−
231− addImplementation : (ifaceName, implName : TTName) -> Elab ()
232−
233− * - isTCName
234− - Determine whether a name denotes an interface.
235−
236− Arguments:
237−
238− - name - a name that might denote an interface.
239−
240− Signature:
241−
242− isTCName : (name : TTName) -> Elab Bool
243−
244−Table of Datatypes Associated with Generating Data and Functions
245−----------------------------------------------------------------
246−
247−The above functions use the following data/records:
248−
249−.. list-table::
250− :widths: 10 30
251− :stub-columns: 1
252−
253− * - Plicity
254− - How an argument is provided in high-level Idris
255−
256− .. code-block:: idris
257−
258− data Plicity=
259− ||| The argument is directly provided at the application site
260− Explicit |
261− ||| The argument is found by Idris at the application site
262− Implicit |
263− ||| The argument is solved using interface resolution
264− Constraint
265−
266− * - FunArg
267− - Function arguments
268−
269− These are the simplest representation of argument lists, and are used for functions. Additionally, because a FunArg provides enough
270− information to build an application, a generic type lookup of a top-level identifier will return its FunArgs, if applicable.
271−
272− .. code-block:: idris
273−
274− record FunArg where
275− constructor MkFunArg
276− name : TTName
277− type : Raw
278− plicity : Plicity
279− erasure : Erasure
280−
281− * - TyConArg
282− - Type constructor arguments
283−
284− Each argument is identified as being either a parameter that is
285−
286− consistent in all constructors, or an index that varies based on
287−
288− which constructor is selected.
289−
290− .. code-block:: idris
291−
292− data TyConArg =
293− ||| Parameters are uniform across the constructors
294− TyConParameter FunArg |
295− ||| Indices are not uniform
296− TyConIndex FunArg
297−
298− * - TyDecl
299− - A type declaration for a function or datatype
300−
301− .. code-block:: idris
302−
303− record TyDecl where
304− constructor Declare
305− ||| The fully-qualified name of the function or datatype being declared.
306− name : TTName
307− ||| Each argument is in the scope of the names of previous arguments.
308− arguments : List FunArg
309− ||| The return type is in the scope of all the argument names.
310− returnType : Raw
311−
312− * - FunClause
313− - A single pattern-matching clause
314−
315− .. code-block:: idris
316−
317− data FunClause : Type -> Type where
318− MkFunClause : (lhs, rhs : a) -> FunClause a
319− MkImpossibleClause : (lhs : a) -> FunClause a
320−
321− * - FunDefn
322− - A reflected function definition.
323−
324− .. code-block:: idris
325−
326− record FunDefn a where
327− constructor DefineFun
328− name : TTName
329− clauses : List (FunClause a)
330−
331− * - ConstructorDefn
332− - A constructor to be associated with a new datatype.
333−
334− .. code-block:: idris
335−
336− record ConstructorDefn where
337− constructor Constructor
338− ||| The name of the constructor. The name must _not_ be qualified -
339− ||| that is, it should begin with the `UN` or `MN` constructors.
340− name : TTName
341− ||| The constructor arguments. Idris will infer which arguments are
342− ||| datatype parameters.
343− arguments : List FunArg
344− ||| The specific type constructed by the constructor.
345− returnType : Raw
346−
347− * - DataDefn
348− - A definition of a datatype to be added during an elaboration script.
349−
350− .. code-block:: idris
351−
352− record DataDefn where
353− constructor DefineDatatype
354− ||| The name of the datatype being defined. It must be
355− ||| fully-qualified, and it must have been previously declared as a
356− ||| datatype.
357− name : TTName
358− ||| A list of constructors for the datatype.
359− constructors : List ConstructorDefn
360−
361− * - CtorArg
362− - CtorParameter
363−
364− .. code-block:: idris
365−
366− data CtorArg = CtorParameter FunArg | CtorField FunArg
367−
368− * - Datatype
369− - A reflected datatype definition
370−
371− .. code-block:: idris
372−
373− record Datatype where
374− constructor MkDatatype
375− ||| The name of the type constructor
376− name : TTName
377− ||| The arguments to the type constructor
378− tyConArgs : List TyConArg
379− ||| The result of the type constructor
380− tyConRes : Raw
381− ||| The constructors for the family
382− constructors : List (TTName, List CtorArg, Raw)</td>
383−
384−.. target-notes::
385−.. _`Elaborator reflection: extending Idris in Idris`: https://dl.acm.org/citation.cfm?doid=2951913.2951932
docs/elaboratorReflection/holes.rstdeleted−196
@@ -1,196 +0,0 @@
1−Elaborator Reflection - Holes
2−=============================
3−
4−The process of doing proofs and elaborator reflection tends to involve stating with a desired conclusion and working back to known premises. This often needs intermediate sub-goals which may only be partially solved, these are encoded using 'holes' and 'guesses'.
5−
6−* A hole is a term (an expression - a chunk of code) which is yet to be determined. We do have information about its type (this process tends to be type driven).
7−* A guess is like a hole that is not yet bound.
8−
9−The theory around this was developed in `Dependently Typed Functional Programs and their Proofs by McBride 1999`_.
10−
11−Notation for Holes and Guesses
12−------------------------------
13−
14−There is a notation used in the McBride 1999 thesis which is adapted for the TT language. When working on elaborator reflection it is useful to know this notation, for instance when reading the output of the 'debug' tactic.
15−
16−* A focused hole is notated like this ?x:t . t
17−* A guess is notated like this ?x ≈ t:t . t
18−
19−The following example shows how this is used:
20−
21−Simple Example
22−--------------
23−
24−Start with a code file that just contains:
25−
26−.. code-block:: idris
27−
28− %language ElabReflection
29−
30− testFn : Nat
31− testFn = %runElab (do debug {a = ()})
32−
33−when this is loaded the following is displayed:
34−
35−.. code-block:: idris
36−
37− Holes:
38− ----------------------------------
39− {hole_2} : Prelude.Nat.Nat
40−
41− ----------------------------------
42− {hole_0} : Prelude.Nat.Nat
43−
44− Term:
45− ?{hole_0} ≈ ? {hole_2} . {hole_2} . {hole_0}
46−
47−This shows information about the state when debug is encountered, during tactic execution, which allows us to investigate what is happening at each stage.
48−
49−* The "Holes" part shows the types of the holes and the local context of each
50−* The "Term" part shows where these holes are in the expression being constructed.
51−
52−So starting with the "Term" part we have.
53−
54−.. code-block:: idris
55−
56− ?{hole_0} ≈ ? {hole_2} . {hole_2} . {hole_0}
57−
58−.. sidebar:: attack tactic
59−
60− This kind of thing tends to arise from "attack", which helps keep binding forms in order.
61−
62−The meaning of this is not immediately apparent so it helps to add some parentheses to make the structure clearer:
63−
64−.. code-block:: idris
65−
66− (?{hole_0} ≈ (? {hole_2} . {hole_2}) . {hole_0})
67−
68−First lets look at the inner part:
69−
70−.. code-block:: idris
71−
72− ? {hole_2} . {hole_2}
73−
74−We can substitute in the type from the "Holes" part:
75−
76−.. code-block:: idris
77−
78− ? {hole_2}:Nat . {hole_2}:Nat
79−
80−So we are looking for a hole of type Nat and all we know is it has type Nat.
81−
82−Going back to the full term, the above is wrapped in a guess, so it means: 'a guess that is itself a hole'.
83−
84−Since the elaborator does not have any further information it has to be given a value:
85−
86−.. code-block:: idris
87−
88− %language ElabReflection
89−
90− testFn : Nat
91− testFn = %runElab (do fill `(Z)
92− debug {a = ()}
93− solve)
94−
95−Now we have a guess for hole_2 which is itself a guess for hole_0:
96−
97−.. code-block:: idris
98−
99− ?{hole_0} ≈ ?{hole_2} ≈ Prelude.Nat.Z . {hole_2} . {hole_0}
100−
101−The guesses can be accepted by calling the 'solve' tactic.
102−
103−Example Showing Patterns
104−------------------------
105−
106−In this next example a parameter 'n' has been added to the function. This allows us to see how patterns are used. Starting with this file:
107−
108−.. code-block:: idris
109−
110− %language ElabReflection
111−
112− testFn : Nat -> Nat
113− testFn n = %runElab (do debug {a = ()})
114−
115−when loaded gives:
116−
117−.. code-block:: idris
118−
119− Holes:
120− n : Prelude.Nat.Nat
121− ----------------------------------
122− {hole_3} : Prelude.Nat.Nat
123−
124− n : Prelude.Nat.Nat
125− ----------------------------------
126− {hole_1} : Prelude.Nat.Nat
127−
128− ----------------------------------
129− {hole_0} : patTy n : Prelude.Nat.Nat . Prelude.Nat.Nat
130−
131− Term:
132− ?{hole_0} ≈ pat n : Prelude.Nat.Nat .
133− ?{hole_1} ≈ ? {hole_3} . {hole_3} . {hole_1} .
134− {hole_0}
135−
136−The ns above the lines show the context of the holes on the right hand side - they include the variable n that is an argument!
137−
138−patTy is a binding form in Idris's core language that introduces a pattern variable. The idea is that the left-hand side and right-hand side of each pattern should have the same type. Because pattern variables may occur multiple times on either side of the equation, we can achieve this by documenting their types with a binding form that wraps each side. This new binding form is why an "attack" was necessary prior to elaborating the RHS.
139−
140−patTy is a type former, and pat is the corresponding introduction form. So you can think of patTy as being a bit like a dependent function type, and pat as being a bit like lambda, except they don't introduce functions (they instead are used for pattern-matching definitions).
141−
142−More Complicated Example
143−------------------------
144−
145−This example does not introduce any new notation but the extra complexity gives a more realistic idea of how it is used. Here we start with this file:
146−
147−.. code-block:: idris
148−
149− %language ElabReflection
150−
151− testFn : (n : Nat) -> (n = plus n Z) -> (S n = S (plus n Z))
152− testFn k ih = %runElab (do debug {a = ()})
153−
154−when loaded gives:
155−
156−.. code-block:: idris
157−
158− Holes:
159− k : Prelude.Nat.Nat
160− ih : = Prelude.Nat.Nat Prelude.Nat.Nat k
161− (Prelude.Nat.plus k Prelude.Nat.Z)
162− ----------------------------------
163− {hole_4} : = Prelude.Nat.Nat Prelude.Nat.Nat (Prelude.Nat.S k)
164− (Prelude.Nat.S (Prelude.Nat.plus k Prelude.Nat.Z))
165−
166− k : Prelude.Nat.Nat
167− ih : = Prelude.Nat.Nat Prelude.Nat.Nat k
168− (Prelude.Nat.plus k Prelude.Nat.Z)
169− ----------------------------------
170− {hole_2} : = Prelude.Nat.Nat Prelude.Nat.Nat (Prelude.Nat.S k)
171− (Prelude.Nat.S (Prelude.Nat.plus k Prelude.Nat.Z))
172−
173− k : Prelude.Nat.Nat
174− ----------------------------------
175− {hole_1} : patTy ih : = Prelude.Nat.Nat Prelude.Nat.Nat k
176− (Prelude.Nat.plus k Prelude.Nat.Z) .
177− = Prelude.Nat.Nat Prelude.Nat.Nat (Prelude.Nat.S k)
178− (Prelude.Nat.S (Prelude.Nat.plus k Prelude.Nat.Z))
179−
180− ----------------------------------
181− {hole_0} : patTy k : Prelude.Nat.Nat .
182− patTy ih : = Prelude.Nat.Nat Prelude.Nat.Nat k
183− (Prelude.Nat.plus k Prelude.Nat.Z) .
184− = Prelude.Nat.Nat Prelude.Nat.Nat (Prelude.Nat.S k)
185− (Prelude.Nat.S (Prelude.Nat.plus k Prelude.Nat.Z))
186−
187− Term:
188− ?{hole_0} ≈ pat k : Prelude.Nat.Nat .
189− ?{hole_1} ≈ pat ih : = Prelude.Nat.Nat Prelude.Nat.Nat k
190− (Prelude.Nat.plus k Prelude.Nat.Z) .
191− ?{hole_2} ≈ ? {hole_4} . {hole_4} . {hole_2} .
192− {hole_1} .
193− {hole_0}
194−
195−.. target-notes::
196−.. _`Dependently Typed Functional Programs and their Proofs by McBride 1999`: https://www.era.lib.ed.ac.uk/handle/1842/374
docs/elaboratorReflection/index.rstdeleted−27
@@ -1,27 +0,0 @@
1−.. _elaborator-index:
2−
3−#####################
4−Elaborator Reflection
5−#####################
6−
7−A tutorial on theorem proving in Idris.
8−
9−.. note::
10−
11− The documentation for Idris has been published under the Creative
12− Commons CC0 License. As such to the extent possible under law, *The
13− Idris Community* has waived all copyright and related or neighboring
14− rights to Documentation for Idris.
15−
16− More information concerning the CC0 can be found online at: http://creativecommons.org/publicdomain/zero/1.0/
17−
18−.. toctree::
19− :maxdepth: 1
20−
21− elaborator-reflection
22− elabReflection
23− tactics
24− holes
25− example1
26− primitive
27− generatingData
docs/elaboratorReflection/primitive.rstdeleted−518
@@ -1,518 +0,0 @@
1−Primitive Operators
2−===================
3−
4−.. list-table::
5− :widths: 10 30
6− :stub-columns: 1
7−
8− * - gensym
9− - Generate a unique name based on some hint.
10−
11− Useful when establishing a new binder.
12−
13− **NB**: the generated name is unique **for this run of the elaborator**.
14−
15− Do not assume that they are globally unique.
16−
17− Signature:
18−
19− gensym : (hint : String) -> Elab TTName
20−
21− * - solve
22− - Substitute a guess into a hole.
23−
24−
25− .. image:: ../image/solve.png
26− :width: 141px
27− :height: 74px
28− :alt: diagram illustrating solve tactic
29−
30−
31− Substitute the focused guess throughout its scope, eliminating it and moving focus to the next element of the hole queue. Fail if the focus is not a guess.
32−
33− Signature:
34−
35− solve : Elab ()
36−
37− Example:
38−
39− .. code-block:: idris
40−
41− %language ElabReflection
42−
43− testFn : Nat
44− testFn = %runElab (do fill `(Z)
45− solve)
46−
47− * - fill
48− - Place a term into a hole, unifying its type. Fails if the focus is not a hole.
49−
50−
51− .. image:: ../image/fill.png
52− :width: 140px
53− :height: 74px
54− :alt: diagram illustrating fill tactic
55−
56−
57− Signature:
58−
59− fill : (e : Raw) -> Elab ()
60−
61− Place a term e with type tc into the focused hole:
62−
63− ?h : th.e'
64−
65− and convert it to a guess:
66−
67− ?h ≈ e:t.e'
68−
69− and fail if the current focus is not a hole. The type t of the guess is constructed by unifying tc and th, which may instantiate holes that they refer to. Fail if the current focus is not a hole or if unification fails.
70−
71− This unification can result in the solution of further holes or the establishment of additional unsolved unification constraints.
72−
73− Example:
74−
75− .. code-block:: idris
76−
77− %language ElabReflection
78−
79− testFn : Nat
80− testFn = %runElab (do fill `(Z)
81− solve)
82−
83− * - apply
84− - Attempt to apply an operator to fill the current hole, potentially solving arguments by unification.
85−
86− A hole is established for each argument.
87−
88− The return value is the list of holes established for the arguments to the function.
89−
90− Note that not all of the returned hole names still exist, as they may have been solved.
91−
92− - @ op the term to apply
93− - @ argSpec - A list of booleans, one for each argument that the operator will be applied to. If true then attempt to solve the argument by unification.
94−
95− Signature:
96−
97− apply : (op : Raw) -> (argSpec : List Bool) -> Elab (List TTName)
98−
99− Example: elaborating an application of a function f that takes one implicit and two explicit arguments might invoke:
100−
101− apply \`(f) [False, True, True]
102−
103− Here is an example of an elab script that uses apply to insert the term plus Z (S Z) into a goal of type Nat.
104−
105− .. code-block:: idris
106−
107− do [x,y] <- apply `(plus) [False, False]
108− solve
109− focus x; fill `(Z); solve
110− focus y; fill `(S Z); solve
111−
112− The names of the established holes are returned.
113−
114− Note: This was added to the original tactic language to allow elaborator reflection.
115−
116− * - matchApply
117− - Attempt to apply an operator to fill the current hole, potentially solving arguments by matching.
118−
119− The return value is the list of holes established for the arguments to the function.
120−
121− Note that not all of the returned hole names still exist, as they may have been solved.
122−
123− - @ op the term to apply
124− - @ argSpec instructions for finding the arguments to the term, where the Boolean states whether or not to attempt to solve the argument by matching.
125−
126− Signature:
127−
128− matchApply : (op : Raw) -> (argSpec : List Bool) -> Elab (List TTName)
129−
130− * - focus
131− - Move the focus to the specified hole, bringing it to the front of the hole queue. Fails if the hole does not exist.
132−
133− @ hole the hole to focus on
134−
135− Signature:
136−
137− focus : (hole : TTName) -> Elab ()
138−
139− * - unfocus
140− - Send the currently-focused hole to the end of the hole queue and focus on the next hole.
141−
142− Signature:
143−
144− unfocus : TTName -> Elab ()
145−
146− * - attack
147− - Convert a hole to make it suitable for bindings.
148−
149−
150− .. image:: ../image/attack.png
151− :width: 152px
152− :height: 70px
153− :alt: diagram illustrating attack tactic
154−
155−
156− The binding tactics require that a hole be directly under its binding, or else the scopes of the generated terms won't make sense. This tactic creates a new hole of the proper form, and points the old hole at it.
157−
158− Signature:
159−
160− attack : Elab ()
161−
162− * - claim
163− - Establish a new hole binding named n with type t, surrounding the current focus.
164−
165− Introduce a new hole with a specified name and type.
166−
167− The new hole will be focused, and the previously-focused hole will be immediately after it in the hole queue. Because this tactic introduces a new binding, you may need to 'attack' first.
168−
169− Signature:
170−
171− claim : TTName -> Raw -> Elab ()
172−
173− * - patvar
174− - Convert a hole into a pattern variable.
175−
176− Signature:
177−
178− patvar : TTName -> Elab ()
179−
180− * - compute
181− - Normalise the goal.
182−
183− Often this is not necessary because normanisation is applied during other tactics.
184−
185− Signature:
186−
187− compute : Elab ()
188−
189− * - normalise
190− - Normalise a term in some lexical environment
191−
192− - @ env the environment in which to compute (get one of these from `getEnv`)
193− - @ term the term to normalise
194−
195− Signature:
196−
197− normalise : (env : List (TTName, Binder TT)) -> (term : TT) -> Elab TT
198−
199− * - whnf
200− - Reduce a closed term to weak-head normal form
201−
202− @ term the term to reduce
203−
204− Signature:
205−
206− whnf : (term : TT) -> Elab TT
207−
208− * - convertsInEnv
209− - Check that two terms are convertible in the current context and in some environment.
210−
211− - @ env a lexical environment to compare the terms in (see `getEnv`)
212− - @ term1 the first term to convert
213− - @ term2 the second term to convert
214−
215− Signature:
216−
217− convertsInEnv : (env : List (TTName, Binder TT)) -> (term1, term2 : TT) -> Elab ()
218−
219− * - converts
220− - Check that two terms are convertable in the current context and environment
221−
222− - @ term1 the first term to convert
223− - @ term2 the second term to convertconverts : (term1, term2 : TT) -> Elab ()
224−
225− converts term1 term2 = convertsInEnv !getEnv term1 term2
226−
227− * - getSourceLocation
228− - Find the source context for the elaboration script
229−
230− Signature:
231−
232− getSourceLocation : Elab SourceLocation
233−
234− * - sourceLocation
235− - Attempt to solve the current goal with the source code
236−
237− locationsourceLocation : Elab ()
238−
239− .. code-block:: idris
240−
241− sourceLocation = do loc <- getSourceLocation
242− fill (quote loc)
243− solve
244−
245− * - currentNamespace
246− - Get the current namespace at the point of tactic execution. This allows scripts to define top-level names conveniently.
247−
248− The namespace is represented as a reverse-order list of strings, just as in the representation of names.
249−
250− Signature:
251−
252− currentNamespace : Elab (List String)
253−
254− * - rewriteWith
255− - Attempt to rewrite the goal using an equality.
256−
257− The tactic searches the goal for applicable subterms, and constructs a context for `replace` using them. In some cases, this is not possible, and `replace` must be called manually with an appropriate context.
258−
259− Because this tactic internally introduces a `let` binding, it requires that the hole be immediately under its binder (use 'attack' if it might not be).
260−
261− Signature:
262−
263− rewriteWith : Raw -> Elab ()
264−
265− * - resolveTC
266− - Attempt to solve the current goal with an interface dictionary
267−
268− @ fn the name of the definition being elaborated (to prevent Idris from looping)
269−
270− Signature:
271−
272− resolveTC : (fn : TTName) -> Elab ()
273−
274− * - search
275− - Use Idris's internal proof search.
276−
277− Signature:
278−
279− search : Elab ()
280−
281− * - search'
282− - Use Idris's internal proof search, with more control.
283−
284− - @ depth the search depth
285− - @ hints additional names to try
286−
287− Signature:
288−
289− search' : (depth : Int) -> (hints : List TTName) -> Elab ()
290−
291− * - operatorFixity
292− - Look up the declared fixity for an operator.
293−
294− The lookup fails if the operator does not yet have a fixity or if the string is not a valid operator.
295−
296− @ operator the operator string to look up
297−
298− Signature:
299−
300− operatorFixity : (operator : String) -> Elab Fixity
301−
302− * - debug
303− - Halt elaboration, dumping the internal state for inspection.
304−
305− This is intended for elaboration script developers, not for end-users. Use `fail` for final scripts.
306−
307− Signature:
308−
309− debug : Elab a
310−
311− If 'debug' is not the last tactic then make sure its type is sufficiently constrained. In particular, its type is Elab a, but there's no way for Idris to find out which type was meant for a. This can be fixed by either writing an explicit type (e.g. debug {a = ()}) or by using a helper that constrains the type (such as simple in Pruviloj, e.g. simple debug as a line).
312−
313− .. code-block:: idris
314−
315− %language ElabReflection
316−
317− idNat : Nat -> Nat
318− idNat = %runElab (do intro `{{x}}
319− debug {a = ()}
320− fill (Var `{{x}})
321− solve)
322−
323− * - debugMessage
324− - Halt elaboration, dumping the internal state and displaying a message.
325−
326− This is intended for elaboration script developers, not for end-users. Use `fail` for final scripts.
327−
328− @ msg the message to display
329−
330− Signature:
331−
332− debugMessage : (msg : List ErrorReportPart) -> Elab a
333−
334− If 'debugMessage' is not the last tactic then make sure its type is sufficiently constrained. In particular, its type is Elab a, but there's no way for Idris to find out which type was meant for a. This can be fixed by either writing an explicit type (e.g. debugMessage [TextPart "message"] {a = ()}) or by using a helper that constrains the type (such as simple in Pruviloj, e.g. simple debug as a line).
335−
336− .. code-block:: idris
337−
338− %language ElabReflection
339− idNat : Nat -> Nat
340− idNat = %runElab (do intro `{{x}}
341− debugMessage [TextPart "error message"] {a = ()}
342− fill (Var `{{x}})
343− solve)
344−
345− * - metavar
346− - Create a new top-level metavariable to solve the current hole.
347−
348− @ name the name for the top-level variable
349−
350− Signature:
351−
352− metavar : (name : TTName) -> Elab ()
353−
354− * - runElab
355− - Recursively invoke the reflected elaborator with some goal.
356−
357− The result is the final term and its type.
358−
359− Signature:
360−
361− runElab : Raw -> Elab () -> Elab (TT, TT)
362−
363−
364−Read and Write State
365−--------------------
366−
367−.. list-table::
368− :widths: 10 30
369− :stub-columns: 1
370−
371− * - getEnv
372− - Look up the lexical binding at the focused hole. Fails if no holes are present.
373−
374− Signature:
375−
376− getEnv : Elab (List (TTName, Binder TT))
377−
378− * - getGoal
379− - Get the name and type of the focused hole. Fails if not holes are present.
380−
381− Signature:
382−
383− getGoal : Elab (TTName, TT)
384−
385− * - getHoles
386− - Get the hole queue, in order.
387−
388− Signature:
389−
390− getHoles : Elab (List TTName)
391−
392− * - getGuess
393− - If the current hole contains a guess, return it. Otherwise, fail.
394−
395− Signature:
396−
397− getGuess : Elab TT
398−
399− * - lookupTy
400− - Look up the types of every overloading of a name.
401−
402− Signature:
403−
404− lookupTy : TTName -> Elab (List (TTName, NameType, TT))
405−
406− * - lookupTyExact
407− - Get the type of a fully-qualified name. Fail if it doesn't resolve uniquely.
408−
409− Signature:
410−
411− lookupTyExact : TTName -> Elab (TTName, NameType, TT)
412−
413− * - lookupDatatype
414− - Find the reflected representation of all datatypes whose names are overloadings of some name.
415−
416− Signature:
417−
418− lookupDatatype : TTName -> Elab (List Datatype)
419−
420− * - lookupDatatypeExact
421− - Find the reflected representation of a datatype, given its fully-qualified name. Fail if the name does not uniquely resolve to a datatype.
422−
423− Signature:
424−
425− lookupDatatypeExact : TTName -> Elab Datatype
426−
427− * - lookupFunDefn
428− - Find the reflected function definition of all functions whose names are overloadings of some name.
429−
430− Signature:
431−
432− lookupFunDefn : TTName -> Elab (List (FunDefn TT))
433−
434− * - lookupFunDefnExact
435− - Find the reflected function definition of a function, given its fully-qualified name. Fail if the name does not uniquely resolve to a function.
436−
437− Signature:
438−
439− lookupFunDefnExact : TTName -> Elab (FunDefn TT)
440−
441− * - lookupArgs
442− - Get the argument specification for each overloading of a name.
443−
444− Signature:
445−
446− lookupArgs : TTName -> Elab (List (TTName, List FunArg, Raw))
447−
448− * - lookupArgsExact
449− - Get the argument specification for a name. Fail if the name does not uniquely resolve.
450−
451− Signature:
452−
453− lookupArgsExact : TTName -> Elab (TTName, List FunArg, Raw)
454−
455− * - check
456− - Attempt to type-check a term, getting back itself and its type.
457−
458− - @ env the environment within which to check the type
459− - @ tm the term to check
460−
461− Signature:
462−
463− check : (env : List (TTName, Binder TT)) -> (tm : Raw) -> Elab (TT, TT)
464−
465−Error Handling
466−--------------
467−
468−.. list-table::
469− :widths: 10 30
470− :stub-columns: 1
471−
472− * - tryCatch
473− - `tryCatch t (\err => t')` will run `t`, and if it fails, roll back the elaboration state and run `t'`,
474− but with access to the knowledge of why `t` failed.
475−
476− Signature:
477−
478− tryCatch : Elab a -> (Err -> Elab a) -> Elab a
479−
480− .. code-block:: idris
481−
482− %language ElabReflection
483−
484− f : Err -> Elab ()
485− f (Msg _) = fill `("message error")
486− f (CantUnify _ _ _ _ _ _) = fill `("unification error")
487− f _ = fill `("other")
488−
489− s2 : String
490− s2 = %runElab (do tryCatch (fill `(True)) f ; solve)
491−
492− * - fail
493− - Halt elaboration with an error
494−
495− Signature:
496−
497− fail : List ErrorReportPart -> Elab a
498−
499− Note: we may need to make sure the return type 'a' is sufficiently constrained. If required add an explicit type {a = ()}.
500−
501− Below is some code which includes 'fail'. This will always fail but we could replace 'True' with some more useful condition.
502−
503− .. code-block:: idris
504−
505− %language ElabReflection
506−
507− id1 : Elab ()
508− id1 = do
509− intro `{{x}}
510− fill (Var `{{x}})
511− if True
512− then
513− fail [TextPart "put error message here"]
514− else
515− solve
516−
517− idNat : Nat -> Nat
518− idNat = %runElab id1
docs/elaboratorReflection/tactics.rstdeleted−430
@@ -1,430 +0,0 @@
1−Elaborator Reflection - Tactics
2−===============================
3−
4−The Idris part of the code for elaborator reflection is in
5−Elab.idr `<https://github.com/idris-lang/Idris-dev/blob/master/libs/prelude/Language/Reflection/Elab.idr>`_
6−Before looking at the Elab monad we need to know how to construct terms.
7−
8−
9−Proof State
10−-----------
11−
12−The terminology 'Proof State' is used by analogy to proof assistants but, as used here, it's really more of a metaprogramming state.
13−
14−Tactics operate on the proof state. The proof state contains various pieces of information, at this stage, the important ones for us are:
15−
16−- A hole queue - This contains a list of the names of the holes used in the proof term. The solution to each hole may depend on the other holes. For more information about holes and guesses see `Dependently Typed Functional Programs and their Proofs by McBride 1999`_.
17−- A goal type - The type of the term that is under construction for the current goal.
18−- A possibly incomplete proof term, which is being calculated and should be the goal type at the end of elaboration.
19−- Context - A collection of open unification problems, representing recoverable failures of unification that may yet unify once more variables are solved.
20−
21−There are many other pieces of information in the proof state such as the names used , such as the bodies of case blocks that need to be elaborated.but, for now, we will leave the system to handle these.
22−
23−.. image:: ../image/elabProofState.png
24− :width: 283px
25− :height: 232px
26−
27−Names TTName
28−------------
29−
30−Names in an Idris program are evaluated at runtime but sometimes a 'variable name' is needed, which can be referred to as an unevaluated symbol.
31−The names used in terms have different constructors depending on their type:
32−
33−+---------------------------+-----------------------------------------------+
34−| UN String | A user-provided name |
35−+---------------------------+-----------------------------------------------+
36−| NS (UN "foo") ["B", "A"]) | A name in some namespace |
37−+---------------------------+-----------------------------------------------+
38−| MN Int String | Machine-chosen names |
39−+---------------------------+-----------------------------------------------+
40−| SN SpecialName | Special names, to make conflicts impossible |
41−| | and language features predictable |
42−+---------------------------+-----------------------------------------------+
43−
44−
45−A user defined name can be constructed like this:
46−
47−.. code-block:: idris
48−
49− Idris> UN "x"
50− UN "x" : TTName
51−
52−.. code-block:: idris
53−
54− Idris> NS (UN "x") ["b","a"]
55− NS (UN "x") ["b", "a"] : TTName
56−
57−.. list-table:: machine-chosen names
58−
59− * - A machine-chosen name needs to be generated within an Elab monad (see below for details) and is unique within that monad. This produced: {abc_140}{abc_141} so although gensym "abc" was called twice each one had a different integer:
60− - example of unique names:
61−
62− .. code-block:: idris
63−
64− implementation Show TTName where
65− show (UN s) = "`{{"++s++"}}"
66− show (NS t a) = "{"++(show t)++
67− "."++(show a)++"}"
68− show (MN i s) = "{"++s++"_"++(show i)++"}"
69− show (SN sn) = "TTName special name"
70−
71− showGensym : String
72− showGensym = %runElab (do
73− debugMessage [TextPart (
74− show !(gensym "abc") ++
75− show !(gensym "abc")
76− )]
77− )
78−
79−Quasiquotation
80−--------------
81−
82−Since names are used frequently in elaborator reflection there is a shortcut for constructing them:
83−
84−.. list-table::
85−
86− * - An unresolved variable "x" is wrapped in backtick and double braces:
87− - .. code-block:: idris
88−
89− Idris> `{{x}}
90− UN "x" : TTName
91−
92−
93− * - Single braces are used for existing variables:
94− - .. code-block:: idris
95−
96− Idris> `{x}
97− No such variable x
98− Idris> :let x=2
99− Idris> `{x}
100− UN "x" : TTName
101−
102−
103− * - brackets are used for an expression:
104−
105− here type is inferable
106− - .. code-block:: idris
107−
108− Idris> :let a=2
109− Idris> `(a)
110− P Ref (UN "a") (TConst (AType (ATInt ITBig))) : TT
111−
112−
113− * - Expression with explicit type:
114− - .. code-block:: idris
115−
116− Idris> `(a:Integer)
117− P Ref (UN "a") (TConst (AType (ATInt ITBig))) : TT
118−
119−
120− * - If we want the value we can escape from quasiquotation by using anti-quotation (tilde)
121− - .. code-block:: idris
122−
123− Idris> `(~a)
124− 2 : Integer
125−
126−quasiquotation summary:
127−
128−+------------+-----------+----------------------------------------------------------+
129−| |Reification| |
130−+============+===========+==========================================================+
131−| \`{{n}} | TTName | Use for new names. Unresolved quotation of the name n. |
132−+------------+-----------+----------------------------------------------------------+
133−| \`{n} | TTName | Use for existing names. Resolved quotation of the name |
134−| | | n. n is a reference to a unique name in scope. |
135−+------------+-----------+----------------------------------------------------------+
136−| \`(e) | | expression e for which a type is inferable. |
137−+------------+-----------+----------------------------------------------------------+
138−| \`(e:t) | | expression e with a given type e. |
139−+------------+-----------+----------------------------------------------------------+
140−| ~a | | anti-quotation - sub region which can be evaluated rather|
141−| | | than quoted. |
142−+------------+-----------+----------------------------------------------------------+
143−|(Var\`{{x}})| Raw | |
144−+------------+-----------+----------------------------------------------------------+
145−
146−TT
147−--
148−
149−There is a notation for a term in TT as it is being constructed (based on a BNF-like grammar), this is used for example in the debug output, it is a compact way to see the state of the term so it is used here.
150−So internally the program is stored as a tree structure using the following syntax:
151−
152−+------------+-------+-------------+---------------------------------------------+
153−| | | Syntax | More Information |
154−+============+=======+=============+=============================================+
155−| term | | t | |
156−+------------+-------+-------------+---------------------------------------------+
157−| binding | | b | |
158−+------------+-------+-------------+---------------------------------------------+
159−| constant | t ::= | c | |
160−+------------+-------+-------------+---------------------------------------------+
161−| variable | t ::= | x | |
162−+------------+-------+-------------+---------------------------------------------+
163−| variable | t ::= | b.t | so a dot '.' tells us this is some sort of |
164−| binding | | | binding. |
165−+------------+-------+-------------+---------------------------------------------+
166−| application| t ::= | t t | As with Idris, juxtaposition indicates |
167−| | | | function application. Note: the same symbol |
168−| | | | 't' is used for both terms, this does not |
169−| | | | imply they are the same term. |
170−+------------+-------+-------------+---------------------------------------------+
171−| Type | t ::= | T | |
172−| constructor| | | |
173−+------------+-------+-------------+---------------------------------------------+
174−| Data | t ::= | C | |
175−| constructor| | | |
176−+------------+-------+-------------+---------------------------------------------+
177−| function | b::= | λ c:t | colon ':' separates parameters from body of |
178−| | | | binding. |
179−+------------+-------+-------------+---------------------------------------------+
180−| let binding| b::= | let\|-> t:t | |
181−+------------+-------+-------------+---------------------------------------------+
182−| function | b::= | ∀ x:t | |
183−+------------+-------+-------------+---------------------------------------------+
184−| Type | c::= | \*i | The universe hierarchy is usually handled |
185−| universe | | | automatically so we can just use\* for the |
186−| | | | type of types. |
187−+------------+-------+-------------+---------------------------------------------+
188−| integer | c:== | i | |
189−| literal | | | |
190−+------------+-------+-------------+---------------------------------------------+
191−|integer type| c:== | Integer | |
192−+------------+-------+-------------+---------------------------------------------+
193−| string | c:== | s | |
194−| literal | | | |
195−+------------+-------+-------------+---------------------------------------------+
196−| string type| c:== | String | |
197−+------------+-------+-------------+---------------------------------------------+
198−|focused hole| | ?x : t | Conor McBride 1999 thesis. |
199−+------------+-------+-------------+---------------------------------------------+
200−| guess | | ?x ≈ t : t | Conor McBride 1999 thesis. |
201−+------------+-------+-------------+---------------------------------------------+
202−
203−Sometimes the part of the term in focus is underlined.
204−
205−Reflection of the well typed core language
206−
207−.. code-block:: idris
208−
209− data TT =
210− ||| A reference to some name (P for Parameter)
211− P NameType TTName TT |
212− ||| de Bruijn variables
213− V Int |
214− ||| Bind a variable
215− Bind TTName (Binder TT) TT |
216− ||| Apply one term to another
217− App TT TT |
218− ||| Embed a constant
219− TConst Const |
220− ||| Erased terms
221− Erased |
222− ||| The type of types along (with universe constraints)
223− TType TTUExp |
224− ||| Alternative universes for dealing with uniqueness
225− UType Universe |
226−
227−TT stores local bound variables using De Bruijn index, when working in Idris this does not concern the user because string names are used for variables. Converting bound variables internally to index values means that the same variable name can be used, in different lambda terms, without ambiguity and without the need for α-substitution.
228−De Bruijn index which is a integer where:
229−
230−- 0=inside current (inner) lambda term
231−- 1= next outer lambda term
232−- 2= next outer and so on
233−
234−Raw
235−---
236−
237−Raw is similar to TT except it is used before types are known. The types should be resolved by the type checker.
238−
239−.. code-block:: idris
240−
241− data Raw =
242− ||| Variables, global or local
243− Var TTName |
244− ||| Bind a variable
245− RBind TTName (Binder Raw) Raw |
246− ||| Application
247− RApp Raw Raw |
248− ||| The type of types
249− RType |
250− ||| Alternative universes for dealing with uniqueness
251− RUType Universe |
252− ||| Embed a constant
253− RConstant Const |
254−
255−Expression Syntax
256−-----------------
257−
258−There is a way of notating expressions such as those used in the proof state (example: goal type and proof terms) which is reasonably standard in the papers written about this subject.
259−
260−This notation is not entered directly by metaprogrammers but it is seen, for example in debug output. So this notation is explained here because it is useful to be familiar with it.
261−
262−The notation assumes right-associativity, in the absence of brackets, the term to the right binds more tightly than the one on the left.
263−So, for nested lambda terms:
264−
265−+---------------+--------+-------------------+
266−| λ a . λ b . f | means | λ a .( λ b . f) |
267−+---------------+--------+-------------------+
268−
269−and the same for function application:
270−
271−+---------------+--------+-------------------+
272−| f g x | means | f (g x) |
273−+---------------+--------+-------------------+
274−
275−In contrast, in lambda calculus, function application is usually regarded as left-associative,
276−Here are some typical examples of the notation used for expressions:
277−
278−+-----------------------+
279−| ? {hole_0} . {hole_0} |
280−+-----------------------+
281−
282−The term, to be derived, may start off in this state following something like this:
283−
284−.. code-block:: idris
285−
286− myScript : Elab ()
287− myScript= do
288−
289−The dot '.' tells us this is some sort of binding.
290−
291−+----------------------------------------------+
292−| ?{hole_0} ≈ ? {hole_2} . {hole_2} . {hole_0} |
293−+----------------------------------------------+
294−
295−This is a slightly more complicated example arising from:
296−
297−.. code-block:: idris
298−
299− idNat : Nat -> Nat
300− idNat = %runElab (do
301−
302−This introduces a guess that hole_0 = hole_2 .
303−
304−+----------------------------------------------------+
305−| ?{hole_0} ≈ λ x . ? {hole_2} . {hole_2} . {hole_0} |
306−+----------------------------------------------------+
307−
308−Following on from the previous example a lambda function is introduced like this:
309−
310−.. code-block:: idris
311−
312− intro `{{x}}
313−
314−So now the expression is wrapped in a lambda binding.
315−
316−+-------------------------------------------------------+
317−| ?{hole_0} ≈ λ x . ?{hole_2} ≈ x . {hole_2} . {hole_0} |
318−+-------------------------------------------------------+
319−
320−Following on, we can use the fill tactic like this:
321−
322−.. code-block:: idris
323−
324− fill (Var `{{x}})
325−
326−which introduces another guess.
327−
328−+--------------------------------+
329−| ?{hole_0} ≈ λ x . x . {hole_0} |
330−+--------------------------------+
331−
332−The solve tactic completes the proof
333−
334−Binders
335−-------
336−
337−Here we look at each tactic in turn to see how they affect the proof state.
338−
339−Introduction tactics for binders. The binder types are:
340−
341−- lambda function (intro)
342−- dependent function (forall)
343−- let (letBind)
344−- pattern (patbind)
345−
346−A precondition of these tactics is that the focused hole is of the form:
347−
348−+-----------+
349−| ?h : t.h |
350−+-----------+
351−
352−that is, that the body of its scope consists directly of a reference to the hole-bound variable. If a hole binder were of the form:
353−
354−+--------------------+
355−| ?h : t1 -> t2.f h |
356−+--------------------+
357−
358−and a tactic such as
359−
360−+------------------+
361−| intro \`{{x}} |
362−+------------------+
363−
364−were applied, the result would be the term
365−
366−+---------------------------+
367−| ?h : t2 . λ x:t1. f h |
368−+---------------------------+
369−
370−However this would cause the application of f to be ill-typed, as it expects an argument of type t1->t2, not an argument of type t2. Additionally, some binding tactics require that t, the type of the hole h, have a specific form, because the binder to be established may have a typing rule associated with it.
371−
372−.. list-table:: Binders
373− :widths: 10 30
374− :stub-columns: 1
375−
376− * - intro
377− - Introduce a lambda binding around the current hole and focus on the body.
378−
379− Requires that the hole be in binding form (use 'attack' if it might not be).
380−
381− @ n the name to use for the argument.
382−
383− Signature:
384−
385− intro : (n : TTName) -> Elab ()
386−
387− Result
388−
389− λn:t1.?h:[n/x]t2.h
390−
391− * - intro'
392− - Introduce a lambda binding around the current hole and focus on the body, using the name provided by the type of the hole.
393−
394− Requires that the hole be immediately under its binder (use 'attack' if it might not be).
395−
396− Signature:
397−
398− intro' : Elab ()
399−
400− * - forall
401− - Introduce a dependent function type binding into the current hole, and focus on the body. Requires that the hole be immediately under its binder
402−
403− (use 'attack' if it might not be).
404−
405− Signature:
406−
407− forall : TTName -> Raw -> Elab ()
408−
409− * - patbind
410− - Introduce a new pattern binding. Requires that the hole be immediately under its binder (use 'attack' if it might not be).
411−
412− Signature:
413−
414− patbind : TTName -> Elab ()
415−
416− * - letbind
417− - Introduce a new let binding.
418−
419− Requires that the hole be immediately under its binder (use 'attack' if it might not be).
420−
421− - @ n the name to let bind
422− - @ ty the type of the term to be let-bound
423− - @ tm the term to be bound
424−
425− Signature:
426−
427− letbind : (n : TTName) -> (ty, tm : Raw) -> Elab ()
428−
429−.. target-notes::
430−.. _`Dependently Typed Functional Programs and their Proofs by McBride 1999`: https://www.era.lib.ed.ac.uk/handle/1842/374
docs/faq/faq.rst+10−43
@@ -33,30 +33,6 @@ for use in production would be very welcome - this includes (but is not
33limited to) extra library support, polishing the run-time system (and ensuring
33limited to) extra library support, polishing the run-time system (and ensuring
34it is robust), providing and maintaining a JVM back end, etc.
34it is robust), providing and maintaining a JVM back end, etc.
35
35
36−Is there some documentation for the standard lib? List of functions?
37−=====================================================================
38−
39−API documentation for the shipped packages is listed on `the
40−documentation page <https://www.idris-lang.org/documentation/>`_.
41−
42−Unfortunately, the default prelude and shipped packages for `Idris`
43−are not necessarily complete with regards to documentation. Other
44−ways to find functions include:
45−
46−+ REPL commands:
47−
48− + Use `:apropos` to search for text in documentation and function names.
49− + Use `:search` to search for functions of a given type.
50− + Use `:browse` to list the contents of a given namespace.
51−
52−+ Use the REPL's auto-complete functionality.
53−+ Grep through the source code in `libs/`
54−
55−If you find that the shipped packages are lacking in documentation,
56−please feel free to write some. Or bug someone to do so. `Idris` has
57−syntax for providing rich documentation, which is then viewable using
58−the `:doc` command and listed in generated HTML API documentation.
59−
60
36
61Why does Idris use eager evaluation rather than lazy?
37Why does Idris use eager evaluation rather than lazy?
62=====================================================
38=====================================================
@@ -197,10 +173,8 @@ function back to itself. On such a path, there must be at least one
197argument which converges to a base case.
173argument which converges to a base case.
198
174
199- Mutually recursive functions are supported
175- Mutually recursive functions are supported
200−
201- However, all functions on the path must be fully applied. In particular,
176- However, all functions on the path must be fully applied. In particular,
202 higher order applications are not supported
177 higher order applications are not supported
203−
204- Idris identifies arguments which converge to a base case by looking for
178- Idris identifies arguments which converge to a base case by looking for
205 recursive calls to syntactically smaller arguments of inputs. e.g.
179 recursive calls to syntactically smaller arguments of inputs. e.g.
206 ``k`` is syntactically smaller than ``S (S k)`` because ``k`` is a
180 ``k`` is syntactically smaller than ``S (S k)`` because ``k`` is a
@@ -215,10 +189,10 @@ function.
215When will Idris be self-hosting?
189When will Idris be self-hosting?
216================================
190================================
217
191
218−It’s not a priority, though not a bad idea in the long run. It would
192+It’s not a priority, though not a bad idea in the long run. It would be a
219−be a worthwhile effort in the short term to implement libraries in
193+worthwhile effort in the short term to implement libraries to support
220−Idris to support self-hosting, such as argument parsing and a
194+self-hosting, such as a good parsing library.
221−POSIX-compliant library for system interaction.
195+
222
196
223Does Idris have universe polymorphism? What is the type of ``Type``?
197Does Idris have universe polymorphism? What is the type of ``Type``?
224====================================================================
198====================================================================
@@ -259,17 +233,14 @@ where the install directory is unknown at build time. When passing this
259flag, the IDRIS_LIB_DIR environment variable needs to be set to the path
233flag, the IDRIS_LIB_DIR environment variable needs to be set to the path
260where the Idris libs reside relative to the idris executable. The
234where the Idris libs reside relative to the idris executable. The
261IDRIS_TOOLCHAIN_DIR environment variable is optional, if that is set,
235IDRIS_TOOLCHAIN_DIR environment variable is optional, if that is set,
262−Idris will use that path to find the C compiler. For example:
236+Idris will use that path to find the C compiler.
263
237
264−::
238+Example::
265
239
266− IDRIS_LIB_DIR="./libs" \
267− IDRIS_TOOLCHAIN_DIR="./mingw/bin" \
268− CABALFLAGS="-fffi -ffreestanding -frelease" \
240+ IDRIS_LIB_DIR="./libs" IDRIS_TOOLCHAIN_DIR="./mingw/bin" CABALFLAGS="-fffi -ffreestanding -frelease" make
269− make
270
241
271
242
272−What does the name “Idris” mean?
243+What does the name ‘Idris’ mean?
273================================
244================================
274
245
275British people of a certain age may be familiar with this
246British people of a certain age may be familiar with this
@@ -285,20 +256,16 @@ There are several reasons why we should not support Unicode operators:
285- It's hard to type (this is important if you're using someone else's code, for
256- It's hard to type (this is important if you're using someone else's code, for
286 example). Various editors have their own input methods, but you have to know
257 example). Various editors have their own input methods, but you have to know
287 what they are.
258 what they are.
288−
289- Not every piece of software easily supports it. Rendering issues have been
259- Not every piece of software easily supports it. Rendering issues have been
290 noted on some mobile email clients, terminal-based IRC clients, web browsers,
260 noted on some mobile email clients, terminal-based IRC clients, web browsers,
291 etc. There are ways to resolve these rendering issues but they provide a
261 etc. There are ways to resolve these rendering issues but they provide a
292 barrier to entry to using Idris.
262 barrier to entry to using Idris.
293−
294- Even if we leave it out of the standard library (which we will in any case!)
263- Even if we leave it out of the standard library (which we will in any case!)
295 as soon as people start using it in their library code, others have to deal
264 as soon as people start using it in their library code, others have to deal
296 with it.
265 with it.
297−
298- Too many characters look too similar. We had enough trouble with confusion
266- Too many characters look too similar. We had enough trouble with confusion
299 between 0 and O without worrying about all the different kinds of colons and
267 between 0 and O without worrying about all the different kinds of colons and
300 brackets.
268 brackets.
301−
302- There seems to be a tendency to go over the top with use of Unicode. For
269- There seems to be a tendency to go over the top with use of Unicode. For
303 example, using sharp and flat for delay and force (or is it the other way
270 example, using sharp and flat for delay and force (or is it the other way
304 around?) in Agda seems gratuitous. We don't want to encourage this sort of
271 around?) in Agda seems gratuitous. We don't want to encourage this sort of
@@ -310,10 +277,10 @@ better and it will make sense to revisit this. For now, however, Idris will not
310be offering arbitrary Unicode symbols in operators.
277be offering arbitrary Unicode symbols in operators.
311
278
312This seems like an instance of `Wadler's
279This seems like an instance of `Wadler's
313−Law <https://www.haskell.org/haskellwiki/Wadler%27s_Law>`__ in action.
280+Law <http://www.haskell.org/haskellwiki/Wadler%27s_Law>`__ in action.
314
281
315This answer is based on Edwin Brady's response in the following
282This answer is based on Edwin Brady's response in the following
316−`pull request <https://github.com/idris-lang/Idris-dev/pull/694#issuecomment-29559291>`_.
283+`pull request <https://github.com/idris-lang/Idris-dev/pull/694#issuecomment-29559291>`__.
317
284
318Where can I find the community standards for the Idris community?
285Where can I find the community standards for the Idris community?
319==================================================================
286==================================================================
docs/guides/index.rst+1−1
@@ -12,7 +12,7 @@ Tutorials submitted by community members.
12 Idris Community* has waived all copyright and related or neighboring
12 Idris Community* has waived all copyright and related or neighboring
13 rights to Documentation for Idris.
13 rights to Documentation for Idris.
14
14
15− More information concerning the CC0 can be found online at: https://creativecommons.org/publicdomain/zero/1.0/
15+ More information concerning the CC0 can be found online at: http://creativecommons.org/publicdomain/zero/1.0/
16
16
17
17
18.. toctree::
18.. toctree::
docs/guides/theorem-prover.rst+1−1
@@ -22,7 +22,7 @@ We will be given the following prompt, in future releases the version string wil
22 ____ __ _
22 ____ __ _
23 / _/___/ /____(_)____
23 / _/___/ /____(_)____
24 / // __ / ___/ / ___/ Version 0.9.18.1
24 / // __ / ___/ / ___/ Version 0.9.18.1
25− _/ // /_/ / / / (__ ) https://www.idris-lang.org/
25+ _/ // /_/ / / / (__ ) http://www.idris-lang.org/
26 /___/\__,_/_/ /_/____/ Type :? for help
26 /___/\__,_/_/ /_/____/ Type :? for help
27
27
28 Idris is free software with ABSOLUTELY NO WARRANTY.
28 Idris is free software with ABSOLUTELY NO WARRANTY.
docs/guides/type-providers-ffi.rst+1−1
@@ -3,7 +3,7 @@ Type Providers in Idris
3***********************
3***********************
4
4
5`Type providers in Idris
5`Type providers in Idris
6−<https://www.davidchristiansen.dk/pubs/dependent-type-providers.pdf>`__
6+<http://www.itu.dk/people/drc/pubs/dependent-type-providers.pdf>`__
7are simple enough, but there are a few caveats to using them that it
7are simple enough, but there are a few caveats to using them that it
8would be worthwhile to go through the basic steps. We also go over
8would be worthwhile to go through the basic steps. We also go over
9foreign functions, because these will often be used with type
9foreign functions, because these will often be used with type
docs/image/README.mddeleted−16
@@ -1,16 +0,0 @@
1−Many of the images in this directory have two files with the same name but a different extension:
2−
3−* The SVG file, being vector graphics, is best for drawing and modifying.
4−* The PNG file, being raster graphics, gives more consistent rendering.
5−
6−The image has therefore been generated as an SVG file and then exported to the PNG file.
7−
8−So, if you need to modify an image, I suggest the following sequence:
9−
10−* Edit the SVG file using a suitable editor (I use Inkscape).
11−* Export the changes to the PNG file, overwriting the old version.
12−* upload both files.
13−
14−Note, when exporting in Inkscape:
15−* Select everything first, this stops an enormous boundary being exported.
16−* After selecting the file to export to and clicking OK, don't forget to click on export button as well.
docs/image/attack.pngdeleted

Binary file not shown.

docs/image/attack.svgdeleted−199
@@ -1,199 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 210 297"
15− version="1.1"
16− id="svg8"
17− inkscape:version="0.92.2 5c3e80d, 2017-08-06"
18− sodipodi:docname="attack.svg">
19− <defs
20− id="defs2">
21− <marker
22− inkscape:stockid="Arrow1Mend"
23− orient="auto"
24− refY="0.0"
25− refX="0.0"
26− id="marker890"
27− style="overflow:visible;"
28− inkscape:isstock="true">
29− <path
30− id="path888"
31− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
32− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
33− transform="scale(0.4) rotate(180) translate(10,0)" />
34− </marker>
35− <marker
36− inkscape:isstock="true"
37− style="overflow:visible;"
38− id="marker838"
39− refX="0.0"
40− refY="0.0"
41− orient="auto"
42− inkscape:stockid="Arrow1Mend"
43− inkscape:collect="always">
44− <path
45− transform="scale(0.4) rotate(180) translate(10,0)"
46− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
47− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
48− id="path836" />
49− </marker>
50− <marker
51− inkscape:stockid="Arrow1Mend"
52− orient="auto"
53− refY="0.0"
54− refX="0.0"
55− id="Arrow1Mend"
56− style="overflow:visible;"
57− inkscape:isstock="true"
58− inkscape:collect="always">
59− <path
60− id="path4529"
61− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
62− style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
63− transform="scale(0.4) rotate(180) translate(10,0)" />
64− </marker>
65− </defs>
66− <sodipodi:namedview
67− id="base"
68− pagecolor="#ffffff"
69− bordercolor="#666666"
70− borderopacity="1.0"
71− inkscape:pageopacity="0.0"
72− inkscape:pageshadow="2"
73− inkscape:zoom="1"
74− inkscape:cx="313.5"
75− inkscape:cy="696.5"
76− inkscape:document-units="mm"
77− inkscape:current-layer="layer1"
78− showgrid="false"
79− inkscape:window-width="1920"
80− inkscape:window-height="1015"
81− inkscape:window-x="0"
82− inkscape:window-y="0"
83− inkscape:window-maximized="1" />
84− <metadata
85− id="metadata5">
86− <rdf:RDF>
87− <cc:Work
88− rdf:about="">
89− <dc:format>image/svg+xml</dc:format>
90− <dc:type
91− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
92− <dc:title />
93− </cc:Work>
94− </rdf:RDF>
95− </metadata>
96− <g
97− inkscape:label="Layer 1"
98− inkscape:groupmode="layer"
99− id="layer1">
100− <rect
101− style="fill:#ffff00;fill-opacity:1;stroke-width:0.26458332"
102− id="rect22"
103− width="28.839582"
104− height="6.0854182"
105− x="66.67498"
106− y="114.4375"
107− inkscape:export-xdpi="61.120499"
108− inkscape:export-ydpi="61.120499" />
109− <text
110− xml:space="preserve"
111− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
112− x="65.352081"
113− y="105.17709"
114− id="text12"
115− inkscape:export-xdpi="61.120499"
116− inkscape:export-ydpi="61.120499"><tspan
117− sodipodi:role="line"
118− x="65.352081"
119− y="105.17709"
120− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
121− id="tspan847">?h ∶ t1→t2 . f h</tspan></text>
122− <text
123− id="text16"
124− y="118.67083"
125− x="56.356247"
126− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
127− xml:space="preserve"
128− inkscape:export-xdpi="61.120499"
129− inkscape:export-ydpi="61.120499"><tspan
130− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
131− y="118.67083"
132− x="56.356247"
133− id="tspan14"
134− sodipodi:role="line">?h ≈ (?h' ∶ t1→t2 . h')∶ t1→t2 . f h</tspan></text>
135− <text
136− id="text20"
137− y="110.99791"
138− x="82.814583"
139− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
140− xml:space="preserve"
141− inkscape:export-xdpi="61.120499"
142− inkscape:export-ydpi="61.120499"><tspan
143− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
144− y="110.99791"
145− x="82.814583"
146− id="tspan18"
147− sodipodi:role="line">attack</tspan></text>
148− <path
149− style="fill:none;stroke:#ff0000;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
150− d="m 80.668481,106.30075 -0.0032,7.57492"
151− id="path4518"
152− inkscape:connector-curvature="0"
153− sodipodi:nodetypes="cc"
154− inkscape:export-xdpi="61.120499"
155− inkscape:export-ydpi="61.120499" />
156− <text
157− inkscape:export-ydpi="61.120499"
158− inkscape:export-xdpi="61.120499"
159− xml:space="preserve"
160− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
161− x="63.235413"
162− y="94.85833"
163− id="text832"><tspan
164− sodipodi:role="line"
165− id="tspan830"
166− x="63.235413"
167− y="94.85833"
168− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332">focus</tspan></text>
169− <path
170− inkscape:export-ydpi="61.120499"
171− inkscape:export-xdpi="61.120499"
172− sodipodi:nodetypes="cc"
173− inkscape:connector-curvature="0"
174− id="path834"
175− d="m 66.645564,94.659084 -0.0032,5.458256"
176− style="fill:none;stroke:#0000ff;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker838)" />
177− <text
178− id="text884"
179− y="110.23682"
180− x="61.94511"
181− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
182− xml:space="preserve"
183− inkscape:export-xdpi="61.120499"
184− inkscape:export-ydpi="61.120499"><tspan
185− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332"
186− y="110.23682"
187− x="61.94511"
188− id="tspan882"
189− sodipodi:role="line">focus</tspan></text>
190− <path
191− style="fill:none;stroke:#0000ff;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker890)"
192− d="m 66.67818,108.97924 -0.0032,5.45826"
193− id="path886"
194− inkscape:connector-curvature="0"
195− sodipodi:nodetypes="cc"
196− inkscape:export-xdpi="61.120499"
197− inkscape:export-ydpi="61.120499" />
198− </g>
199−</svg>
docs/image/binders.pngdeleted

Binary file not shown.

docs/image/binders.svgdeleted−326
@@ -1,326 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="binders.svg">
19− <defs
20− id="defs4" />
21− <sodipodi:namedview
22− id="base"
23− pagecolor="#ffffff"
24− bordercolor="#666666"
25− borderopacity="1.0"
26− inkscape:pageopacity="0.0"
27− inkscape:pageshadow="2"
28− inkscape:zoom="1"
29− inkscape:cx="255.00889"
30− inkscape:cy="520"
31− inkscape:document-units="px"
32− inkscape:current-layer="layer1"
33− showgrid="false"
34− inkscape:window-width="1163"
35− inkscape:window-height="1011"
36− inkscape:window-x="-4"
37− inkscape:window-y="0"
38− inkscape:window-maximized="0" />
39− <metadata
40− id="metadata7">
41− <rdf:RDF>
42− <cc:Work
43− rdf:about="">
44− <dc:format>image/svg+xml</dc:format>
45− <dc:type
46− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
47− <dc:title></dc:title>
48− </cc:Work>
49− </rdf:RDF>
50− </metadata>
51− <g
52− inkscape:label="Layer 1"
53− inkscape:groupmode="layer"
54− id="layer1">
55− <text
56− xml:space="preserve"
57− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
58− x="157"
59− y="177.3622"
60− id="text4136"
61− sodipodi:linespacing="125%"
62− inkscape:export-xdpi="61.120499"
63− inkscape:export-ydpi="61.120499"><tspan
64− sodipodi:role="line"
65− id="tspan4138"
66− x="157"
67− y="177.3622"
68− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;">Code</tspan></text>
69− <text
70− sodipodi:linespacing="125%"
71− id="text4140"
72− y="177.3622"
73− x="287"
74− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
75− xml:space="preserve"
76− inkscape:export-xdpi="61.120499"
77− inkscape:export-ydpi="61.120499"><tspan
78− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;"
79− y="177.3622"
80− x="287"
81− id="tspan4142"
82− sodipodi:role="line">Logic</tspan></text>
83− <path
84− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
85− d="m 229,161.3622 1,298"
86− id="path4144"
87− inkscape:connector-curvature="0"
88− sodipodi:nodetypes="cc"
89− inkscape:export-xdpi="61.120499"
90− inkscape:export-ydpi="61.120499" />
91− <path
92− inkscape:connector-curvature="0"
93− id="path4146"
94− d="m 473.5,184.8622 -364,1"
95− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
96− sodipodi:nodetypes="cc"
97− inkscape:export-xdpi="61.120499"
98− inkscape:export-ydpi="61.120499" />
99− <path
100− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
101− d="m 473.5,270.8622 -364,1"
102− id="path4148"
103− inkscape:connector-curvature="0"
104− sodipodi:nodetypes="cc"
105− inkscape:export-xdpi="61.120499"
106− inkscape:export-ydpi="61.120499" />
107− <path
108− inkscape:connector-curvature="0"
109− id="path4150"
110− d="m 475.5,362.8622 -366,1"
111− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
112− sodipodi:nodetypes="cc"
113− inkscape:export-xdpi="61.120499"
114− inkscape:export-ydpi="61.120499" />
115− <path
116− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
117− d="m 475.5,458.8622 -366,1"
118− id="path4152"
119− inkscape:connector-curvature="0"
120− sodipodi:nodetypes="cc"
121− inkscape:export-xdpi="61.120499"
122− inkscape:export-ydpi="61.120499" />
123− <text
124− sodipodi:linespacing="125%"
125− id="text4154"
126− y="235.3622"
127− x="19"
128− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
129− xml:space="preserve"
130− inkscape:export-xdpi="61.120499"
131− inkscape:export-ydpi="61.120499"><tspan
132− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
133− y="235.3622"
134− x="19"
135− id="tspan4156"
136− sodipodi:role="line">Abstraction</tspan></text>
137− <text
138− xml:space="preserve"
139− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
140− x="19"
141− y="399.36218"
142− id="text4158"
143− sodipodi:linespacing="125%"
144− inkscape:export-xdpi="61.120499"
145− inkscape:export-ydpi="61.120499"><tspan
146− sodipodi:role="line"
147− id="tspan4160"
148− x="19"
149− y="399.36218"
150− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">let</tspan><tspan
151− sodipodi:role="line"
152− x="19"
153− y="424.36218"
154− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
155− id="tspan4184">binding</tspan></text>
156− <text
157− sodipodi:linespacing="125%"
158− id="text4162"
159− y="307.36218"
160− x="19"
161− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
162− xml:space="preserve"
163− inkscape:export-xdpi="61.120499"
164− inkscape:export-ydpi="61.120499"><tspan
165− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
166− y="307.36218"
167− x="19"
168− id="tspan4164"
169− sodipodi:role="line">function</tspan><tspan
170− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
171− y="332.36218"
172− x="19"
173− sodipodi:role="line"
174− id="tspan4166">space</tspan></text>
175− <text
176− xml:space="preserve"
177− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
178− x="167"
179− y="235.3622"
180− id="text4168"
181− sodipodi:linespacing="125%"
182− inkscape:export-xdpi="61.120499"
183− inkscape:export-ydpi="61.120499"><tspan
184− sodipodi:role="line"
185− id="tspan4170"
186− x="167"
187− y="235.3622"
188− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;">λ x:t</tspan></text>
189− <text
190− sodipodi:linespacing="125%"
191− id="text4172"
192− y="222.3622"
193− x="259"
194− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
195− xml:space="preserve"
196− inkscape:export-xdpi="61.120499"
197− inkscape:export-ydpi="61.120499"><tspan
198− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;"
199− y="222.3622"
200− x="259"
201− id="tspan4174"
202− sodipodi:role="line">Γ ⊢ S : Type</tspan></text>
203− <text
204− sodipodi:linespacing="125%"
205− id="text4180"
206− y="417.36218"
207− x="124"
208− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
209− xml:space="preserve"
210− inkscape:export-xdpi="61.120499"
211− inkscape:export-ydpi="61.120499"><tspan
212− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;"
213− y="417.36218"
214− x="124"
215− id="tspan4182"
216− sodipodi:role="line">let x ↦ t : t</tspan></text>
217− <path
218− inkscape:connector-curvature="0"
219− id="path4186"
220− d="m 383.5,227.8622 -136,1"
221− style="fill:none;fill-rule:evenodd;stroke:#0000ff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
222− sodipodi:nodetypes="cc"
223− inkscape:export-xdpi="61.120499"
224− inkscape:export-ydpi="61.120499" />
225− <text
226− xml:space="preserve"
227− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
228− x="246"
229− y="248.3622"
230− id="text4188"
231− sodipodi:linespacing="125%"
232− inkscape:export-xdpi="61.120499"
233− inkscape:export-ydpi="61.120499"><tspan
234− sodipodi:role="line"
235− id="tspan4190"
236− x="246"
237− y="248.3622"
238− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;">Γ ; λ x:S ⊢ valid</tspan></text>
239− <text
240− xml:space="preserve"
241− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
242− x="257"
243− y="308.36218"
244− id="text4192"
245− sodipodi:linespacing="125%"
246− inkscape:export-xdpi="61.120499"
247− inkscape:export-ydpi="61.120499"><tspan
248− sodipodi:role="line"
249− id="tspan4194"
250− x="257"
251− y="308.36218"
252− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;">Γ ⊢ S : Type</tspan></text>
253− <path
254− sodipodi:nodetypes="cc"
255− style="fill:none;fill-rule:evenodd;stroke:#0000ff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
256− d="m 381.5,313.8622 -136,1"
257− id="path4196"
258− inkscape:connector-curvature="0"
259− inkscape:export-xdpi="61.120499"
260− inkscape:export-ydpi="61.120499" />
261− <text
262− sodipodi:linespacing="125%"
263− id="text4198"
264− y="334.36218"
265− x="244"
266− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
267− xml:space="preserve"
268− inkscape:export-xdpi="61.120499"
269− inkscape:export-ydpi="61.120499"><tspan
270− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;"
271− y="334.36218"
272− x="244"
273− id="tspan4200"
274− sodipodi:role="line">Γ ; ∀ x:S ⊢ valid</tspan></text>
275− <text
276− xml:space="preserve"
277− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
278− x="167"
279− y="323.36218"
280− id="text4202"
281− sodipodi:linespacing="125%"
282− inkscape:export-xdpi="61.120499"
283− inkscape:export-ydpi="61.120499"><tspan
284− sodipodi:role="line"
285− id="tspan4204"
286− x="167"
287− y="323.36218"
288− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;">∀ x:t</tspan></text>
289− <text
290− sodipodi:linespacing="125%"
291− id="text4206"
292− y="402.36218"
293− x="255"
294− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
295− xml:space="preserve"
296− inkscape:export-xdpi="61.120499"
297− inkscape:export-ydpi="61.120499"><tspan
298− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;"
299− y="402.36218"
300− x="255"
301− id="tspan4208"
302− sodipodi:role="line">Γ ⊢ S : Type Γ ⊢ s:S </tspan></text>
303− <path
304− inkscape:connector-curvature="0"
305− id="path4210"
306− d="m 453.5,407.8622 -210,1"
307− style="fill:none;fill-rule:evenodd;stroke:#0000ff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
308− sodipodi:nodetypes="cc"
309− inkscape:export-xdpi="61.120499"
310− inkscape:export-ydpi="61.120499" />
311− <text
312− xml:space="preserve"
313− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
314− x="242"
315− y="428.36218"
316− id="text4212"
317− sodipodi:linespacing="125%"
318− inkscape:export-xdpi="61.120499"
319− inkscape:export-ydpi="61.120499"><tspan
320− sodipodi:role="line"
321− id="tspan4214"
322− x="242"
323− y="428.36218"
324− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;">Γ ; let x ↦ s : S ⊢ valid</tspan></text>
325− </g>
326−</svg>
docs/image/compareToProofAssist.pngdeleted

Binary file not shown.

docs/image/compareToProofAssist.svgdeleted−260
@@ -1,260 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="compareToProofAssist.svg">
19− <defs
20− id="defs4">
21− <marker
22− inkscape:isstock="true"
23− style="overflow:visible;"
24− id="marker4251"
25− refX="0.0"
26− refY="0.0"
27− orient="auto"
28− inkscape:stockid="Arrow1Mend">
29− <path
30− transform="scale(0.4) rotate(180) translate(10,0)"
31− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
32− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
33− id="path4253" />
34− </marker>
35− <marker
36− inkscape:stockid="Arrow1Mend"
37− orient="auto"
38− refY="0.0"
39− refX="0.0"
40− id="marker5018"
41− style="overflow:visible;"
42− inkscape:isstock="true">
43− <path
44− id="path5020"
45− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
46− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
47− transform="scale(0.4) rotate(180) translate(10,0)" />
48− </marker>
49− <marker
50− inkscape:isstock="true"
51− style="overflow:visible;"
52− id="marker4436"
53− refX="0.0"
54− refY="0.0"
55− orient="auto"
56− inkscape:stockid="Arrow1Mend"
57− inkscape:collect="always">
58− <path
59− transform="scale(0.4) rotate(180) translate(10,0)"
60− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
61− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
62− id="path4438" />
63− </marker>
64− <marker
65− inkscape:stockid="Arrow1Mend"
66− orient="auto"
67− refY="0.0"
68− refX="0.0"
69− id="Arrow1Mend"
70− style="overflow:visible;"
71− inkscape:isstock="true"
72− inkscape:collect="always">
73− <path
74− id="path4167"
75− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
76− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
77− transform="scale(0.4) rotate(180) translate(10,0)" />
78− </marker>
79− </defs>
80− <sodipodi:namedview
81− id="base"
82− pagecolor="#ffffff"
83− bordercolor="#666666"
84− borderopacity="1.0"
85− inkscape:pageopacity="0.0"
86− inkscape:pageshadow="2"
87− inkscape:zoom="1"
88− inkscape:cx="377.89372"
89− inkscape:cy="520"
90− inkscape:document-units="px"
91− inkscape:current-layer="layer1"
92− showgrid="false"
93− inkscape:window-width="1920"
94− inkscape:window-height="1015"
95− inkscape:window-x="0"
96− inkscape:window-y="0"
97− inkscape:window-maximized="1" />
98− <metadata
99− id="metadata7">
100− <rdf:RDF>
101− <cc:Work
102− rdf:about="">
103− <dc:format>image/svg+xml</dc:format>
104− <dc:type
105− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
106− <dc:title />
107− </cc:Work>
108− </rdf:RDF>
109− </metadata>
110− <g
111− inkscape:label="Layer 1"
112− inkscape:groupmode="layer"
113− id="layer1">
114− <text
115− xml:space="preserve"
116− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
117− x="162"
118− y="326.36221"
119− id="text4136"
120− sodipodi:linespacing="125%"
121− inkscape:export-xdpi="61.120499"
122− inkscape:export-ydpi="61.120499"><tspan
123− sodipodi:role="line"
124− id="tspan4138"
125− x="162"
126− y="326.36221"
127− style="font-size:15px;-inkscape-font-specification:'sans-serif Bold';font-family:sans-serif;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal">Human</tspan></text>
128− <text
129− sodipodi:linespacing="125%"
130− id="text4140"
131− y="368.36221"
132− x="162"
133− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
134− xml:space="preserve"
135− inkscape:export-xdpi="61.120499"
136− inkscape:export-ydpi="61.120499"><tspan
137− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
138− y="368.36221"
139− x="162"
140− id="tspan4142"
141− sodipodi:role="line">Tactics</tspan></text>
142− <text
143− xml:space="preserve"
144− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
145− x="161"
146− y="415.36221"
147− id="text4144"
148− sodipodi:linespacing="125%"
149− inkscape:export-xdpi="61.120499"
150− inkscape:export-ydpi="61.120499"><tspan
151− sodipodi:role="line"
152− id="tspan4146"
153− x="161"
154− y="415.36221"
155− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">fill holes</tspan></text>
156− <text
157− sodipodi:linespacing="125%"
158− id="text4148"
159− y="282.36221"
160− x="130"
161− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
162− xml:space="preserve"
163− inkscape:export-xdpi="61.120499"
164− inkscape:export-ydpi="61.120499"><tspan
165− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;"
166− y="282.36221"
167− x="130"
168− id="tspan4150"
169− sodipodi:role="line">Proof assistant</tspan></text>
170− <path
171− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
172− d="m 188,329.3622 0,22"
173− id="path4152"
174− inkscape:connector-curvature="0"
175− inkscape:export-xdpi="61.120499"
176− inkscape:export-ydpi="61.120499" />
177− <path
178− inkscape:connector-curvature="0"
179− id="path4434"
180− d="m 187,373.3622 0,22"
181− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4436)"
182− inkscape:export-xdpi="61.120499"
183− inkscape:export-ydpi="61.120499" />
184− <text
185− xml:space="preserve"
186− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
187− x="314"
188− y="326.36221"
189− id="text5002"
190− sodipodi:linespacing="125%"
191− inkscape:export-xdpi="61.120499"
192− inkscape:export-ydpi="61.120499"><tspan
193− sodipodi:role="line"
194− id="tspan5004"
195− x="314"
196− y="326.36221"
197− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">Idris source</tspan></text>
198− <text
199− sodipodi:linespacing="125%"
200− id="text5006"
201− y="413.36221"
202− x="281"
203− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
204− xml:space="preserve"
205− inkscape:export-xdpi="61.120499"
206− inkscape:export-ydpi="61.120499"><tspan
207− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
208− y="413.36221"
209− x="281"
210− id="tspan5008"
211− sodipodi:role="line">fill holes</tspan><tspan
212− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
213− y="432.11221"
214− x="281"
215− sodipodi:role="line"
216− id="tspan5060">(implicit variables, etc)</tspan></text>
217− <text
218− xml:space="preserve"
219− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
220− x="294"
221− y="282.36221"
222− id="text5010"
223− sodipodi:linespacing="125%"
224− inkscape:export-xdpi="61.120499"
225− inkscape:export-ydpi="61.120499"><tspan
226− sodipodi:role="line"
227− id="tspan5012"
228− x="294"
229− y="282.36221"
230− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000">Idris Elaborator</tspan></text>
231− <path
232− inkscape:connector-curvature="0"
233− id="path5014"
234− d="m 342,330.3622 0,22"
235− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4251)"
236− inkscape:export-xdpi="61.120499"
237− inkscape:export-ydpi="61.120499" />
238− <path
239− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5018)"
240− d="m 341,374.3622 0,22"
241− id="path5016"
242− inkscape:connector-curvature="0"
243− inkscape:export-xdpi="61.120499"
244− inkscape:export-ydpi="61.120499" />
245− <text
246− inkscape:export-ydpi="61.120499"
247− inkscape:export-xdpi="61.120499"
248− sodipodi:linespacing="125%"
249− id="text4247"
250− y="369.36221"
251− x="317"
252− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
253− xml:space="preserve"><tspan
254− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
255− y="369.36221"
256− x="317"
257− id="tspan4249"
258− sodipodi:role="line">Tactics</tspan></text>
259− </g>
260−</svg>
docs/image/elab.pngdeleted

Binary file not shown.

docs/image/elab.svgdeleted−139
@@ -1,139 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="elab.svg">
19− <defs
20− id="defs4">
21− <marker
22− inkscape:stockid="Arrow1Mend"
23− orient="auto"
24− refY="0.0"
25− refX="0.0"
26− id="Arrow1Mend"
27− style="overflow:visible;"
28− inkscape:isstock="true">
29− <path
30− id="path4155"
31− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
32− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
33− transform="scale(0.4) rotate(180) translate(10,0)" />
34− </marker>
35− </defs>
36− <sodipodi:namedview
37− id="base"
38− pagecolor="#ffffff"
39− bordercolor="#666666"
40− borderopacity="1.0"
41− inkscape:pageopacity="0.0"
42− inkscape:pageshadow="2"
43− inkscape:zoom="1"
44− inkscape:cx="381.03373"
45− inkscape:cy="520"
46− inkscape:document-units="px"
47− inkscape:current-layer="layer1"
48− showgrid="false"
49− inkscape:window-width="1072"
50− inkscape:window-height="1011"
51− inkscape:window-x="-4"
52− inkscape:window-y="0"
53− inkscape:window-maximized="0" />
54− <metadata
55− id="metadata7">
56− <rdf:RDF>
57− <cc:Work
58− rdf:about="">
59− <dc:format>image/svg+xml</dc:format>
60− <dc:type
61− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
62− <dc:title></dc:title>
63− </cc:Work>
64− </rdf:RDF>
65− </metadata>
66− <g
67− inkscape:label="Layer 1"
68− inkscape:groupmode="layer"
69− id="layer1">
70− <rect
71− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
72− id="rect4136"
73− width="206"
74− height="77"
75− x="236"
76− y="254.3622"
77− inkscape:export-xdpi="61.120499"
78− inkscape:export-ydpi="61.120499" />
79− <rect
80− y="388.36218"
81− x="236"
82− height="77"
83− width="206"
84− id="rect4138"
85− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
86− inkscape:export-xdpi="61.120499"
87− inkscape:export-ydpi="61.120499" />
88− <path
89− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
90− d="m 328,331.3622 19,55"
91− id="path4140"
92− inkscape:connector-curvature="0"
93− sodipodi:nodetypes="cc"
94− inkscape:export-xdpi="61.120499"
95− inkscape:export-ydpi="61.120499" />
96− <text
97− xml:space="preserve"
98− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
99− x="242"
100− y="271.36221"
101− id="text5334"
102− sodipodi:linespacing="125%"
103− inkscape:export-xdpi="61.120499"
104− inkscape:export-ydpi="61.120499"><tspan
105− sodipodi:role="line"
106− id="tspan5336"
107− x="242"
108− y="271.36221"
109− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">Definition Elaborator</tspan></text>
110− <text
111− sodipodi:linespacing="125%"
112− id="text5338"
113− y="308.36221"
114− x="253"
115− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
116− xml:space="preserve"
117− inkscape:export-xdpi="61.120499"
118− inkscape:export-ydpi="61.120499"><tspan
119− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
120− y="308.36221"
121− x="253"
122− id="tspan5340"
123− sodipodi:role="line">definition context</tspan></text>
124− <text
125− xml:space="preserve"
126− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
127− x="243"
128− y="409.36221"
129− id="text5342"
130− sodipodi:linespacing="125%"
131− inkscape:export-xdpi="61.120499"
132− inkscape:export-ydpi="61.120499"><tspan
133− sodipodi:role="line"
134− id="tspan5344"
135− x="243"
136− y="409.36221"
137− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">Term Elaborator</tspan></text>
138− </g>
139−</svg>
docs/image/elabLogicEx1_1.pngdeleted

Binary file not shown.

docs/image/elabLogicEx1_1.svgdeleted−99
@@ -1,99 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.92.2 5c3e80d, 2017-08-06"
18− sodipodi:docname="elabLogicEx1_1.svg"
19− inkscape:export-filename="/home/mjb/Idris-dev/docs/image/elabLogicEx1_1.png"
20− inkscape:export-xdpi="61.120499"
21− inkscape:export-ydpi="61.120499">
22− <defs
23− id="defs4" />
24− <sodipodi:namedview
25− id="base"
26− pagecolor="#ffffff"
27− bordercolor="#666666"
28− borderopacity="1.0"
29− inkscape:pageopacity="0.0"
30− inkscape:pageshadow="2"
31− inkscape:zoom="1"
32− inkscape:cx="97.25613"
33− inkscape:cy="593.17666"
34− inkscape:document-units="px"
35− inkscape:current-layer="layer1"
36− showgrid="false"
37− inkscape:window-width="1920"
38− inkscape:window-height="1015"
39− inkscape:window-x="0"
40− inkscape:window-y="0"
41− inkscape:window-maximized="1" />
42− <metadata
43− id="metadata7">
44− <rdf:RDF>
45− <cc:Work
46− rdf:about="">
47− <dc:format>image/svg+xml</dc:format>
48− <dc:type
49− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50− <dc:title />
51− </cc:Work>
52− </rdf:RDF>
53− </metadata>
54− <g
55− inkscape:label="Layer 1"
56− inkscape:groupmode="layer"
57− id="layer1">
58− <text
59− id="text4800"
60− y="473.36218"
61− x="205"
62− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
63− xml:space="preserve"
64− inkscape:export-xdpi="61.120499"
65− inkscape:export-ydpi="61.120499"><tspan
66− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
67− y="473.36218"
68− x="205"
69− sodipodi:role="line"
70− id="tspan4812">hole_2 : pi_arg : Nat -&gt; Nat</tspan></text>
71− <text
72− inkscape:export-ydpi="61.120499"
73− inkscape:export-xdpi="61.120499"
74− xml:space="preserve"
75− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
76− x="428.125"
77− y="472.23718"
78− id="text4178"><tspan
79− id="tspan4180"
80− sodipodi:role="line"
81− x="428.125"
82− y="472.23718"
83− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">hole_0 : pi_arg : Nat -&gt; Nat</tspan></text>
84− <path
85− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
86− d="m 423.125,456.2372 185,-1"
87− id="path4182"
88− inkscape:connector-curvature="0"
89− inkscape:export-xdpi="61.120499"
90− inkscape:export-ydpi="61.120499" />
91− <path
92− inkscape:connector-curvature="0"
93− id="path4184"
94− d="m 200,456.3622 185,-1"
95− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
96− inkscape:export-xdpi="61.120499"
97− inkscape:export-ydpi="61.120499" />
98− </g>
99−</svg>
docs/image/elabLogicEx1_2.pngdeleted

Binary file not shown.

docs/image/elabLogicEx1_2.svgdeleted−112
@@ -1,112 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.92.2 5c3e80d, 2017-08-06"
18− sodipodi:docname="elabLogicEx1_2.svg"
19− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/elabLogicEx1_1.png"
20− inkscape:export-xdpi="61.120499"
21− inkscape:export-ydpi="61.120499">
22− <defs
23− id="defs4" />
24− <sodipodi:namedview
25− id="base"
26− pagecolor="#ffffff"
27− bordercolor="#666666"
28− borderopacity="1.0"
29− inkscape:pageopacity="0.0"
30− inkscape:pageshadow="2"
31− inkscape:zoom="1"
32− inkscape:cx="425.25613"
33− inkscape:cy="593.17666"
34− inkscape:document-units="px"
35− inkscape:current-layer="layer1"
36− showgrid="false"
37− inkscape:window-width="1920"
38− inkscape:window-height="1015"
39− inkscape:window-x="0"
40− inkscape:window-y="0"
41− inkscape:window-maximized="1" />
42− <metadata
43− id="metadata7">
44− <rdf:RDF>
45− <cc:Work
46− rdf:about="">
47− <dc:format>image/svg+xml</dc:format>
48− <dc:type
49− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50− <dc:title />
51− </cc:Work>
52− </rdf:RDF>
53− </metadata>
54− <g
55− inkscape:label="Layer 1"
56− inkscape:groupmode="layer"
57− id="layer1">
58− <text
59− id="text4800"
60− y="473.36218"
61− x="205"
62− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
63− xml:space="preserve"
64− inkscape:export-xdpi="61.120499"
65− inkscape:export-ydpi="61.120499"><tspan
66− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
67− y="473.36218"
68− x="205"
69− sodipodi:role="line"
70− id="tspan4812">hole_2 : Nat</tspan></text>
71− <text
72− inkscape:export-ydpi="61.120499"
73− inkscape:export-xdpi="61.120499"
74− xml:space="preserve"
75− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
76− x="422.5"
77− y="472.23718"
78− id="text4178"><tspan
79− id="tspan4180"
80− sodipodi:role="line"
81− x="422.5"
82− y="472.23718"
83− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">hole_0 : (pi_arg : Nat) -&gt; Nat</tspan></text>
84− <path
85− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
86− d="m 417.5,456.2372 185,-1"
87− id="path4182"
88− inkscape:connector-curvature="0"
89− inkscape:export-xdpi="61.120499"
90− inkscape:export-ydpi="61.120499" />
91− <path
92− inkscape:connector-curvature="0"
93− id="path4184"
94− d="m 200,456.3622 185,-1"
95− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
96− inkscape:export-xdpi="61.120499"
97− inkscape:export-ydpi="61.120499" />
98− <text
99− inkscape:export-ydpi="61.120499"
100− inkscape:export-xdpi="61.120499"
101− xml:space="preserve"
102− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
103− x="229"
104− y="447.36218"
105− id="text4147"><tspan
106− id="tspan4149"
107− sodipodi:role="line"
108− x="229"
109− y="447.36218"
110− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">x : Nat</tspan></text>
111− </g>
112−</svg>
docs/image/elabLogicEx1_3.pngdeleted

Binary file not shown.

docs/image/elabLogicEx1_3.svgdeleted−112
@@ -1,112 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.92.2 5c3e80d, 2017-08-06"
18− sodipodi:docname="elabLogicEx1_3.svg"
19− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/elabLogicEx1_1.png"
20− inkscape:export-xdpi="61.120499"
21− inkscape:export-ydpi="61.120499">
22− <defs
23− id="defs4" />
24− <sodipodi:namedview
25− id="base"
26− pagecolor="#ffffff"
27− bordercolor="#666666"
28− borderopacity="1.0"
29− inkscape:pageopacity="0.0"
30− inkscape:pageshadow="2"
31− inkscape:zoom="1"
32− inkscape:cx="425.25613"
33− inkscape:cy="593.17666"
34− inkscape:document-units="px"
35− inkscape:current-layer="layer1"
36− showgrid="false"
37− inkscape:window-width="1920"
38− inkscape:window-height="1015"
39− inkscape:window-x="0"
40− inkscape:window-y="0"
41− inkscape:window-maximized="1" />
42− <metadata
43− id="metadata7">
44− <rdf:RDF>
45− <cc:Work
46− rdf:about="">
47− <dc:format>image/svg+xml</dc:format>
48− <dc:type
49− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50− <dc:title />
51− </cc:Work>
52− </rdf:RDF>
53− </metadata>
54− <g
55− inkscape:label="Layer 1"
56− inkscape:groupmode="layer"
57− id="layer1">
58− <text
59− id="text4800"
60− y="473.36218"
61− x="205"
62− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
63− xml:space="preserve"
64− inkscape:export-xdpi="61.120499"
65− inkscape:export-ydpi="61.120499"><tspan
66− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
67− y="473.36218"
68− x="205"
69− sodipodi:role="line"
70− id="tspan4812">hole_2 : Nat</tspan></text>
71− <text
72− inkscape:export-ydpi="61.120499"
73− inkscape:export-xdpi="61.120499"
74− xml:space="preserve"
75− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
76− x="439.375"
77− y="472.23718"
78− id="text4178"><tspan
79− id="tspan4180"
80− sodipodi:role="line"
81− x="439.375"
82− y="472.23718"
83− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">hole_0 : (pi_arg : Nat) -&gt; Nat</tspan></text>
84− <path
85− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
86− d="m 434.375,456.2372 185,-1"
87− id="path4182"
88− inkscape:connector-curvature="0"
89− inkscape:export-xdpi="61.120499"
90− inkscape:export-ydpi="61.120499" />
91− <path
92− inkscape:connector-curvature="0"
93− id="path4184"
94− d="m 200,456.3622 185,-1"
95− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
96− inkscape:export-xdpi="61.120499"
97− inkscape:export-ydpi="61.120499" />
98− <text
99− inkscape:export-ydpi="61.120499"
100− inkscape:export-xdpi="61.120499"
101− xml:space="preserve"
102− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
103− x="229"
104− y="447.36218"
105− id="text4147"><tspan
106− id="tspan4149"
107− sodipodi:role="line"
108− x="229"
109− y="447.36218"
110− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">x : Nat</tspan></text>
111− </g>
112−</svg>
docs/image/elabLogicEx1_4.pngdeleted

Binary file not shown.

docs/image/elabLogicEx1_4.svgdeleted−80
@@ -1,80 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="elabLogicEx1_4.svg"
19− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/elabLogicEx1_1.png"
20− inkscape:export-xdpi="61.120499"
21− inkscape:export-ydpi="61.120499">
22− <defs
23− id="defs4" />
24− <sodipodi:namedview
25− id="base"
26− pagecolor="#ffffff"
27− bordercolor="#666666"
28− borderopacity="1.0"
29− inkscape:pageopacity="0.0"
30− inkscape:pageshadow="2"
31− inkscape:zoom="1"
32− inkscape:cx="425.25613"
33− inkscape:cy="593.17666"
34− inkscape:document-units="px"
35− inkscape:current-layer="layer1"
36− showgrid="false"
37− inkscape:window-width="1157"
38− inkscape:window-height="1011"
39− inkscape:window-x="-4"
40− inkscape:window-y="0"
41− inkscape:window-maximized="0" />
42− <metadata
43− id="metadata7">
44− <rdf:RDF>
45− <cc:Work
46− rdf:about="">
47− <dc:format>image/svg+xml</dc:format>
48− <dc:type
49− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50− <dc:title />
51− </cc:Work>
52− </rdf:RDF>
53− </metadata>
54− <g
55− inkscape:label="Layer 1"
56− inkscape:groupmode="layer"
57− id="layer1">
58− <text
59− inkscape:export-ydpi="61.120499"
60− inkscape:export-xdpi="61.120499"
61− xml:space="preserve"
62− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
63− x="205"
64− y="500.36218"
65− id="text4178"
66− sodipodi:linespacing="125%"><tspan
67− id="tspan4180"
68− sodipodi:role="line"
69− x="205"
70− y="500.36218"
71− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">hole_0 : (pi_arg : Nat) -&gt; Nat</tspan></text>
72− <path
73− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
74− d="m 200,484.3622 185,-1"
75− id="path4182"
76− inkscape:connector-curvature="0"
77− inkscape:export-xdpi="61.120499"
78− inkscape:export-ydpi="61.120499" />
79− </g>
80−</svg>
docs/image/elabOverview.pngdeleted

Binary file not shown.

docs/image/elabOverview.svgdeleted−585
@@ -1,585 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="elabOverview.svg"
19− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/data.png"
20− inkscape:export-xdpi="61.120499"
21− inkscape:export-ydpi="61.120499">
22− <defs
23− id="defs4">
24− <marker
25− inkscape:stockid="Arrow1Mend"
26− orient="auto"
27− refY="0.0"
28− refX="0.0"
29− id="marker4738"
30− style="overflow:visible;"
31− inkscape:isstock="true">
32− <path
33− id="path4491"
34− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
35− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
36− transform="scale(0.4) rotate(180) translate(10,0)" />
37− </marker>
38− <marker
39− inkscape:stockid="Arrow1Mend"
40− orient="auto"
41− refY="0.0"
42− refX="0.0"
43− id="marker4672"
44− style="overflow:visible;"
45− inkscape:isstock="true">
46− <path
47− id="path4425"
48− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
49− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
50− transform="scale(0.4) rotate(180) translate(10,0)" />
51− </marker>
52− <marker
53− inkscape:stockid="Arrow1Mend"
54− orient="auto"
55− refY="0.0"
56− refX="0.0"
57− id="Arrow1Mend"
58− style="overflow:visible;"
59− inkscape:isstock="true">
60− <path
61− id="path4418"
62− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
63− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
64− transform="scale(0.4) rotate(180) translate(10,0)" />
65− </marker>
66− <marker
67− inkscape:stockid="Arrow1Mend"
68− orient="auto"
69− refY="0"
70− refX="0"
71− id="marker5018"
72− style="overflow:visible"
73− inkscape:isstock="true">
74− <path
75− inkscape:connector-curvature="0"
76− id="path5020"
77− d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
78− style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
79− transform="matrix(-0.4,0,0,-0.4,-4,0)" />
80− </marker>
81− </defs>
82− <sodipodi:namedview
83− id="base"
84− pagecolor="#ffffff"
85− bordercolor="#666666"
86− borderopacity="1.0"
87− inkscape:pageopacity="0.0"
88− inkscape:pageshadow="2"
89− inkscape:zoom="1"
90− inkscape:cx="258.17464"
91− inkscape:cy="544.34419"
92− inkscape:document-units="px"
93− inkscape:current-layer="layer1"
94− showgrid="false"
95− inkscape:window-width="1920"
96− inkscape:window-height="1015"
97− inkscape:window-x="0"
98− inkscape:window-y="0"
99− inkscape:window-maximized="1" />
100− <metadata
101− id="metadata7">
102− <rdf:RDF>
103− <cc:Work
104− rdf:about="">
105− <dc:format>image/svg+xml</dc:format>
106− <dc:type
107− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
108− <dc:title />
109− </cc:Work>
110− </rdf:RDF>
111− </metadata>
112− <g
113− inkscape:label="Layer 1"
114− inkscape:groupmode="layer"
115− id="layer1">
116− <text
117− xml:space="preserve"
118− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
119− x="268"
120− y="495.36218"
121− id="text4136"
122− sodipodi:linespacing="125%"
123− inkscape:export-xdpi="61.120499"
124− inkscape:export-ydpi="61.120499"><tspan
125− sodipodi:role="line"
126− id="tspan4138"
127− x="268"
128− y="495.36218"
129− style="font-size:12.5px">data TT : Type where</tspan><tspan
130− sodipodi:role="line"
131− x="268"
132− y="510.98718"
133− id="tspan4140"
134− style="font-size:12.5px"> P : NameType -&gt; TTName -&gt; TT -&gt; TT</tspan><tspan
135− sodipodi:role="line"
136− x="268"
137− y="526.61218"
138− style="font-size:12.5px"
139− id="tspan4142"> V : Int -&gt; TT</tspan><tspan
140− sodipodi:role="line"
141− x="268"
142− y="542.23718"
143− style="font-size:12.5px"
144− id="tspan4144"> Bind : TTName -&gt; Binder TT -&gt; TT -&gt; TT</tspan><tspan
145− sodipodi:role="line"
146− x="268"
147− y="557.86218"
148− style="font-size:12.5px"
149− id="tspan4146"> App : TT -&gt; TT -&gt; TT</tspan><tspan
150− sodipodi:role="line"
151− x="268"
152− y="573.48718"
153− style="font-size:12.5px"
154− id="tspan4148"> TConst : Const -&gt; TT</tspan><tspan
155− sodipodi:role="line"
156− x="268"
157− y="589.11218"
158− style="font-size:12.5px"
159− id="tspan4150"> Erased : TT</tspan><tspan
160− sodipodi:role="line"
161− x="268"
162− y="604.73718"
163− style="font-size:12.5px"
164− id="tspan4152"> TType : TTUExp -&gt; TT</tspan><tspan
165− sodipodi:role="line"
166− x="268"
167− y="620.36218"
168− style="font-size:12.5px"
169− id="tspan4154"> UType : Universe -&gt; TT</tspan></text>
170− <text
171− sodipodi:linespacing="125%"
172− id="text4156"
173− y="485.36218"
174− x="509"
175− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
176− xml:space="preserve"
177− inkscape:export-xdpi="61.120499"
178− inkscape:export-ydpi="61.120499"><tspan
179− id="tspan4174"
180− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
181− y="485.36218"
182− x="509"
183− sodipodi:role="line">globally defined variable</tspan><tspan
184− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
185− y="500.98718"
186− x="509"
187− sodipodi:role="line"
188− id="tspan4197"> from name</tspan></text>
189− <path
190− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
191− d="m 486,500.3622 19,-14"
192− id="path4220"
193− inkscape:connector-curvature="0"
194− inkscape:export-xdpi="61.120499"
195− inkscape:export-ydpi="61.120499"
196− sodipodi:nodetypes="cc" />
197− <text
198− xml:space="preserve"
199− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
200− x="392"
201− y="526.36218"
202− id="text4222"
203− sodipodi:linespacing="125%"
204− inkscape:export-xdpi="61.120499"
205− inkscape:export-ydpi="61.120499"><tspan
206− sodipodi:role="line"
207− x="392"
208− y="526.36218"
209− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
210− id="tspan4224">local (de Bruijn) variable</tspan></text>
211− <path
212− inkscape:connector-curvature="0"
213− id="path4226"
214− d="m 351,524.3622 34,-4"
215− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
216− sodipodi:nodetypes="cc"
217− inkscape:export-xdpi="61.120499"
218− inkscape:export-ydpi="61.120499" />
219− <text
220− xml:space="preserve"
221− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
222− x="537"
223− y="533.36218"
224− id="text4228"
225− sodipodi:linespacing="125%"
226− inkscape:export-xdpi="61.120499"
227− inkscape:export-ydpi="61.120499"><tspan
228− sodipodi:role="line"
229− x="537"
230− y="533.36218"
231− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
232− id="tspan4230">any kind of binder</tspan><tspan
233− sodipodi:role="line"
234− x="537"
235− y="548.98718"
236− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
237− id="tspan4234">lambda, let etc.</tspan></text>
238− <path
239− inkscape:connector-curvature="0"
240− id="path4232"
241− d="m 494,538.3622 39,-8"
242− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
243− inkscape:export-xdpi="61.120499"
244− inkscape:export-ydpi="61.120499"
245− sodipodi:nodetypes="cc" />
246− <text
247− xml:space="preserve"
248− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
249− x="417"
250− y="555.36218"
251− id="text4236"
252− sodipodi:linespacing="125%"
253− inkscape:export-xdpi="61.120499"
254− inkscape:export-ydpi="61.120499"><tspan
255− sodipodi:role="line"
256− x="417"
257− y="555.36218"
258− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
259− id="tspan4238">function application</tspan></text>
260− <path
261− inkscape:connector-curvature="0"
262− id="path4240"
263− d="m 392,554.3622 22,-2"
264− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
265− sodipodi:nodetypes="cc"
266− inkscape:export-xdpi="61.120499"
267− inkscape:export-ydpi="61.120499" />
268− <text
269− sodipodi:linespacing="125%"
270− id="text4253"
271− y="569.36218"
272− x="421"
273− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
274− xml:space="preserve"
275− inkscape:export-xdpi="61.120499"
276− inkscape:export-ydpi="61.120499"><tspan
277− id="tspan4255"
278− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
279− y="569.36218"
280− x="421"
281− sodipodi:role="line">intager, char, string, etc.</tspan></text>
282− <path
283− sodipodi:nodetypes="cc"
284− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
285− d="m 396,568.3622 22,-2"
286− id="path4257"
287− inkscape:connector-curvature="0"
288− inkscape:export-xdpi="61.120499"
289− inkscape:export-ydpi="61.120499" />
290− <text
291− xml:space="preserve"
292− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
293− x="374"
294− y="586.36218"
295− id="text4270"
296− sodipodi:linespacing="125%"
297− inkscape:export-xdpi="61.120499"
298− inkscape:export-ydpi="61.120499"><tspan
299− sodipodi:role="line"
300− x="374"
301− y="586.36218"
302− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
303− id="tspan4272">unknown term for erasing types</tspan></text>
304− <path
305− inkscape:connector-curvature="0"
306− id="path4274"
307− d="m 349,585.3622 22,-2"
308− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
309− sodipodi:nodetypes="cc"
310− inkscape:export-xdpi="61.120499"
311− inkscape:export-ydpi="61.120499" />
312− <text
313− sodipodi:linespacing="125%"
314− id="text4276"
315− y="603.36218"
316− x="429"
317− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
318− xml:space="preserve"
319− inkscape:export-xdpi="61.120499"
320− inkscape:export-ydpi="61.120499"><tspan
321− id="tspan4278"
322− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
323− y="603.36218"
324− x="429"
325− sodipodi:role="line">type of types</tspan></text>
326− <path
327− sodipodi:nodetypes="cc"
328− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
329− d="m 404,602.3622 22,-2"
330− id="path4280"
331− inkscape:connector-curvature="0"
332− inkscape:export-xdpi="61.120499"
333− inkscape:export-ydpi="61.120499" />
334− <text
335− xml:space="preserve"
336− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
337− x="433"
338− y="619.36218"
339− id="text4293"
340− sodipodi:linespacing="125%"
341− inkscape:export-xdpi="61.120499"
342− inkscape:export-ydpi="61.120499"><tspan
343− sodipodi:role="line"
344− x="433"
345− y="619.36218"
346− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
347− id="tspan4295">unique universe</tspan></text>
348− <path
349− inkscape:connector-curvature="0"
350− id="path4297"
351− d="m 408,618.3622 22,-2"
352− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
353− sodipodi:nodetypes="cc"
354− inkscape:export-xdpi="61.120499"
355− inkscape:export-ydpi="61.120499" />
356− <text
357− sodipodi:linespacing="125%"
358− id="text4397"
359− y="463.36218"
360− x="375"
361− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
362− xml:space="preserve"
363− inkscape:export-xdpi="61.120499"
364− inkscape:export-ydpi="61.120499"><tspan
365− id="tspan4399"
366− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff"
367− y="463.36218"
368− x="375"
369− sodipodi:role="line">elements of core language</tspan></text>
370− <rect
371− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
372− id="rect4400"
373− width="392"
374− height="185"
375− x="262"
376− y="447.36218"
377− inkscape:export-xdpi="61.120499"
378− inkscape:export-ydpi="61.120499" />
379− <text
380− xml:space="preserve"
381− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
382− x="264"
383− y="466.36218"
384− id="text4402"
385− sodipodi:linespacing="125%"
386− inkscape:export-xdpi="61.120499"
387− inkscape:export-ydpi="61.120499"><tspan
388− sodipodi:role="line"
389− id="tspan4404"
390− x="264"
391− y="466.36218"
392− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">TT</tspan></text>
393− <text
394− inkscape:export-ydpi="61.120499"
395− inkscape:export-xdpi="61.120499"
396− sodipodi:linespacing="125%"
397− id="text4328"
398− y="262.36218"
399− x="96"
400− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
401− xml:space="preserve"><tspan
402− id="tspan4346"
403− style="font-size:12.5px"
404− y="262.36218"
405− x="96"
406− sodipodi:role="line">env</tspan><tspan
407− style="font-size:12.5px"
408− y="277.98718"
409− x="96"
410− sodipodi:role="line"
411− id="tspan4454">goal</tspan><tspan
412− style="font-size:12.5px"
413− y="293.61218"
414− x="96"
415− sodipodi:role="line"
416− id="tspan4456">holes</tspan><tspan
417− style="font-size:12.5px"
418− y="309.23718"
419− x="96"
420− sodipodi:role="line"
421− id="tspan4458">guess</tspan></text>
422− <text
423− inkscape:export-ydpi="61.120499"
424− inkscape:export-xdpi="61.120499"
425− xml:space="preserve"
426− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
427− x="163"
428− y="262.36218"
429− id="text4348"
430− sodipodi:linespacing="125%"><tspan
431− id="tspan4352"
432− sodipodi:role="line"
433− x="163"
434− y="262.36218"
435− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000">Elab (List (TTName, Binder TT)</tspan><tspan
436− sodipodi:role="line"
437− x="163"
438− y="277.98718"
439− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
440− id="tspan4462">Elab (TTName,TT)</tspan><tspan
441− sodipodi:role="line"
442− x="163"
443− y="293.61218"
444− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
445− id="tspan4464">Elab (List TTName)</tspan><tspan
446− sodipodi:role="line"
447− x="163"
448− y="309.23718"
449− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
450− id="tspan4466">Elab (TT)</tspan></text>
451− <path
452− inkscape:export-ydpi="61.120499"
453− inkscape:export-xdpi="61.120499"
454− sodipodi:nodetypes="cc"
455− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
456− d="M 124.13676,260.36509 158,260.3622"
457− id="path4360"
458− inkscape:connector-curvature="0" />
459− <text
460− inkscape:export-ydpi="61.120499"
461− inkscape:export-xdpi="61.120499"
462− xml:space="preserve"
463− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
464− x="64"
465− y="286.36218"
466− id="text4400"
467− sodipodi:linespacing="125%"><tspan
468− sodipodi:role="line"
469− x="64"
470− y="286.36218"
471− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff"
472− id="tspan4402">state</tspan></text>
473− <rect
474− inkscape:export-ydpi="61.120499"
475− inkscape:export-xdpi="61.120499"
476− y="219.36218"
477− x="53"
478− height="224"
479− width="289"
480− id="rect4404"
481− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
482− <text
483− inkscape:export-ydpi="61.120499"
484− inkscape:export-xdpi="61.120499"
485− sodipodi:linespacing="125%"
486− id="text4406"
487− y="238.36218"
488− x="55"
489− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
490− xml:space="preserve"><tspan
491− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
492− y="238.36218"
493− x="55"
494− id="tspan4408"
495− sodipodi:role="line">Elab Monad</tspan></text>
496− <path
497− inkscape:connector-curvature="0"
498− id="path4468"
499− d="M 124.13676,274.36509 158,274.3622"
500− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
501− sodipodi:nodetypes="cc"
502− inkscape:export-xdpi="61.120499"
503− inkscape:export-ydpi="61.120499" />
504− <path
505− inkscape:export-ydpi="61.120499"
506− inkscape:export-xdpi="61.120499"
507− sodipodi:nodetypes="cc"
508− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
509− d="M 128.13676,288.36509 158,288.3622"
510− id="path4470"
511− inkscape:connector-curvature="0" />
512− <path
513− inkscape:connector-curvature="0"
514− id="path4472"
515− d="M 132.13676,304.36509 158,304.3622"
516− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
517− sodipodi:nodetypes="cc"
518− inkscape:export-xdpi="61.120499"
519− inkscape:export-ydpi="61.120499" />
520− <path
521− style="fill:none;fill-rule:evenodd;stroke:#0000ff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4738)"
522− d="m 275,272.3622 c 75.17677,4.63671 121.00356,120.13548 126,174"
523− id="path4476"
524− inkscape:connector-curvature="0"
525− sodipodi:nodetypes="cc"
526− inkscape:export-xdpi="61.120499"
527− inkscape:export-ydpi="61.120499" />
528− <path
529− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
530− d="m 189,320.3622 c 50.81716,51.06633 -107.1143,53.76268 -56,0"
531− id="path12613"
532− inkscape:connector-curvature="0"
533− sodipodi:nodetypes="cc"
534− inkscape:export-xdpi="61.120499"
535− inkscape:export-ydpi="61.120499" />
536− <text
537− xml:space="preserve"
538− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
539− x="147"
540− y="373.36218"
541− id="text15201"
542− sodipodi:linespacing="125%"
543− inkscape:export-xdpi="61.120499"
544− inkscape:export-ydpi="61.120499"><tspan
545− id="tspan15209"
546− sodipodi:role="line"
547− x="147"
548− y="373.36218"
549− style="font-size:12.5px">solve</tspan><tspan
550− sodipodi:role="line"
551− x="147"
552− y="388.98718"
553− style="font-size:12.5px"
554− id="tspan15220">fill</tspan><tspan
555− sodipodi:role="line"
556− x="147"
557− y="404.61218"
558− style="font-size:12.5px"
559− id="tspan15222">apply</tspan><tspan
560− sodipodi:role="line"
561− x="147"
562− y="420.23718"
563− style="font-size:12.5px"
564− id="tspan15224">focus</tspan><tspan
565− sodipodi:role="line"
566− x="147"
567− y="435.86218"
568− style="font-size:12.5px"
569− id="tspan15226">...</tspan></text>
570− <text
571− sodipodi:linespacing="125%"
572− id="text18672"
573− y="396.36218"
574− x="94"
575− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
576− xml:space="preserve"
577− inkscape:export-xdpi="61.120499"
578− inkscape:export-ydpi="61.120499"><tspan
579− id="tspan18674"
580− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff"
581− y="396.36218"
582− x="94"
583− sodipodi:role="line">tactics</tspan></text>
584− </g>
585−</svg>
docs/image/elabProofState.pngdeleted

Binary file not shown.

docs/image/elabProofState.svgdeleted−356
@@ -1,356 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="elabProofState.svg">
19− <defs
20− id="defs4" />
21− <sodipodi:namedview
22− id="base"
23− pagecolor="#ffffff"
24− bordercolor="#666666"
25− borderopacity="1.0"
26− inkscape:pageopacity="0.0"
27− inkscape:pageshadow="2"
28− inkscape:zoom="1"
29− inkscape:cx="252.75613"
30− inkscape:cy="520"
31− inkscape:document-units="px"
32− inkscape:current-layer="layer1"
33− showgrid="false"
34− inkscape:window-width="1920"
35− inkscape:window-height="1015"
36− inkscape:window-x="0"
37− inkscape:window-y="0"
38− inkscape:window-maximized="1" />
39− <metadata
40− id="metadata7">
41− <rdf:RDF>
42− <cc:Work
43− rdf:about="">
44− <dc:format>image/svg+xml</dc:format>
45− <dc:type
46− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
47− <dc:title />
48− </cc:Work>
49− </rdf:RDF>
50− </metadata>
51− <g
52− inkscape:label="Layer 1"
53− inkscape:groupmode="layer"
54− id="layer1">
55− <text
56− sodipodi:linespacing="125%"
57− id="text4148"
58− y="330.36218"
59− x="219"
60− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
61− xml:space="preserve"
62− inkscape:export-xdpi="61.120499"
63− inkscape:export-ydpi="61.120499"><tspan
64− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
65− y="330.36218"
66− x="219"
67− id="tspan4150"
68− sodipodi:role="line">current proof</tspan><tspan
69− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
70− y="349.11218"
71− x="219"
72− sodipodi:role="line"
73− id="tspan4206"> term</tspan></text>
74− <text
75− xml:space="preserve"
76− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
77− x="240"
78− y="303.36218"
79− id="text4160"
80− sodipodi:linespacing="125%"
81− inkscape:export-xdpi="61.120499"
82− inkscape:export-ydpi="61.120499"><tspan
83− sodipodi:role="line"
84− id="tspan4162"
85− x="240"
86− y="303.36218"
87− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">(TTName, TT)</tspan></text>
88− <text
89− sodipodi:linespacing="125%"
90− id="text4202"
91− y="392.36218"
92− x="355"
93− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
94− xml:space="preserve"
95− inkscape:export-xdpi="61.120499"
96− inkscape:export-ydpi="61.120499"><tspan
97− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
98− y="392.36218"
99− x="355"
100− id="tspan4204"
101− sodipodi:role="line">original goal</tspan></text>
102− <text
103− xml:space="preserve"
104− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
105− x="213"
106− y="377.36218"
107− id="text4208"
108− sodipodi:linespacing="125%"
109− inkscape:export-xdpi="61.120499"
110− inkscape:export-ydpi="61.120499"><tspan
111− id="tspan4212"
112− sodipodi:role="line"
113− x="213"
114− y="377.36218"
115− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">path</tspan><tspan
116− sodipodi:role="line"
117− x="213"
118− y="396.11218"
119− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
120− id="tspan4216">subterm</tspan><tspan
121− sodipodi:role="line"
122− x="213"
123− y="414.86218"
124− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
125− id="tspan4218">updates</tspan></text>
126− <text
127− sodipodi:linespacing="125%"
128− id="text4230"
129− y="487.36218"
130− x="148"
131− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
132− xml:space="preserve"
133− inkscape:export-xdpi="61.120499"
134− inkscape:export-ydpi="61.120499"><tspan
135− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
136− y="487.36218"
137− x="148"
138− sodipodi:role="line"
139− id="tspan4243">Contexts used for global definitions and for proof state.</tspan><tspan
140− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
141− y="506.11218"
142− x="148"
143− sodipodi:role="line"
144− id="tspan4190">They contain universe constraints and existing definitions.</tspan><tspan
145− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
146− y="524.86218"
147− x="148"
148− sodipodi:role="line"
149− id="tspan4253">Also store maximum RigCount of the namel</tspan></text>
150− <text
151− inkscape:export-ydpi="61.120499"
152− inkscape:export-xdpi="61.120499"
153− sodipodi:linespacing="125%"
154− id="text4173"
155− y="198.36218"
156− x="135"
157− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
158− xml:space="preserve"><tspan
159− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
160− y="198.36218"
161− x="135"
162− id="tspan4175"
163− sodipodi:role="line">Environment</tspan></text>
164− <text
165− xml:space="preserve"
166− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
167− x="350"
168− y="197.36218"
169− id="text4177"
170− sodipodi:linespacing="125%"
171− inkscape:export-xdpi="61.120499"
172− inkscape:export-ydpi="61.120499"><tspan
173− sodipodi:role="line"
174− id="tspan4179"
175− x="350"
176− y="197.36218"
177− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1">Holes</tspan></text>
178− <text
179− inkscape:export-ydpi="61.120499"
180− inkscape:export-xdpi="61.120499"
181− sodipodi:linespacing="125%"
182− id="text4181"
183− y="197.36218"
184− x="460"
185− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
186− xml:space="preserve"><tspan
187− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
188− y="197.36218"
189− x="460"
190− id="tspan4183"
191− sodipodi:role="line">Guess</tspan></text>
192− <text
193− inkscape:export-ydpi="61.120499"
194− inkscape:export-xdpi="61.120499"
195− sodipodi:linespacing="125%"
196− id="text4185"
197− y="199.36218"
198− x="247"
199− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
200− xml:space="preserve"><tspan
201− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
202− y="199.36218"
203− x="247"
204− id="tspan4187"
205− sodipodi:role="line">Goal</tspan></text>
206− <rect
207− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
208− id="rect4189"
209− width="95"
210− height="32"
211− x="134"
212− y="205.3622"
213− inkscape:export-xdpi="61.120499"
214− inkscape:export-ydpi="61.120499" />
215− <rect
216− y="205.3622"
217− x="241"
218− height="32"
219− width="95"
220− id="rect4191"
221− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
222− inkscape:export-xdpi="61.120499"
223− inkscape:export-ydpi="61.120499" />
224− <rect
225− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
226− id="rect4195"
227− width="95"
228− height="32"
229− x="454"
230− y="205.3622"
231− inkscape:export-xdpi="61.120499"
232− inkscape:export-ydpi="61.120499" />
233− <rect
234− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
235− id="rect4197"
236− width="95"
237− height="32"
238− x="346"
239− y="237.3622"
240− inkscape:export-xdpi="61.120499"
241− inkscape:export-ydpi="61.120499" />
242− <rect
243− y="269.36218"
244− x="346"
245− height="32"
246− width="95"
247− id="rect4199"
248− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
249− inkscape:export-xdpi="61.120499"
250− inkscape:export-ydpi="61.120499" />
251− <rect
252− y="205.3622"
253− x="346"
254− height="32"
255− width="95"
256− id="rect4201"
257− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
258− inkscape:export-xdpi="61.120499"
259− inkscape:export-ydpi="61.120499" />
260− <path
261− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
262− d="m 169,242.3622 -9,184"
263− id="path4206"
264− inkscape:connector-curvature="0"
265− inkscape:export-xdpi="61.120499"
266− inkscape:export-ydpi="61.120499"
267− sodipodi:nodetypes="cc" />
268− <path
269− inkscape:connector-curvature="0"
270− id="path4208"
271− d="m 301,240.3622 -26,46"
272− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
273− sodipodi:nodetypes="cc"
274− inkscape:export-xdpi="61.120499"
275− inkscape:export-ydpi="61.120499" />
276− <text
277− inkscape:export-ydpi="61.120499"
278− inkscape:export-xdpi="61.120499"
279− xml:space="preserve"
280− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
281− x="360"
282− y="366.36218"
283− id="text4210"
284− sodipodi:linespacing="125%"><tspan
285− sodipodi:role="line"
286− id="tspan4213"
287− x="360"
288− y="366.36218"
289− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">focus</tspan></text>
290− <rect
291− inkscape:export-ydpi="61.120499"
292− inkscape:export-xdpi="61.120499"
293− y="237.3622"
294− x="134"
295− height="32"
296− width="95"
297− id="rect4747"
298− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
299− <rect
300− inkscape:export-ydpi="61.120499"
301− inkscape:export-xdpi="61.120499"
302− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
303− id="rect4749"
304− width="95"
305− height="32"
306− x="134"
307− y="269.36218" />
308− <text
309− inkscape:export-ydpi="61.120499"
310− inkscape:export-xdpi="61.120499"
311− xml:space="preserve"
312− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
313− x="148"
314− y="450.36218"
315− id="text4751"
316− sodipodi:linespacing="125%"><tspan
317− id="tspan4757"
318− sodipodi:role="line"
319− x="148"
320− y="450.36218"
321− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">List (TTName, Binder TT)</tspan><tspan
322− sodipodi:role="line"
323− x="148"
324− y="469.11218"
325− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
326− id="tspan4182">Open unification constaints.</tspan></text>
327− <text
328− inkscape:export-ydpi="61.120499"
329− inkscape:export-xdpi="61.120499"
330− xml:space="preserve"
331− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
332− x="349.25366"
333− y="319.99084"
334− id="text4210-3"
335− sodipodi:linespacing="125%"><tspan
336− sodipodi:role="line"
337− id="tspan4213-6"
338− x="349.25366"
339− y="319.99084"
340− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">List TTName</tspan></text>
341− <text
342− sodipodi:linespacing="125%"
343− id="text4782"
344− y="251.99084"
345− x="495.25366"
346− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
347− xml:space="preserve"
348− inkscape:export-xdpi="61.120499"
349− inkscape:export-ydpi="61.120499"><tspan
350− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
351− y="251.99084"
352− x="495.25366"
353− id="tspan4784"
354− sodipodi:role="line">TT</tspan></text>
355− </g>
356−</svg>
docs/image/elabProofStateEx1_1.pngdeleted

Binary file not shown.

docs/image/elabProofStateEx1_1.svgdeleted−312
@@ -1,312 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="elabProofStateEx1_1.svg">
19− <defs
20− id="defs4" />
21− <sodipodi:namedview
22− id="base"
23− pagecolor="#ffffff"
24− bordercolor="#666666"
25− borderopacity="1.0"
26− inkscape:pageopacity="0.0"
27− inkscape:pageshadow="2"
28− inkscape:zoom="1"
29− inkscape:cx="298"
30− inkscape:cy="772.5"
31− inkscape:document-units="px"
32− inkscape:current-layer="layer1"
33− showgrid="false"
34− inkscape:window-width="1920"
35− inkscape:window-height="1015"
36− inkscape:window-x="0"
37− inkscape:window-y="0"
38− inkscape:window-maximized="1" />
39− <metadata
40− id="metadata7">
41− <rdf:RDF>
42− <cc:Work
43− rdf:about="">
44− <dc:format>image/svg+xml</dc:format>
45− <dc:type
46− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
47− <dc:title />
48− </cc:Work>
49− </rdf:RDF>
50− </metadata>
51− <g
52− inkscape:label="Layer 1"
53− inkscape:groupmode="layer"
54− id="layer1">
55− <text
56− sodipodi:linespacing="125%"
57− id="text4140"
58− y="226.36218"
59− x="401"
60− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
61− xml:space="preserve"
62− inkscape:export-xdpi="61.120499"
63− inkscape:export-ydpi="61.120499"><tspan
64− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
65− y="226.36218"
66− x="401"
67− sodipodi:role="line"
68− id="tspan4144">hole_2</tspan></text>
69− <text
70− inkscape:export-ydpi="61.120499"
71− inkscape:export-xdpi="61.120499"
72− sodipodi:linespacing="125%"
73− id="text4173"
74− y="198.36218"
75− x="135"
76− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
77− xml:space="preserve"><tspan
78− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
79− y="198.36218"
80− x="135"
81− id="tspan4175"
82− sodipodi:role="line">Environment</tspan></text>
83− <text
84− xml:space="preserve"
85− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
86− x="393"
87− y="197.36218"
88− id="text4177"
89− sodipodi:linespacing="125%"
90− inkscape:export-xdpi="61.120499"
91− inkscape:export-ydpi="61.120499"><tspan
92− sodipodi:role="line"
93− id="tspan4179"
94− x="393"
95− y="197.36218"
96− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1">Holes</tspan></text>
97− <text
98− inkscape:export-ydpi="61.120499"
99− inkscape:export-xdpi="61.120499"
100− sodipodi:linespacing="125%"
101− id="text4181"
102− y="197.36218"
103− x="503"
104− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
105− xml:space="preserve"><tspan
106− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
107− y="197.36218"
108− x="503"
109− id="tspan4183"
110− sodipodi:role="line">Guess</tspan></text>
111− <text
112− inkscape:export-ydpi="61.120499"
113− inkscape:export-xdpi="61.120499"
114− sodipodi:linespacing="125%"
115− id="text4185"
116− y="199.36218"
117− x="247"
118− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
119− xml:space="preserve"><tspan
120− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
121− y="199.36218"
122− x="247"
123− id="tspan4187"
124− sodipodi:role="line">Goal</tspan></text>
125− <rect
126− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
127− id="rect4189"
128− width="39"
129− height="32"
130− x="134"
131− y="205.3622"
132− inkscape:export-xdpi="61.120499"
133− inkscape:export-ydpi="61.120499" />
134− <rect
135− y="206.3622"
136− x="182"
137− height="32"
138− width="200"
139− id="rect4191"
140− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
141− inkscape:export-xdpi="61.120499"
142− inkscape:export-ydpi="61.120499" />
143− <rect
144− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
145− id="rect4195"
146− width="95"
147− height="32"
148− x="494"
149− y="206.3622"
150− inkscape:export-xdpi="61.120499"
151− inkscape:export-ydpi="61.120499" />
152− <rect
153− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
154− id="rect4197"
155− width="95"
156− height="32"
157− x="389"
158− y="237.3622"
159− inkscape:export-xdpi="61.120499"
160− inkscape:export-ydpi="61.120499" />
161− <rect
162− y="269.36218"
163− x="389"
164− height="32"
165− width="95"
166− id="rect4199"
167− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
168− inkscape:export-xdpi="61.120499"
169− inkscape:export-ydpi="61.120499" />
170− <rect
171− y="205.3622"
172− x="389"
173− height="32"
174− width="95"
175− id="rect4201"
176− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
177− inkscape:export-xdpi="61.120499"
178− inkscape:export-ydpi="61.120499" />
179− <text
180− inkscape:export-ydpi="61.120499"
181− inkscape:export-xdpi="61.120499"
182− xml:space="preserve"
183− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
184− x="400"
185− y="257.36218"
186− id="text4276"
187− sodipodi:linespacing="125%"><tspan
188− id="tspan4280"
189− sodipodi:role="line"
190− x="400"
191− y="257.36218"
192− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">hole_0</tspan></text>
193− <text
194− sodipodi:linespacing="125%"
195− id="text4159"
196− y="225.36218"
197− x="141"
198− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
199− xml:space="preserve"
200− inkscape:export-xdpi="61.120499"
201− inkscape:export-ydpi="61.120499"><tspan
202− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
203− y="225.36218"
204− x="141"
205− sodipodi:role="line"
206− id="tspan4161">[ ]</tspan></text>
207− <text
208− sodipodi:linespacing="125%"
209− id="text4163"
210− y="275.36218"
211− x="135"
212− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
213− xml:space="preserve"
214− inkscape:export-xdpi="61.120499"
215− inkscape:export-ydpi="61.120499"><tspan
216− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
217− y="275.36218"
218− x="135"
219− sodipodi:role="line"
220− id="tspan4165">starts off empty</tspan></text>
221− <path
222− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
223− d="m 154,237.3622 0,25"
224− id="path4167"
225− inkscape:connector-curvature="0"
226− inkscape:export-xdpi="61.120499"
227− inkscape:export-ydpi="61.120499"
228− sodipodi:nodetypes="cc" />
229− <text
230− inkscape:export-ydpi="61.120499"
231− inkscape:export-xdpi="61.120499"
232− xml:space="preserve"
233− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
234− x="188"
235− y="227.36218"
236− id="text4786"
237− sodipodi:linespacing="125%"><tspan
238− sodipodi:role="line"
239− x="188"
240− y="227.36218"
241− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
242− id="tspan4790">(hole_2 , pi_arg : Nat-&gt;Nat)</tspan></text>
243− <text
244− inkscape:export-ydpi="61.120499"
245− inkscape:export-xdpi="61.120499"
246− xml:space="preserve"
247− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
248− x="233.57927"
249− y="309.21585"
250− id="text4794"
251− sodipodi:linespacing="125%"><tspan
252− id="tspan4796"
253− sodipodi:role="line"
254− x="233.57927"
255− y="309.21585"
256− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">this is the signature</tspan><tspan
257− sodipodi:role="line"
258− x="233.57927"
259− y="327.96585"
260− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
261− id="tspan4810">we are looking for</tspan></text>
262− <path
263− inkscape:connector-curvature="0"
264− id="path4798"
265− d="m 298,236.3622 -0.42683,58.52439"
266− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
267− sodipodi:nodetypes="cc"
268− inkscape:export-xdpi="61.120499"
269− inkscape:export-ydpi="61.120499" />
270− <text
271− sodipodi:linespacing="125%"
272− id="text4800"
273− y="335.85608"
274− x="383.54877"
275− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
276− xml:space="preserve"
277− inkscape:export-xdpi="61.120499"
278− inkscape:export-ydpi="61.120499"><tspan
279− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
280− y="335.85608"
281− x="383.54877"
282− sodipodi:role="line"
283− id="tspan4802">machine chosen</tspan><tspan
284− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
285− y="354.60608"
286− x="383.54877"
287− sodipodi:role="line"
288− id="tspan4812">names for the holes</tspan></text>
289− <path
290− sodipodi:nodetypes="cc"
291− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
292− d="m 432,265.3622 0.15244,56.82317"
293− id="path4804"
294− inkscape:connector-curvature="0"
295− inkscape:export-xdpi="61.120499"
296− inkscape:export-ydpi="61.120499" />
297− <text
298− inkscape:export-ydpi="61.120499"
299− inkscape:export-xdpi="61.120499"
300− xml:space="preserve"
301− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
302− x="498"
303− y="227.36218"
304− id="text4806"
305− sodipodi:linespacing="125%"><tspan
306− id="tspan4808"
307− sodipodi:role="line"
308− x="498"
309− y="227.36218"
310− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">no guess yet</tspan></text>
311− </g>
312−</svg>
docs/image/elabProofStateEx1_2.pngdeleted

Binary file not shown.

docs/image/elabProofStateEx1_2.svgdeleted−281
@@ -1,281 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="elabProofStateEx1_2.svg"
19− inkscape:export-filename="/home/mjb/Idris-dev/docs/image/elabProofStateEx1_2.png"
20− inkscape:export-xdpi="61.120499"
21− inkscape:export-ydpi="61.120499">
22− <defs
23− id="defs4">
24− <marker
25− inkscape:stockid="Arrow1Mend"
26− orient="auto"
27− refY="0.0"
28− refX="0.0"
29− id="Arrow1Mend"
30− style="overflow:visible;"
31− inkscape:isstock="true">
32− <path
33− id="path4252"
34− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
35− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
36− transform="scale(0.4) rotate(180) translate(10,0)" />
37− </marker>
38− </defs>
39− <sodipodi:namedview
40− id="base"
41− pagecolor="#ffffff"
42− bordercolor="#666666"
43− borderopacity="1.0"
44− inkscape:pageopacity="0.0"
45− inkscape:pageshadow="2"
46− inkscape:zoom="1"
47− inkscape:cx="211.75967"
48− inkscape:cy="688.76752"
49− inkscape:document-units="px"
50− inkscape:current-layer="layer1"
51− showgrid="false"
52− inkscape:window-width="1920"
53− inkscape:window-height="1015"
54− inkscape:window-x="0"
55− inkscape:window-y="0"
56− inkscape:window-maximized="1" />
57− <metadata
58− id="metadata7">
59− <rdf:RDF>
60− <cc:Work
61− rdf:about="">
62− <dc:format>image/svg+xml</dc:format>
63− <dc:type
64− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
65− <dc:title />
66− </cc:Work>
67− </rdf:RDF>
68− </metadata>
69− <g
70− inkscape:label="Layer 1"
71− inkscape:groupmode="layer"
72− id="layer1">
73− <text
74− sodipodi:linespacing="125%"
75− id="text4140"
76− y="226.36218"
77− x="401"
78− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
79− xml:space="preserve"
80− inkscape:export-xdpi="61.120499"
81− inkscape:export-ydpi="61.120499"><tspan
82− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
83− y="226.36218"
84− x="401"
85− sodipodi:role="line"
86− id="tspan4144">hole_2</tspan></text>
87− <text
88− inkscape:export-ydpi="61.120499"
89− inkscape:export-xdpi="61.120499"
90− sodipodi:linespacing="125%"
91− id="text4173"
92− y="198.36218"
93− x="135"
94− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
95− xml:space="preserve"><tspan
96− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
97− y="198.36218"
98− x="135"
99− id="tspan4175"
100− sodipodi:role="line">Environment</tspan></text>
101− <text
102− xml:space="preserve"
103− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
104− x="393"
105− y="197.36218"
106− id="text4177"
107− sodipodi:linespacing="125%"
108− inkscape:export-xdpi="61.120499"
109− inkscape:export-ydpi="61.120499"><tspan
110− sodipodi:role="line"
111− id="tspan4179"
112− x="393"
113− y="197.36218"
114− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1">Holes</tspan></text>
115− <text
116− inkscape:export-ydpi="61.120499"
117− inkscape:export-xdpi="61.120499"
118− sodipodi:linespacing="125%"
119− id="text4181"
120− y="197.36218"
121− x="503"
122− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
123− xml:space="preserve"><tspan
124− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
125− y="197.36218"
126− x="503"
127− id="tspan4183"
128− sodipodi:role="line">Guess</tspan></text>
129− <text
130− inkscape:export-ydpi="61.120499"
131− inkscape:export-xdpi="61.120499"
132− sodipodi:linespacing="125%"
133− id="text4185"
134− y="199.36218"
135− x="247"
136− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
137− xml:space="preserve"><tspan
138− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
139− y="199.36218"
140− x="247"
141− id="tspan4187"
142− sodipodi:role="line">Goal</tspan></text>
143− <rect
144− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
145− id="rect4189"
146− width="92"
147− height="32"
148− x="134"
149− y="205.3622"
150− inkscape:export-xdpi="61.120499"
151− inkscape:export-ydpi="61.120499" />
152− <rect
153− y="206.3622"
154− x="234"
155− height="32"
156− width="148"
157− id="rect4191"
158− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
159− inkscape:export-xdpi="61.120499"
160− inkscape:export-ydpi="61.120499" />
161− <rect
162− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
163− id="rect4195"
164− width="95"
165− height="32"
166− x="497"
167− y="205.3622"
168− inkscape:export-xdpi="61.120499"
169− inkscape:export-ydpi="61.120499" />
170− <rect
171− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
172− id="rect4197"
173− width="95"
174− height="32"
175− x="389"
176− y="237.3622"
177− inkscape:export-xdpi="61.120499"
178− inkscape:export-ydpi="61.120499" />
179− <rect
180− y="269.36218"
181− x="389"
182− height="32"
183− width="95"
184− id="rect4199"
185− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
186− inkscape:export-xdpi="61.120499"
187− inkscape:export-ydpi="61.120499" />
188− <rect
189− y="205.3622"
190− x="389"
191− height="32"
192− width="95"
193− id="rect4201"
194− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
195− inkscape:export-xdpi="61.120499"
196− inkscape:export-ydpi="61.120499" />
197− <text
198− inkscape:export-ydpi="61.120499"
199− inkscape:export-xdpi="61.120499"
200− xml:space="preserve"
201− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
202− x="400"
203− y="257.36218"
204− id="text4276"
205− sodipodi:linespacing="125%"><tspan
206− id="tspan4280"
207− sodipodi:role="line"
208− x="400"
209− y="257.36218"
210− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">hole_0</tspan></text>
211− <text
212− sodipodi:linespacing="125%"
213− id="text4159"
214− y="225.36218"
215− x="140"
216− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
217− xml:space="preserve"
218− inkscape:export-xdpi="61.120499"
219− inkscape:export-ydpi="61.120499"><tspan
220− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
221− y="225.36218"
222− x="140"
223− sodipodi:role="line"
224− id="tspan4161">(x, λ Nat)</tspan></text>
225− <text
226− inkscape:export-ydpi="61.120499"
227− inkscape:export-xdpi="61.120499"
228− xml:space="preserve"
229− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
230− x="266"
231− y="226.36218"
232− id="text4786"
233− sodipodi:linespacing="125%"><tspan
234− sodipodi:role="line"
235− x="266"
236− y="226.36218"
237− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
238− id="tspan4790">(hole_2 , Nat)</tspan></text>
239− <text
240− sodipodi:linespacing="125%"
241− id="text4800"
242− y="290.36218"
243− x="163"
244− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
245− xml:space="preserve"
246− inkscape:export-xdpi="61.120499"
247− inkscape:export-ydpi="61.120499"><tspan
248− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
249− y="290.36218"
250− x="163"
251− sodipodi:role="line"
252− id="tspan4812">replace the focussed hole</tspan><tspan
253− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
254− y="309.11218"
255− x="163"
256− sodipodi:role="line"
257− id="tspan6225">with a lambda</tspan></text>
258− <path
259− sodipodi:nodetypes="cc"
260− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
261− d="m 307,242.3622 c -5.24693,34.96318 -108.05981,45.71777 -126,0"
262− id="path4804"
263− inkscape:connector-curvature="0"
264− inkscape:export-xdpi="61.120499"
265− inkscape:export-ydpi="61.120499" />
266− <text
267− inkscape:export-ydpi="61.120499"
268− inkscape:export-xdpi="61.120499"
269− xml:space="preserve"
270− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
271− x="510"
272− y="226.36218"
273− id="text4174"
274− sodipodi:linespacing="125%"><tspan
275− id="tspan4176"
276− sodipodi:role="line"
277− x="510"
278− y="226.36218"
279− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">x:Nat</tspan></text>
280− </g>
281−</svg>
docs/image/elabProofStateEx1_3.pngdeleted

Binary file not shown.

docs/image/elabProofStateEx1_3.svgdeleted−244
@@ -1,244 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="elabProofStateEx1_3.svg"
19− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png"
20− inkscape:export-xdpi="61.120499"
21− inkscape:export-ydpi="61.120499">
22− <defs
23− id="defs4" />
24− <sodipodi:namedview
25− id="base"
26− pagecolor="#ffffff"
27− bordercolor="#666666"
28− borderopacity="1.0"
29− inkscape:pageopacity="0.0"
30− inkscape:pageshadow="2"
31− inkscape:zoom="1"
32− inkscape:cx="345.95856"
33− inkscape:cy="688.76752"
34− inkscape:document-units="px"
35− inkscape:current-layer="layer1"
36− showgrid="false"
37− inkscape:window-width="1920"
38− inkscape:window-height="1015"
39− inkscape:window-x="0"
40− inkscape:window-y="0"
41− inkscape:window-maximized="1" />
42− <metadata
43− id="metadata7">
44− <rdf:RDF>
45− <cc:Work
46− rdf:about="">
47− <dc:format>image/svg+xml</dc:format>
48− <dc:type
49− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50− <dc:title />
51− </cc:Work>
52− </rdf:RDF>
53− </metadata>
54− <g
55− inkscape:label="Layer 1"
56− inkscape:groupmode="layer"
57− id="layer1">
58− <text
59− sodipodi:linespacing="125%"
60− id="text4140"
61− y="226.36218"
62− x="401"
63− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
64− xml:space="preserve"
65− inkscape:export-xdpi="61.120499"
66− inkscape:export-ydpi="61.120499"
67− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png"><tspan
68− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
69− y="226.36218"
70− x="401"
71− sodipodi:role="line"
72− id="tspan4144">hole_2</tspan></text>
73− <text
74− inkscape:export-ydpi="61.120499"
75− inkscape:export-xdpi="61.120499"
76− sodipodi:linespacing="125%"
77− id="text4173"
78− y="198.36218"
79− x="135"
80− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
81− xml:space="preserve"
82− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png"><tspan
83− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
84− y="198.36218"
85− x="135"
86− id="tspan4175"
87− sodipodi:role="line">Environment</tspan></text>
88− <text
89− xml:space="preserve"
90− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
91− x="393"
92− y="197.36218"
93− id="text4177"
94− sodipodi:linespacing="125%"
95− inkscape:export-xdpi="61.120499"
96− inkscape:export-ydpi="61.120499"
97− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png"><tspan
98− sodipodi:role="line"
99− id="tspan4179"
100− x="393"
101− y="197.36218"
102− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1">Holes</tspan></text>
103− <text
104− inkscape:export-ydpi="61.120499"
105− inkscape:export-xdpi="61.120499"
106− sodipodi:linespacing="125%"
107− id="text4181"
108− y="197.36218"
109− x="503"
110− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
111− xml:space="preserve"
112− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png"><tspan
113− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
114− y="197.36218"
115− x="503"
116− id="tspan4183"
117− sodipodi:role="line">Guess</tspan></text>
118− <text
119− inkscape:export-ydpi="61.120499"
120− inkscape:export-xdpi="61.120499"
121− sodipodi:linespacing="125%"
122− id="text4185"
123− y="199.36218"
124− x="247"
125− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
126− xml:space="preserve"
127− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png"><tspan
128− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
129− y="199.36218"
130− x="247"
131− id="tspan4187"
132− sodipodi:role="line">Goal</tspan></text>
133− <rect
134− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
135− id="rect4189"
136− width="92"
137− height="32"
138− x="134"
139− y="205.3622"
140− inkscape:export-xdpi="61.120499"
141− inkscape:export-ydpi="61.120499"
142− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png" />
143− <rect
144− y="206.3622"
145− x="234"
146− height="32"
147− width="148"
148− id="rect4191"
149− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
150− inkscape:export-xdpi="61.120499"
151− inkscape:export-ydpi="61.120499"
152− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png" />
153− <rect
154− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
155− id="rect4195"
156− width="95"
157− height="32"
158− x="497"
159− y="205.3622"
160− inkscape:export-xdpi="61.120499"
161− inkscape:export-ydpi="61.120499"
162− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png" />
163− <rect
164− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
165− id="rect4197"
166− width="95"
167− height="32"
168− x="389"
169− y="237.3622"
170− inkscape:export-xdpi="61.120499"
171− inkscape:export-ydpi="61.120499"
172− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png" />
173− <rect
174− y="205.3622"
175− x="389"
176− height="32"
177− width="95"
178− id="rect4201"
179− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
180− inkscape:export-xdpi="61.120499"
181− inkscape:export-ydpi="61.120499"
182− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png" />
183− <text
184− inkscape:export-ydpi="61.120499"
185− inkscape:export-xdpi="61.120499"
186− xml:space="preserve"
187− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
188− x="400"
189− y="257.36218"
190− id="text4276"
191− sodipodi:linespacing="125%"
192− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png"><tspan
193− id="tspan4280"
194− sodipodi:role="line"
195− x="400"
196− y="257.36218"
197− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">hole_0</tspan></text>
198− <text
199− sodipodi:linespacing="125%"
200− id="text4159"
201− y="225.36218"
202− x="140"
203− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
204− xml:space="preserve"
205− inkscape:export-xdpi="61.120499"
206− inkscape:export-ydpi="61.120499"
207− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png"><tspan
208− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
209− y="225.36218"
210− x="140"
211− sodipodi:role="line"
212− id="tspan4161">(x, λ Nat)</tspan></text>
213− <text
214− inkscape:export-ydpi="61.120499"
215− inkscape:export-xdpi="61.120499"
216− xml:space="preserve"
217− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
218− x="266"
219− y="226.36218"
220− id="text4786"
221− sodipodi:linespacing="125%"
222− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png"><tspan
223− sodipodi:role="line"
224− x="266"
225− y="226.36218"
226− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
227− id="tspan4790">(hole_2 , Nat)</tspan></text>
228− <text
229− inkscape:export-ydpi="61.120499"
230− inkscape:export-xdpi="61.120499"
231− xml:space="preserve"
232− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
233− x="510"
234− y="226.36218"
235− id="text4174"
236− sodipodi:linespacing="125%"
237− inkscape:export-filename="/home/master/euclid/prog/idris/elaborator/elabTactics/example1/elabProofStateEx1_3.png"><tspan
238− id="tspan4176"
239− sodipodi:role="line"
240− x="510"
241− y="226.36218"
242− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">x:Nat</tspan></text>
243− </g>
244−</svg>
docs/image/fill.pngdeleted

Binary file not shown.

docs/image/fill.svgdeleted−163
@@ -1,163 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 210 297"
15− version="1.1"
16− id="svg8"
17− inkscape:version="0.92.2 5c3e80d, 2017-08-06"
18− sodipodi:docname="fill.svg">
19− <defs
20− id="defs2">
21− <marker
22− inkscape:isstock="true"
23− style="overflow:visible;"
24− id="marker838"
25− refX="0.0"
26− refY="0.0"
27− orient="auto"
28− inkscape:stockid="Arrow1Mend">
29− <path
30− transform="scale(0.4) rotate(180) translate(10,0)"
31− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
32− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
33− id="path836" />
34− </marker>
35− <marker
36− inkscape:stockid="Arrow1Mend"
37− orient="auto"
38− refY="0.0"
39− refX="0.0"
40− id="Arrow1Mend"
41− style="overflow:visible;"
42− inkscape:isstock="true"
43− inkscape:collect="always">
44− <path
45− id="path4529"
46− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
47− style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
48− transform="scale(0.4) rotate(180) translate(10,0)" />
49− </marker>
50− </defs>
51− <sodipodi:namedview
52− id="base"
53− pagecolor="#ffffff"
54− bordercolor="#666666"
55− borderopacity="1.0"
56− inkscape:pageopacity="0.0"
57− inkscape:pageshadow="2"
58− inkscape:zoom="1"
59− inkscape:cx="313.5"
60− inkscape:cy="696.5"
61− inkscape:document-units="mm"
62− inkscape:current-layer="layer1"
63− showgrid="false"
64− inkscape:window-width="1920"
65− inkscape:window-height="1015"
66− inkscape:window-x="0"
67− inkscape:window-y="0"
68− inkscape:window-maximized="1" />
69− <metadata
70− id="metadata5">
71− <rdf:RDF>
72− <cc:Work
73− rdf:about="">
74− <dc:format>image/svg+xml</dc:format>
75− <dc:type
76− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
77− <dc:title />
78− </cc:Work>
79− </rdf:RDF>
80− </metadata>
81− <g
82− inkscape:label="Layer 1"
83− inkscape:groupmode="layer"
84− id="layer1">
85− <rect
86− style="fill:#ffff00;fill-opacity:1;stroke-width:0.26458332"
87− id="rect22"
88− width="31.75"
89− height="5.5562501"
90− x="70.114571"
91− y="114.96667"
92− inkscape:export-xdpi="61.120499"
93− inkscape:export-ydpi="61.120499" />
94− <text
95− xml:space="preserve"
96− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
97− x="65.352081"
98− y="105.17709"
99− id="text12"
100− inkscape:export-xdpi="61.120499"
101− inkscape:export-ydpi="61.120499"><tspan
102− sodipodi:role="line"
103− id="tspan10"
104− x="65.352081"
105− y="105.17709"
106− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332">? {hole} . {hole}</tspan></text>
107− <text
108− id="text16"
109− y="118.67083"
110− x="56.356247"
111− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
112− xml:space="preserve"
113− inkscape:export-xdpi="61.120499"
114− inkscape:export-ydpi="61.120499"><tspan
115− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
116− y="118.67083"
117− x="56.356247"
118− id="tspan14"
119− sodipodi:role="line">?{hole} ≈ Prelude.Nat.Z . {hole}</tspan></text>
120− <text
121− id="text20"
122− y="110.99791"
123− x="82.814583"
124− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
125− xml:space="preserve"
126− inkscape:export-xdpi="61.120499"
127− inkscape:export-ydpi="61.120499"><tspan
128− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
129− y="110.99791"
130− x="82.814583"
131− id="tspan18"
132− sodipodi:role="line">fill `(Z)</tspan></text>
133− <path
134− style="fill:none;stroke:#ff0000;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
135− d="m 80.668481,106.30075 -0.0032,7.57492"
136− id="path4518"
137− inkscape:connector-curvature="0"
138− sodipodi:nodetypes="cc"
139− inkscape:export-xdpi="61.120499"
140− inkscape:export-ydpi="61.120499" />
141− <text
142− inkscape:export-ydpi="61.120499"
143− inkscape:export-xdpi="61.120499"
144− xml:space="preserve"
145− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
146− x="63.499996"
147− y="93.006248"
148− id="text832"><tspan
149− sodipodi:role="line"
150− id="tspan830"
151− x="63.499996"
152− y="93.006248"
153− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332">focus</tspan></text>
154− <path
155− inkscape:export-ydpi="61.120499"
156− inkscape:export-xdpi="61.120499"
157− sodipodi:nodetypes="cc"
158− inkscape:connector-curvature="0"
159− id="path834"
160− d="m 66.645564,94.659084 -0.0032,5.458256"
161− style="fill:none;stroke:#0000ff;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker838)" />
162− </g>
163−</svg>
docs/image/generateDatatype.pngdeleted

Binary file not shown.

docs/image/generateDatatype.svgdeleted−540
@@ -1,540 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="generateDatatype.svg">
19− <defs
20− id="defs4">
21− <marker
22− inkscape:isstock="true"
23− style="overflow:visible;"
24− id="marker7147"
25− refX="0.0"
26− refY="0.0"
27− orient="auto"
28− inkscape:stockid="Arrow2Mend">
29− <path
30− transform="scale(0.6) rotate(180) translate(0,0)"
31− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
32− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
33− id="path7149" />
34− </marker>
35− <marker
36− inkscape:stockid="Arrow2Mend"
37− orient="auto"
38− refY="0.0"
39− refX="0.0"
40− id="marker6819"
41− style="overflow:visible;"
42− inkscape:isstock="true">
43− <path
44− id="path6821"
45− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
46− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
47− transform="scale(0.6) rotate(180) translate(0,0)" />
48− </marker>
49− <marker
50− inkscape:isstock="true"
51− style="overflow:visible;"
52− id="marker6325"
53− refX="0.0"
54− refY="0.0"
55− orient="auto"
56− inkscape:stockid="Arrow2Mend">
57− <path
58− transform="scale(0.6) rotate(180) translate(0,0)"
59− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
60− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
61− id="path6327" />
62− </marker>
63− <marker
64− inkscape:stockid="Arrow2Mend"
65− orient="auto"
66− refY="0.0"
67− refX="0.0"
68− id="marker5163"
69− style="overflow:visible;"
70− inkscape:isstock="true">
71− <path
72− id="path5165"
73− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
74− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
75− transform="scale(0.6) rotate(180) translate(0,0)" />
76− </marker>
77− <marker
78− inkscape:isstock="true"
79− style="overflow:visible;"
80− id="marker5133"
81− refX="0.0"
82− refY="0.0"
83− orient="auto"
84− inkscape:stockid="Arrow2Mend"
85− inkscape:collect="always">
86− <path
87− transform="scale(0.6) rotate(180) translate(0,0)"
88− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
89− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
90− id="path5135" />
91− </marker>
92− <marker
93− inkscape:stockid="Arrow2Mend"
94− orient="auto"
95− refY="0.0"
96− refX="0.0"
97− id="Arrow2Mend"
98− style="overflow:visible;"
99− inkscape:isstock="true"
100− inkscape:collect="always">
101− <path
102− id="path4183"
103− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
104− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
105− transform="scale(0.6) rotate(180) translate(0,0)" />
106− </marker>
107− </defs>
108− <sodipodi:namedview
109− id="base"
110− pagecolor="#ffffff"
111− bordercolor="#666666"
112− borderopacity="1.0"
113− inkscape:pageopacity="0.0"
114− inkscape:pageshadow="2"
115− inkscape:zoom="1"
116− inkscape:cx="380.92935"
117− inkscape:cy="520"
118− inkscape:document-units="px"
119− inkscape:current-layer="layer1"
120− showgrid="false"
121− inkscape:window-width="1212"
122− inkscape:window-height="1011"
123− inkscape:window-x="-4"
124− inkscape:window-y="0"
125− inkscape:window-maximized="0" />
126− <metadata
127− id="metadata7">
128− <rdf:RDF>
129− <cc:Work
130− rdf:about="">
131− <dc:format>image/svg+xml</dc:format>
132− <dc:type
133− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
134− <dc:title></dc:title>
135− </cc:Work>
136− </rdf:RDF>
137− </metadata>
138− <g
139− inkscape:label="Layer 1"
140− inkscape:groupmode="layer"
141− id="layer1">
142− <rect
143− style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
144− id="rect4136"
145− width="201"
146− height="69"
147− x="116"
148− y="203.3622"
149− inkscape:export-xdpi="61.120499"
150− inkscape:export-ydpi="61.120499" />
151− <rect
152− y="322.36218"
153− x="113"
154− height="69"
155− width="201"
156− id="rect4138"
157− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
158− inkscape:export-xdpi="61.120499"
159− inkscape:export-ydpi="61.120499" />
160− <rect
161− y="202.3622"
162− x="381"
163− height="69"
164− width="201"
165− id="rect4140"
166− style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
167− inkscape:export-xdpi="61.120499"
168− inkscape:export-ydpi="61.120499" />
169− <text
170− xml:space="preserve"
171− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
172− x="125"
173− y="227.3622"
174− id="text4142"
175− sodipodi:linespacing="125%"
176− inkscape:export-xdpi="61.120499"
177− inkscape:export-ydpi="61.120499"><tspan
178− sodipodi:role="line"
179− id="tspan4144"
180− x="125"
181− y="227.3622">declareDatatype</tspan></text>
182− <text
183− sodipodi:linespacing="125%"
184− id="text4146"
185− y="225.3622"
186− x="389"
187− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
188− xml:space="preserve"
189− inkscape:export-xdpi="61.120499"
190− inkscape:export-ydpi="61.120499"><tspan
191− y="225.3622"
192− x="389"
193− id="tspan4148"
194− sodipodi:role="line">defineDatatype</tspan></text>
195− <path
196− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5133)"
197− d="m 190,271.3622 0,48"
198− id="path4150"
199− inkscape:connector-curvature="0"
200− inkscape:export-xdpi="61.120499"
201− inkscape:export-ydpi="61.120499" />
202− <text
203− sodipodi:linespacing="125%"
204− id="text5074"
205− y="295.36218"
206− x="201"
207− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
208− xml:space="preserve"
209− inkscape:export-xdpi="61.120499"
210− inkscape:export-ydpi="61.120499"><tspan
211− y="295.36218"
212− x="201"
213− sodipodi:role="line"
214− id="tspan5080"
215− style="font-size:15px;fill:#ff0000">Declare</tspan></text>
216− <text
217− xml:space="preserve"
218− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
219− x="117"
220− y="344.36218"
221− id="text5082"
222− sodipodi:linespacing="125%"
223− inkscape:export-xdpi="61.120499"
224− inkscape:export-ydpi="61.120499"><tspan
225− style="font-size:15px;fill:#0000ff"
226− sodipodi:role="line"
227− id="tspan5084"
228− x="117"
229− y="344.36218">name:TTName</tspan><tspan
230− style="font-size:15px;fill:#0000ff"
231− id="tspan5086"
232− sodipodi:role="line"
233− x="117"
234− y="363.11218">arguments:List FunArg</tspan><tspan
235− style="font-size:15px;fill:#0000ff"
236− id="tspan5088"
237− sodipodi:role="line"
238− x="117"
239− y="381.86218">returnType:Raw</tspan></text>
240− <text
241− xml:space="preserve"
242− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
243− x="111"
244− y="313.36218"
245− id="text5095"
246− sodipodi:linespacing="125%"
247− inkscape:export-xdpi="61.120499"
248− inkscape:export-ydpi="61.120499"><tspan
249− style="font-size:15px;fill:#0000ff;"
250− id="tspan5097"
251− sodipodi:role="line"
252− x="111"
253− y="313.36218">TyDecl</tspan></text>
254− <rect
255− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
256− id="rect5099"
257− width="125"
258− height="88"
259− x="170"
260− y="415.36218"
261− inkscape:export-xdpi="61.120499"
262− inkscape:export-ydpi="61.120499" />
263− <path
264− inkscape:connector-curvature="0"
265− id="path5101"
266− d="m 247,364.3622 0,48"
267− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend)"
268− inkscape:export-xdpi="61.120499"
269− inkscape:export-ydpi="61.120499" />
270− <text
271− xml:space="preserve"
272− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
273− x="260"
274− y="408.36218"
275− id="text5103"
276− sodipodi:linespacing="125%"
277− inkscape:export-xdpi="61.120499"
278− inkscape:export-ydpi="61.120499"><tspan
279− style="font-size:15px;fill:#ff0000"
280− id="tspan5105"
281− sodipodi:role="line"
282− x="260"
283− y="408.36218">MkFunArg</tspan></text>
284− <text
285− sodipodi:linespacing="125%"
286− id="text5107"
287− y="437.36218"
288− x="174"
289− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
290− xml:space="preserve"
291− inkscape:export-xdpi="61.120499"
292− inkscape:export-ydpi="61.120499"><tspan
293− y="437.36218"
294− x="174"
295− id="tspan5109"
296− sodipodi:role="line"
297− style="font-size:15px;fill:#0000ff">name:TTName</tspan><tspan
298− y="456.11218"
299− x="174"
300− sodipodi:role="line"
301− id="tspan5113"
302− style="font-size:15px;fill:#0000ff">type:Raw</tspan><tspan
303− y="474.86218"
304− x="174"
305− sodipodi:role="line"
306− style="font-size:15px;fill:#0000ff"
307− id="tspan5121">plicity:Plicity</tspan><tspan
308− y="493.61218"
309− x="174"
310− sodipodi:role="line"
311− style="font-size:15px;fill:#0000ff"
312− id="tspan5123">erasure:Erasure</tspan></text>
313− <text
314− sodipodi:linespacing="125%"
315− id="text5115"
316− y="409.36218"
317− x="170"
318− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
319− xml:space="preserve"
320− inkscape:export-xdpi="61.120499"
321− inkscape:export-ydpi="61.120499"><tspan
322− y="409.36218"
323− x="170"
324− sodipodi:role="line"
325− id="tspan5117"
326− style="font-size:15px;fill:#0000ff">FunArg</tspan></text>
327− <text
328− sodipodi:linespacing="125%"
329− id="text5125"
330− y="526.36218"
331− x="105"
332− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
333− xml:space="preserve"
334− inkscape:export-xdpi="61.120499"
335− inkscape:export-ydpi="61.120499"><tspan
336− y="526.36218"
337− x="105"
338− sodipodi:role="line"
339− id="tspan5127"
340− style="font-size:15px;fill:#ff0000">Explicit</tspan><tspan
341− y="545.11218"
342− x="105"
343− sodipodi:role="line"
344− style="font-size:15px;fill:#ff0000"
345− id="tspan5129">Implicit</tspan><tspan
346− y="563.86218"
347− x="105"
348− sodipodi:role="line"
349− style="font-size:15px;fill:#ff0000"
350− id="tspan5131">Constraint</tspan></text>
351− <path
352− inkscape:connector-curvature="0"
353− id="path5161"
354− d="m 169,473.3622 c -30.23945,2.9603 -39.98191,17.10078 -41,36"
355− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5163)"
356− sodipodi:nodetypes="cc"
357− inkscape:export-xdpi="61.120499"
358− inkscape:export-ydpi="61.120499" />
359− <path
360− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker6325)"
361− d="m 245,499.3622 0,28"
362− id="path6319"
363− inkscape:connector-curvature="0"
364− sodipodi:nodetypes="cc"
365− inkscape:export-xdpi="61.120499"
366− inkscape:export-ydpi="61.120499" />
367− <text
368− sodipodi:linespacing="125%"
369− id="text6321"
370− y="544.36218"
371− x="221"
372− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
373− xml:space="preserve"
374− inkscape:export-xdpi="61.120499"
375− inkscape:export-ydpi="61.120499"><tspan
376− y="544.36218"
377− x="221"
378− sodipodi:role="line"
379− id="tspan6323"
380− style="font-size:15px;fill:#ff0000">Erased</tspan><tspan
381− y="563.11218"
382− x="221"
383− sodipodi:role="line"
384− style="font-size:15px;fill:#ff0000"
385− id="tspan6773">NotErased</tspan></text>
386− <rect
387− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
388− id="rect6775"
389− width="247"
390− height="49"
391− x="347"
392− y="322.36218"
393− inkscape:export-xdpi="61.120499"
394− inkscape:export-ydpi="61.120499" />
395− <path
396− inkscape:connector-curvature="0"
397− id="path6777"
398− d="m 458,271.3622 0,48"
399− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5133)"
400− inkscape:export-xdpi="61.120499"
401− inkscape:export-ydpi="61.120499" />
402− <text
403− xml:space="preserve"
404− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
405− x="469"
406− y="295.36218"
407− id="text6779"
408− sodipodi:linespacing="125%"
409− inkscape:export-xdpi="61.120499"
410− inkscape:export-ydpi="61.120499"><tspan
411− style="font-size:15px;fill:#ff0000"
412− id="tspan6781"
413− sodipodi:role="line"
414− x="469"
415− y="295.36218">DefineDatatype</tspan></text>
416− <text
417− sodipodi:linespacing="125%"
418− id="text6783"
419− y="344.36218"
420− x="351"
421− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
422− xml:space="preserve"
423− inkscape:export-xdpi="61.120499"
424− inkscape:export-ydpi="61.120499"><tspan
425− y="344.36218"
426− x="351"
427− sodipodi:role="line"
428− id="tspan6789"
429− style="font-size:15px;fill:#0000ff">name:TTName</tspan><tspan
430− y="363.11218"
431− x="351"
432− sodipodi:role="line"
433− style="font-size:15px;fill:#0000ff"
434− id="tspan7130">constructors : List ConstructorDefn</tspan></text>
435− <text
436− sodipodi:linespacing="125%"
437− id="text6791"
438− y="313.36218"
439− x="379"
440− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
441− xml:space="preserve"
442− inkscape:export-xdpi="61.120499"
443− inkscape:export-ydpi="61.120499"><tspan
444− y="313.36218"
445− x="379"
446− sodipodi:role="line"
447− id="tspan6793"
448− style="font-size:15px;fill:#0000ff">DataDefn</tspan></text>
449− <rect
450− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
451− id="rect6799"
452− width="201"
453− height="69"
454− x="380"
455− y="418.36218"
456− inkscape:export-xdpi="61.120499"
457− inkscape:export-ydpi="61.120499" />
458− <path
459− inkscape:connector-curvature="0"
460− id="path6801"
461− d="m 539,367.3622 0,48"
462− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker6819)"
463− inkscape:export-xdpi="61.120499"
464− inkscape:export-ydpi="61.120499" />
465− <text
466− xml:space="preserve"
467− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
468− x="450"
469− y="386.36218"
470− id="text6803"
471− sodipodi:linespacing="125%"
472− inkscape:export-xdpi="61.120499"
473− inkscape:export-ydpi="61.120499"><tspan
474− style="font-size:15px;fill:#ff0000"
475− id="tspan6805"
476− sodipodi:role="line"
477− x="450"
478− y="386.36218">Constructor</tspan></text>
479− <text
480− sodipodi:linespacing="125%"
481− id="text6807"
482− y="440.36218"
483− x="384"
484− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
485− xml:space="preserve"
486− inkscape:export-xdpi="61.120499"
487− inkscape:export-ydpi="61.120499"><tspan
488− y="440.36218"
489− x="384"
490− id="tspan6809"
491− sodipodi:role="line"
492− style="font-size:15px;fill:#0000ff">name:TTName</tspan><tspan
493− y="459.11218"
494− x="384"
495− sodipodi:role="line"
496− id="tspan6811"
497− style="font-size:15px;fill:#0000ff">arguments:List FunArg</tspan><tspan
498− y="477.86218"
499− x="384"
500− sodipodi:role="line"
501− id="tspan6813"
502− style="font-size:15px;fill:#0000ff">returnType:Raw</tspan></text>
503− <text
504− sodipodi:linespacing="125%"
505− id="text6815"
506− y="409.36218"
507− x="378"
508− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
509− xml:space="preserve"
510− inkscape:export-xdpi="61.120499"
511− inkscape:export-ydpi="61.120499"><tspan
512− y="409.36218"
513− x="378"
514− sodipodi:role="line"
515− id="tspan6817"
516− style="font-size:15px;fill:#0000ff">ConstructorDefn</tspan></text>
517− <text
518− inkscape:export-ydpi="61.120499"
519− inkscape:export-xdpi="61.120499"
520− sodipodi:linespacing="125%"
521− id="text7135"
522− y="425.36218"
523− x="307"
524− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
525− xml:space="preserve"><tspan
526− y="425.36218"
527− x="307"
528− sodipodi:role="line"
529− id="tspan7137"
530− style="font-size:15px;fill:#ff0000">MkFunArg</tspan></text>
531− <path
532− inkscape:export-ydpi="61.120499"
533− inkscape:export-xdpi="61.120499"
534− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker7147)"
535− d="m 379,458.3622 -80,-35"
536− id="path7145"
537− inkscape:connector-curvature="0"
538− sodipodi:nodetypes="cc" />
539− </g>
540−</svg>
docs/image/generateFunction.pngdeleted

Binary file not shown.

docs/image/generateFunction.svgdeleted−588
@@ -1,588 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="generateFunction.svg">
19− <defs
20− id="defs4">
21− <marker
22− inkscape:isstock="true"
23− style="overflow:visible;"
24− id="marker4348"
25− refX="0.0"
26− refY="0.0"
27− orient="auto"
28− inkscape:stockid="Arrow2Mend">
29− <path
30− transform="scale(0.6) rotate(180) translate(0,0)"
31− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
32− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
33− id="path4350" />
34− </marker>
35− <marker
36− inkscape:isstock="true"
37− style="overflow:visible;"
38− id="marker7147"
39− refX="0.0"
40− refY="0.0"
41− orient="auto"
42− inkscape:stockid="Arrow2Mend">
43− <path
44− transform="scale(0.6) rotate(180) translate(0,0)"
45− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
46− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
47− id="path7149" />
48− </marker>
49− <marker
50− inkscape:stockid="Arrow2Mend"
51− orient="auto"
52− refY="0.0"
53− refX="0.0"
54− id="marker6819"
55− style="overflow:visible;"
56− inkscape:isstock="true"
57− inkscape:collect="always">
58− <path
59− id="path6821"
60− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
61− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
62− transform="scale(0.6) rotate(180) translate(0,0)" />
63− </marker>
64− <marker
65− inkscape:isstock="true"
66− style="overflow:visible;"
67− id="marker6325"
68− refX="0.0"
69− refY="0.0"
70− orient="auto"
71− inkscape:stockid="Arrow2Mend">
72− <path
73− transform="scale(0.6) rotate(180) translate(0,0)"
74− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
75− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
76− id="path6327" />
77− </marker>
78− <marker
79− inkscape:stockid="Arrow2Mend"
80− orient="auto"
81− refY="0.0"
82− refX="0.0"
83− id="marker5163"
84− style="overflow:visible;"
85− inkscape:isstock="true">
86− <path
87− id="path5165"
88− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
89− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
90− transform="scale(0.6) rotate(180) translate(0,0)" />
91− </marker>
92− <marker
93− inkscape:isstock="true"
94− style="overflow:visible;"
95− id="marker5133"
96− refX="0.0"
97− refY="0.0"
98− orient="auto"
99− inkscape:stockid="Arrow2Mend"
100− inkscape:collect="always">
101− <path
102− transform="scale(0.6) rotate(180) translate(0,0)"
103− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
104− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
105− id="path5135" />
106− </marker>
107− <marker
108− inkscape:stockid="Arrow2Mend"
109− orient="auto"
110− refY="0.0"
111− refX="0.0"
112− id="Arrow2Mend"
113− style="overflow:visible;"
114− inkscape:isstock="true"
115− inkscape:collect="always">
116− <path
117− id="path4183"
118− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
119− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
120− transform="scale(0.6) rotate(180) translate(0,0)" />
121− </marker>
122− </defs>
123− <sodipodi:namedview
124− id="base"
125− pagecolor="#ffffff"
126− bordercolor="#666666"
127− borderopacity="1.0"
128− inkscape:pageopacity="0.0"
129− inkscape:pageshadow="2"
130− inkscape:zoom="1"
131− inkscape:cx="380.92935"
132− inkscape:cy="520"
133− inkscape:document-units="px"
134− inkscape:current-layer="layer1"
135− showgrid="false"
136− inkscape:window-width="1212"
137− inkscape:window-height="1011"
138− inkscape:window-x="0"
139− inkscape:window-y="0"
140− inkscape:window-maximized="0" />
141− <metadata
142− id="metadata7">
143− <rdf:RDF>
144− <cc:Work
145− rdf:about="">
146− <dc:format>image/svg+xml</dc:format>
147− <dc:type
148− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
149− <dc:title />
150− </cc:Work>
151− </rdf:RDF>
152− </metadata>
153− <g
154− inkscape:label="Layer 1"
155− inkscape:groupmode="layer"
156− id="layer1">
157− <rect
158− style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
159− id="rect4136"
160− width="201"
161− height="69"
162− x="116"
163− y="203.3622"
164− inkscape:export-xdpi="61.120499"
165− inkscape:export-ydpi="61.120499" />
166− <rect
167− y="322.36218"
168− x="113"
169− height="69"
170− width="201"
171− id="rect4138"
172− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
173− inkscape:export-xdpi="61.120499"
174− inkscape:export-ydpi="61.120499" />
175− <rect
176− y="202.3622"
177− x="381"
178− height="69"
179− width="201"
180− id="rect4140"
181− style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
182− inkscape:export-xdpi="61.120499"
183− inkscape:export-ydpi="61.120499" />
184− <text
185− xml:space="preserve"
186− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
187− x="125"
188− y="227.3622"
189− id="text4142"
190− sodipodi:linespacing="125%"
191− inkscape:export-xdpi="61.120499"
192− inkscape:export-ydpi="61.120499"><tspan
193− sodipodi:role="line"
194− id="tspan4144"
195− x="125"
196− y="227.3622">declareType</tspan></text>
197− <text
198− sodipodi:linespacing="125%"
199− id="text4146"
200− y="225.3622"
201− x="389"
202− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
203− xml:space="preserve"
204− inkscape:export-xdpi="61.120499"
205− inkscape:export-ydpi="61.120499"><tspan
206− y="225.3622"
207− x="389"
208− id="tspan4148"
209− sodipodi:role="line">defineFunction</tspan></text>
210− <path
211− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5133)"
212− d="m 190,271.3622 0,48"
213− id="path4150"
214− inkscape:connector-curvature="0"
215− inkscape:export-xdpi="61.120499"
216− inkscape:export-ydpi="61.120499" />
217− <text
218− sodipodi:linespacing="125%"
219− id="text5074"
220− y="295.36218"
221− x="201"
222− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
223− xml:space="preserve"
224− inkscape:export-xdpi="61.120499"
225− inkscape:export-ydpi="61.120499"><tspan
226− y="295.36218"
227− x="201"
228− sodipodi:role="line"
229− id="tspan5080"
230− style="font-size:15px;fill:#ff0000">Declare</tspan></text>
231− <text
232− xml:space="preserve"
233− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
234− x="117"
235− y="344.36218"
236− id="text5082"
237− sodipodi:linespacing="125%"
238− inkscape:export-xdpi="61.120499"
239− inkscape:export-ydpi="61.120499"><tspan
240− style="font-size:15px;fill:#0000ff"
241− sodipodi:role="line"
242− id="tspan5084"
243− x="117"
244− y="344.36218">name:TTName</tspan><tspan
245− style="font-size:15px;fill:#0000ff"
246− id="tspan5086"
247− sodipodi:role="line"
248− x="117"
249− y="363.11218">arguments:List FunArg</tspan><tspan
250− style="font-size:15px;fill:#0000ff"
251− id="tspan5088"
252− sodipodi:role="line"
253− x="117"
254− y="381.86218">returnType:Raw</tspan></text>
255− <text
256− xml:space="preserve"
257− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
258− x="111"
259− y="313.36218"
260− id="text5095"
261− sodipodi:linespacing="125%"
262− inkscape:export-xdpi="61.120499"
263− inkscape:export-ydpi="61.120499"><tspan
264− style="font-size:15px;fill:#0000ff;"
265− id="tspan5097"
266− sodipodi:role="line"
267− x="111"
268− y="313.36218">TyDecl</tspan></text>
269− <rect
270− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
271− id="rect5099"
272− width="125"
273− height="88"
274− x="170"
275− y="415.36218"
276− inkscape:export-xdpi="61.120499"
277− inkscape:export-ydpi="61.120499" />
278− <path
279− inkscape:connector-curvature="0"
280− id="path5101"
281− d="m 247,364.3622 0,48"
282− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend)"
283− inkscape:export-xdpi="61.120499"
284− inkscape:export-ydpi="61.120499" />
285− <text
286− xml:space="preserve"
287− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
288− x="260"
289− y="408.36218"
290− id="text5103"
291− sodipodi:linespacing="125%"
292− inkscape:export-xdpi="61.120499"
293− inkscape:export-ydpi="61.120499"><tspan
294− style="font-size:15px;fill:#ff0000"
295− id="tspan5105"
296− sodipodi:role="line"
297− x="260"
298− y="408.36218">MkFunArg</tspan></text>
299− <text
300− sodipodi:linespacing="125%"
301− id="text5107"
302− y="437.36218"
303− x="174"
304− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
305− xml:space="preserve"
306− inkscape:export-xdpi="61.120499"
307− inkscape:export-ydpi="61.120499"><tspan
308− y="437.36218"
309− x="174"
310− id="tspan5109"
311− sodipodi:role="line"
312− style="font-size:15px;fill:#0000ff">name:TTName</tspan><tspan
313− y="456.11218"
314− x="174"
315− sodipodi:role="line"
316− id="tspan5113"
317− style="font-size:15px;fill:#0000ff">type:Raw</tspan><tspan
318− y="474.86218"
319− x="174"
320− sodipodi:role="line"
321− style="font-size:15px;fill:#0000ff"
322− id="tspan5121">plicity:Plicity</tspan><tspan
323− y="493.61218"
324− x="174"
325− sodipodi:role="line"
326− style="font-size:15px;fill:#0000ff"
327− id="tspan5123">erasure:Erasure</tspan></text>
328− <text
329− sodipodi:linespacing="125%"
330− id="text5115"
331− y="409.36218"
332− x="170"
333− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
334− xml:space="preserve"
335− inkscape:export-xdpi="61.120499"
336− inkscape:export-ydpi="61.120499"><tspan
337− y="409.36218"
338− x="170"
339− sodipodi:role="line"
340− id="tspan5117"
341− style="font-size:15px;fill:#0000ff">FunArg</tspan></text>
342− <text
343− sodipodi:linespacing="125%"
344− id="text5125"
345− y="526.36218"
346− x="105"
347− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
348− xml:space="preserve"
349− inkscape:export-xdpi="61.120499"
350− inkscape:export-ydpi="61.120499"><tspan
351− y="526.36218"
352− x="105"
353− sodipodi:role="line"
354− id="tspan5127"
355− style="font-size:15px;fill:#ff0000">Explicit</tspan><tspan
356− y="545.11218"
357− x="105"
358− sodipodi:role="line"
359− style="font-size:15px;fill:#ff0000"
360− id="tspan5129">Implicit</tspan><tspan
361− y="563.86218"
362− x="105"
363− sodipodi:role="line"
364− style="font-size:15px;fill:#ff0000"
365− id="tspan5131">Constraint</tspan></text>
366− <path
367− inkscape:connector-curvature="0"
368− id="path5161"
369− d="m 169,473.3622 c -30.23945,2.9603 -39.98191,17.10078 -41,36"
370− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5163)"
371− sodipodi:nodetypes="cc"
372− inkscape:export-xdpi="61.120499"
373− inkscape:export-ydpi="61.120499" />
374− <path
375− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker6325)"
376− d="m 245,499.3622 0,28"
377− id="path6319"
378− inkscape:connector-curvature="0"
379− sodipodi:nodetypes="cc"
380− inkscape:export-xdpi="61.120499"
381− inkscape:export-ydpi="61.120499" />
382− <text
383− sodipodi:linespacing="125%"
384− id="text6321"
385− y="544.36218"
386− x="221"
387− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
388− xml:space="preserve"
389− inkscape:export-xdpi="61.120499"
390− inkscape:export-ydpi="61.120499"><tspan
391− y="544.36218"
392− x="221"
393− sodipodi:role="line"
394− id="tspan6323"
395− style="font-size:15px;fill:#ff0000">Erased</tspan><tspan
396− y="563.11218"
397− x="221"
398− sodipodi:role="line"
399− style="font-size:15px;fill:#ff0000"
400− id="tspan6773">NotErased</tspan></text>
401− <rect
402− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
403− id="rect6775"
404− width="247"
405− height="49"
406− x="347"
407− y="322.36218"
408− inkscape:export-xdpi="61.120499"
409− inkscape:export-ydpi="61.120499" />
410− <path
411− inkscape:connector-curvature="0"
412− id="path6777"
413− d="m 458,271.3622 0,48"
414− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5133)"
415− inkscape:export-xdpi="61.120499"
416− inkscape:export-ydpi="61.120499" />
417− <text
418− xml:space="preserve"
419− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
420− x="469"
421− y="295.36218"
422− id="text6779"
423− sodipodi:linespacing="125%"
424− inkscape:export-xdpi="61.120499"
425− inkscape:export-ydpi="61.120499"><tspan
426− style="font-size:15px;fill:#ff0000"
427− id="tspan6781"
428− sodipodi:role="line"
429− x="469"
430− y="295.36218">DefineFun</tspan></text>
431− <text
432− sodipodi:linespacing="125%"
433− id="text6783"
434− y="344.36218"
435− x="351"
436− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
437− xml:space="preserve"
438− inkscape:export-xdpi="61.120499"
439− inkscape:export-ydpi="61.120499"><tspan
440− y="344.36218"
441− x="351"
442− sodipodi:role="line"
443− id="tspan6789"
444− style="font-size:15px;fill:#0000ff">name:TTName</tspan><tspan
445− y="363.11218"
446− x="351"
447− sodipodi:role="line"
448− style="font-size:15px;fill:#0000ff"
449− id="tspan7130">clauses : List (FunClause a)</tspan></text>
450− <text
451− sodipodi:linespacing="125%"
452− id="text6791"
453− y="313.36218"
454− x="379"
455− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
456− xml:space="preserve"
457− inkscape:export-xdpi="61.120499"
458− inkscape:export-ydpi="61.120499"><tspan
459− y="313.36218"
460− x="379"
461− sodipodi:role="line"
462− id="tspan6793"
463− style="font-size:15px;fill:#0000ff">FunDefn</tspan></text>
464− <rect
465− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
466− id="rect6799"
467− width="86"
468− height="64"
469− x="372"
470− y="462.36218"
471− inkscape:export-xdpi="61.120499"
472− inkscape:export-ydpi="61.120499" />
473− <path
474− inkscape:connector-curvature="0"
475− id="path6801"
476− d="m 552,370.3622 0,86"
477− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker6819)"
478− inkscape:export-xdpi="61.120499"
479− inkscape:export-ydpi="61.120499"
480− sodipodi:nodetypes="cc" />
481− <text
482− xml:space="preserve"
483− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
484− x="352"
485− y="418.36218"
486− id="text6803"
487− sodipodi:linespacing="125%"
488− inkscape:export-xdpi="61.120499"
489− inkscape:export-ydpi="61.120499"><tspan
490− style="font-size:15px;fill:#ff0000"
491− id="tspan6805"
492− sodipodi:role="line"
493− x="352"
494− y="418.36218">MkFunClause</tspan></text>
495− <text
496− sodipodi:linespacing="125%"
497− id="text6807"
498− y="484.36218"
499− x="376"
500− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
501− xml:space="preserve"
502− inkscape:export-xdpi="61.120499"
503− inkscape:export-ydpi="61.120499"><tspan
504− y="484.36218"
505− x="376"
506− sodipodi:role="line"
507− id="tspan6813"
508− style="font-size:15px;fill:#0000ff">lhs:a</tspan><tspan
509− y="503.11218"
510− x="376"
511− sodipodi:role="line"
512− style="font-size:15px;fill:#0000ff"
513− id="tspan4330">rhs:a</tspan></text>
514− <text
515− sodipodi:linespacing="125%"
516− id="text6815"
517− y="453.36218"
518− x="370"
519− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
520− xml:space="preserve"
521− inkscape:export-xdpi="61.120499"
522− inkscape:export-ydpi="61.120499"><tspan
523− y="453.36218"
524− x="370"
525− sodipodi:role="line"
526− id="tspan6817"
527− style="font-size:15px;fill:#0000ff">FunClause</tspan></text>
528− <text
529− inkscape:export-ydpi="61.120499"
530− inkscape:export-xdpi="61.120499"
531− sodipodi:linespacing="125%"
532− id="text4321"
533− y="395.36218"
534− x="407"
535− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
536− xml:space="preserve"><tspan
537− y="395.36218"
538− x="407"
539− sodipodi:role="line"
540− id="tspan4323"
541− style="font-size:15px;fill:#ff0000">MkImpossibleClause</tspan></text>
542− <rect
543− inkscape:export-ydpi="61.120499"
544− inkscape:export-xdpi="61.120499"
545− y="461.36218"
546− x="473"
547− height="64"
548− width="86"
549− id="rect4332"
550− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
551− <text
552− inkscape:export-ydpi="61.120499"
553− inkscape:export-xdpi="61.120499"
554− xml:space="preserve"
555− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
556− x="477"
557− y="483.36218"
558− id="text4334"
559− sodipodi:linespacing="125%"><tspan
560− id="tspan4338"
561− style="font-size:15px;fill:#0000ff"
562− sodipodi:role="line"
563− x="477"
564− y="483.36218">lhs:a</tspan></text>
565− <text
566− inkscape:export-ydpi="61.120499"
567− inkscape:export-xdpi="61.120499"
568− xml:space="preserve"
569− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
570− x="471"
571− y="452.36218"
572− id="text4340"
573− sodipodi:linespacing="125%"><tspan
574− style="font-size:15px;fill:#0000ff"
575− id="tspan4342"
576− sodipodi:role="line"
577− x="471"
578− y="452.36218">FunClause</tspan></text>
579− <path
580− inkscape:export-ydpi="61.120499"
581− inkscape:export-xdpi="61.120499"
582− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4348)"
583− d="m 450,371.3622 0,84"
584− id="path4346"
585− inkscape:connector-curvature="0"
586− sodipodi:nodetypes="cc" />
587− </g>
588−</svg>
docs/image/generateFunction2.pngdeleted

Binary file not shown.

docs/image/generateFunction2.svgdeleted−430
@@ -1,430 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="generateFunction2.svg">
19− <defs
20− id="defs4">
21− <marker
22− inkscape:isstock="true"
23− style="overflow:visible;"
24− id="marker4439"
25− refX="0.0"
26− refY="0.0"
27− orient="auto"
28− inkscape:stockid="Arrow2Mend">
29− <path
30− transform="scale(0.6) rotate(180) translate(0,0)"
31− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
32− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
33− id="path4441" />
34− </marker>
35− <marker
36− inkscape:stockid="Arrow2Mend"
37− orient="auto"
38− refY="0.0"
39− refX="0.0"
40− id="marker4433"
41− style="overflow:visible;"
42− inkscape:isstock="true">
43− <path
44− id="path4435"
45− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
46− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
47− transform="scale(0.6) rotate(180) translate(0,0)" />
48− </marker>
49− <marker
50− inkscape:isstock="true"
51− style="overflow:visible;"
52− id="marker4427"
53− refX="0.0"
54− refY="0.0"
55− orient="auto"
56− inkscape:stockid="Arrow2Mend"
57− inkscape:collect="always">
58− <path
59− transform="scale(0.6) rotate(180) translate(0,0)"
60− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
61− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
62− id="path4429" />
63− </marker>
64− <marker
65− inkscape:isstock="true"
66− style="overflow:visible;"
67− id="marker4411"
68− refX="0.0"
69− refY="0.0"
70− orient="auto"
71− inkscape:stockid="Arrow2Mend">
72− <path
73− transform="scale(0.6) rotate(180) translate(0,0)"
74− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
75− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
76− id="path4413" />
77− </marker>
78− <marker
79− inkscape:stockid="Arrow2Mend"
80− orient="auto"
81− refY="0.0"
82− refX="0.0"
83− id="marker4407"
84− style="overflow:visible;"
85− inkscape:isstock="true">
86− <path
87− id="path4409"
88− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
89− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
90− transform="scale(0.6) rotate(180) translate(0,0)" />
91− </marker>
92− <marker
93− inkscape:stockid="Arrow2Mend"
94− orient="auto"
95− refY="0.0"
96− refX="0.0"
97− id="marker4403"
98− style="overflow:visible;"
99− inkscape:isstock="true">
100− <path
101− id="path4405"
102− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
103− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
104− transform="scale(0.6) rotate(180) translate(0,0)" />
105− </marker>
106− <marker
107− inkscape:isstock="true"
108− style="overflow:visible;"
109− id="marker4359"
110− refX="0.0"
111− refY="0.0"
112− orient="auto"
113− inkscape:stockid="Arrow2Mend"
114− inkscape:collect="always">
115− <path
116− transform="scale(0.6) rotate(180) translate(0,0)"
117− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
118− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
119− id="path4361" />
120− </marker>
121− <marker
122− inkscape:stockid="Arrow2Mend"
123− orient="auto"
124− refY="0.0"
125− refX="0.0"
126− id="marker4349"
127− style="overflow:visible;"
128− inkscape:isstock="true"
129− inkscape:collect="always">
130− <path
131− id="path4351"
132− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
133− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
134− transform="scale(0.6) rotate(180) translate(0,0)" />
135− </marker>
136− <marker
137− inkscape:isstock="true"
138− style="overflow:visible;"
139− id="marker7147"
140− refX="0.0"
141− refY="0.0"
142− orient="auto"
143− inkscape:stockid="Arrow2Mend">
144− <path
145− transform="scale(0.6) rotate(180) translate(0,0)"
146− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
147− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
148− id="path7149" />
149− </marker>
150− <marker
151− inkscape:isstock="true"
152− style="overflow:visible;"
153− id="marker6325"
154− refX="0.0"
155− refY="0.0"
156− orient="auto"
157− inkscape:stockid="Arrow2Mend">
158− <path
159− transform="scale(0.6) rotate(180) translate(0,0)"
160− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
161− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
162− id="path6327" />
163− </marker>
164− <marker
165− inkscape:stockid="Arrow2Mend"
166− orient="auto"
167− refY="0.0"
168− refX="0.0"
169− id="marker5163"
170− style="overflow:visible;"
171− inkscape:isstock="true">
172− <path
173− id="path5165"
174− style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
175− d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
176− transform="scale(0.6) rotate(180) translate(0,0)" />
177− </marker>
178− </defs>
179− <sodipodi:namedview
180− id="base"
181− pagecolor="#ffffff"
182− bordercolor="#666666"
183− borderopacity="1.0"
184− inkscape:pageopacity="0.0"
185− inkscape:pageshadow="2"
186− inkscape:zoom="1"
187− inkscape:cx="380.92935"
188− inkscape:cy="592.42473"
189− inkscape:document-units="px"
190− inkscape:current-layer="layer1"
191− showgrid="false"
192− inkscape:window-width="1067"
193− inkscape:window-height="1011"
194− inkscape:window-x="0"
195− inkscape:window-y="0"
196− inkscape:window-maximized="0" />
197− <metadata
198− id="metadata7">
199− <rdf:RDF>
200− <cc:Work
201− rdf:about="">
202− <dc:format>image/svg+xml</dc:format>
203− <dc:type
204− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
205− <dc:title />
206− </cc:Work>
207− </rdf:RDF>
208− </metadata>
209− <g
210− inkscape:label="Layer 1"
211− inkscape:groupmode="layer"
212− id="layer1">
213− <rect
214− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
215− id="rect6799"
216− width="86"
217− height="64"
218− x="203"
219− y="105.36218"
220− inkscape:export-xdpi="61.120499"
221− inkscape:export-ydpi="61.120499" />
222− <text
223− xml:space="preserve"
224− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
225− x="201"
226− y="211.36218"
227− id="text6803"
228− sodipodi:linespacing="125%"
229− inkscape:export-xdpi="61.120499"
230− inkscape:export-ydpi="61.120499"><tspan
231− style="font-size:15px;fill:#ff0000"
232− id="tspan6805"
233− sodipodi:role="line"
234− x="201"
235− y="211.36218">RBind <tspan
236− style="fill:#0000ff"
237− id="tspan4367">TTName</tspan> (<tspan
238− style="fill:#0000ff"
239− id="tspan4363">Binder TT</tspan>) <tspan
240− style="fill:#0000ff"
241− id="tspan4365"> TT</tspan></tspan></text>
242− <text
243− sodipodi:linespacing="125%"
244− id="text6807"
245− y="127.36218"
246− x="207"
247− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
248− xml:space="preserve"
249− inkscape:export-xdpi="61.120499"
250− inkscape:export-ydpi="61.120499"><tspan
251− y="127.36218"
252− x="207"
253− sodipodi:role="line"
254− id="tspan6813"
255− style="font-size:15px;fill:#0000ff">lhs:a</tspan><tspan
256− y="146.11218"
257− x="207"
258− sodipodi:role="line"
259− style="font-size:15px;fill:#0000ff"
260− id="tspan4330">rhs:a</tspan></text>
261− <text
262− sodipodi:linespacing="125%"
263− id="text6815"
264− y="96.362183"
265− x="201"
266− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
267− xml:space="preserve"
268− inkscape:export-xdpi="61.120499"
269− inkscape:export-ydpi="61.120499"><tspan
270− y="96.362183"
271− x="201"
272− sodipodi:role="line"
273− id="tspan6817"
274− style="font-size:15px;fill:#0000ff">FunClause</tspan></text>
275− <rect
276− inkscape:export-ydpi="61.120499"
277− inkscape:export-xdpi="61.120499"
278− y="177.36218"
279− x="153"
280− height="142"
281− width="350"
282− id="rect4332"
283− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
284− <text
285− inkscape:export-ydpi="61.120499"
286− inkscape:export-xdpi="61.120499"
287− xml:space="preserve"
288− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
289− x="162"
290− y="168.36218"
291− id="text4340"
292− sodipodi:linespacing="125%"><tspan
293− style="font-size:15px;fill:#0000ff"
294− id="tspan4342"
295− sodipodi:role="line"
296− x="162"
297− y="168.36218">Raw</tspan></text>
298− <path
299− inkscape:export-ydpi="61.120499"
300− inkscape:export-xdpi="61.120499"
301− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4349)"
302− d="m 247,145.3622 c 28.96221,0.27049 22.31485,19.06346 -7,48"
303− id="path4346"
304− inkscape:connector-curvature="0"
305− sodipodi:nodetypes="cc" />
306− <text
307− inkscape:export-ydpi="61.120499"
308− inkscape:export-xdpi="61.120499"
309− sodipodi:linespacing="125%"
310− id="text4333"
311− y="362.36218"
312− x="343"
313− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
314− xml:space="preserve"><tspan
315− y="362.36218"
316− x="343"
317− sodipodi:role="line"
318− id="tspan4335"
319− style="font-size:15px;fill:#ff0000">PVar <tspan
320− style="fill:#0000ff"
321− id="tspan4415">a</tspan> (<tspan
322− style="fill:#0000ff"
323− id="tspan4369">Binder a</tspan>)</tspan></text>
324− <path
325− sodipodi:nodetypes="cc"
326− inkscape:connector-curvature="0"
327− id="path4337"
328− d="m 336,214.3622 0,158"
329− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4407)"
330− inkscape:export-xdpi="61.120499"
331− inkscape:export-ydpi="61.120499" />
332− <text
333− xml:space="preserve"
334− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
335− x="439"
336− y="196.36218"
337− id="text4339"
338− sodipodi:linespacing="125%"
339− inkscape:export-xdpi="61.120499"
340− inkscape:export-ydpi="61.120499"><tspan
341− style="font-size:15px;fill:#ff0000"
342− id="tspan4341"
343− sodipodi:role="line"
344− x="439"
345− y="196.36218">RApp Raw Raw</tspan></text>
346− <path
347− inkscape:export-ydpi="61.120499"
348− inkscape:export-xdpi="61.120499"
349− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4359)"
350− d="m 396,216.3622 c 22.67213,51.77028 75.6614,-87.82153 4,-37"
351− id="path4343"
352− inkscape:connector-curvature="0"
353− sodipodi:nodetypes="cc" />
354− <rect
355− style="opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
356− id="rect4381"
357− width="314"
358− height="63"
359− x="152"
360− y="373.36218"
361− inkscape:export-xdpi="61.120499"
362− inkscape:export-ydpi="61.120499" />
363− <text
364− sodipodi:linespacing="125%"
365− id="text4383"
366− y="364.36218"
367− x="161"
368− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
369− xml:space="preserve"
370− inkscape:export-xdpi="61.120499"
371− inkscape:export-ydpi="61.120499"><tspan
372− y="364.36218"
373− x="161"
374− sodipodi:role="line"
375− id="tspan4385"
376− style="font-size:15px;fill:#0000ff">Binder a</tspan></text>
377− <text
378− xml:space="preserve"
379− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
380− x="208"
381− y="254.36218"
382− id="text4417"
383− sodipodi:linespacing="125%"
384− inkscape:export-xdpi="61.120499"
385− inkscape:export-ydpi="61.120499"><tspan
386− style="font-size:15px;fill:#ff0000"
387− id="tspan4419"
388− sodipodi:role="line"
389− x="208"
390− y="254.36218">`{{code}}</tspan></text>
391− <text
392− inkscape:export-ydpi="61.120499"
393− inkscape:export-xdpi="61.120499"
394− sodipodi:linespacing="125%"
395− id="text4421"
396− y="275.36218"
397− x="242"
398− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
399− xml:space="preserve"><tspan
400− y="275.36218"
401− x="242"
402− sodipodi:role="line"
403− id="tspan4423"
404− style="font-size:15px;fill:#ff0000">`{{body}}</tspan></text>
405− <path
406− inkscape:export-ydpi="61.120499"
407− inkscape:export-xdpi="61.120499"
408− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4427)"
409− d="m 266,218.3622 -26,17"
410− id="path4425"
411− inkscape:connector-curvature="0"
412− sodipodi:nodetypes="cc" />
413− <path
414− sodipodi:nodetypes="cc"
415− inkscape:connector-curvature="0"
416− id="path4431"
417− d="m 272,217.3622 9,42"
418− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4433)"
419− inkscape:export-xdpi="61.120499"
420− inkscape:export-ydpi="61.120499" />
421− <path
422− sodipodi:nodetypes="cc"
423− inkscape:connector-curvature="0"
424− id="path4437"
425− d="m 248,124.3622 c 30.28183,6.20207 31.24081,36.56361 -10,70"
426− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4439)"
427− inkscape:export-xdpi="61.120499"
428− inkscape:export-ydpi="61.120499" />
429− </g>
430−</svg>
docs/image/idrisTopLevel.pngdeleted

Binary file not shown.

docs/image/idrisTopLevel.svgdeleted−524
@@ -1,524 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="idrisTopLevel.svg">
19− <defs
20− id="defs4">
21− <marker
22− inkscape:stockid="Arrow1Mend"
23− orient="auto"
24− refY="0.0"
25− refX="0.0"
26− id="marker4198"
27− style="overflow:visible;"
28− inkscape:isstock="true">
29− <path
30− id="path4200"
31− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
32− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
33− transform="scale(0.4) rotate(180) translate(10,0)" />
34− </marker>
35− <marker
36− inkscape:isstock="true"
37− style="overflow:visible;"
38− id="marker4203"
39− refX="0.0"
40− refY="0.0"
41− orient="auto"
42− inkscape:stockid="Arrow1Mend"
43− inkscape:collect="always">
44− <path
45− transform="scale(0.4) rotate(180) translate(10,0)"
46− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
47− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
48− id="path4205" />
49− </marker>
50− <marker
51− inkscape:stockid="Arrow1Mend"
52− orient="auto"
53− refY="0.0"
54− refX="0.0"
55− id="marker4197"
56− style="overflow:visible;"
57− inkscape:isstock="true"
58− inkscape:collect="always">
59− <path
60− id="path4199"
61− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
62− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
63− transform="scale(0.4) rotate(180) translate(10,0)" />
64− </marker>
65− <marker
66− inkscape:stockid="Arrow1Mend"
67− orient="auto"
68− refY="0.0"
69− refX="0.0"
70− id="marker4182"
71− style="overflow:visible;"
72− inkscape:isstock="true">
73− <path
74− id="path4184"
75− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
76− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
77− transform="scale(0.4) rotate(180) translate(10,0)" />
78− </marker>
79− <marker
80− inkscape:isstock="true"
81− style="overflow:visible;"
82− id="marker4176"
83− refX="0.0"
84− refY="0.0"
85− orient="auto"
86− inkscape:stockid="Arrow1Mend"
87− inkscape:collect="always">
88− <path
89− transform="scale(0.4) rotate(180) translate(10,0)"
90− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
91− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
92− id="path4178" />
93− </marker>
94− <marker
95− inkscape:stockid="Arrow1Mend"
96− orient="auto"
97− refY="0.0"
98− refX="0.0"
99− id="marker4830"
100− style="overflow:visible;"
101− inkscape:isstock="true"
102− inkscape:collect="always">
103− <path
104− id="path4832"
105− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
106− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
107− transform="scale(0.4) rotate(180) translate(10,0)" />
108− </marker>
109− <marker
110− inkscape:stockid="Arrow1Mend"
111− orient="auto"
112− refY="0.0"
113− refX="0.0"
114− id="Arrow1Mend"
115− style="overflow:visible;"
116− inkscape:isstock="true"
117− inkscape:collect="always">
118− <path
119− id="path4175"
120− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
121− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
122− transform="scale(0.4) rotate(180) translate(10,0)" />
123− </marker>
124− </defs>
125− <sodipodi:namedview
126− id="base"
127− pagecolor="#ffffff"
128− bordercolor="#666666"
129− borderopacity="1.0"
130− inkscape:pageopacity="0.0"
131− inkscape:pageshadow="2"
132− inkscape:zoom="1"
133− inkscape:cx="353.5"
134− inkscape:cy="669.5"
135− inkscape:document-units="px"
136− inkscape:current-layer="layer1"
137− showgrid="false"
138− inkscape:window-width="1744"
139− inkscape:window-height="1011"
140− inkscape:window-x="-4"
141− inkscape:window-y="0"
142− inkscape:window-maximized="0" />
143− <metadata
144− id="metadata7">
145− <rdf:RDF>
146− <cc:Work
147− rdf:about="">
148− <dc:format>image/svg+xml</dc:format>
149− <dc:type
150− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
151− <dc:title />
152− </cc:Work>
153− </rdf:RDF>
154− </metadata>
155− <g
156− inkscape:label="Layer 1"
157− inkscape:groupmode="layer"
158− id="layer1">
159− <text
160− xml:space="preserve"
161− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
162− x="21"
163− y="411.36221"
164− id="text4136"
165− sodipodi:linespacing="125%"
166− inkscape:export-xdpi="61.120499"
167− inkscape:export-ydpi="61.120499"><tspan
168− sodipodi:role="line"
169− id="tspan4138"
170− x="21"
171− y="411.36221"
172− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:25px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000">Idris</tspan></text>
173− <text
174− sodipodi:linespacing="125%"
175− id="text4140"
176− y="411.36221"
177− x="203"
178− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
179− xml:space="preserve"
180− inkscape:export-xdpi="61.120499"
181− inkscape:export-ydpi="61.120499"><tspan
182− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:25px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
183− y="411.36221"
184− x="203"
185− id="tspan4142"
186− sodipodi:role="line">Idris</tspan></text>
187− <text
188− xml:space="preserve"
189− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
190− x="253"
191− y="402.36218"
192− id="text4144"
193− sodipodi:linespacing="125%"
194− inkscape:export-xdpi="61.120499"
195− inkscape:export-ydpi="61.120499"><tspan
196− sodipodi:role="line"
197− id="tspan4146"
198− x="253"
199− y="402.36218"
200− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:25px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;">~</tspan></text>
201− <text
202− sodipodi:linespacing="125%"
203− id="text4148"
204− y="411.60635"
205− x="451"
206− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
207− xml:space="preserve"
208− inkscape:export-xdpi="61.120499"
209− inkscape:export-ydpi="61.120499"><tspan
210− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:25px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
211− y="411.60635"
212− x="451"
213− id="tspan4150"
214− sodipodi:role="line">TT</tspan></text>
215− <text
216− xml:space="preserve"
217− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
218− x="610"
219− y="411.36221"
220− id="text4152"
221− sodipodi:linespacing="125%"
222− inkscape:export-xdpi="61.120499"
223− inkscape:export-ydpi="61.120499"><tspan
224− sodipodi:role="line"
225− id="tspan4154"
226− x="610"
227− y="411.36221"
228− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:25px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000">Executable</tspan></text>
229− <text
230− sodipodi:linespacing="125%"
231− id="text4156"
232− y="436.36218"
233− x="80"
234− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
235− xml:space="preserve"
236− inkscape:export-xdpi="61.120499"
237− inkscape:export-ydpi="61.120499"><tspan
238− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
239− y="436.36218"
240− x="80"
241− id="tspan4158"
242− sodipodi:role="line">desugaring</tspan></text>
243− <path
244− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
245− d="M 81.977612,407.11261 188,407.3622"
246− id="path4160"
247− inkscape:connector-curvature="0"
248− inkscape:export-xdpi="61.120499"
249− inkscape:export-ydpi="61.120499"
250− sodipodi:nodetypes="cc" />
251− <text
252− xml:space="preserve"
253− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
254− x="281"
255− y="432.36218"
256− id="text4790"
257− sodipodi:linespacing="125%"
258− inkscape:export-xdpi="61.120499"
259− inkscape:export-ydpi="61.120499"><tspan
260− sodipodi:role="line"
261− id="tspan4792"
262− x="281"
263− y="432.36218"
264− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">elaboration</tspan></text>
265− <text
266− sodipodi:linespacing="125%"
267− id="text4824"
268− y="394.36218"
269− x="498"
270− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
271− xml:space="preserve"
272− inkscape:export-xdpi="61.120499"
273− inkscape:export-ydpi="61.120499"><tspan
274− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
275− y="394.36218"
276− x="498"
277− id="tspan4826"
278− sodipodi:role="line">compilation</tspan></text>
279− <path
280− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4830)"
281− d="m 495,405.33981 105,0.0224"
282− id="path4828"
283− inkscape:connector-curvature="0"
284− inkscape:export-xdpi="61.120499"
285− inkscape:export-ydpi="61.120499"
286− sodipodi:nodetypes="cc" />
287− <text
288− inkscape:export-ydpi="61.120499"
289− inkscape:export-xdpi="61.120499"
290− sodipodi:linespacing="125%"
291− id="text4166"
292− y="442.36218"
293− x="609"
294− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
295− xml:space="preserve"><tspan
296− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:25px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
297− y="442.36218"
298− x="609"
299− id="tspan4168"
300− sodipodi:role="line">C</tspan></text>
301− <text
302− xml:space="preserve"
303− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
304− x="609"
305− y="475.36218"
306− id="text4170"
307− sodipodi:linespacing="125%"
308− inkscape:export-xdpi="61.120499"
309− inkscape:export-ydpi="61.120499"><tspan
310− sodipodi:role="line"
311− id="tspan4172"
312− x="609"
313− y="475.36218"
314− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:25px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000">JS</tspan></text>
315− <path
316− inkscape:export-ydpi="61.120499"
317− inkscape:export-xdpi="61.120499"
318− inkscape:connector-curvature="0"
319− id="path4174"
320− d="m 495,406.3622 104,26"
321− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:8, 2;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker4176)"
322− sodipodi:nodetypes="cc" />
323− <path
324− sodipodi:nodetypes="cc"
325− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:12, 2;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker4182)"
326− d="M 495,405.90781 599,467.3622"
327− id="path4180"
328− inkscape:connector-curvature="0"
329− inkscape:export-xdpi="61.120499"
330− inkscape:export-ydpi="61.120499" />
331− <text
332− inkscape:export-ydpi="61.120499"
333− inkscape:export-xdpi="61.120499"
334− xml:space="preserve"
335− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
336− x="20"
337− y="523.36218"
338− id="text4186"
339− sodipodi:linespacing="125%"><tspan
340− sodipodi:role="line"
341− x="20"
342− y="523.36218"
343− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
344− id="tspan4190">Add implicitly quantified variables.</tspan><tspan
345− sodipodi:role="line"
346− x="20"
347− y="542.11218"
348− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
349− id="tspan4191">Conditional expressions replaced by function calls.</tspan></text>
350− <path
351− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
352− d="m 120.29902,440.01416 0.098,70.81863"
353− id="path4192"
354− inkscape:connector-curvature="0"
355− inkscape:export-xdpi="61.120499"
356− inkscape:export-ydpi="61.120499"
357− sodipodi:nodetypes="cc" />
358− <text
359− sodipodi:linespacing="125%"
360− id="text4194"
361− y="367.36218"
362− x="358"
363− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
364− xml:space="preserve"
365− inkscape:export-xdpi="61.120499"
366− inkscape:export-ydpi="61.120499"><tspan
367− id="tspan4198"
368− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
369− y="367.36218"
370− x="358"
371− sodipodi:role="line">proof tactics</tspan></text>
372− <path
373− inkscape:connector-curvature="0"
374− id="path4202"
375− d="m 382.73881,368.53384 0.16418,32.3209"
376− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
377− sodipodi:nodetypes="cc"
378− inkscape:export-xdpi="61.120499"
379− inkscape:export-ydpi="61.120499" />
380− <path
381− inkscape:export-ydpi="61.120499"
382− inkscape:export-xdpi="61.120499"
383− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4197)"
384− d="m 277,403.3622 37.7728,-0.0912"
385− id="path4195"
386− inkscape:connector-curvature="0"
387− sodipodi:nodetypes="cc" />
388− <path
389− sodipodi:nodetypes="cc"
390− inkscape:connector-curvature="0"
391− id="path4201"
392− d="m 335,403.15739 37.8864,-0.31841"
393− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4203)"
394− inkscape:export-xdpi="61.120499"
395− inkscape:export-ydpi="61.120499" />
396− <text
397− inkscape:export-ydpi="61.120499"
398− inkscape:export-xdpi="61.120499"
399− xml:space="preserve"
400− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
401− x="215"
402− y="340.36218"
403− id="text4207"
404− sodipodi:linespacing="125%"><tspan
405− sodipodi:role="line"
406− x="215"
407− y="340.36218"
408− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
409− id="tspan4209">during elaboration</tspan><tspan
410− sodipodi:role="line"
411− x="215"
412− y="359.11218"
413− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
414− id="tspan4213">may contain holes</tspan><tspan
415− sodipodi:role="line"
416− x="215"
417− y="377.86218"
418− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
419− id="tspan4199">and guesses</tspan></text>
420− <path
421− inkscape:export-ydpi="61.120499"
422− inkscape:export-xdpi="61.120499"
423− sodipodi:nodetypes="cc"
424− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
425− d="m 324,399.3622 0.11194,-38.03731"
426− id="path4211"
427− inkscape:connector-curvature="0" />
428− <text
429− sodipodi:linespacing="125%"
430− id="text4215"
431− y="461.36218"
432− x="233"
433− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
434− xml:space="preserve"
435− inkscape:export-xdpi="61.120499"
436− inkscape:export-ydpi="61.120499"><tspan
437− id="tspan4217"
438− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
439− y="461.36218"
440− x="233"
441− sodipodi:role="line">Make explicit all types.</tspan><tspan
442− id="tspan4223"
443− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
444− y="480.11218"
445− x="233"
446− sodipodi:role="line">Make explicit function and </tspan><tspan
447− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
448− y="498.86218"
449− x="233"
450− sodipodi:role="line"
451− id="tspan4235"> pattern match variables.</tspan></text>
452− <path
453− inkscape:export-ydpi="61.120499"
454− inkscape:export-xdpi="61.120499"
455− sodipodi:nodetypes="cc"
456− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
457− d="m 323.7402,434.372 0.0637,16.14706"
458− id="path4237"
459− inkscape:connector-curvature="0" />
460− <path
461− inkscape:export-ydpi="61.120499"
462− inkscape:export-xdpi="61.120499"
463− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4198)"
464− d="m 395,402.49819 45.38391,-0.31841"
465− id="path4196"
466− inkscape:connector-curvature="0"
467− sodipodi:nodetypes="cc" />
468− <text
469− inkscape:export-ydpi="61.120499"
470− inkscape:export-xdpi="61.120499"
471− xml:space="preserve"
472− style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
473− x="431"
474− y="465.36218"
475− id="text4202"
476− sodipodi:linespacing="125%"><tspan
477− sodipodi:role="line"
478− x="431"
479− y="465.36218"
480− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
481− id="tspan4204">type checker</tspan><tspan
482− sodipodi:role="line"
483− x="431"
484− y="484.11218"
485− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'"
486− id="tspan4208">Raw -&gt; TT</tspan></text>
487− <path
488− inkscape:export-ydpi="61.120499"
489− inkscape:export-xdpi="61.120499"
490− sodipodi:nodetypes="cc"
491− style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
492− d="m 421,411.3622 39,40"
493− id="path4206"
494− inkscape:connector-curvature="0" />
495− <text
496− inkscape:export-ydpi="61.120499"
497− inkscape:export-xdpi="61.120499"
498− xml:space="preserve"
499− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
500− x="378"
501− y="417.36218"
502− id="text4203"
503− sodipodi:linespacing="125%"><tspan
504− sodipodi:role="line"
505− id="tspan4205"
506− x="378"
507− y="417.36218"
508− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000">Raw</tspan></text>
509− <text
510− sodipodi:linespacing="125%"
511− id="text4205"
512− y="432.36218"
513− x="201"
514− style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
515− xml:space="preserve"
516− inkscape:export-xdpi="61.120499"
517− inkscape:export-ydpi="61.120499"><tspan
518− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000"
519− y="432.36218"
520− x="201"
521− id="tspan4207"
522− sodipodi:role="line">PTerm</tspan></text>
523− </g>
524−</svg>
docs/image/parserModules.pngdeleted

Binary file not shown.

docs/image/parserModules.svgdeleted−1251
@@ -1,1251 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 210 297"
15− version="1.1"
16− id="svg8"
17− inkscape:version="0.92.2 5c3e80d, 2017-08-06"
18− sodipodi:docname="parserModules.svg">
19− <defs
20− id="defs2">
21− <marker
22− inkscape:isstock="true"
23− style="overflow:visible;"
24− id="marker1078"
25− refX="0.0"
26− refY="0.0"
27− orient="auto"
28− inkscape:stockid="Arrow1Mend">
29− <path
30− transform="scale(0.4) rotate(180) translate(10,0)"
31− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
32− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
33− id="path1076" />
34− </marker>
35− <marker
36− inkscape:isstock="true"
37− style="overflow:visible"
38− id="marker1074"
39− refX="0.0"
40− refY="0.0"
41− orient="auto"
42− inkscape:stockid="Arrow1Mstart">
43− <path
44− transform="scale(0.4) translate(10,0)"
45− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
46− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
47− id="path1072" />
48− </marker>
49− <marker
50− inkscape:stockid="Arrow1Mend"
51− orient="auto"
52− refY="0.0"
53− refX="0.0"
54− id="marker1021"
55− style="overflow:visible;"
56− inkscape:isstock="true"
57− inkscape:collect="always">
58− <path
59− id="path1019"
60− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
61− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
62− transform="scale(0.4) rotate(180) translate(10,0)" />
63− </marker>
64− <marker
65− inkscape:stockid="Arrow1Mstart"
66− orient="auto"
67− refY="0.0"
68− refX="0.0"
69− id="marker1017"
70− style="overflow:visible"
71− inkscape:isstock="true"
72− inkscape:collect="always">
73− <path
74− id="path1015"
75− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
76− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
77− transform="scale(0.4) translate(10,0)" />
78− </marker>
79− <marker
80− inkscape:isstock="true"
81− style="overflow:visible;"
82− id="marker973"
83− refX="0.0"
84− refY="0.0"
85− orient="auto"
86− inkscape:stockid="Arrow1Mend"
87− inkscape:collect="always">
88− <path
89− transform="scale(0.4) rotate(180) translate(10,0)"
90− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
91− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
92− id="path971" />
93− </marker>
94− <marker
95− inkscape:isstock="true"
96− style="overflow:visible"
97− id="marker969"
98− refX="0.0"
99− refY="0.0"
100− orient="auto"
101− inkscape:stockid="Arrow1Mstart"
102− inkscape:collect="always">
103− <path
104− transform="scale(0.4) translate(10,0)"
105− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
106− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
107− id="path967" />
108− </marker>
109− <marker
110− inkscape:stockid="Arrow1Mend"
111− orient="auto"
112− refY="0.0"
113− refX="0.0"
114− id="Arrow1Mend"
115− style="overflow:visible;"
116− inkscape:isstock="true"
117− inkscape:collect="always">
118− <path
119− id="path1214"
120− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
121− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
122− transform="scale(0.4) rotate(180) translate(10,0)" />
123− </marker>
124− <marker
125− inkscape:stockid="Arrow1Mstart"
126− orient="auto"
127− refY="0.0"
128− refX="0.0"
129− id="Arrow1Mstart"
130− style="overflow:visible"
131− inkscape:isstock="true"
132− inkscape:collect="always">
133− <path
134− id="path1211"
135− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
136− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
137− transform="scale(0.4) translate(10,0)" />
138− </marker>
139− <marker
140− inkscape:isstock="true"
141− style="overflow:visible;"
142− id="marker1000"
143− refX="0.0"
144− refY="0.0"
145− orient="auto"
146− inkscape:stockid="Arrow1Mend">
147− <path
148− transform="scale(0.4) rotate(180) translate(10,0)"
149− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
150− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
151− id="path998" />
152− </marker>
153− <marker
154− inkscape:isstock="true"
155− style="overflow:visible;"
156− id="marker1127"
157− refX="0.0"
158− refY="0.0"
159− orient="auto"
160− inkscape:stockid="Arrow1Mend">
161− <path
162− transform="scale(0.4) rotate(180) translate(10,0)"
163− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
164− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
165− id="path1125" />
166− </marker>
167− <marker
168− inkscape:isstock="true"
169− style="overflow:visible;"
170− id="marker1123"
171− refX="0.0"
172− refY="0.0"
173− orient="auto"
174− inkscape:stockid="Arrow1Mend">
175− <path
176− transform="scale(0.4) rotate(180) translate(10,0)"
177− style="fill-rule:evenodd;stroke:#00aa3f;stroke-width:1pt;stroke-opacity:1;fill:#00aa3f;fill-opacity:1"
178− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
179− id="path1121" />
180− </marker>
181− <marker
182− inkscape:isstock="true"
183− style="overflow:visible;"
184− id="marker1117"
185− refX="0.0"
186− refY="0.0"
187− orient="auto"
188− inkscape:stockid="Arrow1Mend">
189− <path
190− transform="scale(0.4) rotate(180) translate(10,0)"
191− style="fill-rule:evenodd;stroke:#00aa3f;stroke-width:1pt;stroke-opacity:1;fill:#00aa3f;fill-opacity:1"
192− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
193− id="path1115" />
194− </marker>
195− <marker
196− inkscape:stockid="Arrow1Mend"
197− orient="auto"
198− refY="0.0"
199− refX="0.0"
200− id="marker1111"
201− style="overflow:visible;"
202− inkscape:isstock="true"
203− inkscape:collect="always">
204− <path
205− id="path1109"
206− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
207− style="fill-rule:evenodd;stroke:#00aa3f;stroke-width:1pt;stroke-opacity:1;fill:#00aa3f;fill-opacity:1"
208− transform="scale(0.4) rotate(180) translate(10,0)" />
209− </marker>
210− <marker
211− inkscape:isstock="true"
212− style="overflow:visible;"
213− id="marker1105"
214− refX="0.0"
215− refY="0.0"
216− orient="auto"
217− inkscape:stockid="Arrow1Mend"
218− inkscape:collect="always">
219− <path
220− transform="scale(0.4) rotate(180) translate(10,0)"
221− style="fill-rule:evenodd;stroke:#00aa3f;stroke-width:1pt;stroke-opacity:1;fill:#00aa3f;fill-opacity:1"
222− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
223− id="path1103" />
224− </marker>
225− <marker
226− inkscape:isstock="true"
227− style="overflow:visible;"
228− id="marker1057"
229− refX="0.0"
230− refY="0.0"
231− orient="auto"
232− inkscape:stockid="Arrow1Mend">
233− <path
234− transform="scale(0.4) rotate(180) translate(10,0)"
235− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
236− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
237− id="path1055" />
238− </marker>
239− <marker
240− inkscape:stockid="Arrow1Mend"
241− orient="auto"
242− refY="0.0"
243− refX="0.0"
244− id="marker1045"
245− style="overflow:visible;"
246− inkscape:isstock="true"
247− inkscape:collect="always">
248− <path
249− id="path1043"
250− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
251− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
252− transform="scale(0.4) rotate(180) translate(10,0)" />
253− </marker>
254− <marker
255− inkscape:stockid="Arrow1Mend"
256− orient="auto"
257− refY="0.0"
258− refX="0.0"
259− id="marker1033"
260− style="overflow:visible;"
261− inkscape:isstock="true">
262− <path
263− id="path1031"
264− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
265− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
266− transform="scale(0.4) rotate(180) translate(10,0)" />
267− </marker>
268− <marker
269− inkscape:stockid="Arrow1Mend"
270− orient="auto"
271− refY="0.0"
272− refX="0.0"
273− id="marker1027"
274− style="overflow:visible;"
275− inkscape:isstock="true">
276− <path
277− id="path1025"
278− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
279− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
280− transform="scale(0.4) rotate(180) translate(10,0)" />
281− </marker>
282− <marker
283− inkscape:isstock="true"
284− style="overflow:visible;"
285− id="marker1015"
286− refX="0.0"
287− refY="0.0"
288− orient="auto"
289− inkscape:stockid="Arrow1Mend"
290− inkscape:collect="always">
291− <path
292− transform="scale(0.4) rotate(180) translate(10,0)"
293− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
294− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
295− id="path1013" />
296− </marker>
297− <marker
298− inkscape:isstock="true"
299− style="overflow:visible;"
300− id="marker1009"
301− refX="0.0"
302− refY="0.0"
303− orient="auto"
304− inkscape:stockid="Arrow1Mend">
305− <path
306− transform="scale(0.4) rotate(180) translate(10,0)"
307− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
308− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
309− id="path1007" />
310− </marker>
311− <marker
312− inkscape:isstock="true"
313− style="overflow:visible;"
314− id="marker1003"
315− refX="0.0"
316− refY="0.0"
317− orient="auto"
318− inkscape:stockid="Arrow1Mend">
319− <path
320− transform="scale(0.4) rotate(180) translate(10,0)"
321− style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
322− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
323− id="path1001" />
324− </marker>
325− <marker
326− inkscape:stockid="Arrow1Mend"
327− orient="auto"
328− refY="0.0"
329− refX="0.0"
330− id="marker997"
331− style="overflow:visible;"
332− inkscape:isstock="true"
333− inkscape:collect="always">
334− <path
335− id="path995"
336− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
337− style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
338− transform="scale(0.4) rotate(180) translate(10,0)" />
339− </marker>
340− <marker
341− inkscape:isstock="true"
342− style="overflow:visible;"
343− id="marker991"
344− refX="0.0"
345− refY="0.0"
346− orient="auto"
347− inkscape:stockid="Arrow1Mend"
348− inkscape:collect="always">
349− <path
350− transform="scale(0.4) rotate(180) translate(10,0)"
351− style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
352− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
353− id="path989" />
354− </marker>
355− <marker
356− inkscape:stockid="Arrow1Mend"
357− orient="auto"
358− refY="0.0"
359− refX="0.0"
360− id="marker967"
361− style="overflow:visible;"
362− inkscape:isstock="true"
363− inkscape:collect="always">
364− <path
365− id="path965"
366− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
367− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
368− transform="scale(0.4) rotate(180) translate(10,0)" />
369− </marker>
370− <marker
371− inkscape:isstock="true"
372− style="overflow:visible;"
373− id="marker961"
374− refX="0.0"
375− refY="0.0"
376− orient="auto"
377− inkscape:stockid="Arrow1Mend"
378− inkscape:collect="always">
379− <path
380− transform="scale(0.4) rotate(180) translate(10,0)"
381− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
382− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
383− id="path959" />
384− </marker>
385− <marker
386− inkscape:isstock="true"
387− style="overflow:visible;"
388− id="marker3617"
389− refX="0.0"
390− refY="0.0"
391− orient="auto"
392− inkscape:stockid="Arrow1Mend">
393− <path
394− transform="scale(0.4) rotate(180) translate(10,0)"
395− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
396− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
397− id="path3615" />
398− </marker>
399− <marker
400− inkscape:stockid="Arrow1Mend"
401− orient="auto"
402− refY="0.0"
403− refX="0.0"
404− id="marker2049"
405− style="overflow:visible;"
406− inkscape:isstock="true"
407− inkscape:collect="always">
408− <path
409− id="path2047"
410− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
411− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
412− transform="scale(0.4) rotate(180) translate(10,0)" />
413− </marker>
414− <marker
415− inkscape:isstock="true"
416− style="overflow:visible;"
417− id="marker1539"
418− refX="0.0"
419− refY="0.0"
420− orient="auto"
421− inkscape:stockid="Arrow1Mend"
422− inkscape:collect="always">
423− <path
424− transform="scale(0.4) rotate(180) translate(10,0)"
425− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
426− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
427− id="path1537" />
428− </marker>
429− </defs>
430− <sodipodi:namedview
431− id="base"
432− pagecolor="#ffffff"
433− bordercolor="#666666"
434− borderopacity="1.0"
435− inkscape:pageopacity="0.0"
436− inkscape:pageshadow="2"
437− inkscape:zoom="1"
438− inkscape:cx="368.33949"
439− inkscape:cy="547.05121"
440− inkscape:document-units="mm"
441− inkscape:current-layer="layer1"
442− showgrid="false"
443− inkscape:window-width="1800"
444− inkscape:window-height="1011"
445− inkscape:window-x="86"
446− inkscape:window-y="0"
447− inkscape:window-maximized="0"
448− inkscape:snap-nodes="false" />
449− <metadata
450− id="metadata5">
451− <rdf:RDF>
452− <cc:Work
453− rdf:about="">
454− <dc:format>image/svg+xml</dc:format>
455− <dc:type
456− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
457− <dc:title />
458− </cc:Work>
459− </rdf:RDF>
460− </metadata>
461− <g
462− inkscape:label="Layer 1"
463− inkscape:groupmode="layer"
464− id="layer1">
465− <text
466− inkscape:export-ydpi="61.120499"
467− inkscape:export-xdpi="61.120499"
468− id="text854"
469− y="119.72919"
470− x="131.23334"
471− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
472− xml:space="preserve"><tspan
473− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
474− y="129.46077"
475− x="131.23334"
476− id="tspan852"
477− sodipodi:role="line" /></text>
478− <rect
479− inkscape:export-ydpi="61.120499"
480− inkscape:export-xdpi="61.120499"
481− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
482− id="rect875"
483− width="43.656246"
484− height="18.520832"
485− x="92.339577"
486− y="110.20418" />
487− <path
488− inkscape:export-ydpi="61.120499"
489− inkscape:export-xdpi="61.120499"
490− inkscape:connector-curvature="0"
491− id="path881"
492− d="m 135.73129,118.93554 16.66875,-0.26459"
493− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2049)" />
494− <text
495− inkscape:export-ydpi="61.120499"
496− inkscape:export-xdpi="61.120499"
497− id="text895"
498− y="115.76046"
499− x="138.37698"
500− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
501− xml:space="preserve"><tspan
502− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
503− y="115.76046"
504− x="138.37698"
505− id="tspan893"
506− sodipodi:role="line">PTerm</tspan></text>
507− <text
508− inkscape:export-ydpi="61.120499"
509− inkscape:export-xdpi="61.120499"
510− id="text903"
511− y="115.23129"
512− x="93.927078"
513− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
514− xml:space="preserve"><tspan
515− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332"
516− y="115.23129"
517− x="93.927078"
518− id="tspan901"
519− sodipodi:role="line">module Idris.Parser</tspan><tspan
520− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332"
521− y="128.46045"
522− x="93.927078"
523− sodipodi:role="line"
524− id="tspan1021" /></text>
525− <rect
526− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
527− id="rect905"
528− width="44.185421"
529− height="18.785423"
530− x="40.463421"
531− y="141.50723"
532− inkscape:export-xdpi="61.120499"
533− inkscape:export-ydpi="61.120499" />
534− <rect
535− y="155.183"
536− x="95.51458"
537− height="18.256256"
538− width="49.212498"
539− id="rect907"
540− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
541− inkscape:export-xdpi="61.120499"
542− inkscape:export-ydpi="61.120499" />
543− <path
544− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker961)"
545− d="m 84.648837,152.88468 9.013662,7.32603"
546− id="path909"
547− inkscape:connector-curvature="0"
548− inkscape:export-xdpi="61.120499"
549− inkscape:export-ydpi="61.120499"
550− sodipodi:nodetypes="cc" />
551− <path
552− inkscape:connector-curvature="0"
553− id="path911"
554− d="m 22.471756,152.09108 16.66875,-0.26459"
555− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1539)"
556− inkscape:export-xdpi="61.120499"
557− inkscape:export-ydpi="61.120499" />
558− <text
559− xml:space="preserve"
560− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
561− x="24.059256"
562− y="148.91547"
563− id="text917"
564− inkscape:export-xdpi="61.120499"
565− inkscape:export-ydpi="61.120499"><tspan
566− sodipodi:role="line"
567− id="tspan915"
568− x="24.059256"
569− y="148.91547"
570− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332">String</tspan></text>
571− <text
572− id="text923"
573− y="137.72075"
574− x="65.087494"
575− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
576− xml:space="preserve"
577− inkscape:export-xdpi="61.120499"
578− inkscape:export-ydpi="61.120499"><tspan
579− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
580− y="137.72075"
581− x="65.087494"
582− sodipodi:role="line"
583− id="tspan921">List (TokenData Token)</tspan></text>
584− <text
585− id="text931"
586− y="218.41846"
587− x="36.512497"
588− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332;"
589− xml:space="preserve"
590− inkscape:export-xdpi="61.120499"
591− inkscape:export-ydpi="61.120499"><tspan
592− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332;"
593− y="218.41846"
594− x="36.512497"
595− id="tspan929"
596− sodipodi:role="line">module Text.Lexer</tspan></text>
597− <text
598− xml:space="preserve"
599− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
600− x="98.160408"
601− y="161.00386"
602− id="text935"
603− inkscape:export-xdpi="61.120499"
604− inkscape:export-ydpi="61.120499"><tspan
605− sodipodi:role="line"
606− id="tspan933"
607− x="98.160408"
608− y="161.00386"
609− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332">module Parser.Support</tspan></text>
610− <rect
611− inkscape:export-ydpi="61.120499"
612− inkscape:export-xdpi="61.120499"
613− y="214.18488"
614− x="32.01458"
615− height="6.3500061"
616− width="43.656254"
617− id="rect937"
618− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
619− <rect
620− inkscape:export-ydpi="61.120499"
621− inkscape:export-xdpi="61.120499"
622− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
623− id="rect939"
624− width="42.862495"
625− height="6.8791728"
626− x="94.985413"
627− y="214.18488" />
628− <text
629− inkscape:export-ydpi="61.120499"
630− inkscape:export-xdpi="61.120499"
631− xml:space="preserve"
632− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
633− x="42.31551"
634− y="147.59224"
635− id="text951"><tspan
636− sodipodi:role="line"
637− id="tspan949"
638− x="42.31551"
639− y="147.59224"
640− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332">module Parser.Lexer</tspan></text>
641− <path
642− sodipodi:nodetypes="cc"
643− inkscape:export-ydpi="61.120499"
644− inkscape:export-xdpi="61.120499"
645− inkscape:connector-curvature="0"
646− id="path963"
647− d="m 53.299561,213.22831 1.53604,-51.85834"
648− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker967)" />
649− <text
650− inkscape:export-ydpi="61.120499"
651− inkscape:export-xdpi="61.120499"
652− xml:space="preserve"
653− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332;"
654− x="23.220526"
655− y="251.01649"
656− id="text971"><tspan
657− sodipodi:role="line"
658− id="tspan969"
659− x="23.220526"
660− y="251.01649"
661− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332;">module Text.Lexer.Core</tspan></text>
662− <rect
663− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
664− id="rect973"
665− width="47.889587"
666− height="6.3500061"
667− x="21.633026"
668− y="246.51833"
669− inkscape:export-xdpi="61.120499"
670− inkscape:export-ydpi="61.120499" />
671− <path
672− style="fill:none;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker991)"
673− d="m 48.369316,228.83873 0.04943,-6.71548"
674− id="path975"
675− inkscape:connector-curvature="0"
676− inkscape:export-xdpi="61.120499"
677− inkscape:export-ydpi="61.120499"
678− sodipodi:nodetypes="cc" />
679− <text
680− id="text979"
681− y="241.96643"
682− x="23.283329"
683− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332;"
684− xml:space="preserve"
685− inkscape:export-xdpi="61.120499"
686− inkscape:export-ydpi="61.120499"><tspan
687− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332;"
688− y="241.96643"
689− x="23.283329"
690− id="tspan977"
691− sodipodi:role="line">module Text.Quantity</tspan></text>
692− <rect
693− inkscape:export-ydpi="61.120499"
694− inkscape:export-xdpi="61.120499"
695− y="237.46826"
696− x="21.695829"
697− height="6.2469702"
698− width="43.853985"
699− id="rect981"
700− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
701− <text
702− inkscape:export-ydpi="61.120499"
703− inkscape:export-xdpi="61.120499"
704− xml:space="preserve"
705− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332;"
706− x="23.18244"
707− y="233.68523"
708− id="text985"><tspan
709− sodipodi:role="line"
710− id="tspan983"
711− x="23.18244"
712− y="233.68523"
713− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332;">module Text.Token</tspan></text>
714− <rect
715− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
716− id="rect987"
717− width="39.011257"
718− height="5.9464455"
719− x="21.59494"
720− y="229.18706"
721− inkscape:export-xdpi="61.120499"
722− inkscape:export-ydpi="61.120499" />
723− <path
724− sodipodi:nodetypes="cc"
725− inkscape:export-ydpi="61.120499"
726− inkscape:export-xdpi="61.120499"
727− inkscape:connector-curvature="0"
728− id="path993"
729− d="M 62.998384,237.01083 62.846037,221.92147"
730− style="fill:#ff0000;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker997)" />
731− <path
732− style="fill:#ff0000;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1003)"
733− d="M 67.336659,246.29272 67.083422,221.71969"
734− id="path999"
735− inkscape:connector-curvature="0"
736− inkscape:export-xdpi="61.120499"
737− inkscape:export-ydpi="61.120499"
738− sodipodi:nodetypes="cc" />
739− <path
740− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1009)"
741− d="M 73.937074,214.02206 94.72083,169.47102"
742− id="path1005"
743− inkscape:connector-curvature="0"
744− inkscape:export-xdpi="61.120499"
745− inkscape:export-ydpi="61.120499"
746− sodipodi:nodetypes="cc" />
747− <path
748− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1015)"
749− d="M 108.0684,213.75748 108.0169,173.5408"
750− id="path1011"
751− inkscape:connector-curvature="0"
752− inkscape:export-xdpi="61.120499"
753− inkscape:export-ydpi="61.120499"
754− sodipodi:nodetypes="cc" />
755− <text
756− inkscape:export-ydpi="61.120499"
757− inkscape:export-xdpi="61.120499"
758− id="text1019"
759− y="218.94762"
760− x="96.837494"
761− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332;"
762− xml:space="preserve"><tspan
763− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332;"
764− y="218.94762"
765− x="96.837494"
766− id="tspan1017"
767− sodipodi:role="line">module Text.Parser</tspan></text>
768− <path
769− sodipodi:nodetypes="cc"
770− inkscape:export-ydpi="61.120499"
771− inkscape:export-xdpi="61.120499"
772− inkscape:connector-curvature="0"
773− id="path1023"
774− d="m 113.62466,154.75539 0.0397,-25.06978"
775− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1027)" />
776− <path
777− sodipodi:nodetypes="cc"
778− inkscape:export-ydpi="61.120499"
779− inkscape:export-xdpi="61.120499"
780− inkscape:connector-curvature="0"
781− id="path1029"
782− d="M 83.757032,147.15485 97.991855,129.77582"
783− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1033)" />
784− <rect
785− y="142.91107"
786− x="118.15033"
787− height="6.6968417"
788− width="45.2328"
789− id="rect1035"
790− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
791− inkscape:export-xdpi="61.120499"
792− inkscape:export-ydpi="61.120499" />
793− <path
794− sodipodi:nodetypes="cc"
795− inkscape:export-ydpi="61.120499"
796− inkscape:export-xdpi="61.120499"
797− inkscape:connector-curvature="0"
798− id="path1037"
799− d="m 121.83513,142.5835 -0.0515,-12.72267"
800− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1057)" />
801− <text
802− xml:space="preserve"
803− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
804− x="120.00241"
805− y="147.67372"
806− id="text1041"
807− inkscape:export-xdpi="61.120499"
808− inkscape:export-ydpi="61.120499"><tspan
809− sodipodi:role="line"
810− id="tspan1039"
811− x="120.00241"
812− y="147.67372"
813− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332">module TTImp.TTImp</tspan></text>
814− <rect
815− inkscape:export-ydpi="61.120499"
816− inkscape:export-xdpi="61.120499"
817− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
818− id="rect1047"
819− width="42.862495"
820− height="6.8791728"
821− x="125.28364"
822− y="133.0603" />
823− <path
824− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1045)"
825− d="m 145.18016,132.82376 -9.18434,-4.09859"
826− id="path1049"
827− inkscape:connector-curvature="0"
828− inkscape:export-xdpi="61.120499"
829− inkscape:export-ydpi="61.120499"
830− sodipodi:nodetypes="cc" />
831− <text
832− inkscape:export-ydpi="61.120499"
833− inkscape:export-xdpi="61.120499"
834− id="text1053"
835− y="137.82295"
836− x="127.13572"
837− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
838− xml:space="preserve"><tspan
839− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332"
840− y="137.82295"
841− x="127.13572"
842− id="tspan1051"
843− sodipodi:role="line">module Idris.Syntax</tspan></text>
844− <rect
845− inkscape:export-ydpi="61.120499"
846− inkscape:export-xdpi="61.120499"
847− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#00871c;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
848− id="rect1061"
849− width="59.266659"
850− height="16.13958"
851− x="97.102074"
852− y="186.93335" />
853− <path
854− inkscape:export-ydpi="61.120499"
855− inkscape:export-xdpi="61.120499"
856− inkscape:connector-curvature="0"
857− id="path1063"
858− d="m 76.993749,160.21044 18.785417,28.83958"
859− style="fill:none;stroke:#00aa3f;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1105)"
860− sodipodi:nodetypes="cc" />
861− <text
862− inkscape:export-ydpi="61.120499"
863− inkscape:export-xdpi="61.120499"
864− id="text1081"
865− y="192.48962"
866− x="157.95586"
867− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#008000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
868− xml:space="preserve"><tspan
869− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#008000;stroke-width:0.26458332"
870− y="192.48962"
871− x="157.95586"
872− id="tspan1079"
873− sodipodi:role="line">SExp</tspan></text>
874− <text
875− inkscape:export-ydpi="61.120499"
876− inkscape:export-xdpi="61.120499"
877− id="text1089"
878− y="192.75421"
879− x="98.954155"
880− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#008000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
881− xml:space="preserve"><tspan
882− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#008000;stroke-width:0.26458332"
883− y="192.75421"
884− x="98.954155"
885− id="tspan1087"
886− sodipodi:role="line">module Idris.IDEMode.Parser</tspan></text>
887− <rect
888− inkscape:export-ydpi="61.120499"
889− inkscape:export-xdpi="61.120499"
890− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#7c007d;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
891− id="rect1097"
892− width="55.033333"
893− height="14.287498"
894− x="20.637447"
895− y="52.524986" />
896− <text
897− inkscape:export-ydpi="61.120499"
898− inkscape:export-xdpi="61.120499"
899− id="text1101"
900− y="58.610428"
901− x="23.54781"
902− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#800080;fill-opacity:1;stroke:none;stroke-width:0.26458332;"
903− xml:space="preserve"><tspan
904− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#800080;stroke-width:0.26458332;"
905− y="58.610428"
906− x="23.54781"
907− id="tspan1099"
908− sodipodi:role="line">module Idris.REPL</tspan></text>
909− <path
910− sodipodi:nodetypes="cc"
911− style="fill:none;stroke:#00aa3f;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1111)"
912− d="m 112.97708,174.23335 0,14.02292"
913− id="path1107"
914− inkscape:connector-curvature="0"
915− inkscape:export-xdpi="61.120499"
916− inkscape:export-ydpi="61.120499" />
917− <path
918− inkscape:export-ydpi="61.120499"
919− inkscape:export-xdpi="61.120499"
920− inkscape:connector-curvature="0"
921− id="path1113"
922− d="m 148.43125,150.15592 0.26458,35.71911"
923− style="fill:none;stroke:#00aa3f;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1117)"
924− sodipodi:nodetypes="cc" />
925− <path
926− inkscape:export-ydpi="61.120499"
927− inkscape:export-xdpi="61.120499"
928− inkscape:connector-curvature="0"
929− id="path1119"
930− d="m 156.56889,195.56696 13.16435,-0.41532"
931− style="fill:none;stroke:#00aa3f;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1123)"
932− sodipodi:nodetypes="cc" />
933− <text
934− id="text950"
935− y="104.70191"
936− x="22.426785"
937− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
938− xml:space="preserve"
939− inkscape:export-xdpi="61.120499"
940− inkscape:export-ydpi="61.120499"><tspan
941− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332"
942− y="104.70191"
943− x="22.426785"
944− id="tspan948"
945− sodipodi:role="line">module Core.Core</tspan></text>
946− <rect
947− inkscape:export-ydpi="61.120499"
948− inkscape:export-xdpi="61.120499"
949− y="100.20374"
950− x="20.839275"
951− height="9.7895899"
952− width="47.889587"
953− id="rect952"
954− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
955− <text
956− inkscape:export-ydpi="61.120499"
957− inkscape:export-xdpi="61.120499"
958− xml:space="preserve"
959− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
960− x="22.955944"
961− y="108.40608"
962− id="text956"><tspan
963− sodipodi:role="line"
964− id="tspan954"
965− x="22.955944"
966− y="108.40608"
967− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332">error messages</tspan></text>
968− <text
969− inkscape:export-ydpi="61.120499"
970− inkscape:export-xdpi="61.120499"
971− xml:space="preserve"
972− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
973− x="79.312202"
974− y="92.266502"
975− id="text960"><tspan
976− sodipodi:role="line"
977− id="tspan958"
978− x="79.312202"
979− y="92.266502"
980− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332">module Core.CompileExpr</tspan></text>
981− <rect
982− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
983− id="rect962"
984− width="61.912495"
985− height="18.785419"
986− x="77.724693"
987− y="87.768333"
988− inkscape:export-xdpi="61.120499"
989− inkscape:export-ydpi="61.120499" />
990− <text
991− id="text966"
992− y="95.970665"
993− x="79.841362"
994− style="font-style:normal;font-weight:normal;font-size:3.52777767px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
995− xml:space="preserve"
996− inkscape:export-xdpi="61.120499"
997− inkscape:export-ydpi="61.120499"><tspan
998− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332"
999− y="95.970665"
1000− x="79.841362"
1001− sodipodi:role="line"
1002− id="tspan968">Representation of expressions ready</tspan><tspan
1003− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332"
1004− y="100.38039"
1005− x="79.841362"
1006− sodipodi:role="line"
1007− id="tspan974">for compiling: CExp</tspan><tspan
1008− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332"
1009− y="104.79011"
1010− x="79.841362"
1011− sodipodi:role="line"
1012− id="tspan972">Type erased, explicit case trees</tspan></text>
1013− <text
1014− inkscape:export-ydpi="61.120499"
1015− inkscape:export-xdpi="61.120499"
1016− xml:space="preserve"
1017− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
1018− x="22.162193"
1019− y="73.217979"
1020− id="text978"><tspan
1021− sodipodi:role="line"
1022− id="tspan976"
1023− x="22.162193"
1024− y="73.217979"
1025− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332">module Idris.CommandLine</tspan></text>
1026− <rect
1027− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
1028− id="rect980"
1029− width="55.827087"
1030− height="10.054173"
1031− x="20.574694"
1032− y="68.719742"
1033− inkscape:export-xdpi="61.120499"
1034− inkscape:export-ydpi="61.120499" />
1035− <text
1036− id="text984"
1037− y="76.92215"
1038− x="22.69136"
1039− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
1040− xml:space="preserve"
1041− inkscape:export-xdpi="61.120499"
1042− inkscape:export-ydpi="61.120499"><tspan
1043− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332"
1044− y="76.92215"
1045− x="22.69136"
1046− id="tspan982"
1047− sodipodi:role="line">command line options</tspan></text>
1048− <text
1049− id="text988"
1050− y="89.886726"
1051− x="22.162193"
1052− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
1053− xml:space="preserve"
1054− inkscape:export-xdpi="61.120499"
1055− inkscape:export-ydpi="61.120499"><tspan
1056− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332"
1057− y="89.886726"
1058− x="22.162193"
1059− id="tspan986"
1060− sodipodi:role="line">module Idris.Error</tspan></text>
1061− <rect
1062− inkscape:export-ydpi="61.120499"
1063− inkscape:export-xdpi="61.120499"
1064− y="85.388489"
1065− x="20.574694"
1066− height="9.5250101"
1067− width="37.835419"
1068− id="rect990"
1069− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
1070− <text
1071− inkscape:export-ydpi="61.120499"
1072− inkscape:export-xdpi="61.120499"
1073− xml:space="preserve"
1074− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
1075− x="22.69136"
1076− y="93.590897"
1077− id="text994"><tspan
1078− sodipodi:role="line"
1079− id="tspan992"
1080− x="22.69136"
1081− y="93.590897"
1082− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332">perror</tspan></text>
1083− <path
1084− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1000)"
1085− d="m 66.876776,99.410007 c -0.17822,-10.50534 -0.880145,-7.9985 -7.143748,-8.99444"
1086− id="path996"
1087− inkscape:connector-curvature="0"
1088− inkscape:export-xdpi="61.120499"
1089− inkscape:export-ydpi="61.120499"
1090− sodipodi:nodetypes="cc" />
1091− <path
1092− style="fill:none;stroke:#000000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
1093− d="M 15.081249,210.48125 H 200.02499"
1094− id="path1201"
1095− inkscape:connector-curvature="0"
1096− sodipodi:nodetypes="cc"
1097− inkscape:export-xdpi="61.120499"
1098− inkscape:export-ydpi="61.120499" />
1099− <path
1100− style="fill:none;stroke:#000000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend)"
1101− d="m 154.78125,214.97917 -0.26459,40.21666"
1102− id="path1203"
1103− inkscape:connector-curvature="0"
1104− inkscape:export-xdpi="61.120499"
1105− inkscape:export-ydpi="61.120499" />
1106− <text
1107− xml:space="preserve"
1108− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:0.40000001;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332;"
1109− x="158.75"
1110− y="226.09137"
1111− id="text1473"
1112− inkscape:export-xdpi="61.120499"
1113− inkscape:export-ydpi="61.120499"><tspan
1114− sodipodi:role="line"
1115− id="tspan1471"
1116− x="158.75"
1117− y="226.09137"
1118− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332;">'text' modules are</tspan><tspan
1119− sodipodi:role="line"
1120− x="158.75"
1121− y="230.92491"
1122− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332;"
1123− id="tspan1475">also in Idris 1</tspan><tspan
1124− sodipodi:role="line"
1125− x="158.75"
1126− y="235.75845"
1127− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332;"
1128− id="tspan1477">library.</tspan></text>
1129− <path
1130− inkscape:connector-curvature="0"
1131− id="path957"
1132− d="m 172.77292,166.03125 -0.26459,40.21666"
1133− style="fill:none;stroke:#000000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker969);marker-end:url(#marker973)"
1134− inkscape:export-xdpi="61.120499"
1135− inkscape:export-ydpi="61.120499" />
1136− <text
1137− inkscape:export-ydpi="61.120499"
1138− inkscape:export-xdpi="61.120499"
1139− id="text965"
1140− y="177.14345"
1141− x="176.74167"
1142− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:0.40000001;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#008000;fill-opacity:1;stroke:none;stroke-width:0.26458332;"
1143− xml:space="preserve"><tspan
1144− id="tspan963"
1145− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#008000;stroke-width:0.26458332;"
1146− y="177.14345"
1147− x="176.74167"
1148− sodipodi:role="line">'IDEMode is for</tspan><tspan
1149− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#008000;stroke-width:0.26458332;"
1150− y="181.97699"
1151− x="176.74167"
1152− sodipodi:role="line"
1153− id="tspan981">communicating</tspan><tspan
1154− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#008000;stroke-width:0.26458332;"
1155− y="186.81053"
1156− x="176.74167"
1157− sodipodi:role="line"
1158− id="tspan984">with external</tspan><tspan
1159− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#008000;stroke-width:0.26458332;"
1160− y="191.64406"
1161− x="176.74167"
1162− sodipodi:role="line"
1163− id="tspan987">editors. It uses</tspan><tspan
1164− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#008000;stroke-width:0.26458332;"
1165− y="196.4776"
1166− x="176.74167"
1167− sodipodi:role="line"
1168− id="tspan989">SExp structure</tspan><tspan
1169− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#008000;stroke-width:0.26458332;"
1170− y="201.31114"
1171− x="176.74167"
1172− sodipodi:role="line"
1173− id="tspan991">which is Lisp-</tspan><tspan
1174− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#008000;stroke-width:0.26458332;"
1175− y="206.14468"
1176− x="176.74167"
1177− sodipodi:role="line"
1178− id="tspan993">like.</tspan></text>
1179− <path
1180− style="fill:none;stroke:#000000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker1017);marker-end:url(#marker1021)"
1181− d="m 172.77292,110.20417 -0.26459,40.21666"
1182− id="path997"
1183− inkscape:connector-curvature="0"
1184− inkscape:export-xdpi="61.120499"
1185− inkscape:export-ydpi="61.120499" />
1186− <text
1187− xml:space="preserve"
1188− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:0.40000001;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
1189− x="176.21251"
1190− y="115.76012"
1191− id="text1013"
1192− inkscape:export-xdpi="61.120499"
1193− inkscape:export-ydpi="61.120499"><tspan
1194− id="tspan1011"
1195− sodipodi:role="line"
1196− x="176.21251"
1197− y="115.76012"
1198− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332">Idris.Parser</tspan><tspan
1199− sodipodi:role="line"
1200− x="176.21251"
1201− y="120.59366"
1202− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332"
1203− id="tspan1050">reads from a</tspan><tspan
1204− sodipodi:role="line"
1205− x="176.21251"
1206− y="125.42719"
1207− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332"
1208− id="tspan1052">file and outputs</tspan><tspan
1209− sodipodi:role="line"
1210− x="176.21251"
1211− y="130.26073"
1212− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332"
1213− id="tspan1054">to a PTerm</tspan><tspan
1214− sodipodi:role="line"
1215− x="176.21251"
1216− y="135.09427"
1217− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332"
1218− id="tspan1056">structure.</tspan></text>
1219− <path
1220− inkscape:connector-curvature="0"
1221− id="path1058"
1222− d="m 171.97917,51.731253 -0.26459,19.57916"
1223− style="fill:none;stroke:#000000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker1074);marker-end:url(#marker1078)"
1224− sodipodi:nodetypes="cc"
1225− inkscape:export-xdpi="61.120499"
1226− inkscape:export-ydpi="61.120499" />
1227− <text
1228− inkscape:export-ydpi="61.120499"
1229− inkscape:export-xdpi="61.120499"
1230− id="text1070"
1231− y="57.287201"
1232− x="175.41876"
1233− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:0.40000001;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#800080;fill-opacity:1;stroke:none;stroke-width:0.26458332;"
1234− xml:space="preserve"><tspan
1235− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#800080;stroke-width:0.26458332;"
1236− y="57.287201"
1237− x="175.41876"
1238− sodipodi:role="line"
1239− id="tspan1060">Idris.Parser</tspan><tspan
1240− id="tspan1068"
1241− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#800080;stroke-width:0.26458332;"
1242− y="62.120739"
1243− x="175.41876"
1244− sodipodi:role="line">reads from the</tspan><tspan
1245− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:0.40000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#800080;stroke-width:0.26458332;"
1246− y="66.954277"
1247− x="175.41876"
1248− sodipodi:role="line"
1249− id="tspan1089">command line.</tspan></text>
1250− </g>
1251−</svg>
docs/image/parserTopLevel.pngdeleted

Binary file not shown.

docs/image/parserTopLevel.svgdeleted−294
@@ -1,294 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 210 297"
15− version="1.1"
16− id="svg8"
17− inkscape:version="0.92.2 5c3e80d, 2017-08-06"
18− sodipodi:docname="topLevel.svg">
19− <defs
20− id="defs2">
21− <marker
22− inkscape:isstock="true"
23− style="overflow:visible;"
24− id="marker3617"
25− refX="0.0"
26− refY="0.0"
27− orient="auto"
28− inkscape:stockid="Arrow1Mend">
29− <path
30− transform="scale(0.4) rotate(180) translate(10,0)"
31− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
32− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
33− id="path3615" />
34− </marker>
35− <marker
36− inkscape:stockid="Arrow1Mend"
37− orient="auto"
38− refY="0.0"
39− refX="0.0"
40− id="marker2891"
41− style="overflow:visible;"
42− inkscape:isstock="true"
43− inkscape:collect="always">
44− <path
45− id="path2889"
46− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
47− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
48− transform="scale(0.4) rotate(180) translate(10,0)" />
49− </marker>
50− <marker
51− inkscape:stockid="Arrow1Mend"
52− orient="auto"
53− refY="0.0"
54− refX="0.0"
55− id="marker2049"
56− style="overflow:visible;"
57− inkscape:isstock="true">
58− <path
59− id="path2047"
60− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
61− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
62− transform="scale(0.4) rotate(180) translate(10,0)" />
63− </marker>
64− <marker
65− inkscape:isstock="true"
66− style="overflow:visible;"
67− id="marker1539"
68− refX="0.0"
69− refY="0.0"
70− orient="auto"
71− inkscape:stockid="Arrow1Mend"
72− inkscape:collect="always">
73− <path
74− transform="scale(0.4) rotate(180) translate(10,0)"
75− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
76− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
77− id="path1537" />
78− </marker>
79− <marker
80− inkscape:stockid="Arrow1Mend"
81− orient="auto"
82− refY="0.0"
83− refX="0.0"
84− id="Arrow1Mend"
85− style="overflow:visible;"
86− inkscape:isstock="true"
87− inkscape:collect="always">
88− <path
89− id="path830"
90− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
91− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
92− transform="scale(0.4) rotate(180) translate(10,0)" />
93− </marker>
94− </defs>
95− <sodipodi:namedview
96− id="base"
97− pagecolor="#ffffff"
98− bordercolor="#666666"
99− borderopacity="1.0"
100− inkscape:pageopacity="0.0"
101− inkscape:pageshadow="2"
102− inkscape:zoom="1"
103− inkscape:cx="396.85039"
104− inkscape:cy="560"
105− inkscape:document-units="mm"
106− inkscape:current-layer="layer1"
107− showgrid="false"
108− inkscape:window-width="1920"
109− inkscape:window-height="1015"
110− inkscape:window-x="0"
111− inkscape:window-y="0"
112− inkscape:window-maximized="1" />
113− <metadata
114− id="metadata5">
115− <rdf:RDF>
116− <cc:Work
117− rdf:about="">
118− <dc:format>image/svg+xml</dc:format>
119− <dc:type
120− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
121− <dc:title />
122− </cc:Work>
123− </rdf:RDF>
124− </metadata>
125− <g
126− inkscape:label="Layer 1"
127− inkscape:groupmode="layer"
128− id="layer1">
129− <rect
130− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
131− id="rect815"
132− width="35.983334"
133− height="18.25625"
134− x="37.306248"
135− y="79.512497"
136− inkscape:export-xdpi="61.120499"
137− inkscape:export-ydpi="61.120499" />
138− <rect
139− y="79.512497"
140− x="92.339577"
141− height="18.25625"
142− width="35.983334"
143− id="rect817"
144− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
145− inkscape:export-xdpi="61.120499"
146− inkscape:export-ydpi="61.120499" />
147− <path
148− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
149− d="m 73.554166,88.508337 16.66875,-0.26459"
150− id="path819"
151− inkscape:connector-curvature="0"
152− inkscape:export-xdpi="61.120499"
153− inkscape:export-ydpi="61.120499" />
154− <path
155− inkscape:connector-curvature="0"
156− id="path1535"
157− d="m 18.785416,88.77292 16.66875,-0.26459"
158− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1539)"
159− inkscape:export-xdpi="61.120499"
160− inkscape:export-ydpi="61.120499" />
161− <path
162− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2049)"
163− d="m 128.32291,88.243753 16.66875,-0.26459"
164− id="path2045"
165− inkscape:connector-curvature="0"
166− inkscape:export-xdpi="61.120499"
167− inkscape:export-ydpi="61.120499" />
168− <text
169− xml:space="preserve"
170− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
171− x="20.372915"
172− y="85.597931"
173− id="text2857"
174− inkscape:export-xdpi="61.120499"
175− inkscape:export-ydpi="61.120499"><tspan
176− sodipodi:role="line"
177− id="tspan2855"
178− x="20.372915"
179− y="85.597931"
180− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332">String</tspan></text>
181− <text
182− id="text2861"
183− y="80.835434"
184− x="76.199997"
185− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
186− xml:space="preserve"
187− inkscape:export-xdpi="61.120499"
188− inkscape:export-ydpi="61.120499"><tspan
189− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
190− y="80.835434"
191− x="76.199997"
192− sodipodi:role="line"
193− id="tspan2867">List</tspan><tspan
194− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
195− y="86.127098"
196− x="76.199997"
197− sodipodi:role="line"
198− id="tspan2871">Token</tspan></text>
199− <text
200− xml:space="preserve"
201− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
202− x="130.96875"
203− y="85.068764"
204− id="text2865"
205− inkscape:export-xdpi="61.120499"
206− inkscape:export-ydpi="61.120499"><tspan
207− sodipodi:role="line"
208− id="tspan2863"
209− x="130.96875"
210− y="85.068764"
211− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332">PTerm</tspan></text>
212− <text
213− id="text2875"
214− y="89.302101"
215− x="47.360416"
216− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332;"
217− xml:space="preserve"
218− inkscape:export-xdpi="61.120499"
219− inkscape:export-ydpi="61.120499"><tspan
220− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332;fill:#0000ff;"
221− y="89.302101"
222− x="47.360416"
223− id="tspan2873"
224− sodipodi:role="line">Lexer</tspan></text>
225− <text
226− xml:space="preserve"
227− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
228− x="100.27708"
229− y="89.037521"
230− id="text2879"
231− inkscape:export-xdpi="61.120499"
232− inkscape:export-ydpi="61.120499"><tspan
233− sodipodi:role="line"
234− id="tspan2877"
235− x="100.27708"
236− y="89.037521"
237− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332">Parser</tspan></text>
238− <path
239− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2891)"
240− d="m 52.916666,71.575003 v 7.67291"
241− id="path2887"
242− inkscape:connector-curvature="0"
243− sodipodi:nodetypes="cc"
244− inkscape:export-xdpi="61.120499"
245− inkscape:export-ydpi="61.120499" />
246− <path
247− sodipodi:nodetypes="cc"
248− inkscape:connector-curvature="0"
249− id="path3613"
250− d="m 108.74375,71.575003 v 7.67291"
251− style="fill:none;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker3617)"
252− inkscape:export-xdpi="61.120499"
253− inkscape:export-ydpi="61.120499" />
254− <text
255− id="text4173"
256− y="69.987518"
257− x="43.391666"
258− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
259− xml:space="preserve"
260− inkscape:export-xdpi="61.120499"
261− inkscape:export-ydpi="61.120499"><tspan
262− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
263− y="69.987518"
264− x="43.391666"
265− id="tspan4171"
266− sodipodi:role="line">Recogniser</tspan></text>
267− <text
268− xml:space="preserve"
269− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
270− x="97.102081"
271− y="69.722939"
272− id="text4177"
273− inkscape:export-xdpi="61.120499"
274− inkscape:export-ydpi="61.120499"><tspan
275− sodipodi:role="line"
276− id="tspan4175"
277− x="97.102081"
278− y="69.722939"
279− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332">Grammar</tspan></text>
280− <text
281− inkscape:export-ydpi="61.120499"
282− inkscape:export-xdpi="61.120499"
283− id="text854"
284− y="93.800011"
285− x="131.23334"
286− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
287− xml:space="preserve"><tspan
288− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
289− y="103.5316"
290− x="131.23334"
291− id="tspan852"
292− sodipodi:role="line" /></text>
293− </g>
294−</svg>
docs/image/plusReducesProof.pngdeleted

Binary file not shown.

docs/image/plusReducesProof.svgdeleted−339
@@ -1,339 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.91 r13725"
18− sodipodi:docname="plusReducesProof.svg">
19− <defs
20− id="defs4">
21− <marker
22− inkscape:stockid="Arrow1Mend"
23− orient="auto"
24− refY="0.0"
25− refX="0.0"
26− id="marker6540"
27− style="overflow:visible;"
28− inkscape:isstock="true">
29− <path
30− id="path6542"
31− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
32− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
33− transform="scale(0.4) rotate(180) translate(10,0)" />
34− </marker>
35− <marker
36− inkscape:stockid="Arrow1Mend"
37− orient="auto"
38− refY="0.0"
39− refX="0.0"
40− id="marker5748"
41− style="overflow:visible;"
42− inkscape:isstock="true">
43− <path
44− id="path5750"
45− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
46− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
47− transform="scale(0.4) rotate(180) translate(10,0)" />
48− </marker>
49− <marker
50− inkscape:isstock="true"
51− style="overflow:visible;"
52− id="marker5154"
53− refX="0.0"
54− refY="0.0"
55− orient="auto"
56− inkscape:stockid="Arrow1Mend"
57− inkscape:collect="always">
58− <path
59− transform="scale(0.4) rotate(180) translate(10,0)"
60− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
61− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
62− id="path5156" />
63− </marker>
64− <marker
65− inkscape:stockid="Arrow1Mend"
66− orient="auto"
67− refY="0.0"
68− refX="0.0"
69− id="Arrow1Mend"
70− style="overflow:visible;"
71− inkscape:isstock="true"
72− inkscape:collect="always">
73− <path
74− id="path4189"
75− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
76− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
77− transform="scale(0.4) rotate(180) translate(10,0)" />
78− </marker>
79− </defs>
80− <sodipodi:namedview
81− id="base"
82− pagecolor="#ffffff"
83− bordercolor="#666666"
84− borderopacity="1.0"
85− inkscape:pageopacity="0.0"
86− inkscape:pageshadow="2"
87− inkscape:zoom="1"
88− inkscape:cx="397.18872"
89− inkscape:cy="520"
90− inkscape:document-units="px"
91− inkscape:current-layer="layer1"
92− showgrid="false"
93− inkscape:window-width="1110"
94− inkscape:window-height="1011"
95− inkscape:window-x="-4"
96− inkscape:window-y="0"
97− inkscape:window-maximized="0" />
98− <metadata
99− id="metadata7">
100− <rdf:RDF>
101− <cc:Work
102− rdf:about="">
103− <dc:format>image/svg+xml</dc:format>
104− <dc:type
105− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
106− <dc:title></dc:title>
107− </cc:Work>
108− </rdf:RDF>
109− </metadata>
110− <g
111− inkscape:label="Layer 1"
112− inkscape:groupmode="layer"
113− id="layer1">
114− <text
115− xml:space="preserve"
116− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
117− x="266"
118− y="225.36221"
119− id="text4136"
120− sodipodi:linespacing="125%"><tspan
121− sodipodi:role="line"
122− id="tspan4138"
123− x="266"
124− y="225.36221">assumptions</tspan><tspan
125− sodipodi:role="line"
126− x="266"
127− y="250.36221"
128− id="tspan4140">(context)</tspan></text>
129− <text
130− sodipodi:linespacing="125%"
131− id="text4142"
132− y="238.36221"
133− x="526"
134− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
135− xml:space="preserve"><tspan
136− id="tspan4146"
137− y="238.36221"
138− x="526"
139− sodipodi:role="line">goal</tspan></text>
140− <text
141− xml:space="preserve"
142− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
143− x="420"
144− y="289.36221"
145− id="text4150"
146− sodipodi:linespacing="125%"><tspan
147− sodipodi:role="line"
148− x="420"
149− y="289.36221"
150− id="tspan4152">(k : Nat) -&gt; (k = plus k 0) -&gt; S k = S (plus k 0)</tspan></text>
151− <path
152− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
153− d="m 241,262.3622 428,-1"
154− id="path4154"
155− inkscape:connector-curvature="0" />
156− <path
157− inkscape:connector-curvature="0"
158− id="path4160"
159− d="m 241,308.3622 428,-1"
160− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
161− <text
162− sodipodi:linespacing="125%"
163− id="text4162"
164− y="312.36221"
165− x="175"
166− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
167− xml:space="preserve"><tspan
168− id="tspan4164"
169− y="312.36221"
170− x="175"
171− sodipodi:role="line">intro `{{k}}</tspan></text>
172− <text
173− sodipodi:linespacing="125%"
174− id="text4166"
175− y="333.36221"
176− x="482"
177− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
178− xml:space="preserve"><tspan
179− id="tspan4168"
180− y="333.36221"
181− x="482"
182− sodipodi:role="line">(k = plus k 0) -&gt; S k = S (plus k 0)</tspan></text>
183− <text
184− xml:space="preserve"
185− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
186− x="324"
187− y="334.36221"
188− id="text4170"
189− sodipodi:linespacing="125%"><tspan
190− sodipodi:role="line"
191− x="324"
192− y="334.36221"
193− id="tspan4172">k : Nat</tspan></text>
194− <path
195− style="fill:none;fill-rule:evenodd;stroke:#0000ff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
196− d="m 441,294.3622 -73,30"
197− id="path4174"
198− inkscape:connector-curvature="0"
199− sodipodi:nodetypes="cc" />
200− <path
201− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
202− d="m 241,352.3622 428,-1"
203− id="path5134"
204− inkscape:connector-curvature="0" />
205− <text
206− xml:space="preserve"
207− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
208− x="171"
209− y="355.36221"
210− id="text5136"
211− sodipodi:linespacing="125%"><tspan
212− sodipodi:role="line"
213− x="171"
214− y="355.36221"
215− id="tspan5138">intro `{{ih}}</tspan></text>
216− <text
217− xml:space="preserve"
218− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
219− x="570"
220− y="372.36221"
221− id="text5140"
222− sodipodi:linespacing="125%"><tspan
223− sodipodi:role="line"
224− x="570"
225− y="372.36221"
226− id="tspan5142">S k = S (plus k 0)</tspan></text>
227− <text
228− sodipodi:linespacing="125%"
229− id="text5144"
230− y="378.36221"
231− x="324"
232− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
233− xml:space="preserve"><tspan
234− id="tspan5146"
235− y="378.36221"
236− x="324"
237− sodipodi:role="line">k : Nat</tspan></text>
238− <text
239− sodipodi:linespacing="125%"
240− id="text5150"
241− y="393.36221"
242− x="323"
243− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
244− xml:space="preserve"><tspan
245− id="tspan5152"
246− y="393.36221"
247− x="323"
248− sodipodi:role="line">ih : k = plus k 0</tspan></text>
249− <path
250− inkscape:connector-curvature="0"
251− id="path5728"
252− d="m 242,404.3622 428,-1"
253− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
254− <text
255− sodipodi:linespacing="125%"
256− id="text5730"
257− y="408.36221"
258− x="109"
259− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
260− xml:space="preserve"><tspan
261− id="tspan5732"
262− y="408.36221"
263− x="109"
264− sodipodi:role="line">rewriteWith (Var `{{ih}})</tspan></text>
265− <text
266− sodipodi:linespacing="125%"
267− id="text5734"
268− y="424.36221"
269− x="587"
270− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
271− xml:space="preserve"><tspan
272− id="tspan5736"
273− y="424.36221"
274− x="587"
275− sodipodi:role="line">S k = S k </tspan></text>
276− <text
277− xml:space="preserve"
278− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
279− x="325"
280− y="430.36221"
281− id="text5738"
282− sodipodi:linespacing="125%"><tspan
283− sodipodi:role="line"
284− x="325"
285− y="430.36221"
286− id="tspan5740">k : Nat</tspan></text>
287− <path
288− style="fill:none;fill-rule:evenodd;stroke:#0000ff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5748)"
289− d="m 610,379.3622 1,29"
290− id="path5742"
291− inkscape:connector-curvature="0"
292− sodipodi:nodetypes="cc" />
293− <text
294− xml:space="preserve"
295− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
296− x="324"
297− y="445.36221"
298− id="text5744"
299− sodipodi:linespacing="125%"><tspan
300− sodipodi:role="line"
301− x="324"
302− y="445.36221"
303− id="tspan5746">ih : k = plus k 0</tspan></text>
304− <path
305− inkscape:connector-curvature="0"
306− id="path7294"
307− d="m 418,460.3622 -2,-199"
308− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
309− sodipodi:nodetypes="cc" />
310− <path
311− sodipodi:nodetypes="cc"
312− inkscape:connector-curvature="0"
313− id="path5148"
314− d="m 519,339.3622 -107,44"
315− style="fill:none;fill-rule:evenodd;stroke:#0000ff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5154)" />
316− <path
317− style="fill:none;fill-rule:evenodd;stroke:#0000ff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:12, 2;stroke-dashoffset:0;stroke-opacity:1"
318− d="m 609,391.3622 -197,49"
319− id="path6538"
320− inkscape:connector-curvature="0"
321− sodipodi:nodetypes="cc" />
322− <path
323− style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
324− d="m 242,458.3622 428,-1"
325− id="path7308"
326− inkscape:connector-curvature="0" />
327− <text
328− xml:space="preserve"
329− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
330− x="177"
331− y="462.36221"
332− id="text7310"
333− sodipodi:linespacing="125%"><tspan
334− sodipodi:role="line"
335− x="177"
336− y="462.36221"
337− id="tspan7312">reflexivity</tspan></text>
338− </g>
339−</svg>
docs/image/recogniser.pngdeleted

Binary file not shown.

docs/image/recogniser.svgdeleted−477
@@ -1,477 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 210 297"
15− version="1.1"
16− id="svg8"
17− inkscape:version="0.92.2 5c3e80d, 2017-08-06"
18− sodipodi:docname="recogniser.svg">
19− <defs
20− id="defs2" />
21− <sodipodi:namedview
22− id="base"
23− pagecolor="#ffffff"
24− bordercolor="#666666"
25− borderopacity="1.0"
26− inkscape:pageopacity="0.0"
27− inkscape:pageshadow="2"
28− inkscape:zoom="1"
29− inkscape:cx="384.45994"
30− inkscape:cy="560"
31− inkscape:document-units="mm"
32− inkscape:current-layer="layer1"
33− showgrid="false"
34− inkscape:window-width="1920"
35− inkscape:window-height="1015"
36− inkscape:window-x="0"
37− inkscape:window-y="0"
38− inkscape:window-maximized="1" />
39− <metadata
40− id="metadata5">
41− <rdf:RDF>
42− <cc:Work
43− rdf:about="">
44− <dc:format>image/svg+xml</dc:format>
45− <dc:type
46− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
47− <dc:title />
48− </cc:Work>
49− </rdf:RDF>
50− </metadata>
51− <g
52− inkscape:label="Layer 1"
53− inkscape:groupmode="layer"
54− id="layer1">
55− <rect
56− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70599997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
57− id="rect815"
58− width="112.44793"
59− height="77.258354"
60− x="6.3499999"
61− y="63.108334"
62− ry="3.96875"
63− inkscape:export-xdpi="61.120499"
64− inkscape:export-ydpi="61.120499" />
65− <text
66− xml:space="preserve"
67− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:5.64444447px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
68− x="11.112496"
69− y="68.399994"
70− id="text819"
71− inkscape:export-xdpi="61.120499"
72− inkscape:export-ydpi="61.120499"><tspan
73− sodipodi:role="line"
74− id="tspan817"
75− x="11.112496"
76− y="68.399994"
77− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:5.64444447px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332">Text.Lexer.Core</tspan></text>
78− <text
79− id="text823"
80− y="74.749992"
81− x="8.7312441"
82− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
83− xml:space="preserve"
84− inkscape:export-xdpi="61.120499"
85− inkscape:export-ydpi="61.120499"><tspan
86− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
87− y="74.749992"
88− x="8.7312441"
89− id="tspan821"
90− sodipodi:role="line">data Recognise : (consumes : Bool) -&gt; Type where</tspan><tspan
91− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
92− y="80.041656"
93− x="8.7312441"
94− sodipodi:role="line"
95− id="tspan825"> Empty : Recognise False</tspan><tspan
96− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
97− y="85.333328"
98− x="8.7312441"
99− sodipodi:role="line"
100− id="tspan827"> Fail : Recognise c</tspan><tspan
101− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
102− y="90.624992"
103− x="8.7312441"
104− sodipodi:role="line"
105− id="tspan829"> Lookahead : (positive : Bool) -&gt; Recognise c -&gt; Recognise False</tspan><tspan
106− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
107− y="95.916656"
108− x="8.7312441"
109− sodipodi:role="line"
110− id="tspan831"> Pred : (Char -&gt; Bool) -&gt; Recognise True</tspan><tspan
111− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
112− y="101.20832"
113− x="8.7312441"
114− sodipodi:role="line"
115− id="tspan835"> SeqEat : Recognise True -&gt; Inf (Recognise e) -&gt; Recognise True</tspan><tspan
116− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
117− y="106.49999"
118− x="8.7312441"
119− sodipodi:role="line"
120− id="tspan837"> SeqEmpty : Recognise e1 -&gt; Recognise e2 -&gt; Recognise (e1 || e2)</tspan><tspan
121− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
122− y="111.79166"
123− x="8.7312441"
124− sodipodi:role="line"
125− id="tspan839"> Alt : Recognise e1 -&gt; Recognise e2 -&gt; Recognise (e1 &amp;&amp; e2)</tspan><tspan
126− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
127− y="117.08332"
128− x="8.7312441"
129− sodipodi:role="line"
130− id="tspan841" /><tspan
131− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
132− y="122.37499"
133− x="8.7312441"
134− sodipodi:role="line"
135− id="tspan843">||| A token recogniser. Guaranteed to consume at least one character.</tspan><tspan
136− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
137− y="127.66666"
138− x="8.7312441"
139− sodipodi:role="line"
140− id="tspan845">public export</tspan><tspan
141− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
142− y="132.95833"
143− x="8.7312441"
144− sodipodi:role="line"
145− id="tspan847">Lexer : Type</tspan><tspan
146− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
147− y="138.24998"
148− x="8.7312441"
149− sodipodi:role="line"
150− id="tspan849">Lexer = Recognise True</tspan><tspan
151− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
152− y="143.54166"
153− x="8.7312441"
154− sodipodi:role="line"
155− id="tspan851" /></text>
156− <rect
157− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
158− id="rect850"
159− width="111.65417"
160− height="10.318749"
161− x="9.7895756"
162− y="97.504166"
163− inkscape:export-xdpi="61.120499"
164− inkscape:export-ydpi="61.120499" />
165− <rect
166− y="97.504166"
167− x="9.7895756"
168− height="15.610415"
169− width="111.38958"
170− id="rect852"
171− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
172− inkscape:export-xdpi="61.120499"
173− inkscape:export-ydpi="61.120499" />
174− <text
175− inkscape:export-ydpi="61.120499"
176− inkscape:export-xdpi="61.120499"
177− id="text870"
178− y="98.297905"
179− x="129.64584"
180− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
181− xml:space="preserve"><tspan
182− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
183− y="98.297905"
184− x="129.64584"
185− sodipodi:role="line"
186− id="tspan908">(&lt;+&gt;) : Recognise c1 -&gt; inf c1 (Recognise c2) -&gt; </tspan><tspan
187− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
188− y="103.58957"
189− x="129.64584"
190− sodipodi:role="line"
191− id="tspan929"> Recognise (c1 || c2)</tspan><tspan
192− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
193− y="108.88124"
194− x="129.64584"
195− sodipodi:role="line"
196− id="tspan916">Sequence two recognisers. If either consumes a</tspan><tspan
197− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
198− y="114.1729"
199− x="129.64584"
200− sodipodi:role="line"
201− id="tspan918">character, the sequence is guaranteed to</tspan><tspan
202− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
203− y="119.46457"
204− x="129.64584"
205− sodipodi:role="line"
206− id="tspan935">consume a character</tspan><tspan
207− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
208− y="124.75623"
209− x="129.64584"
210− sodipodi:role="line"
211− id="tspan912" /><tspan
212− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
213− y="130.04791"
214− x="129.64584"
215− sodipodi:role="line"
216− id="tspan868" /></text>
217− <path
218− style="fill:none;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
219− d="m 129.38124,100.41458 -7.9375,-2.910414"
220− id="path937"
221− inkscape:connector-curvature="0"
222− sodipodi:nodetypes="cc"
223− inkscape:export-xdpi="61.120499"
224− inkscape:export-ydpi="61.120499" />
225− <text
226− xml:space="preserve"
227− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
228− x="130.175"
229− y="129.25418"
230− id="text953"
231− inkscape:export-xdpi="61.120499"
232− inkscape:export-ydpi="61.120499"><tspan
233− sodipodi:role="line"
234− x="130.175"
235− y="129.25418"
236− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
237− id="tspan973">(&lt;|&gt;) : Recognise c1 -&gt; Recognise c2 -&gt;</tspan><tspan
238− sodipodi:role="line"
239− x="130.175"
240− y="134.54584"
241− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
242− id="tspan975"> Recognise (c1 &amp;&amp; c2)</tspan><tspan
243− sodipodi:role="line"
244− x="130.175"
245− y="139.83751"
246− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
247− id="tspan983">Alternative recognisers. If both consume, the</tspan><tspan
248− sodipodi:role="line"
249− x="130.175"
250− y="145.12917"
251− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
252− id="tspan985">combination is guaranteed to consumer a</tspan><tspan
253− sodipodi:role="line"
254− x="130.175"
255− y="150.42084"
256− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
257− id="tspan992">character.</tspan><tspan
258− sodipodi:role="line"
259− x="130.175"
260− y="155.71251"
261− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
262− id="tspan977" /><tspan
263− id="tspan949"
264− sodipodi:role="line"
265− x="130.175"
266− y="161.00417"
267− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332" /><tspan
268− id="tspan951"
269− sodipodi:role="line"
270− x="130.175"
271− y="166.29584"
272− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332" /></text>
273− <path
274− inkscape:connector-curvature="0"
275− id="path996"
276− d="M 128.05833,126.87292 110.33125,110.46875"
277− style="fill:none;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
278− sodipodi:nodetypes="cc"
279− inkscape:export-xdpi="61.120499"
280− inkscape:export-ydpi="61.120499" />
281− <text
282− xml:space="preserve"
283− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
284− x="28.045837"
285− y="51.731236"
286− id="text1012"
287− inkscape:export-xdpi="61.120499"
288− inkscape:export-ydpi="61.120499"><tspan
289− id="tspan1006"
290− sodipodi:role="line"
291− x="28.045837"
292− y="51.731236"
293− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332">empty : Recognise False</tspan><tspan
294− sodipodi:role="line"
295− x="28.045837"
296− y="57.022903"
297− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
298− id="tspan1087">Recognise no input (doesn't consume any input)</tspan><tspan
299− id="tspan1008"
300− sodipodi:role="line"
301− x="28.045837"
302− y="62.314568"
303− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332" /><tspan
304− id="tspan1010"
305− sodipodi:role="line"
306− x="28.045837"
307− y="67.606232"
308− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332" /></text>
309− <text
310− inkscape:export-ydpi="61.120499"
311− inkscape:export-xdpi="61.120499"
312− id="text1031"
313− y="49.614574"
314− x="114.56458"
315− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
316− xml:space="preserve"><tspan
317− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
318− y="49.614574"
319− x="114.56458"
320− sodipodi:role="line"
321− id="tspan1025">fail : Recognise c</tspan><tspan
322− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
323− y="54.906242"
324− x="114.56458"
325− sodipodi:role="line"
326− id="tspan1089">A recogniser that always fails.</tspan><tspan
327− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
328− y="60.197906"
329− x="114.56458"
330− sodipodi:role="line"
331− id="tspan1027" /><tspan
332− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
333− y="65.489571"
334− x="114.56458"
335− sodipodi:role="line"
336− id="tspan1029" /></text>
337− <text
338− inkscape:export-ydpi="61.120499"
339− inkscape:export-xdpi="61.120499"
340− id="text1039"
341− y="61.785423"
342− x="128.32292"
343− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
344− xml:space="preserve"><tspan
345− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
346− y="61.785423"
347− x="128.32292"
348− sodipodi:role="line"
349− id="tspan1051">expect : Recognise c -&gt; Recognise False</tspan><tspan
350− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
351− y="67.077087"
352− x="128.32292"
353− sodipodi:role="line"
354− id="tspan1059">Positive lookahead. Never consumes input.</tspan><tspan
355− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
356− y="72.368759"
357− x="128.32292"
358− sodipodi:role="line"
359− id="tspan1035" /><tspan
360− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
361− y="77.660423"
362− x="128.32292"
363− sodipodi:role="line"
364− id="tspan1037" /></text>
365− <text
366− xml:space="preserve"
367− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
368− x="125.14791"
369− y="86.39167"
370− id="text1047"
371− inkscape:export-xdpi="61.120499"
372− inkscape:export-ydpi="61.120499"><tspan
373− id="tspan1041"
374− sodipodi:role="line"
375− x="125.14791"
376− y="86.39167"
377− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332">pred : (Char -&gt; Bool) -&gt; Lexer</tspan><tspan
378− sodipodi:role="line"
379− x="125.14791"
380− y="91.683334"
381− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
382− id="tspan1085">Recognise a character that matches a predicate</tspan><tspan
383− id="tspan1043"
384− sodipodi:role="line"
385− x="125.14791"
386− y="96.975006"
387− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332" /><tspan
388− id="tspan1045"
389− sodipodi:role="line"
390− x="125.14791"
391− y="102.26667"
392− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332" /></text>
393− <rect
394− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
395− id="rect1053"
396− width="79.904167"
397− height="23.283327"
398− x="121.70833"
399− y="57.816666"
400− inkscape:export-xdpi="61.120499"
401− inkscape:export-ydpi="61.120499" />
402− <text
403− xml:space="preserve"
404− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
405− x="128.32291"
406− y="72.897926"
407− id="text1069"
408− inkscape:export-xdpi="61.120499"
409− inkscape:export-ydpi="61.120499"><tspan
410− id="tspan1063"
411− sodipodi:role="line"
412− x="128.32291"
413− y="72.897926"
414− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332">reject : Recognise c -&gt; Recognise False</tspan><tspan
415− sodipodi:role="line"
416− x="128.32291"
417− y="78.18959"
418− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
419− id="tspan1073">Negative lookahead. Never consumes input.</tspan><tspan
420− sodipodi:role="line"
421− x="128.32291"
422− y="83.481262"
423− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
424− id="tspan1075" /><tspan
425− id="tspan1065"
426− sodipodi:role="line"
427− x="128.32291"
428− y="88.772926"
429− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332" /><tspan
430− id="tspan1067"
431− sodipodi:role="line"
432− x="128.32291"
433− y="94.06459"
434− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332" /></text>
435− <path
436− sodipodi:nodetypes="cc"
437− inkscape:connector-curvature="0"
438− id="path1081"
439− d="M 124.35416,89.83125 76.99375,94.858333"
440− style="fill:none;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
441− inkscape:export-xdpi="61.120499"
442− inkscape:export-ydpi="61.120499" />
443− <path
444− style="fill:none;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
445− d="M 123.82499,66.01875 112.97708,86.391666"
446− id="path1083"
447− inkscape:connector-curvature="0"
448− sodipodi:nodetypes="cc"
449− inkscape:export-xdpi="61.120499"
450− inkscape:export-ydpi="61.120499" />
451− <path
452− sodipodi:nodetypes="cc"
453− inkscape:connector-curvature="0"
454− id="path1091"
455− d="M 33.33749,59.139583 20.90208,76.337499"
456− style="fill:none;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
457− inkscape:export-xdpi="61.120499"
458− inkscape:export-ydpi="61.120499" />
459− <path
460− style="fill:none;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
461− d="M 113.77082,51.73125 42.068747,83.481249"
462− id="path1093"
463− inkscape:connector-curvature="0"
464− sodipodi:nodetypes="cc"
465− inkscape:export-xdpi="61.120499"
466− inkscape:export-ydpi="61.120499" />
467− <rect
468− y="94.064583"
469− x="129.64583"
470− height="27.51667"
471− width="78.316658"
472− id="rect899"
473− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
474− inkscape:export-xdpi="61.120499"
475− inkscape:export-ydpi="61.120499" />
476− </g>
477−</svg>
docs/image/solve.pngdeleted

Binary file not shown.

docs/image/solve.svgdeleted−163
@@ -1,163 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 210 297"
15− version="1.1"
16− id="svg8"
17− inkscape:version="0.92.2 5c3e80d, 2017-08-06"
18− sodipodi:docname="solve.svg">
19− <defs
20− id="defs2">
21− <marker
22− inkscape:isstock="true"
23− style="overflow:visible;"
24− id="marker838"
25− refX="0.0"
26− refY="0.0"
27− orient="auto"
28− inkscape:stockid="Arrow1Mend">
29− <path
30− transform="scale(0.4) rotate(180) translate(10,0)"
31− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
32− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
33− id="path836" />
34− </marker>
35− <marker
36− inkscape:stockid="Arrow1Mend"
37− orient="auto"
38− refY="0.0"
39− refX="0.0"
40− id="Arrow1Mend"
41− style="overflow:visible;"
42− inkscape:isstock="true"
43− inkscape:collect="always">
44− <path
45− id="path4529"
46− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
47− style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
48− transform="scale(0.4) rotate(180) translate(10,0)" />
49− </marker>
50− </defs>
51− <sodipodi:namedview
52− id="base"
53− pagecolor="#ffffff"
54− bordercolor="#666666"
55− borderopacity="1.0"
56− inkscape:pageopacity="0.0"
57− inkscape:pageshadow="2"
58− inkscape:zoom="1"
59− inkscape:cx="313.5"
60− inkscape:cy="696.5"
61− inkscape:document-units="mm"
62− inkscape:current-layer="layer1"
63− showgrid="false"
64− inkscape:window-width="1920"
65− inkscape:window-height="1015"
66− inkscape:window-x="0"
67− inkscape:window-y="0"
68− inkscape:window-maximized="1" />
69− <metadata
70− id="metadata5">
71− <rdf:RDF>
72− <cc:Work
73− rdf:about="">
74− <dc:format>image/svg+xml</dc:format>
75− <dc:type
76− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
77− <dc:title />
78− </cc:Work>
79− </rdf:RDF>
80− </metadata>
81− <g
82− inkscape:label="Layer 1"
83− inkscape:groupmode="layer"
84− id="layer1">
85− <rect
86− style="fill:#ffff00;fill-opacity:1;stroke-width:0.26458332"
87− id="rect22"
88− width="31.75"
89− height="5.5562501"
90− x="70.114571"
91− y="114.96667"
92− inkscape:export-xdpi="61.120499"
93− inkscape:export-ydpi="61.120499" />
94− <text
95− id="text16"
96− y="118.67083"
97− x="72.231262"
98− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
99− xml:space="preserve"
100− inkscape:export-xdpi="61.120499"
101− inkscape:export-ydpi="61.120499"><tspan
102− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332"
103− y="118.67083"
104− x="72.231262"
105− id="tspan14"
106− sodipodi:role="line">Prelude.Nat.Z </tspan></text>
107− <text
108− id="text20"
109− y="110.99791"
110− x="82.814583"
111− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
112− xml:space="preserve"
113− inkscape:export-xdpi="61.120499"
114− inkscape:export-ydpi="61.120499"><tspan
115− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;stroke-width:0.26458332"
116− y="110.99791"
117− x="82.814583"
118− id="tspan18"
119− sodipodi:role="line">solve</tspan></text>
120− <path
121− style="fill:none;stroke:#ff0000;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
122− d="m 80.668481,106.30075 -0.0032,7.57492"
123− id="path4518"
124− inkscape:connector-curvature="0"
125− sodipodi:nodetypes="cc"
126− inkscape:export-xdpi="61.120499"
127− inkscape:export-ydpi="61.120499" />
128− <text
129− inkscape:export-ydpi="61.120499"
130− inkscape:export-xdpi="61.120499"
131− xml:space="preserve"
132− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
133− x="56.620823"
134− y="93.006248"
135− id="text832"><tspan
136− sodipodi:role="line"
137− id="tspan830"
138− x="56.620823"
139− y="93.006248"
140− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;stroke-width:0.26458332">focus</tspan></text>
141− <path
142− inkscape:export-ydpi="61.120499"
143− inkscape:export-xdpi="61.120499"
144− sodipodi:nodetypes="cc"
145− inkscape:connector-curvature="0"
146− id="path834"
147− d="m 57.649725,94.659084 -0.0032,5.458256"
148− style="fill:none;stroke:#0000ff;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker838)" />
149− <text
150− inkscape:export-ydpi="61.120499"
151− inkscape:export-xdpi="61.120499"
152− xml:space="preserve"
153− style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
154− x="56.356247"
155− y="104.91254"
156− id="text842"><tspan
157− sodipodi:role="line"
158− id="tspan840"
159− x="56.356247"
160− y="104.91254"
161− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.26458332">?{hole} ≈ Prelude.Nat.Z . {hole}</tspan></text>
162− </g>
163−</svg>
docs/image/tokenise.pngdeleted

Binary file not shown.

docs/image/tokenise.svgdeleted−740
@@ -1,740 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 210 297"
15− version="1.1"
16− id="svg8"
17− inkscape:version="0.92.2 5c3e80d, 2017-08-06"
18− sodipodi:docname="tokenise.svg">
19− <defs
20− id="defs2">
21− <marker
22− inkscape:isstock="true"
23− style="overflow:visible;"
24− id="marker7119"
25− refX="0.0"
26− refY="0.0"
27− orient="auto"
28− inkscape:stockid="Arrow1Mend">
29− <path
30− transform="scale(0.4) rotate(180) translate(10,0)"
31− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
32− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
33− id="path7117" />
34− </marker>
35− <marker
36− inkscape:stockid="Arrow1Mend"
37− orient="auto"
38− refY="0.0"
39− refX="0.0"
40− id="marker4031"
41− style="overflow:visible;"
42− inkscape:isstock="true"
43− inkscape:collect="always">
44− <path
45− id="path4029"
46− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
47− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
48− transform="scale(0.4) rotate(180) translate(10,0)" />
49− </marker>
50− <marker
51− inkscape:isstock="true"
52− style="overflow:visible;"
53− id="marker1931"
54− refX="0.0"
55− refY="0.0"
56− orient="auto"
57− inkscape:stockid="Arrow1Mend"
58− inkscape:collect="always">
59− <path
60− transform="scale(0.4) rotate(180) translate(10,0)"
61− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
62− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
63− id="path1929" />
64− </marker>
65− <marker
66− inkscape:stockid="Arrow1Mend"
67− orient="auto"
68− refY="0.0"
69− refX="0.0"
70− id="Arrow1Mend"
71− style="overflow:visible;"
72− inkscape:isstock="true"
73− inkscape:collect="always">
74− <path
75− id="path1036"
76− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
77− style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
78− transform="scale(0.4) rotate(180) translate(10,0)" />
79− </marker>
80− </defs>
81− <sodipodi:namedview
82− id="base"
83− pagecolor="#ffffff"
84− bordercolor="#666666"
85− borderopacity="1.0"
86− inkscape:pageopacity="0.0"
87− inkscape:pageshadow="2"
88− inkscape:zoom="1"
89− inkscape:cx="497.48698"
90− inkscape:cy="885.5"
91− inkscape:document-units="mm"
92− inkscape:current-layer="layer1"
93− showgrid="false"
94− inkscape:window-width="1920"
95− inkscape:window-height="1015"
96− inkscape:window-x="0"
97− inkscape:window-y="0"
98− inkscape:window-maximized="1" />
99− <metadata
100− id="metadata5">
101− <rdf:RDF>
102− <cc:Work
103− rdf:about="">
104− <dc:format>image/svg+xml</dc:format>
105− <dc:type
106− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
107− <dc:title></dc:title>
108− </cc:Work>
109− </rdf:RDF>
110− </metadata>
111− <g
112− inkscape:label="Layer 1"
113− inkscape:groupmode="layer"
114− id="layer1">
115− <rect
116− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
117− id="rect815"
118− width="4.3310161"
119− height="4.3471913"
120− x="61.383358"
121− y="51.995804"
122− inkscape:export-xdpi="61.120499"
123− inkscape:export-ydpi="61.120499" />
124− <text
125− xml:space="preserve"
126− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
127− x="62.917812"
128− y="55.649193"
129− id="text819"
130− inkscape:export-xdpi="61.120499"
131− inkscape:export-ydpi="61.120499"><tspan
132− sodipodi:role="line"
133− id="tspan817"
134− x="62.917812"
135− y="55.649193"
136− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none">i</tspan></text>
137− <rect
138− y="51.995804"
139− x="65.714371"
140− height="4.3471913"
141− width="4.3310161"
142− id="rect823"
143− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
144− inkscape:export-xdpi="61.120499"
145− inkscape:export-ydpi="61.120499" />
146− <text
147− id="text827"
148− y="55.307304"
149− x="66.760414"
150− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
151− xml:space="preserve"
152− inkscape:export-xdpi="61.120499"
153− inkscape:export-ydpi="61.120499"><tspan
154− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
155− y="55.307304"
156− x="66.760414"
157− id="tspan825"
158− sodipodi:role="line">n</tspan></text>
159− <rect
160− y="51.995804"
161− x="70.045387"
162− height="4.3471913"
163− width="4.3310161"
164− id="rect829"
165− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
166− inkscape:export-xdpi="61.120499"
167− inkscape:export-ydpi="61.120499" />
168− <text
169− id="text833"
170− y="55.063095"
171− x="71.237953"
172− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
173− xml:space="preserve"
174− inkscape:export-xdpi="61.120499"
175− inkscape:export-ydpi="61.120499"><tspan
176− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
177− y="55.063095"
178− x="71.237953"
179− id="tspan831"
180− sodipodi:role="line">p</tspan></text>
181− <rect
182− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
183− id="rect835"
184− width="4.3310161"
185− height="4.3471913"
186− x="74.376404"
187− y="51.995804"
188− inkscape:export-xdpi="61.120499"
189− inkscape:export-ydpi="61.120499" />
190− <text
191− xml:space="preserve"
192− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
193− x="75.422447"
194− y="55.356148"
195− id="text839"
196− inkscape:export-xdpi="61.120499"
197− inkscape:export-ydpi="61.120499"><tspan
198− sodipodi:role="line"
199− id="tspan837"
200− x="75.422447"
201− y="55.356148"
202− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none">u</tspan></text>
203− <rect
204− y="51.995804"
205− x="78.70742"
206− height="4.3471913"
207− width="4.3310161"
208− id="rect841"
209− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
210− inkscape:export-xdpi="61.120499"
211− inkscape:export-ydpi="61.120499" />
212− <text
213− id="text845"
214− y="55.649193"
215− x="80.241875"
216− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
217− xml:space="preserve"
218− inkscape:export-xdpi="61.120499"
219− inkscape:export-ydpi="61.120499"><tspan
220− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
221− y="55.649193"
222− x="80.241875"
223− id="tspan843"
224− sodipodi:role="line">t</tspan></text>
225− <rect
226− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
227− id="rect847"
228− width="4.3310161"
229− height="4.3471913"
230− x="83.038437"
231− y="51.995804"
232− inkscape:export-xdpi="61.120499"
233− inkscape:export-ydpi="61.120499" />
234− <text
235− xml:space="preserve"
236− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
237− x="59.172871"
238− y="88.457558"
239− id="text851"><tspan
240− sodipodi:role="line"
241− id="tspan849"
242− x="59.172871"
243− y="92.350197"
244− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none" /></text>
245− <rect
246− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
247− id="rect853"
248− width="4.3310161"
249− height="4.3471913"
250− x="87.369453"
251− y="51.995804"
252− inkscape:export-xdpi="61.120499"
253− inkscape:export-ydpi="61.120499" />
254− <text
255− xml:space="preserve"
256− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
257− x="88.46434"
258− y="55.453827"
259− id="text857"
260− inkscape:export-xdpi="61.120499"
261− inkscape:export-ydpi="61.120499"><tspan
262− sodipodi:role="line"
263− id="tspan855"
264− x="88.46434"
265− y="55.453827"
266− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none">s</tspan></text>
267− <rect
268− y="51.995804"
269− x="91.70047"
270− height="4.3471913"
271− width="4.3310161"
272− id="rect859"
273− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
274− inkscape:export-xdpi="61.120499"
275− inkscape:export-ydpi="61.120499" />
276− <text
277− id="text863"
278− y="55.649193"
279− x="93.234924"
280− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
281− xml:space="preserve"
282− inkscape:export-xdpi="61.120499"
283− inkscape:export-ydpi="61.120499"><tspan
284− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
285− y="55.649193"
286− x="93.234924"
287− id="tspan861"
288− sodipodi:role="line">t</tspan></text>
289− <rect
290− y="51.995804"
291− x="96.031487"
292− height="4.3471913"
293− width="4.3310161"
294− id="rect865"
295− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
296− inkscape:export-xdpi="61.120499"
297− inkscape:export-ydpi="61.120499" />
298− <text
299− id="text869"
300− y="55.649193"
301− x="97.565941"
302− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
303− xml:space="preserve"
304− inkscape:export-xdpi="61.120499"
305− inkscape:export-ydpi="61.120499"><tspan
306− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
307− y="55.649193"
308− x="97.565941"
309− id="tspan867"
310− sodipodi:role="line">r</tspan></text>
311− <rect
312− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
313− id="rect871"
314− width="4.3310161"
315− height="4.3471913"
316− x="100.3625"
317− y="51.995804"
318− inkscape:export-xdpi="61.120499"
319− inkscape:export-ydpi="61.120499" />
320− <text
321− xml:space="preserve"
322− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
323− x="101.89697"
324− y="55.649193"
325− id="text875"
326− inkscape:export-xdpi="61.120499"
327− inkscape:export-ydpi="61.120499"><tspan
328− sodipodi:role="line"
329− id="tspan873"
330− x="101.89697"
331− y="55.649193"
332− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none">i</tspan></text>
333− <rect
334− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
335− id="rect877"
336− width="4.3310161"
337− height="4.3471913"
338− x="104.69353"
339− y="51.995804"
340− inkscape:export-xdpi="61.120499"
341− inkscape:export-ydpi="61.120499" />
342− <text
343− xml:space="preserve"
344− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
345− x="105.73955"
346− y="55.50267"
347− id="text881"
348− inkscape:export-xdpi="61.120499"
349− inkscape:export-ydpi="61.120499"><tspan
350− sodipodi:role="line"
351− id="tspan879"
352− x="105.73955"
353− y="55.50267"
354− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none">n</tspan></text>
355− <rect
356− y="51.995804"
357− x="109.0245"
358− height="4.3471913"
359− width="4.3310161"
360− id="rect883"
361− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
362− inkscape:export-xdpi="61.120499"
363− inkscape:export-ydpi="61.120499" />
364− <text
365− id="text887"
366− y="54.965416"
367− x="110.21709"
368− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
369− xml:space="preserve"
370− inkscape:export-xdpi="61.120499"
371− inkscape:export-ydpi="61.120499"><tspan
372− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
373− y="54.965416"
374− x="110.21709"
375− id="tspan885"
376− sodipodi:role="line">g</tspan></text>
377− <text
378− xml:space="preserve"
379− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
380− x="125.67681"
381− y="55.359386"
382− id="text893"
383− inkscape:export-xdpi="61.120499"
384− inkscape:export-ydpi="61.120499"><tspan
385− sodipodi:role="line"
386− id="tspan891"
387− x="125.67681"
388− y="55.359386"
389− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none">:String</tspan></text>
390− <rect
391− y="51.995804"
392− x="113.35551"
393− height="4.3471913"
394− width="4.3310161"
395− id="rect895"
396− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
397− inkscape:export-xdpi="61.120499"
398− inkscape:export-ydpi="61.120499" />
399− <text
400− id="text899"
401− y="55.50267"
402− x="114.40154"
403− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
404− xml:space="preserve"><tspan
405− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
406− y="59.395306"
407− x="114.40154"
408− id="tspan897"
409− sodipodi:role="line" /></text>
410− <rect
411− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
412− id="rect901"
413− width="4.3310161"
414− height="4.3471913"
415− x="117.68649"
416− y="51.995804"
417− inkscape:export-xdpi="61.120499"
418− inkscape:export-ydpi="61.120499" />
419− <text
420− xml:space="preserve"
421− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
422− x="118.87907"
423− y="55.494583"
424− id="text905"
425− inkscape:export-xdpi="61.120499"
426− inkscape:export-ydpi="61.120499"><tspan
427− sodipodi:role="line"
428− id="tspan903"
429− x="118.87907"
430− y="55.494583"
431− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none">1</tspan></text>
432− <g
433− id="g950"
434− transform="translate(-15.319488,0.319156)"
435− inkscape:export-xdpi="61.120499"
436− inkscape:export-ydpi="61.120499">
437− <rect
438− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
439− id="rect907"
440− width="11.990757"
441− height="4.3471909"
442− x="47.978806"
443− y="69.310013" />
444− <text
445− xml:space="preserve"
446− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
447− x="48.706326"
448− y="72.963402"
449− id="text911"><tspan
450− sodipodi:role="line"
451− id="tspan909"
452− x="48.706326"
453− y="72.963402"
454− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none">token</tspan></text>
455− <rect
456− y="69.310013"
457− x="59.969563"
458− height="4.2674026"
459− width="10.075821"
460− id="rect913"
461− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
462− <text
463− id="text917"
464− y="72.940666"
465− x="61.015606"
466− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
467− xml:space="preserve"><tspan
468− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
469− y="72.940666"
470− x="61.015606"
471− id="tspan915"
472− sodipodi:role="line">line</tspan></text>
473− <rect
474− y="69.389801"
475− x="70.045387"
476− height="4.1876144"
477− width="7.5225825"
478− id="rect919"
479− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
480− <text
481− id="text923"
482− y="72.935829"
483− x="70.998589"
484− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
485− xml:space="preserve"><tspan
486− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
487− y="72.935829"
488− x="70.998589"
489− id="tspan921"
490− sodipodi:role="line">col</tspan></text>
491− </g>
492− <text
493− id="text927"
494− y="80.971657"
495− x="40.541954"
496− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
497− xml:space="preserve"
498− inkscape:export-xdpi="61.120499"
499− inkscape:export-ydpi="61.120499"><tspan
500− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
501− y="80.971657"
502− x="40.541954"
503− sodipodi:role="line"
504− id="tspan933">:(List (TokenData Token), Int, Int, String)</tspan></text>
505− <g
506− id="g970"
507− transform="translate(16.596112,0.319156)"
508− inkscape:export-xdpi="61.120499"
509− inkscape:export-ydpi="61.120499">
510− <rect
511− y="69.310013"
512− x="47.978806"
513− height="4.3471909"
514− width="11.990757"
515− id="rect952"
516− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
517− <text
518− id="text956"
519− y="72.963402"
520− x="48.706326"
521− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
522− xml:space="preserve"><tspan
523− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
524− y="72.963402"
525− x="48.706326"
526− id="tspan954"
527− sodipodi:role="line">token</tspan></text>
528− <rect
529− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
530− id="rect958"
531− width="10.075821"
532− height="4.2674026"
533− x="59.969563"
534− y="69.310013" />
535− <text
536− xml:space="preserve"
537− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
538− x="61.015606"
539− y="72.940666"
540− id="text962"><tspan
541− sodipodi:role="line"
542− id="tspan960"
543− x="61.015606"
544− y="72.940666"
545− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none">line</tspan></text>
546− <rect
547− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
548− id="rect964"
549− width="7.5225825"
550− height="4.1876144"
551− x="70.045387"
552− y="69.389801" />
553− <text
554− xml:space="preserve"
555− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
556− x="70.998589"
557− y="72.935829"
558− id="text968"><tspan
559− sodipodi:role="line"
560− id="tspan966"
561− x="70.998589"
562− y="72.935829"
563− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none">col</tspan></text>
564− </g>
565− <g
566− transform="translate(48.591501,0.319156)"
567− id="g990"
568− inkscape:export-xdpi="61.120499"
569− inkscape:export-ydpi="61.120499">
570− <rect
571− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
572− id="rect972"
573− width="11.990757"
574− height="4.3471909"
575− x="47.978806"
576− y="69.310013" />
577− <text
578− xml:space="preserve"
579− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
580− x="48.706326"
581− y="72.963402"
582− id="text976"><tspan
583− sodipodi:role="line"
584− id="tspan974"
585− x="48.706326"
586− y="72.963402"
587− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none">token</tspan></text>
588− <rect
589− y="69.310013"
590− x="59.969563"
591− height="4.2674026"
592− width="10.075821"
593− id="rect978"
594− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
595− <text
596− id="text982"
597− y="72.940666"
598− x="61.015606"
599− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
600− xml:space="preserve"><tspan
601− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
602− y="72.940666"
603− x="61.015606"
604− id="tspan980"
605− sodipodi:role="line">line</tspan></text>
606− <rect
607− y="69.389801"
608− x="70.045387"
609− height="4.1876144"
610− width="7.5225825"
611− id="rect984"
612− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
613− <text
614− id="text988"
615− y="72.935829"
616− x="70.998589"
617− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
618− xml:space="preserve"><tspan
619− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
620− y="72.935829"
621− x="70.998589"
622− id="tspan986"
623− sodipodi:role="line">col</tspan></text>
624− </g>
625− <path
626− style="fill:none;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
627− d="m 125.97308,68.549658 1.30238,0.0089 -0.0153,6.481345 h -1.30803"
628− id="path992"
629− inkscape:connector-curvature="0"
630− sodipodi:nodetypes="cccc"
631− inkscape:export-xdpi="61.120499"
632− inkscape:export-ydpi="61.120499" />
633− <path
634− sodipodi:nodetypes="cccc"
635− inkscape:connector-curvature="0"
636− id="path994"
637− d="m 32.561899,68.619523 -1.30238,0.0089 0.0153,6.481345 h 1.30803"
638− style="fill:none;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
639− inkscape:export-xdpi="61.120499"
640− inkscape:export-ydpi="61.120499" />
641− <rect
642− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
643− id="rect996"
644− width="11.990757"
645− height="4.3471909"
646− x="155.60759"
647− y="69.899559"
648− inkscape:export-xdpi="61.120499"
649− inkscape:export-ydpi="61.120499" />
650− <text
651− xml:space="preserve"
652− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
653− x="156.33508"
654− y="73.552948"
655− id="text1000"
656− inkscape:export-xdpi="61.120499"
657− inkscape:export-ydpi="61.120499"><tspan
658− sodipodi:role="line"
659− id="tspan998"
660− x="156.33508"
661− y="73.552948"
662− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none">string</tspan></text>
663− <rect
664− y="69.750786"
665− x="130.3979"
666− height="4.2674026"
667− width="10.075821"
668− id="rect1002"
669− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
670− inkscape:export-xdpi="61.120499"
671− inkscape:export-ydpi="61.120499" />
672− <text
673− id="text1006"
674− y="73.381439"
675− x="131.44394"
676− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
677− xml:space="preserve"
678− inkscape:export-xdpi="61.120499"
679− inkscape:export-ydpi="61.120499"><tspan
680− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
681− y="73.381439"
682− x="131.44394"
683− id="tspan1004"
684− sodipodi:role="line">line</tspan></text>
685− <rect
686− y="69.830574"
687− x="143.64868"
688− height="4.1876144"
689− width="7.5225825"
690− id="rect1008"
691− style="opacity:1;vector-effect:none;fill:none;fill-opacity:0.97596154;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
692− inkscape:export-xdpi="61.120499"
693− inkscape:export-ydpi="61.120499" />
694− <text
695− id="text1012"
696− y="73.376602"
697− x="144.60188"
698− style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
699− xml:space="preserve"
700− inkscape:export-xdpi="61.120499"
701− inkscape:export-ydpi="61.120499"><tspan
702− style="font-size:4.23333311px;stroke-width:0.70555556;stroke-miterlimit:4;stroke-dasharray:none"
703− y="73.376602"
704− x="144.60188"
705− id="tspan1010"
706− sodipodi:role="line">col</tspan></text>
707− <path
708− style="fill:none;stroke:#000000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
709− d="m 58.415342,69.700595 -0.143613,-5.887785 4.912582,-0.06048 0.03784,-6.371998"
710− id="path1025"
711− inkscape:connector-curvature="0"
712− sodipodi:nodetypes="cccc"
713− inkscape:export-xdpi="61.120499"
714− inkscape:export-ydpi="61.120499" />
715− <path
716− inkscape:connector-curvature="0"
717− id="path1927"
718− d="m 89.918872,69.996556 -0.02264,-12.07186"
719− style="fill:none;stroke:#000000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1931)"
720− sodipodi:nodetypes="cc"
721− inkscape:export-xdpi="61.120499"
722− inkscape:export-ydpi="61.120499" />
723− <path
724− sodipodi:nodetypes="cccc"
725− style="fill:none;stroke:#000000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4031)"
726− d="m 122.08751,69.519138 -0.0832,-5.464386 -2.3456,-0.06048 -0.20406,-6.674425"
727− id="path4027"
728− inkscape:connector-curvature="0"
729− inkscape:export-xdpi="61.120499"
730− inkscape:export-ydpi="61.120499" />
731− <path
732− inkscape:connector-curvature="0"
733− id="path7115"
734− d="m 147.18896,69.882051 -0.0832,-5.827299 -22.72919,0 -0.446,-6.251027"
735− style="fill:none;stroke:#000000;stroke-width:0.70555556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker7119)"
736− sodipodi:nodetypes="cccc"
737− inkscape:export-xdpi="61.120499"
738− inkscape:export-ydpi="61.120499" />
739− </g>
740−</svg>
docs/image/tree.pngdeleted

Binary file not shown.

docs/image/tree.svgdeleted−212
@@ -1,212 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<!-- Created with Inkscape (http://www.inkscape.org/) -->
3−
4−<svg
5− xmlns:dc="http://purl.org/dc/elements/1.1/"
6− xmlns:cc="http://creativecommons.org/ns#"
7− xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8− xmlns:svg="http://www.w3.org/2000/svg"
9− xmlns="http://www.w3.org/2000/svg"
10− xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11− xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12− width="210mm"
13− height="297mm"
14− viewBox="0 0 744.09448819 1052.3622047"
15− id="svg2"
16− version="1.1"
17− inkscape:version="0.92.2 5c3e80d, 2017-08-06"
18− sodipodi:docname="tree.svg">
19− <defs
20− id="defs4">
21− <marker
22− inkscape:isstock="true"
23− style="overflow:visible;"
24− id="marker5204"
25− refX="0.0"
26− refY="0.0"
27− orient="auto"
28− inkscape:stockid="Arrow1Mend">
29− <path
30− transform="scale(0.4) rotate(180) translate(10,0)"
31− style="fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1;fill:#0000ff;fill-opacity:1"
32− d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
33− id="path5206" />
34− </marker>
35− </defs>
36− <sodipodi:namedview
37− id="base"
38− pagecolor="#ffffff"
39− bordercolor="#666666"
40− borderopacity="1.0"
41− inkscape:pageopacity="0.0"
42− inkscape:pageshadow="2"
43− inkscape:zoom="1"
44− inkscape:cx="383.03443"
45− inkscape:cy="690.88799"
46− inkscape:document-units="px"
47− inkscape:current-layer="layer1"
48− showgrid="false"
49− inkscape:window-width="1129"
50− inkscape:window-height="730"
51− inkscape:window-x="671"
52− inkscape:window-y="0"
53− inkscape:window-maximized="0" />
54− <metadata
55− id="metadata7">
56− <rdf:RDF>
57− <cc:Work
58− rdf:about="">
59− <dc:format>image/svg+xml</dc:format>
60− <dc:type
61− rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
62− <dc:title />
63− </cc:Work>
64− </rdf:RDF>
65− </metadata>
66− <g
67− inkscape:label="Layer 1"
68− inkscape:groupmode="layer"
69− id="layer1">
70− <text
71− xml:space="preserve"
72− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
73− x="348.5"
74− y="334.92474"
75− id="text4136"
76− inkscape:export-xdpi="61.120499"
77− inkscape:export-ydpi="61.120499"><tspan
78− sodipodi:role="line"
79− id="tspan4138"
80− x="348.5"
81− y="334.92474"
82− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;fill-opacity:1">{hole2} :Nat-&gt;Nat</tspan></text>
83− <text
84− id="text4152"
85− y="364.17471"
86− x="380.375"
87− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
88− xml:space="preserve"
89− inkscape:export-xdpi="61.120499"
90− inkscape:export-ydpi="61.120499"><tspan
91− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;fill-opacity:1"
92− y="364.17471"
93− x="380.375"
94− id="tspan4154"
95− sodipodi:role="line">intro `{{x}}</tspan></text>
96− <text
97− xml:space="preserve"
98− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
99− x="381.0625"
100− y="470.23721"
101− id="text4156"
102− inkscape:export-xdpi="61.120499"
103− inkscape:export-ydpi="61.120499"><tspan
104− sodipodi:role="line"
105− id="tspan4158"
106− x="381.0625"
107− y="470.23721"
108− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;fill-opacity:1">solve</tspan></text>
109− <text
110− id="text4160"
111− y="414.42471"
112− x="380.5625"
113− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
114− xml:space="preserve"
115− inkscape:export-xdpi="61.120499"
116− inkscape:export-ydpi="61.120499"><tspan
117− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;fill-opacity:1"
118− y="414.42471"
119− x="380.5625"
120− id="tspan4162"
121− sodipodi:role="line">fill (Var `{{x}})</tspan></text>
122− <path
123− style="fill:#0000ff;fill-rule:evenodd;stroke:#0000ff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5204)"
124− d="m 371.4375,343.4872 0.875,29.125"
125− id="path5202"
126− inkscape:connector-curvature="0"
127− sodipodi:nodetypes="cc"
128− inkscape:export-xdpi="61.120499"
129− inkscape:export-ydpi="61.120499" />
130− <path
131− inkscape:export-ydpi="61.120499"
132− inkscape:export-xdpi="61.120499"
133− sodipodi:nodetypes="cc"
134− inkscape:connector-curvature="0"
135− id="path89"
136− d="m 371.4375,395.9872 0.875,29.125"
137− style="fill:#0000ff;fill-rule:evenodd;stroke:#0000ff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5204)" />
138− <path
139− style="fill:#0000ff;fill-rule:evenodd;stroke:#0000ff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5204)"
140− d="m 371.4375,450.3622 0.875,29.125"
141− id="path91"
142− inkscape:connector-curvature="0"
143− sodipodi:nodetypes="cc"
144− inkscape:export-xdpi="61.120499"
145− inkscape:export-ydpi="61.120499" />
146− <text
147− inkscape:export-ydpi="61.120499"
148− inkscape:export-xdpi="61.120499"
149− id="text95"
150− y="332.11224"
151− x="295.0625"
152− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
153− xml:space="preserve"><tspan
154− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
155− y="332.11224"
156− x="295.0625"
157− id="tspan93"
158− sodipodi:role="line">state</tspan></text>
159− <text
160− xml:space="preserve"
161− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
162− x="295.0625"
163− y="386.48724"
164− id="text99"
165− inkscape:export-xdpi="61.120499"
166− inkscape:export-ydpi="61.120499"><tspan
167− sodipodi:role="line"
168− id="tspan97"
169− x="295.0625"
170− y="386.48724"
171− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1">state</tspan></text>
172− <text
173− inkscape:export-ydpi="61.120499"
174− inkscape:export-xdpi="61.120499"
175− id="text103"
176− y="444.61224"
177− x="295.0625"
178− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
179− xml:space="preserve"><tspan
180− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ff0000;fill-opacity:1"
181− y="444.61224"
182− x="295.0625"
183− id="tspan101"
184− sodipodi:role="line">state</tspan></text>
185− <text
186− inkscape:export-ydpi="61.120499"
187− inkscape:export-xdpi="61.120499"
188− id="text3796"
189− y="389.29974"
190− x="345.6875"
191− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
192− xml:space="preserve"><tspan
193− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;fill-opacity:1"
194− y="389.29974"
195− x="345.6875"
196− id="tspan3794"
197− sodipodi:role="line">λ x:Nat . ? {hole 2}</tspan></text>
198− <text
199− xml:space="preserve"
200− style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
201− x="344.75"
202− y="442.73724"
203− id="text3800"
204− inkscape:export-xdpi="61.120499"
205− inkscape:export-ydpi="61.120499"><tspan
206− sodipodi:role="line"
207− id="tspan3798"
208− x="344.75"
209− y="442.73724"
210− style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0000ff;fill-opacity:1">λ x:Nat . x</tspan></text>
211− </g>
212−</svg>
docs/index.rst+1−3
@@ -13,7 +13,7 @@ Documentation for the Idris Language
13 Idris Community* has waived all copyright and related or neighboring
13 Idris Community* has waived all copyright and related or neighboring
14 rights to Documentation for Idris.
14 rights to Documentation for Idris.
15
15
16− More information concerning the CC0 can be found online at: https://creativecommons.org/publicdomain/zero/1.0/
16+ More information concerning the CC0 can be found online at: http://creativecommons.org/publicdomain/zero/1.0/
17
17
18
18
19.. toctree::
19.. toctree::
@@ -24,7 +24,5 @@ Documentation for the Idris Language
24 st/index
24 st/index
25 effects/index
25 effects/index
26 proofs/index
26 proofs/index
27− elaboratorReflection/index
28− parserLibrary/index
29 reference/index
27 reference/index
30 guides/index
28 guides/index
docs/listing/idris-prompt-helloworld.txt+2−2
@@ -1,8 +1,8 @@
1$ idris hello.idr
1$ idris hello.idr
2 ____ __ _
2 ____ __ _
3 / _/___/ /____(_)____
3 / _/___/ /____(_)____
4− / // __ / ___/ / ___/ Version 1.3.2
4+ / // __ / ___/ / ___/ Version 1.2.0
5− _/ // /_/ / / / (__ ) https://www.idris-lang.org/
5+ _/ // /_/ / / / (__ ) http://www.idris-lang.org/
6 /___/\__,_/_/ /_/____/ Type :? for help
6 /___/\__,_/_/ /_/____/ Type :? for help
7
7
8Type checking ./hello.idr
8Type checking ./hello.idr
docs/listing/idris-prompt-interp.txt+2−2
@@ -1,8 +1,8 @@
1$ idris interp.idr
1$ idris interp.idr
2 ____ __ _
2 ____ __ _
3 / _/___/ /____(_)____
3 / _/___/ /____(_)____
4− / // __ / ___/ / ___/ Version 1.3.2
4+ / // __ / ___/ / ___/ Version 1.2.0
5− _/ // /_/ / / / (__ ) https://www.idris-lang.org/
5+ _/ // /_/ / / / (__ ) http://www.idris-lang.org/
6 /___/\__,_/_/ /_/____/ Type :? for help
6 /___/\__,_/_/ /_/____/ Type :? for help
7
7
8Type checking ./interp.idr
8Type checking ./interp.idr
docs/listing/idris-prompt-start.txt+2−2
@@ -1,8 +1,8 @@
1$ idris
1$ idris
2 ____ __ _
2 ____ __ _
3 / _/___/ /____(_)____
3 / _/___/ /____(_)____
4− / // __ / ___/ / ___/ Version 1.3.2
4+ / // __ / ___/ / ___/ Version 1.2.0
5− _/ // /_/ / / / (__ ) https://www.idris-lang.org/
5+ _/ // /_/ / / / (__ ) http://www.idris-lang.org/
6/___/\__,_/_/ /_/____/ Type :? for help
6/___/\__,_/_/ /_/____/ Type :? for help
7
7
8Idris>
8Idris>
docs/make.bat+1−1
@@ -65,7 +65,7 @@ if errorlevel 9009 (
65 echo.may add the Sphinx directory to PATH.
65 echo.may add the Sphinx directory to PATH.
66 echo.
66 echo.
67 echo.If you don't have Sphinx installed, grab it from
67 echo.If you don't have Sphinx installed, grab it from
68− echo.https://www.sphinx-doc.org/
68+ echo.http://sphinx-doc.org/
69 exit /b 1
69 exit /b 1
70)
70)
71
71
docs/parserLibrary/index.rstdeleted−24
@@ -1,24 +0,0 @@
1−.. _parserLibrary:
2−
3−########################
4−Lexer and Parser Library
5−########################
6−
7−A tutorial on the lexer and parser library in Idris.
8−
9−.. note::
10−
11− The documentation for Idris has been published under the Creative
12− Commons CC0 License. As such to the extent possible under law, *The
13− Idris Community* has waived all copyright and related or neighboring
14− rights to Documentation for Idris.
15−
16− More information concerning the CC0 can be found online at: http://creativecommons.org/publicdomain/zero/1.0/
17−
18−.. toctree::
19− :maxdepth: 1
20−
21− introduction
22− lexer
23− parser
24− whitespace
docs/parserLibrary/introduction.rstdeleted−76
@@ -1,76 +0,0 @@
1−.. _parserLibraryIntro:
2−
3−***************************
4−Parser Library Introduction
5−***************************
6−
7−The parser library can be used to build Idris structures from text. It involves a
8−certain amount of complexity and so it would typically be used for big projects.
9−An example might be a compiler for another language, written in Idris.
10−
11−Of course the parser library can also be used to compile to Idris, this is what
12−is done in Idris 2 and that is what the this library appears to have been
13−written for.
14−
15−So a secondary use for this tutorial would be to help understanding the internal
16−workings of Idris 2.
17−
18−The parser library is used in a similar way to Parsec which is a library for
19−writing parsers in Haskell. It is based on higher-order parser combinators, so a
20−complicated parser can be made out of many smaller ones.
21−
22−.. list-table::
23−
24− * - This is a two stage process:
25− - Lexer - This takes the input string and turns it into a list of Tokens.
26− - Parser - This takes the list of tokens and outputs the code.
27−
28− - .. image:: ../image/parserTopLevel.png
29− :width: 307px
30− :height: 76px
31− :alt: diagram illustrating these stages of lexer and parser
32−
33−The advantage of using two stages, like this, is that things like whitespace and
34−comments don't need to be considered in every parser rule.
35−
36−The Idris parser library differs from Parsec in that you need to say, in the
37−Recogniser, whether a rule is guaranteed to consume input. This means that the
38−Idris type system prevents the construction of recognisers/rules that can't
39−consume the input.
40−
41−The Lexer is similar but works at the level of characters rather than tokens, and
42−you need to provide a TokenMap which defines how to build a token from
43−a string when a rule is matched.
44−
45−The following pages contain a tutorial for the :ref:`parserLibraryLexer` and a
46−tutorial for the :ref:`parserLibraryParser`. These tutorials have a running
47−example of a parser for integer expressions. This is a very simple example, there
48−may be easier ways to do something so simple, but it illustrates some of the
49−principles.
50−
51−Parser Library and Idris 2
52−--------------------------
53−
54−The parser library, in Idris 1, is almost the same as the code that the Idris 2
55−parser is built on. Even if you only want to use the Idris 1 parser library it
56−is useful to look at the code in the Idris 2 compilers to see how the library
57−can be used.
58−
59−Idris 2 has at least 3 compilers:
60−
61−- IDEMode - complies to SExp which is a Lisp-like structure used to communicate
62− with external editors like Emacs and Vim.
63−- Idris.Parser - This is the main compiler which compiles from a file to
64− PTerm (and eventually TT structure).
65−- REPL - compiles input from the command line.
66−
67−The following diagram is my first attempt to work out how some of the modules in
68−Idris 2 fit together (with a few of the dependencies between them shown). The
69−Idris 1 library is based on the modules at the bottom of the diagram (shown
70−in red).
71−
72−.. image:: ../image/parserModules.png
73− :width: 460px
74− :height: 496px
75− :alt: diagram illustrating these stages of lexer and parser
76−
docs/parserLibrary/lexer.rstdeleted−288
@@ -1,288 +0,0 @@
1−.. _parserLibraryLexer:
2−
3−Lexer
4−=====
5−
6−The lexer is run by calling the 'lex' function in the Text.Lexer.Core
7−module:
8−
9−.. code-block:: idris
10−
11− lex : TokenMap a -> String -> (List (TokenData a), (Int, Int, String))
12−
13−.. list-table::
14−
15− * - This function takes a String and returns a list of tokens. With the
16− tokens we have indexes back to the original string which can be used
17− in error messages:
18−
19− - .. image:: ../image/tokenise.png
20− :width: 330px
21− :height: 73px
22− :alt: diagram illustrating these stages of lexer
23−
24−TokenMap
25−--------
26−
27−In order to construct this list of tokens we need:
28−
29−- A way to recognise the tokens in the input string.
30−- A way to construct these individual tokens.
31−
32−This is given by the TokenMap which is a list of pairs containing
33−this information:
34−
35−.. code-block:: idris
36−
37− (Lexer, String -> tokenType)
38−
39−So for each Lexer in the list, if a substring in the input matches, run
40−the associated function to produce a token of type ``tokenType``
41−
42−.. list-table::
43−
44− * - from Text.Lexer.Core
45− : https://github.com/idris-lang/Idris-dev/blob/master/libs/contrib/Text/Lexer/Core.idr
46−
47− - .. code-block:: idris
48−
49− TokenMap : (tokenType : Type) -> Type
50− TokenMap tokenType = List (Lexer, String -> tokenType)
51−
52− * - We can create a tokenMap by using a function like this:
53−
54− - .. code-block:: idris
55−
56− myTokenMap : TokenMap Token
57− myTokenMap = [(is 'a',CharLit)]
58−
59−Once we have a TokenMap we can use it to lex many strings.
60−
61−Recognisers
62−-----------
63−
64−The first part of each entry in the TokenMap is the recogniser.
65−
66−A simple recogniser is 'Pred' which uses a predicate (Char -> Bool) to
67−test whether to accept the character. It can be constructed using the
68−'is' function:
69−
70−.. code-block:: idris
71−
72− *parserEx> is 'a'
73− Pred (\ARG =>
74− intToBool (prim__eqChar ARG 'a'))
75− : Recognise True
76−
77−More complicated structures can be recognised as tokens, this is done using
78−the combinator structure of recognisers. This allows recognisers to be
79−combined, for example,
80−
81−.. list-table::
82−
83− * - ``<+>`` means sequence two recognisers. If either consumes a character,
84− the sequence is guaranteed to consume a character.
85−
86− - .. code-block:: idris
87−
88− *parserEx> is 'a' <+> is 'b'
89− SeqEat (Pred (\ARG => intToBool (prim__eqChar ARG 'a')))
90− (Delay (is 'b')) : Recognise True
91−
92− * - ``<|>`` means if both consume, the combination is guaranteed
93− to consumer a character:
94−
95− - .. code-block:: idris
96−
97− *parserEx> is 'a' <|> is 'b'
98− Alt (Pred (\ARG => intToBool (prim__eqChar ARG 'a')))
99− (Pred (\ARG => intToBool (prim__eqChar ARG 'b')))
100− : Recognise True
101−
102−This diagram shows the recogniser combinator with some of its constructors:
103−
104−.. image:: ../image/recogniser.png
105− :width: 487px
106− :height: 249px
107− :alt: recogniser data structure
108−
109−A recogniser consumes its input, that is it advances the index to its input
110−string, as it generates the token list. In some cases we don't want this to
111−happen, for instance, we may need to lookahead before consuming the input
112−string.
113−
114−If a recogniser does not consume input there is a danger of an infinite loop.
115−To prevent this the recogniser is dependent on a boolean called 'consumes' which
116−is true if the recogniser is guaranteed to consume at least one character.
117−
118−The constructors of Recognise allow us to ensure that, even though parts of
119−the recogniser may not consume, overall the recogniser will consume.
120−
121−Since 'Recognise True' is more common than 'Recognise False' it is convenient to
122−use 'Lexer' as a type synonym for 'Recognise True'.
123−
124−Whitespace and Comments
125−-----------------------
126−
127−An important reason to have a lexer is to simplify the parser when whitespace
128−or comments are required. Without this the parser would require a match for
129−every combination, with and without, whitespace and comments.
130−
131−In some languages the lexer needs to remove whitespace and comments so that
132−they don't appear in the token list. In some cases whitespace is significant
133−but a single whitespace token can stand for any number of spaces, tabs,
134−carriage returns and so on.
135−
136−In some cases, such as when parsing the Idris language itself, whitespace
137−is important to indicate blocks. In this case we might want to output a
138−start-of-block token when the indent increases and an end-of-block token
139−when the indent decreases.
140−
141−This topic will be discussed more fully on this page
142−:ref:`parserLibraryWhitespace`.
143−
144−Simple Expression Example for Lexer
145−-----------------------------------
146−
147−On this page we will implement a lexer to 'lex' a very simple expression as
148−a running example, on the next page, we will go on to implement a parser for it.
149−
150−First import the lexer and parser code:
151−
152−.. code-block:: idris
153−
154− module ParserExample
155−
156− import Text.Lexer
157− import public Text.Parser.Core
158− import public Text.Parser
159−
160−Then decide on the tokens that are needed. For this example the idea is to be
161−able to parse simple arithmetic expressions, like this:
162−
163−.. code-block:: idris
164−
165− 1+(2*3)
166−
167−so we need:
168−
169−- Numbers (for now integer literals are good enough).
170−- Some operators (for now ``+``, ``-`` and ``*`` will do.
171−- Opening and closing Parentheses.
172−
173−We can define these, as tokens, like this:
174−
175−.. code-block:: idris
176−
177− %default total
178−
179− public export
180− data ExpressionToken = Number Integer
181− | Operator String
182− | OParen
183− | CParen
184− | EndInput
185−
186−It may help with debugging and to implement error messages to
187−implement ``show`` for these tokens:
188−
189−.. code-block:: idris
190−
191− export
192− Show ExpressionToken where
193− show (Number x) = "number " ++ show x
194− show (Operator x) = "operator " ++ x
195− show OParen = "("
196− show CParen = ")"
197− show EndInput = "end of input"
198−
199− export
200− Show (TokenData ExpressionToken) where
201− show (MkToken l c t) = "line=" ++ show l ++ " col=" ++ show c ++ "tok=" ++ show t
202−
203−The following defines the 'TokenMap' for this example:
204−
205−.. code-block:: idris
206−
207− ||| integer arithmetic operators plus, minus and multiply.
208− export
209− opChars : String
210− opChars = "+-*"
211−
212− operator : Lexer
213− operator = some (oneOf opChars)
214−
215− toInt' : String -> Integer
216− toInt' = cast
217−
218− expressionTokens : TokenMap ExpressionToken
219− expressionTokens =
220− [(digits, \x => Number (toInt' x)),
221− (operator, \x => Operator x),
222− (is '(' ,\x => OParen),
223− (is ')' ,\x => CParen)]
224−
225−This specifies the lexer. It gives, for each token, a function to recognise
226−the token type and a function to construct the token.
227−
228−The library module 'Text.Lexer' contains useful functions to help with this.
229−For example, the digits function used above, which reads one or more
230−numeric characters.
231−
232−We can now run the code with various strings to see what output the lexer
233−produces. This is done by calling the 'lex' function with the TokenMap and
234−input string as parameters:
235−
236−.. code-block:: idris
237−
238− cd Idris-dev/libs/contrib
239− idris -p contrib parserEx.idr
240− ____ __ _
241− / _/___/ /____(_)____
242− / // __ / ___/ / ___/ Version 1.3.2
243− _/ // /_/ / / / (__ ) http://www.idris-lang.org/
244− /___/\__,_/_/ /_/____/ Type :? for help
245−
246− Idris is free software with ABSOLUTELY NO WARRANTY.
247− For details type :warranty.
248− Type checking ./Text/Token.idr
249− Type checking ./Text/Quantity.idr
250− Type checking ./Control/Delayed.idr
251− Type checking ./Data/Bool/Extra.idr
252− Type checking ./Text/Lexer/Core.idr
253− Type checking ./Text/Lexer.idr
254− Type checking ./parserEx.idr
255−
256− *parserEx> lex expressionTokens "1+2"
257− ([MkToken 0 0 (Number 1),
258− MkToken 0
259− (case fspan (\ARG => not (intToBool (prim__eqChar ARG '\n'))) "1" of
260− (incol, "") => c + cast (length incol)
261− (incol, b) => cast (length incol))
262− (Operator "+"),
263− MkToken 0
264− (case fspan (\ARG => not (intToBool (prim__eqChar ARG '\n'))) "+" of
265− (incol, "") => c + cast (length incol)
266− (incol, b) => cast (length incol))
267− (Number 2)],
268− 0,
269− case fspan (\ARG => not (intToBool (prim__eqChar ARG '\n'))) "2" of
270− (incol, "") => c + cast (length incol)
271− (incol, b) => cast (length incol),
272− getString (MkStrLen "" 0)) : (List (TokenData ExpressionToken),
273− Int,
274− Int,
275− String)
276−
277−The lexer uses potentially infinite data structures. It has recursive
278−arguments (codata type) so code is lazy. In the output above the indexes
279−have not been computed but we can pick out the tokens:
280−
281−- (Number 1)
282−- (Operator "+")
283−- (Number 2)
284−
285−So the code is working.
286−
287−We can now go ahead and parse this token list. A parser for this example will
288−be constructed on the next page.
docs/parserLibrary/parser.rstdeleted−700
@@ -1,700 +0,0 @@
1−.. _parserLibraryParser:
2−
3−Parser
4−======
5−
6−To run the parser we call ``parse``. This requires a grammar and the output
7−from the lexer (which is a list of tokens).
8−
9−.. code-block:: idris
10−
11− parse : (act : Grammar tok c ty) -> (xs : List tok) ->
12− Either (ParseError tok) (ty, List tok)
13−
14−If successful this returns 'Right' with a pair of
15−
16−- the parse result.
17−- the unparsed tokens (the remaining input).
18−
19−otherwise it returns 'Left' with the error message.
20−
21−So we need to define the grammar for our parser, this is done using the following
22−'Grammar' data structure. This is a combinator structure, similar in principle
23−to the recogniser combinator for the lexer, which was discussed on the
24−previous page.
25−
26−As with the Recogniser the ``Grammar`` type is dependent on a boolean 'consumes'
27−value which allows us to ensure that complicated ``Grammar`` structures will always
28−consume input.
29−
30−.. code-block:: idris
31−
32− ||| Description of a language's grammar. The `tok` parameter is the type
33− ||| of tokens, and the `consumes` flag is True if the language is guaranteed
34− ||| to be non-empty - that is, successfully parsing the language is guaranteed
35− ||| to consume some input.
36− public export
37− data Grammar : (tok : Type) -> (consumes : Bool) -> Type -> Type where
38− Empty : (val : ty) -> Grammar tok False ty
39− Terminal : String -> (tok -> Maybe a) -> Grammar tok True a
40− NextIs : String -> (tok -> Bool) -> Grammar tok False tok
41− EOF : Grammar tok False ()
42−
43− Fail : Bool -> String -> Grammar tok c ty
44− Commit : Grammar tok False ()
45− MustWork : Grammar tok c a -> Grammar tok c a
46−
47− SeqEat : Grammar tok True a -> Inf (a -> Grammar tok c2 b) ->
48− Grammar tok True b
49− SeqEmpty : {c1, c2 : Bool} ->
50− Grammar tok c1 a -> (a -> Grammar tok c2 b) ->
51− Grammar tok (c1 || c2) b
52− Alt : {c1, c2 : Bool} ->
53− Grammar tok c1 ty -> Grammar tok c2 ty ->
54− Grammar tok (c1 && c2) ty
55−
56−So an example of a grammer type may look something like this:
57−``Grammar (TokenData ExpressionToken) True Integer``.
58−This is a complicated type name and a given parser will need to use it a lot.
59−So to reduce the amount of typing we can use the following type synonym (similar
60−to what is done in Idris 2
61−: https://github.com/edwinb/Idris2/blob/master/src/Parser/Support.idr
62−)
63−
64−.. code-block:: idris
65−
66− public export
67− Rule : Type -> Type
68− Rule ty = Grammar (TokenData ExpressionToken) True ty
69−
70−Parser Example
71−--------------
72−
73−On the previous page we implemented a lexer to 'lex' a very simple expression, on
74−this page we will go on to add a parser for this running example.
75−
76−.. list-table::
77−
78− * - The syntax we are aiming at is something
79− like this (expressed in Backus–Naur form (BNF)):
80− - .. code-block:: idris
81−
82− <expr> ::= <integer literal>
83− | <expr>'+'<expr>
84− | <expr>'-'<expr>
85− | <expr>'*'<expr>
86− | '('<expr>')'
87−
88− <integer literal> ::= <digit>|<integer literal><digit>
89−
90−.. list-table::
91−
92− * - To start, here is a grammar to parse an integer literal (that is, a
93− sequence of numeric characters).
94−
95− - .. code-block:: idris
96−
97− export
98− intLiteral : Rule Integer
99− intLiteral
100− = terminal (\x => case tok x of
101− Number i => Just i
102− _ => Nothing)
103−
104−In order to try this out, here is a temporary function, this calls
105−parse which takes two parameters:
106−
107−- The grammar (in this case intLiteral)
108−- The token list from the lexer.
109−
110−.. code-block:: idris
111−
112− test1 : String -> Either (ParseError (TokenData ExpressionToken))
113− (Integer, List (TokenData ExpressionToken))
114− test1 s = parse intLiteral (fst (lex expressionTokens s))
115−
116−As required, if we pass it a string which is a number literal then it will
117−return the number in the 'Right' option.
118−
119−.. code-block:: idris
120−
121− *parserEx> test1 "123"
122− Right (123, []) : Either (ParseError (TokenData ExpressionToken))
123− (Integer, List (TokenData ExpressionToken))
124−
125−If we pass it a string which is not a number literal then it will return an
126−error message.
127−
128−.. code-block:: idris
129−
130− *parserEx> test1 "a"
131− Left (Error "End of input"
132− []) : Either (ParseError (TokenData ExpressionToken))
133− (Integer, List (TokenData ExpressionToken))
134−
135−If we pass it a number followed by something else, then it will still be
136−successful, this is because we are not specifically checking for end-of-file.
137−
138−.. code-block:: idris
139−
140− *parserEx> test1 "123a"
141− Right (123, []) : Either (ParseError (TokenData ExpressionToken))
142− (Integer, List (TokenData ExpressionToken))
143− *parserEx>
144−
145−.. list-table::
146−
147− * - The ``intLiteral`` function above uses the ``terminal`` function to
148− construct the grammar
149− - .. code-block:: idris
150−
151− ||| Succeeds if running the predicate on the
152− ||| next token returns Just x, returning x.
153− ||| Otherwise fails.
154− export
155− terminal : (tok -> Maybe a) -> Grammar tok True a
156− terminal = Terminal
157−
158−This is defined here
159−: https://github.com/idris-lang/Idris-dev/blob/master/libs/contrib/Text/Parser/Core.idr
160−Idris 2 uses a slightly different version which stores an error message like
161−"Expected integer literal" which can be output if the rule fails
162−: https://github.com/edwinb/Idris2/blob/master/src/Text/Parser/Core.idr
163−
164−.. list-table::
165−
166− * - The 'terminal' function is also used to construct the other
167− elements of the grammar that we require, for instance,
168− opening parenthesis:
169−
170− - .. code-block:: idris
171−
172− openParen : Rule Integer
173− openParen = terminal (\x => case tok x of
174− OParen => Just 0
175− _ => Nothing)
176−
177−Integer value is not really relevant for parenthesis so ``0`` (zero) is used as
178−a default value.
179−
180−As before, this can be tested with a function like this:
181−
182−.. code-block:: idris
183−
184− test2 : String -> Either (ParseError (TokenData ExpressionToken))
185− (Integer, List (TokenData ExpressionToken))
186− test2 s = parse openParen (fst (lex expressionTokens s))
187−
188−We can see below that it correctly parses an open parenthesis and gives an
189−error for anything else:
190−
191−.. code-block:: idris
192−
193− *parserEx> test2 "("
194− Right (0, []) : Either (ParseError (TokenData ExpressionToken))
195− (Integer, List (TokenData ExpressionToken))
196− *parserEx> test2 "123"
197− Left (Error "Unrecognised token"
198− [MkToken 0
199− 0
200− (Number 123)]) : Either (ParseError (TokenData ExpressionToken))
201− (Integer,
202− List (TokenData ExpressionToken))
203−
204−Now we have two Grammars we can try combining them. The following test looks
205−for ``openParen`` followed by ``intLiteral``, the two Grammars are combined using
206−``<*>``. The ``map const`` part uses the integer value from the first.
207−
208−The following test is looking for ``(`` followed by a number:
209−
210−.. code-block:: idris
211−
212− test3 : String -> Either (ParseError (TokenData ExpressionToken))
213− (Integer, List (TokenData ExpressionToken))
214− test3 s = parse (map const openParen <*> intLiteral) (fst (lex expressionTokens s))
215−
216−We can see below that ``(`` followed by a number is successfully parsed but, as
217−required, other token lists are not:
218−
219−.. code-block:: idris
220−
221− *parserEx> test3 "(123"
222− Right (0, []) : Either (ParseError (TokenData ExpressionToken))
223− (Integer, List (TokenData ExpressionToken))
224− *parserEx> test3 "(("
225− Left (Error "Unrecognised token"
226− [MkToken 0
227− (case fspan (\ARG => not (intToBool (prim__eqChar ARG '\n')))
228− "(" of
229− (incol, "") => c + cast (length incol)
230− (incol, b) => cast (length incol))
231− OParen]) : Either (ParseError (TokenData ExpressionToken))
232− (Integer, List (TokenData ExpressionToken))
233−
234− *parserEx> test3 "123"
235− Left (Error "Unrecognised token"
236− [MkToken 0
237− 0
238− (Number 123)]) : Either (ParseError (TokenData ExpressionToken))
239− (Integer,
240− List (TokenData ExpressionToken))
241− *parserEx> test3 "123("
242− Left (Error "Unrecognised token"
243− [MkToken 0 0 (Number 123),
244− MkToken 0
245− (case fspan (\ARG => not (intToBool (prim__eqChar ARG '\n')))
246− "321" of
247− (incol, "") => c + cast (length incol)
248− (incol, b) => cast (length incol))
249− OParen]) : Either (ParseError (TokenData ExpressionToken))
250− (Integer, List (TokenData ExpressionToken))
251−
252−.. list-table::
253−
254− * - The closing parenthesis is constructed in the same way.
255−
256− - .. code-block:: idris
257−
258− closeParen : Rule Integer
259− closeParen = terminal (\x => case tok x of
260− CParen => Just 0
261− _ => Nothing)
262−
263−.. list-table::
264−
265− * - Now we can generate a Grammar for an expression inside parenthesis
266− like this.
267−
268− - .. code-block:: idris
269−
270− paren : Rule Integer -> Rule Integer
271− paren exp = openParen *> exp <* closeParen
272−
273−The use of ``*>`` and ``<*`` instead of ``<*>`` is an easy way to use the integer
274−value from the inner expression.
275−
276−So lets try to use this to define a grammar which recognises either:
277−
278−- An integer literal
279−- An integer literal inside parenthesis
280−- An integer literal inside parenthesis inside parenthesis
281−- ... and so on.
282−
283−.. list-table::
284−
285− * - This requires a recursively defined structure like this:
286−
287− - .. code-block:: idris
288−
289− partial
290− expr : Rule Integer
291− expr = intLiteral <|> (paren expr)
292−
293−This is a valid grammar because every time it is called it is guaranteed to
294−consume a token. However, as an Idris structure, it is problematic due to
295−the recursion. Defining it as partial allows it to compile but at runtime
296−we are likely to get a crash with an (unhelpful) error message like
297−``killed by signal 11``.
298−
299−So a better method is to use ``do`` notation as described in the following
300−section.
301−
302−Monadic Combinator
303−------------------
304−
305−In addition to ``<|>`` and ``<*>`` there is a ``>>=`` combinator, which is
306−defined like this:
307−
308−.. code-block:: idris
309−
310− ||| Sequence two grammars. If either consumes some input, the sequence is
311− ||| guaranteed to consume some input. If the first one consumes input, the
312− ||| second is allowed to be recursive (because it means some input has been
313− ||| consumed and therefore the input is smaller)
314− export %inline
315− (>>=) : {c1 : Bool} ->
316− Grammar tok c1 a ->
317− inf c1 (a -> Grammar tok c2 b) ->
318− Grammar tok (c1 || c2) b
319− (>>=) {c1 = False} = SeqEmpty
320− (>>=) {c1 = True} = SeqEat
321−
322−.. list-table::
323−
324− * - This allows us to use ``do`` notation for the previous parenthesis example:
325−
326− - .. code-block:: idris
327−
328− expr = intLiteral <|> do
329− openParen
330− r <- expr
331− closeParen
332− pure r
333−
334−This can be more flexible than using the ``<*>`` operator. Also it is defined
335−using ``Inf`` so we can implement recursively defined grammars as above.
336−
337−Implementing the Arithmetic Operators
338−-------------------------------------
339−
340−.. list-table::
341−
342− * - Now for the operations, in this case: ``+``, ``-`` and ``*``.
343− The syntax we require for these infix operators
344− would require recursive grammars like this:
345−
346− - .. code-block:: idris
347−
348− expr = expr (op "+") expr
349−
350−As already explained, ``do`` notation can allow us to use recursive
351−definitions but not necessarily left-recursion like this.
352−
353−In order to work up to this gradually lets start with prefix operators
354−(sometimes known as Polish notation) then modify later for infix operators.
355−
356−.. list-table::
357−
358− * - So prefix operators would have this sort of form:
359−
360− - .. code-block:: idris
361−
362− expr = (add (op "+") expr expr)
363−
364−where ``op`` is defined like this:
365−
366−.. code-block:: idris
367−
368− ||| Matches if this is an operator token and string matches, that is,
369− ||| it is the required type of operator.
370− op : String -> Rule Integer
371− op s = terminal (\x => case tok x of
372− (Operator s1) => if s==s1 then Just 0 else Nothing
373− _ => Nothing)
374−
375−.. list-table::
376−
377− * - and ``add`` is defined like this:
378−
379− Where:
380−
381− - x is the add operator.
382− - y is the first operand.
383− - z is the second operand.
384−
385− - .. code-block:: idris
386−
387− addInt : Integer -> Integer -> Integer
388− addInt a b = a+b
389−
390− export
391− add : Grammar tok c1 Integer ->
392− Grammar tok c2 Integer ->
393− Grammar tok c3 Integer ->
394− Grammar tok ((c1 || c2) || c3) Integer
395− add x y z = map addInt (x *> y) <*> z
396−
397−
398−
399−The resulting integer will be the sum of the two operands.
400−
401−.. list-table::
402−
403− * - The other operators are defined in a similar way:
404−
405− - .. code-block:: idris
406−
407− subInt : Integer -> Integer -> Integer
408− subInt a b = a-b
409−
410− export
411− sub : Grammar tok c1 Integer ->
412− Grammar tok c2 Integer ->
413− Grammar tok c3 Integer ->
414− Grammar tok ((c1 || c2) || c3) Integer
415− sub x y z = map subInt (x *> y) <*> z
416−
417− multInt : Integer -> Integer -> Integer
418− multInt a b = a*b
419−
420− export
421− mult : Grammar tok c1 Integer ->
422− Grammar tok c2 Integer ->
423− Grammar tok c3 Integer ->
424− Grammar tok ((c1 || c2) || c3) Integer
425− mult x y z = map multInt (x *> y) <*> z
426−
427−So the top level ``Grammar`` can now be defined as follows. Note that this is
428−partial as it is a potentially infinite structure and so not total.
429−
430−.. code-block:: idris
431−
432− partial
433− expr : Rule Integer
434− expr = (add (op "+") expr expr)
435− <|> (sub (op "-") expr expr)
436− <|> (mult (op "*") expr expr)
437− <|> intLiteral <|> (paren expr)
438−
439−.. list-table::
440−
441− * - To make the testing easier we can use this function:
442−
443− - .. code-block:: idris
444−
445− partial
446− test : String -> Either (ParseError (TokenData ExpressionToken))
447− (Integer, List (TokenData ExpressionToken))
448− test s = parse expr (fst (lex expressionTokens s))
449−
450−.. list-table::
451−
452− * - First test a valid (prefix) expression:
453−
454− - .. code-block:: idris
455−
456− *parserEx> test "+1*6(4)"
457− Right (25,
458− []) : Either (ParseError (TokenData ExpressionToken))
459− (Integer, List (TokenData ExpressionToken))
460−
461−Then an invalid syntax:
462−
463−.. code-block:: idris
464−
465− *parserEx> test "))"
466− Left (Error "Unrecognised token"
467− [MkToken 0 0 CParen,
468− MkToken 0
469− (case fspan (\ARG =>
470− not (intToBool (prim__eqChar ARG
471− '\n')))
472− ")" of
473− (incol, "") => c + cast (length incol)
474− (incol, b) => cast (length incol))
475− CParen]) : Either (ParseError (TokenData ExpressionToken))
476− (Integer,
477− List (TokenData ExpressionToken))
478−
479−However if we try something that is invalid, but starts with a valid token,
480−then it will return ``Right`` (to indicate success)
481−
482−.. code-block:: idris
483−
484− *parserEx> test "1))"
485− Right (1,
486− [MkToken 0
487− (case fspan (\ARG =>
488− not (intToBool (prim__eqChar ARG '\n')))
489− "1" of
490− (incol, "") => c + cast (length incol)
491− (incol, b) => cast (length incol))
492− CParen,
493− MkToken 0
494− (case fspan (\ARG =>
495− not (intToBool (prim__eqChar ARG '\n')))
496− ")" of
497− (incol, "") => c + cast (length incol)
498− (incol, b) => cast (length incol))
499− CParen]) : Either (ParseError (TokenData ExpressionToken))
500− (Integer,
501− List (TokenData ExpressionToken))
502−
503−Infix Notation
504−--------------
505−
506−So far we have implemented a prefix notation for operators (like this:
507−``+ expr expr``) but the aim is to implemented an infix notation (like this:
508−``expr + expr``). To do this we must be able to deal with potentially
509−infinite data structures (see Codata Types here :ref:`sect-typefuns`).
510−
511−First alter the grammar to have infix operations:
512−
513−.. code-block:: idris
514−
515− addInt : Integer -> Integer -> Integer
516− addInt a b = a+b
517−
518− export
519− add : Grammar tok c1 Integer ->
520− Grammar tok c2 Integer ->
521− Grammar tok c3 Integer ->
522− Grammar tok ((c1 || c2) || c3) Integer
523− add x y z = map addInt (x <* y) <*> z
524−
525− subInt : Integer -> Integer -> Integer
526− subInt a b = a-b
527−
528− export
529− sub : Grammar tok c1 Integer ->
530− Grammar tok c2 Integer ->
531− Grammar tok c3 Integer ->
532− Grammar tok ((c1 || c2) || c3) Integer
533− sub x y z = map subInt (x <* y) <*> z
534−
535−
536− multInt : Integer -> Integer -> Integer
537− multInt a b = a*b
538−
539− export
540− mult : Grammar tok c1 Integer ->
541− Grammar tok c2 Integer ->
542− Grammar tok c3 Integer ->
543− Grammar tok ((c1 || c2) || c3) Integer
544− mult x y z = map multInt (x <* y) <*> z
545−
546− partial
547− expr : Rule Integer
548− expr = (add expr (op "+") expr)
549− <|> (sub expr (op "-") expr)
550− <|> (mult expr (op "*") expr)
551− <|> intLiteral <|> (paren expr)
552−
553−However, if this was run, the code would not terminate.
554−
555−Implement Left Recursion Elimination
556−------------------------------------
557−
558−Left factoring, like this, is a general problem.
559−
560−If we have a rule like this:
561−
562−.. code-block:: idris
563−
564− A -> (x<*>y) <|> (x<*>z)
565−
566−If ``x<*>y`` fails but ``x<*>z`` would succeed a problem is that, ``x<*>y`` has
567−already consumed ``x``, so now ``x<*>z`` will fail.
568−
569−so we could write code to backtrack. That is ``try`` ``x<*>y`` without consuming
570−so that, if the first token succeeds but the following tokens fail, then the
571−first tokens would not be consumed.
572−
573−Another approach is left factoring:
574−
575−Left Factoring
576−--------------
577−
578−Replace the rule with two rules (that is we add a non-terminal symbol) so
579−for example, instead of:
580−
581−.. code-block:: idris
582−
583− A -> (x<*>y) <|> (x<*>z)
584−
585−we add an extra rule to give:
586−
587−.. code-block:: idris
588−
589− A -> x<*>N
590− N -> y <|> z
591−
592−That is we convert a general context-free grammar to a LL(1) grammar. Although
593−not every context-free grammar can be converted to a LL(1) grammar.
594−
595−This still does not solve the infinite recursion issue and there is another
596−problem: the precedence of the operators ``+``, ``-`` and ``*`` is not explicit.
597−
598−.. list-table::
599−
600− * - To resolve this we can alter the example to have a BNF like this:
601− Where braces ``{ ... }`` mean the contents can occur 1 or more times.
602−
603− - .. code-block:: idris
604−
605− 'expression' ::= ('+'|'-') 'term' {('+'|'-') 'term'}
606−
607− 'term' ::= 'factor' {'*' 'factor'}
608−
609− 'factor' ::=
610− number
611− | '(' 'expression' ')'
612−
613−
614−.. code-block:: idris
615−
616− expr : Rule Integer
617−
618− factor : Rule Integer
619− factor = intLiteral <|> do
620− openParen
621− r <- expr
622− closeParen
623− pure r
624−
625− term : Rule Integer
626− term = map multInt factor <*> (
627− (op "*")
628− *> factor)
629− <|> factor
630−
631− expr = map addInt term <*> (
632− (op "+")
633− *> term)
634− <|> map subInt term <*> (
635− (op "-")
636− *> term)
637− <|> term
638−
639− calc : String -> Either (ParseError (TokenData ExpressionToken))
640− (Integer, List (TokenData ExpressionToken))
641− calc s = parse expr (fst (lex expressionTokens s))
642−
643− lft : (ParseError (TokenData ExpressionToken)) -> IO ()
644− lft (Error s lst) = putStrLn ("error:"++s)
645−
646− rht : (Integer, List (TokenData ExpressionToken)) -> IO ()
647− rht i = putStrLn ("right " ++ (show i))
648−
649− main : IO ()
650− main = do
651− putStr "alg>"
652− x <- getLine
653− either lft rht (calc x) -- eliminator for Either
654−
655−As the following tests show, this now handles infix operators and precedence.
656−
657−.. list-table::
658−
659− * - For example '*' is an infix operator:
660−
661− - .. code-block:: idris
662−
663− *algebraREPL> :exec
664− alg>2*3
665− right (6, [])
666−
667− * - Check that atomic number literals work:
668−
669− - .. code-block:: idris
670−
671− *algebraREPL> :exec
672− alg>2
673− right (2, [])
674−
675− * - Check that '*' has a higher precedence than '+'.
676−
677− - .. code-block:: idris
678−
679− *algebraREPL> :exec
680− alg>2+3*4
681− right (14, [])
682−
683− * - Also '*' has a higher precedence than '+' when the order is reversed.
684−
685− - .. code-block:: idris
686−
687− *algebraREPL> :exec
688− alg>3*4+2
689− right (14, [])
690−
691− * - Also precedence can be overridden by parenthesis.
692−
693− - .. code-block:: idris
694−
695− *algebraREPL> :exec
696− alg>(2+3)*4
697− right (20, [])
698−
699−This is still not correct because it does not correctly parse multiple sums or terms
700−like ``1+2+3`` or ``1*2*3``.
docs/parserLibrary/whitespace.rstdeleted−250
@@ -1,250 +0,0 @@
1−.. _parserLibraryWhitespace:
2−
3−Whitespace and Comments
4−=======================
5−
6−The previous two pages introduced the lexer and parser but have not yet
7−discussed how to handle whitespace and comments.
8−
9−In some grammars whitespace and comments would not be considered significant and
10−so we might be tempted not to generate any tokens for them. However, in the
11−running example, we may want to make spaces significant in the future. For
12−example, we might want to implement function application expressed by
13−juxtaposition as in Haskell and Idris like this: ``f x``.
14−
15−So, on this page, we will add a token for whitespace and comments. We will
16−then consider two ways to process this:
17−
18−- Filter all whitespace tokens from the lexer results before passing to
19− the parser.
20−- Process the whitespace tokens in the parser.
21−
22−Whitespace and Comments in Lexer
23−--------------------------------
24−
25−To start with we can use the same token for both whitespace and comments. Here
26−it is called ``Comment`` and added to the ``ExpressionToken`` data structure
27−like this:
28−
29−.. code-block:: idris
30−
31− public export
32− data ExpressionToken = Number Integer
33− | Operator String
34− | OParen
35− | CParen
36− | Comment String
37− | EndInput
38−
39−This is added to the ``TokenMap`` like this:
40−
41−.. code-block:: idris
42−
43− ||| from https://github.com/edwinb/Idris2/blob/master/src/Parser/Lexer.idr
44− comment : Lexer
45− comment = is '-' <+> is '-' <+> many (isNot '\n')
46−
47− expressionTokens : TokenMap ExpressionToken
48− expressionTokens =
49− [(digits, \x => Number (toInt' x)),
50− (operator, \x => Operator x),
51− (is '(' ,\x => OParen),
52− (is ')' ,\x => CParen),
53− (spaces, Comment),
54− (comment, Comment)]
55−
56−As you can see, the comment is defined like a single line Idris comment,
57−it starts with ``--`` and continues for the remainder of the line.
58−
59−We don't need to define ``spaces`` because it is already defined in
60−: https://github.com/idris-lang/Idris-dev/blob/master/libs/contrib/Text/Lexer.idr
61−like this:
62−
63−.. code-block:: idris
64−
65− ||| Recognise a single whitespace character
66− ||| /\\s/
67− space : Lexer
68− space = pred isSpace
69−
70− ||| Recognise one or more whitespace characters
71− ||| /\\s+/
72− spaces : Lexer
73− spaces = some space
74−
75−If these whitespace tokens are not significant, that is, they can appear
76−anywhere and they are optional then we can filter them out before the parser
77−gets them like this:
78−
79−.. code-block:: idris
80−
81− processWhitespace : (List (TokenData ExpressionToken), Int, Int, String)
82− -> (List (TokenData ExpressionToken), Int, Int, String)
83− processWhitespace (x,l,c,s) = ((filter notComment x),l,c,s) where
84− notComment : TokenData ExpressionToken -> Bool
85− notComment t = case tok t of
86− Comment _ => False
87− _ => True
88−
89− calc : String -> Either (ParseError (TokenData ExpressionToken))
90− (Integer, List (TokenData ExpressionToken))
91− calc s = parse expr (fst (processWhitespace (lex expressionTokens s)))
92−
93−
94−Whitespace and Comments in Parser
95−---------------------------------
96−
97−If we sometimes require whitespace to be significant then we can't filter
98−them out as above. In this case the ``Comment`` tokens are sent to the parser
99−which now needs to be able to handle them.
100−
101−.. code-block:: idris
102−
103− commentSpace : Rule Integer
104− commentSpace = terminal (\x => case tok x of
105− Comment s => Just 0
106− _ => Nothing)
107−
108−So far we don't have any syntax that requires spaces to be significant so we
109−need to define the grammar so that it will parse with, or without, spaces.
110−This needs to be done in a systematic way, here I have defined the grammar so
111−that there is an optional space to the right of every atom or operator.
112−First add versions of ``intLiteral`` , ``openParen`` , ``closeParen``
113−and ``op`` that allow optional spaces/comments to the right of them:
114−
115−.. code-block:: idris
116−
117− intLiteralC : Rule Integer
118− intLiteralC = (intLiteral <* commentSpace) <|> intLiteral
119−
120− openParenC : Rule Integer
121− openParenC = (openParen <* commentSpace) <|> openParen
122−
123− closeParenC : Rule Integer
124− closeParenC = (closeParen <* commentSpace) <|> closeParen
125−
126− ||| like op but followed by optional comment or space
127− opC : String -> Rule Integer
128− opC s = ((op s) <* commentSpace) <|> (op s)
129−
130−Then just use these functions instead of the original functions:
131−
132−.. code-block:: idris
133−
134− expr : Rule Integer
135−
136− factor : Rule Integer
137− factor = intLiteralC <|> do
138− openParenC
139− r <- expr
140− closeParenC
141− pure r
142−
143− term : Rule Integer
144− term = map multInt factor <*> (
145− (opC "*")
146− *> factor)
147− <|> factor
148−
149− expr = map addInt term <*> (
150− (opC "+")
151− *> term)
152− <|> map subInt term <*> (
153− (opC "-")
154− *> term)
155− <|> term
156−
157− calc : String -> Either (ParseError (TokenData ExpressionToken))
158− (Integer, List (TokenData ExpressionToken))
159− calc s = parse expr (fst (lex expressionTokens s))
160−
161− lft : (ParseError (TokenData ExpressionToken)) -> IO ()
162− lft (Error s lst) = putStrLn ("error:"++s)
163−
164− rht : (Integer, List (TokenData ExpressionToken)) -> IO ()
165− rht i = putStrLn ("right " ++ (show i))
166−
167− main : IO ()
168− main = do
169− putStr "alg>"
170− x <- getLine
171− either lft rht (calc x) -- eliminator for Either
172−
173−
174−Defining Block Structure using Indents
175−--------------------------------------
176−
177−Many languages such as Python, Haskell and Idris use indents to delimit
178−the block structure of the language.
179−
180−We can see how Idris2 does it here
181−: https://github.com/edwinb/Idris2/blob/master/src/Parser/Support.idr
182−
183−.. code-block:: idris
184−
185− export
186− IndentInfo : Type
187− IndentInfo = Int
188−
189− export
190− init : IndentInfo
191− init = 0
192−
193−EndInput Token
194−--------------
195−
196−So far, the parser will return a successful result even if the full input
197−is not consumed. To ensure that the top level syntax is fully matched we
198−add a ``EndInput`` token to indicate the last token.
199−
200−``EndInput`` is added to the other tokens like this:
201−
202−.. code-block:: idris
203−
204− data ExpressionToken = Number Integer
205− | Operator String
206− | OParen
207− | CParen
208− | Comment String
209− | EndInput
210−
211−A rule to consume this token is added:
212−
213−.. code-block:: idris
214−
215− eoi : Rule Integer
216− eoi = terminal (\x => case tok x of
217− EndInput => Just 0
218− _ => Nothing)
219−
220−Instead of using ``expr`` at the top level of the syntax we can now define
221−``exprFull`` as shown here. This will make sure that only when ``EndInput``
222−is consumed will the parse be successful:
223−
224−.. code-block:: idris
225−
226− exprFull : Rule Integer
227− exprFull = expr <* eoi
228−
229−The following code makes sure ``EndInput`` is added to the end of the token
230−list:
231−
232−.. code-block:: idris
233−
234− processWhitespace : (List (TokenData ExpressionToken), Int, Int, String)
235− -> (List (TokenData ExpressionToken), Int, Int, String)
236− processWhitespace (x,l,c,s) = ((filter notComment x)++
237− [MkToken l c EndInput],l,c,s) where
238− notComment : TokenData ExpressionToken -> Bool
239− notComment t = case tok t of
240− Comment _ => False
241− _ => True
242−
243−All we have to do now is use ``exprFull`` instead of ``expr``:
244−
245−.. code-block:: idris
246−
247− calc : String -> Either (ParseError (TokenData ExpressionToken))
248− (Integer, List (TokenData ExpressionToken))
249− calc s = parse exprFull (fst (processWhitespace (lex expressionTokens s)))
250−
docs/proofs/definitional.rstdeleted−235
@@ -1,235 +0,0 @@
1−*******************
2−Background Material
3−*******************
4−
5−In order to understand how to write proofs in Idris I think its worth clarifying some fundamentals, such as,
6−
7−- Propositions and judgments
8−- Boolean and constructive logic
9−- Curry-Howard correspondence
10−- Definitional and propositional equalities
11−- Axiomatic and constructive approaches
12−
13−Propositions and Judgments
14−==========================
15−
16−Propositions are the subject of our proofs, before the proof then we can't formally say if they are true or not. If the proof is successful then the result is a 'judgment'.
17−For instance, if the ``proposition`` is,
18−
19−+-------+
20−| 1+1=2 |
21−+-------+
22−
23−When we prove it, the ``judgment`` is,
24−
25−+------------+
26−| 1+1=2 true |
27−+------------+
28−
29−Or if the ``proposition`` is,
30−
31−+-------+
32−| 1+1=3 |
33−+-------+
34−
35−Obviously we can't prove it is true, but it is still a valid proposition and perhaps we can prove it is false so the ``judgment`` is,
36−
37−+-------------+
38−| 1+1=3 false |
39−+-------------+
40−
41−This may seem a bit pedantic but it is important to be careful, in mathematics not every proposition is true or false for instance, a proposition may be unproven or even unprovable.
42−
43−So the logic here is different from the logic that comes from boolean algebra. In that case what is not true is false and what is not false is true. The logic we are using here does not have this 'law of excluded middle' so we have to be careful not to use it.
44−
45−A false proposition is taken to be a contradiction and if we have a contradiction then we can prove anything, so we need to avoid this. Some languages, used in proof assistants, prevent contradictions but such languages cannot be Turing complete, so Idris does not prevent contradictions.
46−
47−The logic we are using is called constructive (or sometimes intuitional) because we are constructing a 'database' of judgments.
48−
49−There are also many other types of logic, another important type of logic for Idris programmers is '``linear logic``' but that's not discussed on this page.
50−
51−Curry-Howard correspondence
52−===========================
53−
54−So how to we relate these proofs to Idris programs? It turns out that there is a correspondence between constructive logic and type theory. They are the same structure and we can switch backward and forward between the two notations because they are the same thing.
55−
56−The way that this works is that a proposition is a type so this,
57−
58−.. code-block:: idris
59−
60− Idris> 1+1=2
61− 2 = 2 : Type
62−
63−is a proposition and it is also a type. This is built into Idris so when an '=' equals sign appears in a function type an equality type is generated. The following will also produce an equality type:
64−
65−
66−.. code-block:: idris
67−
68− Idris> 1+1=3
69− 2 = 3 : Type
70−
71−Both of these are valid propositions so both are valid equality types. But how do we represent true judgment, that is, how do we denote 1+1=2 is true but not 1+1=3.
72−A type that is true is inhabited, that is, it can be constructed. An equality type has only one constructor 'Refl' so a proof of 1+1=2 is
73−
74−.. code-block:: idris
75−
76− onePlusOne : 1+1=2
77− onePlusOne = Refl
78−
79−So how can Refl, which is a constructor without any parameters, construct an equality type? If we type it on its own then it can't:
80−
81−.. code-block:: idris
82−
83− Idris> Refl
84− (input):Can't infer argument A to Refl, Can't infer argument x to Refl
85−
86−So it must pattern match on its return type:
87−
88−.. code-block:: idris
89−
90− Idris> the (1=1) Refl
91− Refl : 1 = 1
92−
93−So now that we can represent propositions as types other aspects of propositional logic can also be translated to types as follows:
94−
95−+----------+-------------------+--------------------------+
96−| | propositions | example of possible type |
97−+----------+-------------------+--------------------------+
98−| A | x=y | |
99−+----------+-------------------+--------------------------+
100−| B | y=z | |
101−+----------+-------------------+--------------------------+
102−| and | A /\\ B | ``Pair(x=y,y=z)`` |
103−+----------+-------------------+--------------------------+
104−| or | A \\/ B | ``Either(x=y,y=z)`` |
105−+----------+-------------------+--------------------------+
106−| implies | A -> B | ``(x=y) -> (y=x)`` |
107−+----------+-------------------+--------------------------+
108−| for all | y=z | |
109−+----------+-------------------+--------------------------+
110−| exists | y=z | |
111−+----------+-------------------+--------------------------+
112−
113−
114−And (conjunction)
115−-----------------
116−
117−We can have a type which corresponds to conjunction:
118−
119−.. code-block:: idris
120−
121− AndIntro : a -> b -> A a b
122−
123−There is a built in type called 'Pair'.
124−
125−Or (disjunction)
126−----------------
127−
128−We can have a type which corresponds to disjunction:
129−
130−.. code-block:: idris
131−
132− data Or : Type -> Type -> Type where
133− OrIntroLeft : a -> A a b
134− OrIntroRight : b -> A a b
135−
136−There is a built in type called 'Either'.
137−
138−Definitional and Propositional Equalities
139−=========================================
140−
141−We have seen that we can 'prove' a type by finding a way to construct a term. In the case of equality types there is only one constructor which is 'Refl'.
142−We have also seen that each side of the equation does not have to be identical like '2=2'. It is enough that both sides are ``definitionaly equal`` like this:
143−
144−.. code-block:: idris
145−
146− onePlusOne : 1+1=2
147− onePlusOne = Refl
148−
149−So both sides of this equation nomalise to 2 and so Refl will type match and the proposition is proved.
150−
151−We don't have to stick to terms, can also use symbolic parameters so the following will compile:
152−
153−.. code-block:: idris
154−
155− varIdentity : m = m
156− varIdentity = Refl
157−
158−If a proposition/equality type is not definitionaly equal but is still true then it is ``propositionaly equal``. In this case we may still be able to prove it but some steps in the proof may require us to add something into the terms or at least to take some sideways steps to get to a proof.
159−
160−Especially when working with equalities containing variable terms (inside functions) it can be hard to know which equality types are definitially equal, in this example plusReducesL is '``definitially equal``' but plusReducesR is not (although it is '``propositionaly equal``'). The only difference between them is the order of the operands.
161−
162−.. code-block:: idris
163−
164− plusReducesL : (n:Nat) -> plus Z n = n
165− plusReducesL n = Refl
166−
167− plusReducesR : (n:Nat) -> plus n Z = n
168− plusReducesR n = Refl
169−
170−plusReducesR gives the following error:
171−
172−
173−.. code-block:: idris
174−
175− - + Errors (1)
176− `-- proof.idr line 6 col 17:
177− When checking right hand side of plusReducesR with expected type
178− plus n 0 = n
179−
180− Type mismatch between
181− n = n (Type of Refl)
182− and
183− plus n 0 = n (Expected type)
184−
185− Specifically:
186− Type mismatch between
187− n
188− and
189− plus n 0
190−
191−So why is 'Refl' able to prove some equality types but not others?
192−
193−The first answer is that 'plus' is defined in such a way that it splits on its first argument so it is simple to prove when 0 is the first argument but not the second. So what is the general way to know if Refl will work?
194−
195−If an equality type can be proved/constructed by using Refl alone it is known as a ``definitional equality``. In order to be definitinally equal both sides of the equation must normalise to unique values. That is, each step in the proof must reduce the term so each step is effectively forced.
196−
197−So when we type 1+1 in Idris it is immediately converted to 2 because definitional equality is built in.
198−
199−.. code-block:: idris
200−
201− Idris> 1+1
202− 2 : Integer
203−
204−In the following pages we discuss how to resolve propositionaly equalies.
205−
206−Axiomatic and Constructive Approaches
207−=====================================
208−
209−How should we define types so that we can do proofs on them? In the natural numbers with the plus example we could have started by treating it as a group based on the plus operator. So we have axioms:
210−
211−- for all x,y : ``x+y=y+x``
212−- for all x: ``x + 0 = x = 0 + x``
213−- for all x,y,z: ``(x + y) + z = x + (x + z)``
214−
215−Then we can implement '+' so that it respects these axioms (presumably implemented in hardware).
216−
217−These are axioms, that is a propositions/types that are asserted to be true without proof. In Idris we can use the 'postulate' keyword
218−
219−
220−.. code-block:: idris
221−
222− postulate commutePlus: (x:Nat) -> (y:Nat) -> plus x y = plus y x
223−
224−Alternatively we could define the natural numbers based on Zero and Successor. The axioms above then become derived rules and we also gain the ability to do inductive proofs.
225−
226−As we know, Idris uses both of these approaches with automatic coercion between them which gives the best of both worlds.
227−
228−So what can we learn from this to implement our own types:
229−
230−- Should we try to implement both approaches?
231−- Should we define our types by constructing up from primitive types?
232−
233−Proof theory affects these design decisions.
234−
235−
docs/proofs/index.rst+2−5
@@ -4,7 +4,7 @@
4Theorem Proving
4Theorem Proving
5###############
5###############
6
6
7−A tutorial on theorem proving in Idris.
7+A tutorial on theorem proving in Idris.
8
8
9.. note::
9.. note::
10
10
@@ -13,16 +13,13 @@ A tutorial on theorem proving in Idris.
13 Idris Community* has waived all copyright and related or neighboring
13 Idris Community* has waived all copyright and related or neighboring
14 rights to Documentation for Idris.
14 rights to Documentation for Idris.
15
15
16− More information concerning the CC0 can be found online at: https://creativecommons.org/publicdomain/zero/1.0/
16+ More information concerning the CC0 can be found online at: http://creativecommons.org/publicdomain/zero/1.0/
17
17
18.. toctree::
18.. toctree::
19 :maxdepth: 1
19 :maxdepth: 1
20
20
21− definitional
22 pluscomm
21 pluscomm
23 inductive
22 inductive
24 patterns
23 patterns
25− propositional
26 interactive
24 interactive
27− interactiveOld
28
25
docs/proofs/interactive.rst+97−224
@@ -1,102 +1,15 @@
1−***************************
1+***************************************
2−Interactive Theorem Proving
2+DEPRECATED: Interactive Theorem Proving
3−***************************
3+***************************************
4
4
5+.. warning::
5−Idris supports interactive theorem proving via elaborator reflection.
6+ The interactive theorem-proving interface documented here has been
7+ deprecated in favor of :ref:`elaborator-reflection`.
6
8
7−:ref:`elaborator-reflection` is also used to convert high-level Idris code into
9+Idris also supports interactive theorem proving via tactics. This
8−the core language and for customising the language. Here we show how to use it
10+is generally not recommended to be used directly, but rather used as a
9−to interactively construct proofs.
11+mechanism for building proof automation which is beyond the scope of this
10−
12+tutorial. In this section, we briefly discus tactics.
11−The primary purpose of the elaboration mechanism is to elaborate Idris and so it
12−is not optimised to work as a proof assistant, however it can interactively
13−construct proofs as described on this page.
14−
15−Elab and Pruviloj Libraries
16−===========================
17−
18−Elaborator reflection is defined in ``prelude/Language/Reflection/Elab.idr``
19−and ``pruviloj`` is defined in ``Idris-dev/libs/pruviloj/``.
20−
21−``Elab`` defines the basics such as: ``solve``, ``attack``, ``intro``, ``compute``,
22−``rewriteWith`` and others.
23−``pruviloj`` defines some more advanced derived commands such as:
24−``reflexivity`` and others.
25−
26−To use ``pruviloj`` call Idris with the ``-p pruviloj`` option and add:
27−
28−.. code-block:: idris
29−
30− import Pruviloj
31− import Pruviloj.Induction
32−
33−to the top of your file.
34−
35−It is useful to get the docs at the REPL by using the ``:doc`` command, and
36−search the docstrings using ``:apropos``. So to introduce the functions from
37−``Elab`` and ``Pruviloj``, that we will need for the following example, here are
38−their docstrings:
39−
40−.. code-block:: idris
41−
42− *plusReducesZ> :doc solve
43− Language.Reflection.Elab.Tactics.solve : Elab ()
44− Substitute a guess into a hole.
45−
46−.. code-block:: idris
47−
48− *plusReducesZ> :doc attack
49− Language.Reflection.Elab.Tactics.attack : Elab ()
50− Convert a hole to make it suitable for bindings - that is, transform
51− it such that it has the form ?h : t . h as opposed to ?h : t . f h.
52−
53− The binding tactics require that a hole be directly under its binding,
54− or else the scopes of the generated terms won't make sense. This
55− tactic creates a new hole of the proper form, and points the old hole
56− at it.
57−
58−.. code-block:: idris
59−
60− *plusReducesZ> :doc intro
61− Language.Reflection.Elab.Tactics.intro : (n : TTName) -> Elab ()
62− Introduce a lambda binding around the current hole and focus on the
63− body. Requires that the hole be in binding form (use attack).
64− Arguments:
65− n : TTName -- the name to use for the argument
66−
67−.. code-block:: idris
68−
69− *plusReducesZ> :doc compute
70− Language.Reflection.Elab.Tactics.compute : Elab ()
71− Normalise the goal.
72−
73−.. code-block:: idris
74−
75− *plusReducesZ> :doc rewriteWith
76− Language.Reflection.Elab.Tactics.rewriteWith : Raw -> Elab ()
77− Attempt to rewrite the goal using an equality.
78−
79− The tactic searches the goal for applicable subterms, and constructs a
80− context for replace using them. In some cases, this is not possible,
81− and replace must be called manually with an appropriate context.
82−
83− Because this tactic internally introduces a let binding, it requires
84− that the hole be immediately under its binder (use attack if it might
85− not be).
86−
87−Here is the command from ``pruviloj`` that we will need for the example on
88−this page:
89−
90−.. code-block:: idris
91−
92− *plusReducesZ> :doc reflexivity
93− Pruviloj.Core.reflexivity : Elab ()
94− A special-purpose tactic that attempts to solve a goal using Refl.
95− This is useful for ensuring that goals in fact are trivial when
96− developing or testing other tactics; otherwise, consider using search.
97−
98−Interactive Example: plusReduces
99−================================
100
13
101One way to write proofs interactively is to write the general *structure* of
14One way to write proofs interactively is to write the general *structure* of
102the proof, and use the interactive mode to complete the details.
15the proof, and use the interactive mode to complete the details.
@@ -112,185 +25,145 @@ hypothesis, and insert *holes* for the rest of the definition:
112
25
113.. code-block:: idris
26.. code-block:: idris
114
27
115− import Pruviloj
116− import Pruviloj.Induction
117−
118 plusReducesZ' : (n:Nat) -> n = plus n Z
28 plusReducesZ' : (n:Nat) -> n = plus n Z
119 plusReducesZ' Z = ?plusredZ_Z
29 plusReducesZ' Z = ?plusredZ_Z
120 plusReducesZ' (S k) = let ih = plusReducesZ' k in
30 plusReducesZ' (S k) = let ih = plusReducesZ' k in
121 ?plusredZ_S
31 ?plusredZ_S
122
32
123On running , two global names are created, ``plusredZ_Z`` and
33On running , two global names are created, ``plusredZ_Z`` and
124−``plusredZ_S``, with no definition.
34+``plusredZ_S``, with no definition. We can use the ``:m`` command at the
35+prompt to find out which holes are still to be solved (or, more
36+precisely, which functions exist but have no definitions), then the
37+``:t`` command to see their types:
125
38
126.. code-block:: idris
39.. code-block:: idris
127
40
128− *theorems> : idris plusReducesZ.idr -p pruviloj
41+ *theorems> :m
129−
42+ Global holes:
130− . / _/___/ /____(_)____
43+ [plusredZ_S,plusredZ_Z]
131− / // __ / ___/ / ___/ Version 1.2.0
132− _/ // /_/ / / / (__ ) https://www.idris-lang.org/
133− /___/\__,_/_/ /_/____/ Type :? for help
134−
135− Idris is free software with ABSOLUTELY NO WARRANTY.
136− For details type :warranty.
137− Holes: Main.plusredZ_S, Main.plusredZ_Z
138−
139−This tells us that we have two holes ``Main.plusredZ_S`` and ``Main.plusredZ_Z``. We can solve
140−these separately, ``plusredZ_Z`` is the simplest so we will do that first.
141−
142−The ``:elab plusredZ_Z`` command enters interactive elaboration mode, which can be used to
143−complete the missing definition for ``plusredZ_Z``.
144
44
145.. code-block:: idris
45.. code-block:: idris
146
46
147− *plusReducesZ> :elab plusredZ_Z
47+ *theorems> :t plusredZ_Z
48+ plusredZ_Z : Z = plus Z Z
148
49
149− ---------- Goal: ----------
50+ *theorems> :t plusredZ_S
150− {hole_0} : 0 = 0
51+ plusredZ_S : (k : Nat) -> (k = plus k Z) -> S k = plus (S k) Z
151
52
152−This has been normalised to ``0 = 0`` so now we have to prove that ``0`` equals ``0``, which
53+The ``:p`` command enters interactive proof mode, which can be used to
153−is easy to prove by ``reflexivity`` from the ``pruviloj`` library:
54+complete the missing definitions.
154
55
155.. code-block:: idris
56.. code-block:: idris
156
57
157− -Main.plusredZ_Z> reflexivity
58+ *theorems> :p plusredZ_Z
158− plusredZ_Z: No more goals.
159−
160−This tells us that the proof is complete. We can now leave the interactive mode which
161−we entered with the ``:elab`` command. We do this with the ``:qed`` command:
162−
163−.. code-block:: idris
164−
165− -Main.plusredZ_Z> :qed
166− Proof completed!
167− Main.plusredZ_Z = %runElab (do reflexivity)
168− Holes: Main.plusredZ_S
169−
170−This gives us a trace of the proof which is ``plusredZ_Z = %runElab (do reflexivity)``. We
171−can cut & paste this into the hole in the original file. This also tells us that we
172−have another hole ``Main.plusredZ_S`` remaining.
173
59
174−This remaining proof is bit more complicated, the following diagram gives an overview:
60+ ---------------------------------- (plusredZ_Z) --------
61+ {hole0} : Z = plus Z Z
175
62
176−|image|
63+This gives us a list of premises (above the line; there are none here)
177−
64+and the current goal (below the line; named ``{hole0}`` here). At the
178−We approach this remaining proof in the same way by using the ``:elab`` command:
65+prompt we can enter tactics to direct the construction of the proof. In
66+this case, we can normalise the goal with the ``compute`` tactic:
179
67
180.. code-block:: idris
68.. code-block:: idris
181
69
182− *plusReducesZ> :elab plusredZ_S
70+ -plusredZ_Z> compute
183
71
72+ ---------------------------------- (plusredZ_Z) --------
73+ {hole0} : Z = Z
184
74
185− ---------- Goal: ----------
75+Now we have to prove that ``Z`` equals ``Z``, which is easy to prove by
186− {hole_0} : (k : Nat) -> (k = plus k 0) -> S k = S (plus k 0)
76+``Refl``. To apply a function, such as ``Refl``, we use ``refine`` which
187−
77+introduces subgoals for each of the function’s explicit arguments
188−In this case, the goal is a function type, using ``k`` (the argument
78+(``Refl`` has none):
189−accessible by pattern matching) and ``ih`` — the local variable
190−containing the result of the recursive call. We can introduce these as
191−assumptions using the ``intro`` tactic twice. The parameter is entered as
192−a constant of type ``TTName`` which is entered as a backtick with double
193−braces ```{{ih}}``. This gives:
194
79
195.. code-block:: idris
80.. code-block:: idris
196
81
197− -Main.plusredZ_S> intro `{{k}}
82+ -plusredZ_Z> refine Refl
83+ plusredZ_Z: no more goals
198
84
199− ---------- Assumptions: ----------
85+Here, we could also have used the ``trivial`` tactic, which tries to
200− k : Nat
86+refine by ``Refl``, and if that fails, tries to refine by each name in
201− ---------- Goal: ----------
87+the local context. When a proof is complete, we use the ``qed`` tactic
202− {hole_0} : (k = plus k 0) -> S k = S (plus k 0)
88+to add the proof to the global context, and remove the hole from the
203− -Main.plusredZ_S> intro `{{ih}}
89+unsolved holes list. This also outputs a trace of the proof:
204
90
205− ---------- Assumptions: ----------
91+.. code-block:: idris
206− k : Nat
207− ih : k = plus k 0
208− ---------- Goal: ----------
209− {hole_0} : S k = S (plus k 0)
210
92
211−We know, from the type of ``ih``, that ``k = plus k 0``, so we would
93+ -plusredZ_Z> qed
212−like to use this knowledge to replace ``plus k 0`` in the goal with
94+ plusredZ_Z = proof
213−``k``. We can achieve this with the ``rewriteWith`` tactic:
95+ compute
96+ refine Refl
214
97
215.. code-block:: idris
98.. code-block:: idris
216
99
217− -Main.plusredZ_S> rewriteWith (Var `{{ih}})
100+ *theorems> :m
218−
101+ Global holes:
219− ---------- Assumptions: ----------
102+ [plusredZ_S]
220− k : Nat
221− ih : k = plus k 0
222− ---------- Goal: ----------
223− {hole_0} : S k = S k
224
103
225−The ``rewriteWith`` tactic takes an equality proof as an argument, and tries
104+The ``:addproof`` command, at the interactive prompt, will add the proof
226−to rewrite the goal using that proof. The ``ih`` value is entered as a constant
105+to the source file (effectively in an appendix). Let us now prove the
227−of type ``TTName`` which is entered as a backtick with double braces ```{{ih}}`` but
106+other required lemma, ``plusredZ_S``:
228−``rewriteWith`` requires an expression of type ``Raw``, rather than just a name,
229−so the ``Var`` constructor is used to make a variable. Here, it results in an equality
230−which is trivially provable using ``reflexivity``:
231
107
232.. code-block:: idris
108.. code-block:: idris
233
109
234− -Main.plusredZ_S> reflexivity
235− plusredZ_S: No more goals.
236− -Main.plusredZ_S> :qed
237− Proof completed!
238− Main.plusredZ_S = %runElab (do intro `{{k}}
110+ *theorems> :p plusredZ_S
239− intro `{{ih}}
240− rewriteWith (Var `{{ih}})
241− reflexivity)
242
111
243−We can't just cut & paste this into the hole in the original file like this:
112+ ---------------------------------- (plusredZ_S) --------
113+ {hole0} : (k : Nat) -> (k = plus k Z) -> S k = plus (S k) Z
244
114
245−.. code-block:: idris
115+In this case, the goal is a function type, using ``k`` (the argument
246−
116+accessible by pattern matching) and ``ih`` — the local variable
247− import Pruviloj
117+containing the result of the recursive call. We can introduce these as
248− import Pruviloj.Induction
118+premises using the ``intro`` tactic twice (or ``intros``, which
119+introduces all arguments as premises). This gives:
249
120
250− %language ElabReflection
121+.. code-block:: idris
251
122
252− plusReducesZ' : (n:Nat) -> n = plus n Z
123+ k : Nat
253− plusReducesZ' Z = %runElab (do reflexivity)
124+ ih : k = plus k Z
254− plusReducesZ' (S k) = let ih = plusReducesZ' k in
125+ ---------------------------------- (plusredZ_S) --------
255− (%runElab (do intro `{{k}}
126+ {hole2} : S k = plus (S k) Z
256− intro `{{ih}}
257− rewriteWith (Var `{{ih}})
258− reflexivity)
259− )
260
127
261−because this gives the following error:
128+Since plus is defined by recursion on its first argument, the term
129+``plus (S k) Z`` in the goal can be simplified, so we use ``compute``.
262
130
263.. code-block:: idris
131.. code-block:: idris
264
132
265− Idris> :load elabInteractiveEx2.idr
133+ k : Nat
266− elabInteractiveEx2.idr:10:32:
134+ ih : k = plus k Z
267− |
135+ ---------------------------------- (plusredZ_S) --------
268− 10 | intro `{{ih}}
136+ {hole2} : S k = S (plus k Z)
269− | ^
270− unexpected "in"
271− expecting dependent type signature
272
137
273−However if we put the proof into a separate function like this:
138+We know, from the type of ``ih``, that ``k = plus k Z``, so we would
139+like to use this knowledge to replace ``plus k Z`` in the goal with
140+``k``. We can achieve this with the ``rewrite`` tactic:
274
141
275.. code-block:: idris
142.. code-block:: idris
276
143
277− import Pruviloj
144+ -plusredZ_S> rewrite ih
278− import Pruviloj.Induction
279
145
280− %language ElabReflection
146+ k : Nat
147+ ih : k = plus k Z
148+ ---------------------------------- (plusredZ_S) --------
149+ {hole3} : S k = S k
281
150
282− plusredZ_S : (k : Nat) -> (ih:(k = plus k Z)) -> (S k = S (plus k Z))
151+ -plusredZ_S>
283− plusredZ_S = %runElab (do intro `{{k}}
284− intro `{{ih}}
285− rewriteWith (Var `{{ih}})
286− reflexivity)
287
152
288− plusReducesZ' : (n:Nat) -> n = plus n Z
153+The ``rewrite`` tactic takes an equality proof as an argument, and tries
289− plusReducesZ' Z = %runElab (do reflexivity)
154+to rewrite the goal using that proof. Here, it results in an equality
290− plusReducesZ' (S k) = let ih = plusReducesZ' k in plusredZ_S k ih
155+which is trivially provable:
291
156
292−This then loads [#f1]_ .
157+.. code-block:: idris
293
158
294−.. [#f1] https://github.com/idris-lang/Idris-dev/issues/4556
159+ -plusredZ_S> trivial
160+ plusredZ_S: no more goals
161+ -plusredZ_S> qed
162+ plusredZ_S = proof {
163+ intros;
164+ rewrite ih;
165+ trivial;
166+ }
295
167
296−.. |image| image:: ../image/plusReducesProof.png
168+Again, we can add this proof to the end of our source file using the
169+``:addproof`` command at the interactive prompt.
docs/proofs/interactiveOld.rstdeleted−169
@@ -1,169 +0,0 @@
1−**************************************************************
2−DEPRECATED: Interactive Theorem Proving Using Old Tactics Code
3−**************************************************************
4−
5−.. warning::
6− The interactive theorem-proving interface documented here has been
7− deprecated in favor of :ref:`elaborator-reflection`.
8−
9−Idris also supports interactive theorem proving via tactics. This
10−is generally not recommended to be used directly, but rather used as a
11−mechanism for building proof automation which is beyond the scope of this
12−tutorial. In this section, we briefly discus tactics.
13−
14−One way to write proofs interactively is to write the general *structure* of
15−the proof, and use the interactive mode to complete the details.
16−Consider the following definition, proved in :ref:`sect-theorems`:
17−
18−.. code-block:: idris
19−
20− plusReduces : (n:Nat) -> plus Z n = n
21−
22−We’ll be constructing the proof by *induction*, so we write the cases for ``Z``
23−and ``S``, with a recursive call in the ``S`` case giving the inductive
24−hypothesis, and insert *holes* for the rest of the definition:
25−
26−.. code-block:: idris
27−
28− plusReducesZ' : (n:Nat) -> n = plus n Z
29− plusReducesZ' Z = ?plusredZ_Z
30− plusReducesZ' (S k) = let ih = plusReducesZ' k in
31− ?plusredZ_S
32−
33−On running , two global names are created, ``plusredZ_Z`` and
34−``plusredZ_S``, with no definition. We can use the ``:m`` command at the
35−prompt to find out which holes are still to be solved (or, more
36−precisely, which functions exist but have no definitions), then the
37−``:t`` command to see their types:
38−
39−.. code-block:: idris
40−
41− *theorems> :m
42− Global holes:
43− [plusredZ_S,plusredZ_Z]
44−
45−.. code-block:: idris
46−
47− *theorems> :t plusredZ_Z
48− plusredZ_Z : Z = plus Z Z
49−
50− *theorems> :t plusredZ_S
51− plusredZ_S : (k : Nat) -> (k = plus k Z) -> S k = plus (S k) Z
52−
53−The ``:p`` command enters interactive proof mode, which can be used to
54−complete the missing definitions.
55−
56−.. code-block:: idris
57−
58− *theorems> :p plusredZ_Z
59−
60− ---------------------------------- (plusredZ_Z) --------
61− {hole0} : Z = plus Z Z
62−
63−This gives us a list of premises (above the line; there are none here)
64−and the current goal (below the line; named ``{hole0}`` here). At the
65−prompt we can enter tactics to direct the construction of the proof. In
66−this case, we can normalise the goal with the ``compute`` tactic:
67−
68−.. code-block:: idris
69−
70− -plusredZ_Z> compute
71−
72− ---------------------------------- (plusredZ_Z) --------
73− {hole0} : Z = Z
74−
75−Now we have to prove that ``Z`` equals ``Z``, which is easy to prove by
76−``Refl``. To apply a function, such as ``Refl``, we use ``refine`` which
77−introduces subgoals for each of the function’s explicit arguments
78−(``Refl`` has none):
79−
80−.. code-block:: idris
81−
82− -plusredZ_Z> refine Refl
83− plusredZ_Z: no more goals
84−
85−Here, we could also have used the ``trivial`` tactic, which tries to
86−refine by ``Refl``, and if that fails, tries to refine by each name in
87−the local context. When a proof is complete, we use the ``qed`` tactic
88−to add the proof to the global context, and remove the hole from the
89−unsolved holes list. This also outputs a trace of the proof:
90−
91−.. code-block:: idris
92−
93− -plusredZ_Z> qed
94− plusredZ_Z = proof
95− compute
96− refine Refl
97−
98−.. code-block:: idris
99−
100− *theorems> :m
101− Global holes:
102− [plusredZ_S]
103−
104−The ``:addproof`` command, at the interactive prompt, will add the proof
105−to the source file (effectively in an appendix). Let us now prove the
106−other required lemma, ``plusredZ_S``:
107−
108−.. code-block:: idris
109−
110− *theorems> :p plusredZ_S
111−
112− ---------------------------------- (plusredZ_S) --------
113− {hole0} : (k : Nat) -> (k = plus k Z) -> S k = plus (S k) Z
114−
115−In this case, the goal is a function type, using ``k`` (the argument
116−accessible by pattern matching) and ``ih`` — the local variable
117−containing the result of the recursive call. We can introduce these as
118−premises using the ``intro`` tactic twice (or ``intros``, which
119−introduces all arguments as premises). This gives:
120−
121−.. code-block:: idris
122−
123− k : Nat
124− ih : k = plus k Z
125− ---------------------------------- (plusredZ_S) --------
126− {hole2} : S k = plus (S k) Z
127−
128−Since plus is defined by recursion on its first argument, the term
129−``plus (S k) Z`` in the goal can be simplified, so we use ``compute``.
130−
131−.. code-block:: idris
132−
133− k : Nat
134− ih : k = plus k Z
135− ---------------------------------- (plusredZ_S) --------
136− {hole2} : S k = S (plus k Z)
137−
138−We know, from the type of ``ih``, that ``k = plus k Z``, so we would
139−like to use this knowledge to replace ``plus k Z`` in the goal with
140−``k``. We can achieve this with the ``rewrite`` tactic:
141−
142−.. code-block:: idris
143−
144− -plusredZ_S> rewrite ih
145−
146− k : Nat
147− ih : k = plus k Z
148− ---------------------------------- (plusredZ_S) --------
149− {hole3} : S k = S k
150−
151− -plusredZ_S>
152−
153−The ``rewrite`` tactic takes an equality proof as an argument, and tries
154−to rewrite the goal using that proof. Here, it results in an equality
155−which is trivially provable:
156−
157−.. code-block:: idris
158−
159− -plusredZ_S> trivial
160− plusredZ_S: no more goals
161− -plusredZ_S> qed
162− plusredZ_S = proof {
163− intros;
164− rewrite ih;
165− trivial;
166− }
167−
168−Again, we can add this proof to the end of our source file using the
169−``:addproof`` command at the interactive prompt.
docs/proofs/pluscomm.rst+1−1
@@ -182,7 +182,7 @@ interface rather than using ``plus`` directly. They have the names
182
182
183In the remainder of this tutorial, we will explore several different
183In the remainder of this tutorial, we will explore several different
184ways of proving ``plus_commutes`` (or, to put it another way, writing
184ways of proving ``plus_commutes`` (or, to put it another way, writing
185−the function). We will also discuss how to use such equality proofs, and
185+the function.) We will also discuss how to use such equality proofs, and
186see where the need for them arises in practice.
186see where the need for them arises in practice.
187
187
188.. [1]
188.. [1]
docs/proofs/propositional.rstdeleted−133
@@ -1,133 +0,0 @@
1−******************************
2−Proving Propositional Equality
3−******************************
4−
5−This page attempts to explain some of the techniques used in Idris to prove propositional equalities.
6−
7−We have seen that definitional equalities can be proved using ``Refl`` since they always normalise to unique values that can be compared directly.
8−
9−However with propositional equalities we are using symbolic variables they do not always normalise.
10−
11−So to take the previous example:
12−
13−.. code-block:: idris
14−
15− plusReducesR : (n:Nat) -> plus n Z = n
16−
17−In this case ``plus n Z`` does not normalise to ``n``. Even though both sides are equal we cannot pattern match ``Refl``.
18−
19−If the pattern match cannot match for all ``n`` then the way around this is to separately match all possible values of ``n``. In the case of natural numbers we do this by induction.
20−
21−So here:
22−
23−.. code-block:: idris
24−
25− plusReducesR : n = plus n 0
26− plusReducesR {n = Z} = Refl
27− plusReducesR {n = (S k)} = let rec = plus_commutes_Z {n=k} in
28− rewrite rec in Refl
29−
30−we don't call ``Refl`` to match on ``n = plus n 0`` forall ``n`` we call it for every number separately. So, in the second line, the pattern matcher knows to substitute ``Z`` for ``n`` in the type being matched. This uses ``rewrite`` which is explained below.
31−
32−Replace
33−=======
34−
35−This implements the *indiscernability of identicals* principle, if two terms are equal then they have the same properties. In other words, if ``x=y``, then we can substitute ``y`` for ``x`` in any expression. In our proofs we can express this as:
36−
37−.. code-block:: idris
38−
39− if x=y
40− then P x = P y
41−
42−where ``P`` is a pure function representing the property. In the examples below ``P`` is an expression in some variable with a type like this: ``P: n -> Type``.
43−
44−So if ``n`` is a natural number variable then ``P`` could be something like ``2*n + 3``.
45−
46−To use this in our proofs there is the following function in the prelude:
47−
48−.. code-block:: idris
49−
50− ||| Perform substitution in a term according to some equality.
51− replace : {a:_} -> {x:_} -> {y:_} -> {P : a -> Type} -> x = y -> P x -> P y
52− replace Refl prf = prf
53−
54−Removing the implicits, if we supply an equality ``x=y`` and a proof of a property of ``x`` (i.e. ``P x``) then we get a proof of a property of ``y`` (i.e. ``P y``)
55−
56−.. code-block:: idris
57−
58− > :t replace
59− replace : (x = y) -> P x -> P y
60−
61−So, in the following example, if we supply ``p1 x`` which is a proof that ``x=2`` and the equality ``x=y`` then we get a proof that ``y=2``.
62−
63−.. code-block:: idris
64−
65− p1: Nat -> Type
66− p1 n = (n=2)
67−
68− testReplace: (x=y) -> (p1 x) -> (p1 y)
69− testReplace a b = replace a b
70−
71−Rewrite
72−=======
73−
74−Similar to ``replace`` above but Idris provides a nicer syntax which makes ``rewrite`` easier to use in examples like ``plusReducesR`` above.
75−
76−.. code-block:: idris
77−
78− rewrite__impl : (P : a -> Type) -> x = y -> P y -> P x
79− rewrite__impl p Refl prf = prf
80−
81−The difference from ``replace`` above is nicer syntax and the property ``p1`` is explicitly supplied and it goes in the opposite direction (input and output reversed).
82−
83−Example: again we supply ``p1`` which is a proof that ``x=2`` and the equality ``x=y`` then we get a proof that ``y=2``.
84−
85−.. code-block:: idris
86−
87− p1: Nat -> Type
88− p1 x = (x=2)
89−
90− testRewrite2: (x=y) -> (p1 y) -> (p1 x)
91− testRewrite2 a b = rewrite a in b
92−
93−We can think of rewrite doing this:
94−
95− * start with a equation ``x=y`` and a property ``P: x -> Type``;
96− * search ``y`` in ``P``;
97− * replace all occurrences of ``y`` with ``x`` in ``P``.
98−
99−That is, we are doing a substitution.
100−
101−Symmetry and Transitivity
102−=========================
103−
104−In addition to *reflexivity* equality also obeys *symmetry* and *transitivity* and these are also included in the prelude:
105−
106−.. code-block:: idris
107−
108− ||| Symmetry of propositional equality
109− sym : {left:a} -> {right:b} -> left = right -> right = left
110− sym Refl = Refl
111−
112− ||| Transitivity of propositional equality
113− trans : {a:x} -> {b:y} -> {c:z} -> a = b -> b = c -> a = c
114− trans Refl Refl = Refl
115−
116−Heterogeneous Equality
117−======================
118−
119−Also included in the prelude:
120−
121−.. code-block:: idris
122−
123− ||| Explicit heterogeneous ("John Major") equality. Use this when Idris
124− ||| incorrectly chooses homogeneous equality for `(=)`.
125− ||| @ a the type of the left side
126− ||| @ b the type of the right side
127− ||| @ x the left side
128− ||| @ y the right side
129− (~=~) : (x : a) -> (y : b) -> Type
130− (~=~) x y = (x = y)
131−
132−
133−
docs/reference/codegen.rst+4−18
@@ -1,5 +1,3 @@
1−.. _code-generation-targets:
2−
3************************
1************************
4Code Generation Targets
2Code Generation Targets
5************************
3************************
@@ -18,13 +16,6 @@ Official Backends
18C Language
16C Language
19----------
17----------
20
18
21−The default target of Idris is C. In order to view the generated C code, compile via:
22−
23−::
24−
25− $ idris hello.idr -S -o hello.c
26−
27−
28Javascript
19Javascript
29----------
20----------
30
21
@@ -36,10 +27,10 @@ issue the following command:
36 $ idris --codegen javascript hello.idr -o hello.js
27 $ idris --codegen javascript hello.idr -o hello.js
37
28
38
29
39−Idris can produce big chunks of JavaScript code (hello world weighs in at about
30+Idris can produce very big chunks of JavaScript code (hello world
40−60 lines). However, the generated code can be minified using the
31+weighs in at 1500 lines). However, the generated code can be minified
32+using the `closure-compiler
41−`closure-compiler <https://developers.google.com/closure/compiler/>`__ from
33+<https://developers.google.com/closure/compiler/>`__ from Google.
42−Google.
43
34
44::
35::
45
36
@@ -140,8 +131,3 @@ WS
140---
131---
141
132
142`Available online <https://github.com/edwinb/WS-idr>`__
133`Available online <https://github.com/edwinb/WS-idr>`__
143−
144−WebAssembly
145−-----------
146−
147−`Available online <https://github.com/SPY/idris-codegen-wasm>`__
docs/reference/compilation.rst+15−15
@@ -54,7 +54,7 @@ by setting a verbosity level.
54 Checking, and the individual steps prior to code generation.
54 Checking, and the individual steps prior to code generation.
55
55
56
56
57−By default Idris' progress reporting is set to quiet: ``-q``, or ``--quiet``.
57+By default Idris' progress reporting is set to quiet-``-q``, or ``--quiet``.
58
58
59Logging Internal Operation
59Logging Internal Operation
60===========================
60===========================
@@ -100,32 +100,32 @@ Environment Variables
100Several paths set by default within the Idris compiler can be
100Several paths set by default within the Idris compiler can be
101overridden through environment variables. The provided variables are:
101overridden through environment variables. The provided variables are:
102
102
103−* ``IDRIS_CC`` Change the *C compiler* used by the *C backend*.
103+* `IDRIS_CC` Change the `C` compiler used by the `C` backend.
104−* ``IDRIS_CFLAGS`` Change the *C flags* passed to the *C compiler*.
104+* `IDRIS_CFLAGS` Change the `C` flags passed to the `C` compiler.
105−* ``TARGET`` Change the target directory i.e. *data dir* where Idris installs files when installing using Cabal/Stack.
105+* `TARGET` Change the target directory i.e. `data dir` where Idris installs files when installing using Cabal/Stack.
106−* ``IDRIS_LIBRARY_PATH`` Change the location of where installed packages are found/installed.
106+* `IDRIS_LIBRARY_PATH` Change the location of where installed packages are found/installed.
107−* ``IDRIS_DOC_PATH`` Change the location of where generated idrisdoc for packages are installed.
107+* `IDRIS_DOC_PATH` Change the location of where generated idrisdoc for packages are installed.
108
108
109.. note::
109.. note::
110
110
111 In versions of Idris prior to 0.12.3 the environment variables
111 In versions of Idris prior to 0.12.3 the environment variables
112− ``IDRIS_LIBRARY_PATH`` and ``TARGET`` were both used to affect the
112+ `IDRIS_LIBRARY_PATH` and `TARGET` were both used to affect the
113 installation of single packages and direct where Idris installed
113 installation of single packages and direct where Idris installed
114 its data. The meaning of these variables has changed, and command
114 its data. The meaning of these variables has changed, and command
115 line options are preferred when changing where individual packages
115 line options are preferred when changing where individual packages
116 are installed.
116 are installed.
117
117
118−The CLI option ``--ibcsubdir`` can be used to direct where generated IBC
118+The CLI option `--ibcsubdir` can be used to direct where generated IBC
119files are placed. However, this means Idris will install files in a
119files are placed. However, this means Idris will install files in a
120non-standard location separate from the rest of the installed
120non-standard location separate from the rest of the installed
121−packages. The CLI option ``--idrispath <dir>`` allows you to add a
121+packages. The CLI option `--idrispath <dir>` allows you to add a
122directory to the library search path; this option can be used multiple
122directory to the library search path; this option can be used multiple
123−times and can be shortened to ``-i <dir>``. Similary, the ``--sourcepath
123+times and can be shortened to `-i <dir>`. Similary, the `--sourcepath
124−<dir>`` option can be used to add directories to the source search
124+<dir>` option can be used to add directories to the source search
125−path. There is no shortened version for this option as ``-s`` is a
125+path. There is no shortened version for this option as `-s` is a
126reserved flag.
126reserved flag.
127
127
128Further, Idris also supports options to augment the paths used, and
128Further, Idris also supports options to augment the paths used, and
129−pass options to the code generator backend. The option ``--cg-opt
129+pass options to the code generator backend. The option `--cg-opt
130−<ARG>`` can be used to pass options to the code generator. The format
130+<ARG>` can be used to pass options to the code generator. The format
131−of ``<ARG>`` is dependent on the selected backend.
131+of `<ARG>` is dependent on the selected backend.
docs/elaboratorReflection/elaborator-reflection.rst → docs/reference/elaborator-reflection.rstrenamed+6−13
@@ -1,13 +1,12 @@
1.. _elaborator-reflection:
1.. _elaborator-reflection:
2
2
3−**********************************
3+*********************
4−Elaborator Reflection Introduction
4+Elaborator Reflection
5−**********************************
5+*********************
6
6
7The Idris elaborator is responsible for converting high-level Idris code into the core language.
7The Idris elaborator is responsible for converting high-level Idris code into the core language.
8It is implemented as a kind of embedded tactic language in Haskell, where tactic scripts are written in an *elaboration monad* that provides error handling and a proof state.
8It is implemented as a kind of embedded tactic language in Haskell, where tactic scripts are written in an *elaboration monad* that provides error handling and a proof state.
9−For details, see `Edwin Brady's 2013 paper in the Journal of Functional
9+For details, see [Edwin Brady's 2013 paper in the Journal of Functional Programming](https://eb.host.cs.st-andrews.ac.uk/drafts/impldtp.pdf).
10−Programming <https://eb.host.cs.st-andrews.ac.uk/drafts/impldtp.pdf>`_.
11
10
12Elaborator reflection makes the elaboration type as well as a selection of its tactics available to Idris code.
11Elaborator reflection makes the elaboration type as well as a selection of its tactics available to Idris code.
13This means that metaprograms written in Idris can have complete control over the elaboration process, generating arbitrary code, and they have access to all of the facilities available in the elaborator, such as higher-order unification, type checking, and emitting auxiliary definitions.
12This means that metaprograms written in Idris can have complete control over the elaboration process, generating arbitrary code, and they have access to all of the facilities available in the elaborator, such as higher-order unification, type checking, and emitting auxiliary definitions.
@@ -198,12 +197,6 @@ This is primarily useful for code generation, particularly for generating patter
198
197
199Learn More
198Learn More
200==========
199==========
201−
200+While this documentation is still incomplete, elaboration reflection works in Idris today.
202−Some tactics are introduced in the :ref:`proofs-index` section with further details, of those most relevant to elaborator reflection, on the following pages.
203−
204−The list of built-in tactics can be obtained using the ``:browse`` command in an Idris REPL or the corresponding feature in one of the graphical IDE clients to explore the ``Language.Reflection.Elab.Tactics`` namespace.
201+As you wait for the completion of the documentation, the list of built-in tactics can be obtained using the ``:browse`` command in an Idris REPL or the corresponding feature in one of the graphical IDE clients to explore the ``Language.Reflection.Elab.Tactics`` namespace.
205All of the built-in tactics contain documentation strings.
202All of the built-in tactics contain documentation strings.
206−
207−For alternative ways to extend the Idris language see the :ref:`reference-index` section.
208−
209−The following pages explain more about the theory and practice of elaborator reflection.
docs/reference/erasure.rst+4−4
@@ -127,7 +127,7 @@ For better intuition, the shape of the U-view of
127
127
128 x0 y0 (two)
128 x0 y0 (two)
129 x1 y1 (two)
129 x1 y1 (two)
130− x2 y2 (two)
130+ x2 y1 (two)
131 z (one)
131 z (one)
132
132
133When recursing over this structure, the values of ``xs`` range over
133When recursing over this structure, the values of ``xs`` range over
@@ -254,7 +254,7 @@ Benchmarks
254==========
254==========
255
255
256- source: https://github.com/ziman/idris-benchmarks
256- source: https://github.com/ziman/idris-benchmarks
257−- results: https://ziman.functor.sk/erasure-bm/
257+- results: http://ziman.functor.sk/erasure-bm/
258
258
259It can be clearly seen that asymptotics are improved by erasure.
259It can be clearly seen that asymptotics are improved by erasure.
260
260
@@ -269,7 +269,7 @@ Usage warnings are quite bad and unhelpful at the moment. We should
269include more information and at least translate argument numbers to
269include more information and at least translate argument numbers to
270their names.
270their names.
271
271
272−There is no decent documentation yet. This page is the first one.
272+There is no decent documentation yet. This wiki page is the first one.
273
273
274There is no generally accepted terminology. We switch between
274There is no generally accepted terminology. We switch between
275"dotted", "unused", "erased", "irrelevant", "inaccessible", while each
275"dotted", "unused", "erased", "irrelevant", "inaccessible", while each
@@ -499,4 +499,4 @@ References
499
499
500.. [BMM04] Edwin Brady, Conor McBride, James McKinna: `Inductive
500.. [BMM04] Edwin Brady, Conor McBride, James McKinna: `Inductive
501 families need not store their indices
501 families need not store their indices
502− <https://citeseerx.ist.psu.edu/viewdoc/summary;jsessionid=1F796FCF0F2C4C535FC70F62BE2FB821?doi=10.1.1.62.3849>`__
502+ <http://citeseerx.ist.psu.edu/viewdoc/summary;jsessionid=1F796FCF0F2C4C535FC70F62BE2FB821?doi=10.1.1.62.3849>`__
docs/reference/ffi.rst+7−56
@@ -115,26 +115,6 @@ For C, this is:
115 FFI_C : FFI
115 FFI_C : FFI
116 FFI_C = MkFFI C_Types String String
116 FFI_C = MkFFI C_Types String String
117
117
118−Linking foreign code
119−====================
120−
121−This is the example of linking C code.
122−
123−.. code-block:: idris
124−
125− %include C "mylib.h"
126− %link C "mylib.o"
127−
128−Example Makefile
129−
130−.. code-block:: shell
131−
132− DEFAULT: mylib.o main.idr
133− idris main.idr -o executableFile
134−
135− clean:
136− rm -f executableFile mylib.o main.ibc
137−
138Foreign calls
118Foreign calls
139=============
119=============
140
120
@@ -198,16 +178,9 @@ compilation error:
198 example : (Int -> ()) -> IO ()
178 example : (Int -> ()) -> IO ()
199 example f = foreign FFI_C "callbacker" (CFnPtr (Int -> ()) -> IO ()) f
179 example f = foreign FFI_C "callbacker" (CFnPtr (Int -> ()) -> IO ()) f
200
180
201−Note that the function that is used as a callback can't be a closure, that is
202−it can't be a partially applied function. This is because the mechanism used is
203−unable to pass the closed-over values through C. If we want to pass Idris values
204−to the callback we have to pass them through C explicitly. Non-primitive Idris
205−values can be passed to C via the ``Raw`` type.
206−
207−The other big limitation is that it doesn't support ``IO`` functions. Use
181+The other big limitation is that it doesn't support IO functions. Use
208−``unsafePerformIO`` to wrap them (i.e. to make an ``IO`` function usable as a
182+``unsafePerformIO`` to wrap them (i.e. to make an IO function usable as a callback, change the return type
209−callback, change the return type from ``IO r`` to ``r``, and change the ``= do``
210−to ``= unsafePerformIO $ do``).
183+from IOr to r, and change the = do to = unsafePerformIO $ do).
211
184
212There are two special function names:
185There are two special function names:
213``%wrapper`` returns the function pointer that wraps an Idris function. This
186``%wrapper`` returns the function pointer that wraps an Idris function. This
@@ -259,7 +232,7 @@ useful to access constants that are preprocessor definitions (like ``INT_MAX``).
259 main = print !intMax
232 main = print !intMax
260
233
261For more complicated interactions with C (such as reading and setting fields
234For more complicated interactions with C (such as reading and setting fields
262−of a C ``struct``), there is a module C FFI available in the contrib package.
235+of a C struct), there is a module CFFI available in the contrib package.
263
236
264C heap
237C heap
265------
238------
@@ -357,10 +330,9 @@ Usage from C code
357
330
358 CData some_allocating_fun(int arg)
331 CData some_allocating_fun(int arg)
359 {
332 {
360− size_t size = sizeof(...);
361− void * data = (void *) malloc(size);
333+ void * data = (void *) malloc(...);
362 // ...
334 // ...
363− return cdata_manage(data, size, finalizer);
335+ return cdata_manage(data, finalizer);
364 }
336 }
365
337
366 int other_fun(CData cd, int arg)
338 int other_fun(CData cd, int arg)
@@ -369,32 +341,11 @@ Usage from C code
369 return result;
341 return result;
370 }
342 }
371
343
372−The ``Raw`` type constructor allows you to access or return a runtime
373−representation of the value. For instance, if you want to copy a string
374−generated from C code into an Idris value, you may want to return a
375−``Raw String`` instead of a ``String`` and use ``MKSTR`` or ``MKSTRlen`` to
376−copy it over.
377−
378−.. code-block:: idris
379−
380− getString : () -> IO (Raw String)
381− getString () = foreign FFI_C "get_string" (IO (Raw String))
382−
383−.. code-block:: cpp
384−
385− const VAL get_string ()
386− {
387− char * c_string = get_string_allocated_with_malloc()
388− const VAL idris_string = MKSTR(get_vm(), c_string);
389− free(c_string);
390− return idris_string
391− }
392−
393FFI implementation
344FFI implementation
394------------------
345------------------
395
346
396In order to write bindings to external libraries, the details of how
347In order to write bindings to external libraries, the details of how
397−``foreign`` works are unnecessary: you simply need to know that
348+``foreign`` works are unnecessary --- you simply need to know that
398``foreign`` takes an FFI descriptor, the function name, and its
349``foreign`` takes an FFI descriptor, the function name, and its
399type. It is instructive to look a little deeper, however:
350type. It is instructive to look a little deeper, however:
400
351
docs/reference/index.rst+2−2
@@ -14,7 +14,7 @@ This will tell you how Idris works, for using it you should read the Idris Tutor
14 Idris Community* has waived all copyright and related or neighboring
14 Idris Community* has waived all copyright and related or neighboring
15 rights to Documentation for Idris.
15 rights to Documentation for Idris.
16
16
17− More information concerning the CC0 can be found online at: https://creativecommons.org/publicdomain/zero/1.0/
17+ More information concerning the CC0 can be found online at: http://creativecommons.org/publicdomain/zero/1.0/
18
18
19
19
20.. toctree::
20.. toctree::
@@ -26,7 +26,6 @@ This will tell you how Idris works, for using it you should read the Idris Tutor
26 uniqueness-types
26 uniqueness-types
27 ffi
27 ffi
28 syntax-guide
28 syntax-guide
29− syntax-reference
30 erasure
29 erasure
31 ide-protocol
30 ide-protocol
32 semantic-highlighting
31 semantic-highlighting
@@ -36,6 +35,7 @@ This will tell you how Idris works, for using it you should read the Idris Tutor
36 internals
35 internals
37 language-features
36 language-features
38 language-extensions
37 language-extensions
38+ elaborator-reflection
39 type-directed-search
39 type-directed-search
40 partial-evaluation
40 partial-evaluation
41 misc
41 misc
docs/reference/internals.rst+28−31
@@ -10,8 +10,8 @@ free to contribute.
10This document assumes that you are already familiar with Idris. It is
10This document assumes that you are already familiar with Idris. It is
11intended for those who want to work on the internals.
11intended for those who want to work on the internals.
12
12
13−People looking to develop new back ends may want to look at
13+People looking to develop new back ends may want to look at [[Idris back
14−:ref:`code-generation-targets`
14+end IRs\|Idris-back-end-IRs]]
15
15
16Core/TT.hs
16Core/TT.hs
17==========
17==========
@@ -53,7 +53,7 @@ with ``SC`` and ``CaseAlt`` to get GHC to generate a function for
53mapping over contained terms.
53mapping over contained terms.
54
54
55Constructor cases (``ConCase`` in ``CaseAlt``) refer to numbered
55Constructor cases (``ConCase`` in ``CaseAlt``) refer to numbered
56−constructors. Every constructor is numbered *0,1,2,…*. At this stage in
56+constructors. Every constructor is numbered 0,1,2,…. At this stage in
57the compiler, the tags are datatype-local. After defunctionalization,
57the compiler, the tags are datatype-local. After defunctionalization,
58however, they are made globally unique.
58however, they are made globally unique.
59
59
@@ -91,12 +91,12 @@ dictionary which makes totality checking easier.
91The ``normalise*`` functions give different behaviors - but
91The ``normalise*`` functions give different behaviors - but
92``normalise`` is the most common.
92``normalise`` is the most common.
93
93
94−- ``normaliseC`` - "resolved" means with names converted to de Bruijn
94+``normaliseC`` - "resolved" means with names converted to de Bruijn
95− indices as appropriate;
95+indices as appropriate.
96
96
97−- ``normaliseAll`` - reduce everything, even if it's non-total;
97+``normaliseAll`` - reduce everything, even if it's non-total
98
98
99−- ``normaliseTrace`` - special-purpose for debugging.
99+``normaliseTrace`` - special-purpose for debugging
100
100
101``simplify`` - reduce the things that are small - the list argument is
101``simplify`` - reduce the things that are small - the list argument is
102the things to not reduce.
102the things to not reduce.
@@ -110,8 +110,8 @@ Core/Elaborate.hs
110=================
110=================
111
111
112Idris definitions are elaborated one by one and turned into the
112Idris definitions are elaborated one by one and turned into the
113−corresponding ``TT``. This is done with a tactic language as an EDSL in the
113+corresponding TT. This is done with a tactic language as an EDSL in the
114−``Elab`` monad (or ``Elab'`` when there's a custom state).
114+Elab monad (or Elab' when there's a custom state).
115
115
116Lots of plumbing for errors.
116Lots of plumbing for errors.
117
117
@@ -122,17 +122,17 @@ The string in the pair returned by elaborate is log information.
122See JFP paper, but the names don't necessarily map to each other. The
122See JFP paper, but the names don't necessarily map to each other. The
123paper is the "idealized version" without logging, additional state, etc.
123paper is the "idealized version" without logging, additional state, etc.
124
124
125−All the tactics take ``Raw`` s, typechecking happens there.
125+All the tactics take Raws, typechecking happens there.
126
126
127−``claim (x : t)`` assumes a new ``x : t``.
127+claim (x : t) assumes a new x : t.
128
128
129PLEASE TIDY THINGS UP!
129PLEASE TIDY THINGS UP!
130
130
131−``proofSearch`` flag is to try whether the failure came from a human (so
131+proofSearch flag to try' is whether the failure came from a human (so
132fail) or from a machine (so continue)
132fail) or from a machine (so continue)
133
133
134−Idris-level syntax for providing alternatives explicitly: ``(| x, y, z
134+Idris-level syntax for providing alternatives explicitly: (\| x, y, z
135−|)`` try ``x``, ``y``, ``z`` in order, and take the first that succeeds.
135+\|) try x, y, z in order, and take the first that succeeds.
136
136
137Core/ProofState.hs
137Core/ProofState.hs
138==================
138==================
@@ -140,40 +140,37 @@ Core/ProofState.hs
140Core/Unify.hs
140Core/Unify.hs
141=============
141=============
142
142
143−Deals with unification. Unification can reply with:
143+Deals with unification. Unification can reply with: - this works - this
144+can never work - this will work if these other unification problems work
145+out (eg unifying f x with 1)
144
146
145−- this works
146−- this can never work
147−- this will work if these other unification problems work out (e.g.
148− unifying ``f x`` with ``1``)
149−
150−``match_unify``: same thing as unification except it's just matching name
147+match\_unify: same thing as unification except it's just matching name
151−against name, term against term. ``x + y`` matches to ``0 + y`` with
148+against name, term against term. x + y matches to 0 + y with x = 0. Used
152−``x = 0``. Used for ``<==`` syntax as well as type class resolution.
149+for <== syntax as well as type class resolution.
153
150
154Idris/AbsSyntaxTree.hs
151Idris/AbsSyntaxTree.hs
155======================
152======================
156
153
157−``PTerm`` is the datatype of Idris syntax. ``P`` is for *Program*.
154+PTerm is the datatype of Idris syntax. P is for Program. Each PTerm
158−Each ``PTerm`` turns into a TT term by applying a series of tactics.
155+turns into a TT term by applying a series of tactics.
159
156
160−``IState`` is the major interpreter state. The global context is the
157+IState is the major interpreter state. The global context is the
161−``tt_ctxt`` field.
158+tt\_ctxt field.
162
159
163−``Ctxt`` maps possibly ambiguous names to their referents.
160+Ctxt maps possibly ambiguous names to their referents.
164
161
165Idris/ElabDecls.hs
162Idris/ElabDecls.hs
166==================
163==================
167
164
168−This is where the actual elaboration from ``PTerm`` to ``TT`` happens.
165+This is where the actual elaboration from PTerm to TT happens.
169
166
170Idris/ElabTerm.hs
167Idris/ElabTerm.hs
171=================
168=================
172
169
173−``build`` is the function that creates a ``Raw``. All the "junk" is to deal with
170+build is the function that creates a Raw. All the "junk" is to deal with
174things like metavars and so forth. It has to remember what names are
171things like metavars and so forth. It has to remember what names are
175still to be defined, and it doesn't yet know the type (filled in by
172still to be defined, and it doesn't yet know the type (filled in by
176unificaiton later). Also case expressions have to turn into top-level
173unificaiton later). Also case expressions have to turn into top-level
177functions.
174functions.
178
175
179−``resolveTC`` is type class resolution.
176+resolveTC is type class resolution.
docs/reference/language-extensions.rst+3−8
@@ -3,12 +3,13 @@ Language Extensions
3*******************
3*******************
4
4
5
5
6+
6Type Providers
7Type Providers
7===============
8===============
8
9
9Idris type providers are a way to get the type system to reflect
10Idris type providers are a way to get the type system to reflect
10observations about the world outside of Idris. Similarly to `F# type
11observations about the world outside of Idris. Similarly to `F# type
11−providers <https://msdn.microsoft.com/en-us/library/vstudio/hh156509.aspx>`__,
12+providers <http://msdn.microsoft.com/en-us/library/vstudio/hh156509.aspx>`__,
12they cause effectful computations to run during type checking, returning
13they cause effectful computations to run during type checking, returning
13information that the type checker can use when checking the rest of the
14information that the type checker can use when checking the rest of the
14program. While F# type providers are based on code generation, Idris
15program. While F# type providers are based on code generation, Idris
@@ -31,11 +32,5 @@ to the user.
31Example Idris type providers can be seen at `this
32Example Idris type providers can be seen at `this
32repository <https://github.com/david-christiansen/idris-type-providers>`__.
33repository <https://github.com/david-christiansen/idris-type-providers>`__.
33More detailed descriptions are available in David Christiansen's `WGP
34More detailed descriptions are available in David Christiansen's `WGP
34−'13 paper <https://dx.doi.org/10.1145/2502488.2502495>`__ and `M.Sc.
35+'13 paper <http://dx.doi.org/10.1145/2502488.2502495>`__ and `M.Sc.
35thesis <http://itu.dk/people/drc/david-christiansen-thesis.pdf>`__.
36thesis <http://itu.dk/people/drc/david-christiansen-thesis.pdf>`__.
36−
37−Elaborator Reflection
38−=====================
39−
40−Another way to extend the language is elaborator reflection which is described
41−in the :ref:`elaborator-index` section.
docs/reference/misc.rst+6−6
@@ -115,11 +115,11 @@ Here is an example:
115 import Syntax.PreorderReasoning
115 import Syntax.PreorderReasoning
116 multThree : (a, b, c : Nat) -> a * b * c = c * a * b
116 multThree : (a, b, c : Nat) -> a * b * c = c * a * b
117 multThree a b c =
117 multThree a b c =
118− (a * b * c) ={ sym (multAssociative a b c) }=
118+ (a * b * c) ={ sym (multAssociative a b c) }=
119− (a * (b * c)) ={ cong (multCommutative b c) }=
119+ (a * (b * c)) ={ cong (multCommutative b c) }=
120− (a * (c * b)) ={ multAssociative a c b }=
120+ (a * (c * b)) ={ multAssociative a c b }=
121− (a * c * b) ={ cong {f = (* b)} (multCommutative a c) }=
121+ (a * c * b) ={ cong {f = (* b)} (multCommutative a c) }=
122− (c * a * b) QED
122+ (c * a * b) QED
123
123
124Note that the parentheses are required -- only a simple expression can
124Note that the parentheses are required -- only a simple expression can
125be on the left of ``={ }=`` or ``QED``. Also, when using preorder
125be on the left of ``={ }=`` or ``QED``. Also, when using preorder
@@ -220,7 +220,7 @@ following command::
220 source <(idris --bash-completion-script `which idris`)
220 source <(idris --bash-completion-script `which idris`)
221
221
222
222
223−To enable completion permanently you must either:
223+To enable completion permenatly you must either:
224
224
225* Modify your bash init script with the above command.
225* Modify your bash init script with the above command.
226
226
docs/reference/packages.rst+1−1
@@ -24,7 +24,7 @@ comma separated list of modules. For example, a library test which
24has two modules ``foo.idr`` and ``bar.idr`` as source files would be
24has two modules ``foo.idr`` and ``bar.idr`` as source files would be
25written as follows::
25written as follows::
26
26
27− package test
27+ package foo
28
28
29 modules = foo, bar
29 modules = foo, bar
30
30
docs/reference/partial-evaluation.rst+2−2
@@ -8,7 +8,7 @@ of functions with arguments annotated as ``%static``.
8
8
9(This is an implementation of the partial evaluator described in `this
9(This is an implementation of the partial evaluator described in `this
10ICFP 2010
10ICFP 2010
11−paper <https://eb.host.cs.st-andrews.ac.uk/writings/icfp10.pdf>`__.
11+paper <http://eb.host.cs.st-andrews.ac.uk/writings/icfp10.pdf>`__.
12Please refer to this for more precise definitions of what follows.)
12Please refer to this for more precise definitions of what follows.)
13
13
14Partial evaluation is switched off by default since Idris 1.0. It can
14Partial evaluation is switched off by default since Idris 1.0. It can
@@ -207,7 +207,7 @@ Specialising Interpreters
207A particularly useful situation where partial evaluation becomes
207A particularly useful situation where partial evaluation becomes
208effective is in defining an interpreter for a well-typed expression
208effective is in defining an interpreter for a well-typed expression
209language, defined as follows (see the `Idris tutorial, section
209language, defined as follows (see the `Idris tutorial, section
210−4 <https://eb.host.cs.st-andrews.ac.uk/writings/idris-tutorial.pdf>`__
210+4 <http://eb.host.cs.st-andrews.ac.uk/writings/idris-tutorial.pdf>`__
211for more details on how this works):
211for more details on how this works):
212
212
213::
213::
docs/reference/syntax-guide.rst−6
@@ -390,12 +390,6 @@ Totality
390 partial
390 partial
391 covering
391 covering
392
392
393−Sets explicitly to which extent pattern matching is terminating and/or
394−exhaustive. A ``partial`` pattern matching makes no assumption. A ``covering``
395−pattern matching ensures that pattern matching is exhaustive on its clauses.
396−Furthermore, a ``total`` pattern matching enforces both exhaustivity and
397−termination of the evaluation of its clauses.
398−
399Implicit Coercion
393Implicit Coercion
400^^^^^^^^^^^^^^^^^
394^^^^^^^^^^^^^^^^^
401
395
docs/reference/syntax-reference.rstdeleted−422
@@ -1,422 +0,0 @@
1−*****************
2−Syntax Reference
3−*****************
4−
5−Here we present a rough description of Idris' surface syntax as an eBNF grammar.
6−This presentend grammar may differ from syntax that Idris' parser can handle due to the parser and grammar description not being in sync.
7−
8−=========
9−Notation
10−=========
11−
12−Grammar shortcut notation::
13−
14− ~CHARSEQ = complement of char sequence (i.e. any character except CHARSEQ)
15− RULE? = optional rule (i.e. RULE or nothing)
16− RULE* = repeated rule (i.e. RULE zero or more times)
17− RULE+ = repeated rule with at least one match (i.e. RULE one or more times)
18− RULE! = invalid rule (i.e. rule that is not valid in context, report meaningful error in case)
19− RULE{n} = rule repeated n times
20−
21−
22−=============
23−Main Grammar
24−=============
25−
26−.. productionlist::
27− ModuleHeader : `DocComment_t`? "module" `Identifier_t` ";"? ;
28− Import : "import" `Identifier_t` ";"? ;
29− Prog : `Decl`* `EOF`;
30− Decl : `DeclP`
31− : | `Using`
32− : | `Params`
33− : | `Mutual`
34− : | `Namespace`
35− : | `Interface`
36− : | `Implementation`
37− : | `DSL`
38− : | `Directive`
39− : | `Provider`
40− : | `Transform`
41− : | `Import`!
42− : | `RunElabDecl` ;
43− DeclP : `Fixity`
44− : | `FunDecl`
45− : | `Data`
46− : | `Record`
47− : | `SyntaxDecl` ;
48−
49−
50−--------------------
51−Syntax Declarations
52−--------------------
53−
54−.. productionlist::
55− SyntaxDecl : `SyntaxRule` ;
56− SyntaxRuleOpts : "term" | "pattern" ;
57− SyntaxRule : `SyntaxRuleOpts`? "syntax" `SyntaxSym`+ "=" `TypeExpr` `Terminator`;
58− SyntaxSym : '[' `Name_t` ']'
59− : | '{' `Name_t` '}'
60− : | `Name_t`
61− : | `StringLiteral_t`;
62− SyntaxSym : '[' `Name_t` ']'
63− : | '{' `Name_t` '}'
64− : | `Name_t`
65− : | `StringLiteral_t`;
66−
67−----------
68−Functions
69−----------
70−
71−.. productionlist::
72− FunDecl : `FunDeclP`;
73− FunDeclP : `DocComment_t`? `FnOpts`* `Accessibility`? `FnOpts`* `FnName` `TypeSig` `Terminator`
74− : | `Postulate`
75− : | `Pattern`
76− : | `CAF` ;
77− FnOpts : `FnOpt`* `Accessibility` `FnOpt`* ;
78− FnOpt : 'total'
79− : | 'partial'
80− : | 'covering'
81− : | 'implicit'
82− : | '%' 'no_implicit'
83− : | '%' 'assert_total'
84− : | '%' 'error_handler'
85− : | '%' 'reflection'
86− : | '%' 'specialise' '[' `NameTimesList`? ']' ;
87− NameTimes : `FnName` `Natural`?;
88− NameTimesList : `NameTimes` | `NameTimes` ',' `NameTimesList` ;
89− Postulate : `DocComment_t`? 'postulate' `FnOpts`* `Accesibility`? `FnOpts`* `FnName` `TypeSig` `Terminator` ;
90−
91−--------------------
92−Blocks & Namespaces
93−--------------------
94−
95−.. productionlist::
96− Using : 'using' '(' `UsingDeclList` ')' `OpenBlock` `Decl`* `CloseBlock` ;
97− UsingDeclList : `UsingDeclListP` | `NameList TypeSig`;
98− UsingDeclListP : `UsingDecl` | `UsingDecl` ',' `UsingDeclListP` ;
99− NameList : `Name` | `Name` ',' `NameList` ;
100− UsingDecl : `FnName` `TypeSig` | `FnName` `FnName`+ ;
101− Params : 'parameters' '(' `TypeDeclList` ')' `OpenBlock` `Decl`* `CloseBlock`;
102− Mutual : 'mutual' `OpenBlock` `Decl`* `CloseBlock` ;
103− Namespace : 'namespace' `identifier` `OpenBlock` `Decl`+ `CloseBlock` ;
104−
105−----------------------------
106−Interfaces & Implementation
107−----------------------------
108−
109−.. productionlist::
110− ImplementationBlock : 'where' `OpenBlock` `FnDecl`* `CloseBlock` ;
111− MethodOrImplementation : `FnDecl` | `Implementation`;
112− InterfaceBlock : 'where' `OpenBlock` `Constructor`? `MethodOrImplementation`* `CloseBlock` ;
113− InterfaceArgument : `Name` | '(' `Name` ':' `Expr` ')';
114− Interface ::= `DocComment_t`? `Accessibility`? 'interface' `ConstraintList`? `Name` `InterfaceArgument`* `InterfaceBlock`?;
115− Implementation : `DocComment_t`? 'implementation' `ImplementationName`? `ConstraintList`? `Name` `SimpleExpr`* `ImplementationBlock`? ;
116− ImplementationName : '[' `Name` ']';
117−
118−
119−-------
120−Bodies
121−-------
122−
123−.. productionlist::
124− Pattern : `Clause`;
125− CAF : 'let' `FnName` '=' `Expr` `Terminator`;
126− ArgExpr : `HSimpleExpr` | "In Pattern External (User-defined) Expression";
127− RHS : '=' `Expr`
128− : | '?=' `RHSName`? `Expr`
129− : | `Impossible` ;
130− RHSName : '{' `FnName` '}' ;
131− RHSOrWithBlock : `RHS` `WhereOrTerminator`
132− : | 'with' `SimpleExpr` `OpenBlock` `FnDecl`+ `CloseBlock`;
133− Clause : `WExpr`+ `RHSOrWithBlock`
134− : | `SimpleExpr` '<==' `FnName` `RHS` `WhereOrTerminator`
135− : | `ArgExpr` `Operator` `ArgExpr` `WExpr`* `RHSOrWithBlock` {- Except "=" and "?=" operators to avoid ambiguity -}
136− : | `FnName` `ConstraintArg`* `ImplicitOrArgExpr`* `WExpr`* `RHSOrWithBlock`;
137− ImplicitOrArgExpr ::= `ImplicitArg` | `ArgExpr`;
138− WhereOrTerminator ::= `WhereBlock` | `Terminator`;
139− WExpr ::= '|' `Expr`';
140− WhereBlock : 'where' `OpenBlock` `Decl`+ `CloseBlock`;
141−
142−----------
143−Directives
144−----------
145−
146−.. productionlist::
147− Codegen: 'C'
148− : | 'Java'
149− : | 'JavaScript'
150− : | 'Node'
151− : | 'LLVM'
152− : | 'Bytecode' ;
153− StringList : `String` | `String` ',' `StringList` ;
154− Directive : '%' `DirectiveP`;
155− DirectiveP : 'lib' `CodeGen` `String_t`
156− : | 'link' `CodeGen` `String_t`
157− : | 'flag' `CodeGen` `String_t`
158− : | 'include' `CodeGen` `String_t`
159− : | 'hide' `Name`
160− : | 'freeze' `Name`
161− : | 'thaw' `Name`
162− : | 'access' `Accessibility`
163− : | 'default' `Totality`
164− : | 'logging' `Natural`
165− : | 'dynamic' `StringList`
166− : | 'name' `Name` `NameList`
167− : | 'error_handlers' `Name` `NameList`
168− : | 'language' 'TypeProviders'
169− : | 'language' 'ErrorReflection'
170− : | 'deprecated' `Name` `String`
171− : | 'fragile' `Name` `Reason` ;
172− LangExt : "TypeProviders"
173− : | "ErrorReflection"
174− : | "UniquenessTypes"
175− : | "LinearTypes"
176− : | "DSLNotation"
177− : | "ElabReflection"
178− : | "FirstClassReflection" ;
179− Totality : 'partial' | 'total' | 'covering'
180− Provider : `DocComment_t`? '%' 'provide' `Provider_What`? '(' `FnName` `TypeSig` ')' 'with' `Expr`;
181− ProviderWhat : 'proof' | 'term' | 'type' | 'postulate'
182− Transform : '%' 'transform' `Expr` '==>' `Expr`;
183− RunElabDecl : '%' 'runElab' `Expr`;
184−
185−
186−===========
187−Expressions
188−===========
189−
190−.. productionlist::
191− FullExpr : `Expr` `EOF_t` ;
192− Expr : `Pi` ;
193− OpExpr : "Expression Parser with Operators based on ExprP" ;
194− ExprP : "External (User-defined) Syntax" | `InternalExpr` ;
195− InternalExpr : `UnifyLog`
196− : | `RecordType`
197− : | `SimpleExpr`
198− : | `Lambda`
199− : | `QuoteGoal`
200− : | `Let`
201− : | `If`
202− : | `RewriteTerm`
203− : | `CaseExpr`
204− : | `DoBlock`
205− : | `App` ;
206−
207−-------
208−Bodies
209−-------
210−
211−.. productionlist::
212− Impossible : `impossible` ;
213− CaseExpr : "case" `Expr` "of" `OpenBlock` `CaseOption`+ `CloseBlock` ;
214− CaseOption : `Expr` (`Impossible` | "=>" `Expr`) `Terminator` ;
215− ProofExpr : "proof" `OpenBlock` `Tactic'`* `CloseBlock` ;
216− TacticsExpr : "tactics" `OpenBlock` `Tactic'`* `CloseBlock` ;
217− SimpleExpr : "External (User-defined) Simple Expression"
218− : | "?" `Name`
219− : | "%" "implementation"
220− : | "Refl" ("{" `Expr` "}")?
221− : | `ProofExpr`
222− : | `TacticsExpr`
223− : | `FnName`
224− : | `Idiom`
225− : | `List`
226− : | `Alt`
227− : | `Bracketed`
228− : | `Constant`
229− : | `Type`
230− : | "Void"
231− : | `Quasiquote`
232− : | `NameQuote`
233− : | `Unquote`
234− : | "_" ;
235− Bracketed : "(" `BracketedP` ;
236− BracketedP : ")"
237− : | `Expr` ")"
238− : | `ExprList` ")"
239− : | `DependentPair` ")"
240− : | `Operator` `Expr` ")"
241− : | `Expr` `Operator` ")" ;
242− Alt : "(|" `Expr_List` "|)" ;
243− Expr_List : `Expr'` | `Expr'` "," `Expr_List` ;
244− HSimpleExpr : "." `SimpleExpr` | `SimpleExpr` ;
245− UnifyLog : "%" "unifyLog" `SimpleExpr` ;
246− RunTactics : "%" "runElab" `SimpleExpr` ;
247− Disamb : "with" `NameList` `Expr` ;
248− NoImplicits : "%" "noImplicits" `SimpleExpr` ;
249− App : "mkForeign" `Arg` `Arg`*
250− : | `MatchApp`
251− : | `SimpleExpr` `Arg`* ;
252− MatchApp : `SimpleExpr` "<==" `FnName` ;
253− Arg :` ImplicitArg` | `ConstraintArg` | `SimpleExpr` ;
254− ImplicitArg : "{" `Name` ("=" `Expr`)? "}" ;
255− ConstraintArg : "@{" `Expr` "}" ;
256− Quasiquote : "`(" `Expr` ")" ;
257− Unquote : "," `Expr` ;
258− RecordType : "record" "{" `FieldTypeList` "}" ;
259− FieldTypeList : `FieldType` | `FieldType` "," `FieldTypeList` ;
260− FieldType : `FnName` "=" `Expr` ;
261− TypeSig : ":" `Expr` ;
262− TypeExpr : `ConstraintList`? `Expr` ;
263− Lambda : "\\" `TypeOptDeclList` `LambdaTail`
264− : | "\\" `SimpleExprList` `LambdaTail` ;
265− SimpleExprList : `SimpleExpr` | `SimpleExpr` "," `SimpleExprList` ;
266− LambdaTail : `Impossible` | "=>" `Expr` ;
267− RewriteTerm : "rewrite" `Expr` ("==>" `Expr`)? "in" `Expr` ;
268− RigCount: "1" : "0" ;
269− Let : "let" `Name` `TypeSig`"? "=" `Expr` "in" `Expr`
270− : | "let" `Expr'` "=" `Expr'` "in" `Expr` ;
271− TypeSig' : ":" `Expr'` ;
272− If : "if" `Expr` "then" `Expr` "else" `Expr` ;
273− QuoteGoal : "quoteGoal" `Name` "by" `Expr` "in" `Expr` ;
274−
275−----
276−Pies
277−----
278−
279−.. productionlist::
280− Pi : `PiOpts` `Static`? `PiP` ;
281− PiP : `OpExpr` ("->" `Pi`)?
282− : | "(" `TypeDeclList` ")" "->" `Pi`
283− : | "{" `TypeDeclList` "}" "->" `Pi`
284− : | "{" "auto" `TypeDeclList` "}" "->" `Pi`
285− : | "{" "default" `SimpleExpr` `TypeDeclList` "}" "->" `Pi` ;
286− PiOpts : "."? ;
287− ConstraintList : "(" `Expr_List` ")" "=>"
288− : | `Expr` "=>" ;
289− TypeDeclList : `FunctionSignatureList`
290− : | `NameList` `TypeSig` ;
291− FunctionSignatureList : `Name` `TypeSig`
292− : | `Name` `TypeSig` "," `FunctionSignatureList` ;
293− TypeOptDeclList : `NameOrPlaceholder` `TypeSig`?
294− : | `NameOrPlaceholder` `TypeSig`? "," `TypeOptDeclList` ;
295− NameOrPlaceHolder : `Name` : "_" ;
296− ListExpr : "[" "]" | "[" `Expr` "|" `DoList` "]" | "[" `ExprList` "]" ;
297− ExprList : `Expr` | `Expr` "," `ExprList` ;
298−
299−
300−-------------------
301−Do Blocks & Idioms
302−-------------------
303−
304−.. productionlist::
305− DoList : `Do` : `Do` "," `DoList` ;
306− Do' : `Do` `KeepTerminator` ;
307− DoBlock : "do" `OpenBlock` `Do'`+ `CloseBlock` ;
308− Do : "let" `Name` `TypeSig`"? "=" `Expr`
309− : | "let" `Expr'` "=" `Expr`
310− : | "rewrite" `Expr`
311− : | `Name` "<-" `Expr`
312− : | `Expr'` "<-" `Expr`
313− : | `Expr` ;
314− Idiom : "[|" `Expr` "|]" ;
315−
316−
317−----------
318−Constants
319−----------
320−
321−.. productionlist::
322− Constant : | "Integer"
323− : | "Int"
324− : | "Char"
325− : | "Double"
326− : | "String"
327− : | "Bits8"
328− : | "Bits16"
329− : | "Bits32"
330− : | "Bits64"
331− : | `Float_t`
332− : | `Natural_t`
333− : | `VerbatimString_t`
334− : | `String_t`
335− : | `Char_t` ;
336− VerbatimString_t : "\"\"\"" ~"\"\"\"" "\""* "\"\"\"" ;
337−
338−-------
339−Tactics
340−-------
341−
342−.. productionlist::
343− Tactic : "intro" `NameList`?
344− : | "intros"
345− : | "refine" `Name` `Imp`+
346− : | "mrefine" `Name`
347− : | "rewrite" `Expr`
348− : | "induction" `Expr`
349− : | "equiv" `Expr`
350− : | "let" `Name` ":" `Expr'` "=" `Expr`
351− : | "let" `Name` "=" `Expr`
352− : | "focus" `Name`
353− : | "exact" `Expr`
354− : | "applyTactic" `Expr`
355− : | "reflect" `Expr`
356− : | "fill" `Expr`
357− : | "try" `Tactic` "|" `Tactic`
358− : | "{" `TacticSeq` "}"
359− : | "compute"
360− : | "trivial"
361− : | "solve"
362− : | "attack"
363− : | "state"
364− : | "term"
365− : | "undo"
366− : | "qed"
367− : | "abandon"
368− : | ":" "q" ;
369− TacticSeq : `Tactic` ";" `Tactic` | `Tactic` ";" `TacticSeq` ;
370−
371−----
372−Misc
373−----
374−
375−.. productionlist::
376− Imp : "?" | "_" ;
377− Static : "%static" ;
378−
379−=====
380−Data
381−=====
382−
383−.. productionlist::
384− Record : `DocComment` `Accessibility`? "record" `FnName` `TypeSig` "where" `OpenBlock` `Constructor` `KeepTerminator` `CloseBlock`;
385− DataI : "data" | "codata";
386− Data : `DocComment`? `Accessibility`? `DataI` `FnName` `TypeSig` `ExplicitTypeDataRest`?
387− : `DocComment`? `Accessibility`? `DataI` `FnName` `Name`* `DataRest`? ;
388− Constructor': `Constructor` `KeepTerminator` ;
389− ExplicitTypeDataRest : "where" `OpenBlock` `Constructor'`* `CloseBlock`;
390− DataRest : "=" `SimpleConstructorList` `Terminator` | "where"!;
391− SimpleConstructorList : `SimpleConstructor` | `SimpleConstructor` "|" `SimpleConstructorList`;
392− Constructor : `DocComment`? `FnName` `TypeSig`;
393− SimpleConstructor : `FnName` `SimpleExpr`* `DocComment`?;
394− DSL : "dsl" `FnName` `OpenBlock` `Overload'`+ `CloseBlock`;
395− OverloadIdentifier : "let" | `Identifier`;
396− Overload : `OverloadIdentifier` "=" `Expr`;
397−
398−
399−=========
400−Operators
401−=========
402−
403−.. productionlist::
404− BacktickOperator: `Name` ;
405− OperatorName: `SymbolicOperator` : `BacktickOperator` ;
406− OperatorFront: "(" "=" ")" | (`Identifier_t` ".")? "(" `Operator_t` ")" ;
407− FnName: `Name` | `OperatorFront`;
408− Fixity: `FixityType` `Natural_t` `OperatorList` `Terminator`;
409− FixityType: "infixl" | "infixr" | "infix" | "prefix";
410−
411−
412−==============
413−Documentation
414−==============
415−
416−.. productionlist::
417− SingleLineComment_t: "--" ~`EOL_t`* `EOL_t` ;
418− MultiLineComment_t: "{" .. "}" | "{ -" `InCommentChars_t` ;
419− InCommentChars_t : "- }" | `MultiLineComment_t` `InCommentChars_t` | ~"- }"+ `InCommentChars_t`;
420− DocComment_t : `DocCommentLine` (`ArgCommentLine` `DocCommentLine`*)* ;
421− DocCommentLine : "|||" ~`EOL_t`* `EOL_t` ;
422− ArgCommentLine : "|||" "@" ~`EOL_t`* `EOL_t` ;
docs/reference/type-directed-search.rst+1−1
@@ -4,7 +4,7 @@ Type Directed Search ``:search``
4
4
5Idris' ``:search`` command searches for terms according to their
5Idris' ``:search`` command searches for terms according to their
6approximate type signature (much like
6approximate type signature (much like
7−`Hoogle <https://www.haskell.org/hoogle/>`__ for Haskell). For
7+`Hoogle <http://www.haskell.org/hoogle/>`__ for Haskell). For
8example::
8example::
9
9
10 Idris> :search e -> List e -> List e
10 Idris> :search e -> List e -> List e
docs/reference/uniqueness-types.rst+2−2
@@ -13,7 +13,7 @@ ideally while giving up as little high level conveniences as possible.
13
13
14They are inspired by linear types, `Uniqueness Types
14They are inspired by linear types, `Uniqueness Types
15<https://en.wikipedia.org/wiki/Uniqueness_type>`__ in the `Clean
15<https://en.wikipedia.org/wiki/Uniqueness_type>`__ in the `Clean
16−<https://wiki.clean.cs.ru.nl/Clean>`__ programming language, and
16+<http://wiki.clean.cs.ru.nl/Clean>`__ programming language, and
17ownership types and borrowed pointers in the `Rust
17ownership types and borrowed pointers in the `Rust
18<https://www.rust-lang.org/>`__ programming language.
18<https://www.rust-lang.org/>`__ programming language.
19
19
@@ -199,7 +199,7 @@ return it in exactly the condition in which it was received!
199The restriction is that when a ``Borrowed`` type is matched, any
199The restriction is that when a ``Borrowed`` type is matched, any
200pattern variables under the ``Read`` which have a unique type may not
200pattern variables under the ``Read`` which have a unique type may not
201be referred to at all on the right hand side (unless they are
201be referred to at all on the right hand side (unless they are
202−themselves lent to another function).
202+themselves ``lent`` to another function).
203
203
204Uniqueness information is stored in the type, and in particular in
204Uniqueness information is stored in the type, and in particular in
205function types. Once we're in a unique context, any new function which
205function types. Once we're in a unique context, any new function which
docs/st/composing.rst+16−16
@@ -1,7 +1,7 @@
1.. _composing:
1.. _composing:
2
2
3************************
3************************
4−Composing State Machines
4+Composing State Machines
5************************
5************************
6
6
7In the previous section, we defined a ``DataStore`` interface and used it
7In the previous section, we defined a ``DataStore`` interface and used it
@@ -28,7 +28,7 @@ there was a login failure in a state.
28
28
29Furthermore, we may have *hierarchies* of state machines, in that one
29Furthermore, we may have *hierarchies* of state machines, in that one
30state machine could be implemented by composing several others. For
30state machine could be implemented by composing several others. For
31−example, we can have a state machine representing the state of a
31+example, we can have a state machine representing the state of a
32graphics system, and use this to implement a *higher level* graphics API
32graphics system, and use this to implement a *higher level* graphics API
33such as turtle graphics, which uses the graphics system plus some additional
33such as turtle graphics, which uses the graphics system plus some additional
34state for the turtle.
34state for the turtle.
@@ -50,7 +50,7 @@ count to zero, a session might run as follows:
50 *LoginCount> :exec main
50 *LoginCount> :exec main
51 Enter password: Mornington Crescent
51 Enter password: Mornington Crescent
52 Secret is: "Secret Data"
52 Secret is: "Secret Data"
53− Enter password: Dollis Hill
53+ Enter password: Dollis Hill
54 Failure
54 Failure
55 Number of failures: 1
55 Number of failures: 1
56 Enter password: Mornington Crescent
56 Enter password: Mornington Crescent
@@ -63,7 +63,7 @@ count to zero, a session might run as follows:
63We'll start by adding a state resource to ``getData`` to keep track of the
63We'll start by adding a state resource to ``getData`` to keep track of the
64number of failures:
64number of failures:
65
65
66−.. code-block:: idris
66+.. code-block:: idrs
67
67
68 getData : (ConsoleIO m, DataStore m) =>
68 getData : (ConsoleIO m, DataStore m) =>
69 (failcount : Var) -> ST m () [failcount ::: State Integer]
69 (failcount : Var) -> ST m () [failcount ::: State Integer]
@@ -116,7 +116,7 @@ match:
116 Required result states here are: st2_fn
116 Required result states here are: st2_fn
117
117
118In other words, ``connect`` requires that there are *no* resources on
118In other words, ``connect`` requires that there are *no* resources on
119−entry, but we have *one*, the failure count!
119+entry, but we have *one*, the failure count!
120This shouldn't be a problem, though: the required resources are a *subset* of
120This shouldn't be a problem, though: the required resources are a *subset* of
121the resources we have, after all, and the additional resources (here, the
121the resources we have, after all, and the additional resources (here, the
122failure count) are not relevant to ``connect``. What we need, therefore,
122failure count) are not relevant to ``connect``. What we need, therefore,
@@ -214,7 +214,7 @@ ordering of resources is allowed to change, although resources which
214appear in ``old`` can't appear in the ``sub`` list more than once (you will
214appear in ``old`` can't appear in the ``sub`` list more than once (you will
215get a type error if you try this).
215get a type error if you try this).
216
216
217−The function ``updateWith`` takes the *output* resources of the
217+The function ``updateWith`` takes the *output* resources of the
218called function, and updates them in the current resource list. It makes
218called function, and updates them in the current resource list. It makes
219an effort to preserve ordering as far as possible, although this isn't
219an effort to preserve ordering as far as possible, although this isn't
220always possible if the called function does some complicated resource
220always possible if the called function does some complicated resource
@@ -338,7 +338,7 @@ representing a surface on which we'll draw lines and rectangles:
338
338
339.. code-block:: idris
339.. code-block:: idris
340
340
341− interface Draw (m : Type -> Type) where
341+ interface Draw (m : Type -> Type) where
342 Surface : Type
342 Surface : Type
343
343
344We'll need to be able to create a new ``Surface`` by opening a window:
344We'll need to be able to create a new ``Surface`` by opening a window:
@@ -369,7 +369,7 @@ succeeds (that is, returns a result of the form ``Just val``.
369 an operation returns ``Just ty``, there's also ``addIfRight``:
369 an operation returns ``Just ty``, there's also ``addIfRight``:
370
370
371 .. code-block:: idris
371 .. code-block:: idris
372−
372+
373 addIfJust : Type -> Action (Maybe Var)
373 addIfJust : Type -> Action (Maybe Var)
374 addIfRight : Type -> Action (Either a Var)
374 addIfRight : Type -> Action (Either a Var)
375
375
@@ -378,10 +378,10 @@ succeeds (that is, returns a result of the form ``Just val``.
378 of an operation:
378 of an operation:
379
379
380 .. code-block:: idris
380 .. code-block:: idris
381−
381+
382 Add : (ty -> Resources) -> Action ty
382 Add : (ty -> Resources) -> Action ty
383−
383+
384− Using this, you can create your own actions to add resources
384+ Using this, you can create your own actions to add resources
385 based on the result of an operation, if required. For example,
385 based on the result of an operation, if required. For example,
386 ``addIfJust`` is implemented as follows:
386 ``addIfJust`` is implemented as follows:
387
387
@@ -479,7 +479,7 @@ For example, assuming we have a surface ``win`` to draw onto, we can write a
479
479
480The ``flip win`` at the end is necessary because the drawing primitives
480The ``flip win`` at the end is necessary because the drawing primitives
481are double buffered, to prevent flicker. We draw onto one buffer, off-screen,
481are double buffered, to prevent flicker. We draw onto one buffer, off-screen,
482−and display the other. When we call ``flip``, it displays the off-screen
482+and display the other. When we call ``flip``, it displays the off-screen
483buffer, and creates a new off-screen buffer for drawing the next frame.
483buffer, and creates a new off-screen buffer for drawing the next frame.
484
484
485To include this in a program, we'll write a main loop which renders our
485To include this in a program, we'll write a main loop which renders our
@@ -496,7 +496,7 @@ application:
496
496
497Finally, we can create a main program which initialises a window, if
497Finally, we can create a main program which initialises a window, if
498possible, then runs the main loop:
498possible, then runs the main loop:
499−
499+
500.. code-block:: idris
500.. code-block:: idris
501
501
502 drawMain : (ConsoleIO m, Draw m) => ST m () []
502 drawMain : (ConsoleIO m, Draw m) => ST m () []
@@ -593,7 +593,7 @@ is implemented using the following type, defined by ``Control.ST``:
593
593
594.. code-block:: idris
594.. code-block:: idris
595
595
596− data Composite : List Type -> Type
596+ data Composite : List Type -> Type
597
597
598If we have a composite resource, we can split it into its constituent
598If we have a composite resource, we can split it into its constituent
599resources, and create new variables for each of those resources, using
599resources, and create new variables for each of those resources, using
@@ -604,7 +604,7 @@ the *split* function. For example:
604 splitComp : (comp : Var) -> ST m () [comp ::: Composite [State Int, State String]]
604 splitComp : (comp : Var) -> ST m () [comp ::: Composite [State Int, State String]]
605 splitComp comp = do [int, str] <- split comp
605 splitComp comp = do [int, str] <- split comp
606 ?whatNow
606 ?whatNow
607−
607+
608The call ``split comp`` extracts the ``State Int`` and ``State String`` from
608The call ``split comp`` extracts the ``State Int`` and ``State String`` from
609the composite resource ``comp``, and stores them in the variables ``int``
609the composite resource ``comp``, and stores them in the variables ``int``
610and ``str`` respectively. If we check the type of ``whatNow``, we'll see
610and ``str`` respectively. If we check the type of ``whatNow``, we'll see
@@ -713,7 +713,7 @@ A ``Line`` is defined as a start location, and end location, and a colour:
713 Line : Type
713 Line : Type
714 Line = ((Int, Int), (Int, Int), Col)
714 Line = ((Int, Int), (Int, Int), Col)
715
715
716−To implement ``start``, which creates a new ``Turtle`` (or returns ``Nothing``
716+To implement ``start``, which creates a new ``Turtle`` (or returns ``Nothing``
717if this is impossible), we begin by initialising the drawing surface then
717if this is impossible), we begin by initialising the drawing surface then
718all of the components of the state. Finally, we combine all of these
718all of the components of the state. Finally, we combine all of these
719into a composite resource for the turtle:
719into a composite resource for the turtle:
docs/st/examples.rst+1−1
@@ -350,7 +350,7 @@ Implementing ``Sockets``
350
350
351To implement ``Sockets`` in ``IO``, we'll begin by giving a concrete type
351To implement ``Sockets`` in ``IO``, we'll begin by giving a concrete type
352for ``Sock``. We can use the raw sockets API (implemented in
352for ``Sock``. We can use the raw sockets API (implemented in
353−``Network.Socket``) for this, and use a ``Socket`` stored in a ``State``, no
353+``Network.Sockeet``) for this, and use a ``Socket`` stored in a ``State``, no
354matter what abstract state the socket is in:
354matter what abstract state the socket is in:
355
355
356.. code-block:: idris
356.. code-block:: idris
docs/st/index.rst+1−1
@@ -14,7 +14,7 @@ the `Control.ST` library in `Idris`.
14 Idris Community* has waived all copyright and related or neighbouring
14 Idris Community* has waived all copyright and related or neighbouring
15 rights to Documentation for Idris.
15 rights to Documentation for Idris.
16
16
17− More information concerning the CC0 can be found online at: https://creativecommons.org/publicdomain/zero/1.0/
17+ More information concerning the CC0 can be found online at: http://creativecommons.org/publicdomain/zero/1.0/
18
18
19.. toctree::
19.. toctree::
20 :maxdepth: 1
20 :maxdepth: 1
docs/st/introduction.rst+2−2
@@ -3,7 +3,7 @@ Overview
3********
3********
4
4
5Pure functional languages with dependent types such as `Idris
5Pure functional languages with dependent types such as `Idris
6−<https://www.idris-lang.org/>`_ support reasoning about programs directly
6+<http://www.idris-lang.org/>`_ support reasoning about programs directly
7in the type system, promising that we can *know* a program will run
7in the type system, promising that we can *know* a program will run
8correctly (i.e. according to the specification in its type) simply
8correctly (i.e. according to the specification in its type) simply
9because it compiles.
9because it compiles.
@@ -70,7 +70,7 @@ Outline
70=======
70=======
71
71
72This tutorial starts (:ref:`introst`) by describing how to manipulate
72This tutorial starts (:ref:`introst`) by describing how to manipulate
73−individual states, introduces a data type ``STrans`` for describing stateful
73+individual states, introduce a data type ``STrans`` for describing stateful
74functions, and ``ST`` which describes top level state transitions.
74functions, and ``ST`` which describes top level state transitions.
75Next (:ref:`smstypes`) it describes how to represent state machines in
75Next (:ref:`smstypes`) it describes how to represent state machines in
76types, and how to define *interfaces* for describing stateful systems.
76types, and how to define *interfaces* for describing stateful systems.
docs/st/state.rst+1−1
@@ -164,7 +164,7 @@ can define ``ioMakeAndIncrement`` as follows:
164 lift $ putStrLn ("var = " ++ show !(read var))
164 lift $ putStrLn ("var = " ++ show !(read var))
165 delete var
165 delete var
166
166
167−The ``lift`` function allows us to use functions from the underlying
167+The ``lift`` function allows us to use funtions from the underlying
168computation context (``IO`` here) directly. Again, we'll see the exact type
168computation context (``IO`` here) directly. Again, we'll see the exact type
169of ``lift`` shortly.
169of ``lift`` shortly.
170
170
docs/tutorial/conclusions.rst+6−6
@@ -7,11 +7,11 @@ Further Reading
7Further information about Idris programming, and programming with
7Further information about Idris programming, and programming with
8dependent types in general, can be obtained from various sources:
8dependent types in general, can be obtained from various sources:
9
9
10−- The Idris web site (https://www.idris-lang.org/) and by asking
10+- The Idris web site (http://www.idris-lang.org/) and by asking
11 questions on the mailing list.
11 questions on the mailing list.
12
12
13- The IRC channel ``#idris``, on
13- The IRC channel ``#idris``, on
14− `webchat.freenode.net <https://webchat.freenode.net/>`__.
14+ `chat.freenode.net <http://chat.freenode.net>`__.
15
15
16- The wiki (https://github.com/idris-lang/Idris-dev/wiki/) has further
16- The wiki (https://github.com/idris-lang/Idris-dev/wiki/) has further
17 user provided information, in particular:
17 user provided information, in particular:
@@ -25,7 +25,7 @@ dependent types in general, can be obtained from various sources:
25 https://github.com/idris-lang/Idris-dev.
25 https://github.com/idris-lang/Idris-dev.
26
26
27- Existing projects on the ``Idris Hackers`` web space:
27- Existing projects on the ``Idris Hackers`` web space:
28− https://idris-hackers.github.io.
28+ http://idris-hackers.github.io.
29
29
30- Various papers (e.g. [1]_, [2]_, and [3]_). Although these mostly
30- Various papers (e.g. [1]_, [2]_, and [3]_). Although these mostly
31 describe older versions of Idris.
31 describe older versions of Idris.
@@ -36,14 +36,14 @@ dependent types in general, can be obtained from various sources:
36 Aspects of Declarative Languages (PADL'12), Claudio Russo and
36 Aspects of Declarative Languages (PADL'12), Claudio Russo and
37 Neng-Fa Zhou (Eds.). Springer-Verlag, Berlin, Heidelberg,
37 Neng-Fa Zhou (Eds.). Springer-Verlag, Berlin, Heidelberg,
38 242-257. DOI=10.1007/978-3-642-27694-1_18
38 242-257. DOI=10.1007/978-3-642-27694-1_18
39− https://dx.doi.org/10.1007/978-3-642-27694-1_18
39+ http://dx.doi.org/10.1007/978-3-642-27694-1_18
40
40
41.. [2] Edwin C. Brady. 2011. IDRIS ---: systems programming meets full
41.. [2] Edwin C. Brady. 2011. IDRIS ---: systems programming meets full
42 dependent types. In Proceedings of the 5th ACM workshop on
42 dependent types. In Proceedings of the 5th ACM workshop on
43 Programming languages meets program verification (PLPV
43 Programming languages meets program verification (PLPV
44 '11). ACM, New York, NY, USA,
44 '11). ACM, New York, NY, USA,
45 43-54. DOI=10.1145/1929529.1929536
45 43-54. DOI=10.1145/1929529.1929536
46− https://doi.acm.org/10.1145/1929529.1929536
46+ http://doi.acm.org/10.1145/1929529.1929536
47
47
48.. [3] Edwin C. Brady and Kevin Hammond. 2010. Scrapping your
48.. [3] Edwin C. Brady and Kevin Hammond. 2010. Scrapping your
49 inefficient engine: using partial evaluation to improve
49 inefficient engine: using partial evaluation to improve
@@ -51,4 +51,4 @@ dependent types in general, can be obtained from various sources:
51 15th ACM SIGPLAN international conference on Functional
51 15th ACM SIGPLAN international conference on Functional
52 programming (ICFP '10). ACM, New York, NY, USA,
52 programming (ICFP '10). ACM, New York, NY, USA,
53 297-308. DOI=10.1145/1863543.1863587
53 297-308. DOI=10.1145/1863543.1863587
54− https://doi.acm.org/10.1145/1863543.1863587
54+ http://doi.acm.org/10.1145/1863543.1863587
docs/tutorial/index.rst+1−1
@@ -15,7 +15,7 @@ existing functional programming language such as Haskell or OCaml.
15 Idris Community* has waived all copyright and related or neighboring
15 Idris Community* has waived all copyright and related or neighboring
16 rights to Documentation for Idris.
16 rights to Documentation for Idris.
17
17
18− More information concerning the CC0 can be found online at: https://creativecommons.org/publicdomain/zero/1.0/
18+ More information concerning the CC0 can be found online at: http://creativecommons.org/publicdomain/zero/1.0/
19
19
20
20
21.. toctree::
21.. toctree::
docs/tutorial/interactive.rst+6−5
@@ -23,12 +23,13 @@ editor, and specifically how to do so in `Vim
23for `Emacs <https://github.com/idris-hackers/idris-mode>`_ is also
23for `Emacs <https://github.com/idris-hackers/idris-mode>`_ is also
24available.
24available.
25
25
26+
26Editing at the REPL
27Editing at the REPL
27===================
28===================
28
29
29The REPL provides a number of commands, which we will describe
30The REPL provides a number of commands, which we will describe
30shortly, which generate new program fragments based on the currently
31shortly, which generate new program fragments based on the currently
31−loaded module. These take the general form:
32+loaded module. These take the general form
32
33
33::
34::
34
35
@@ -63,9 +64,9 @@ Editing Commands
63:addclause
64:addclause
64----------
65----------
65
66
66−The ``:addclause n f`` command, abbreviated ``:ac n f``, creates a
67+The ``:addclause n f`` command (abbreviated ``:ac n f``) creates a
67template definition for the function named ``f`` declared on line
68template definition for the function named ``f`` declared on line
68−``n``. For example, if the code beginning on line 94 contains:
69+``n``. For example, if the code beginning on line 94 contains:
69
70
70.. code-block:: idris
71.. code-block:: idris
71
72
@@ -128,7 +129,7 @@ ys`` would lead to a unification error.
128
129
129The ``:addmissing n f`` command, abbreviated ``:am n f``, adds the
130The ``:addmissing n f`` command, abbreviated ``:am n f``, adds the
130clauses which are required to make the function ``f`` on line ``n``
131clauses which are required to make the function ``f`` on line ``n``
131−cover all inputs. For example, if the code beginning on line 94 is:
132+cover all inputs. For example, if the code beginning on line 94 is
132
133
133.. code-block:: idris
134.. code-block:: idris
134
135
@@ -142,7 +143,7 @@ then ``:am 96 vzipWith`` gives:
142
143
143 vzipWith f (x :: xs) (y :: ys) = ?vzipWith_rhs_2
144 vzipWith f (x :: xs) (y :: ys) = ?vzipWith_rhs_2
144
145
145−That is, it notices that there are no cases for empty vectors,
146+That is, it notices that there are no cases for non-empty vectors,
146generates the required clauses, and eliminates the clauses which would
147generates the required clauses, and eliminates the clauses which would
147lead to unification errors.
148lead to unification errors.
148
149
docs/tutorial/interfaces.rst+7−6
@@ -11,8 +11,8 @@ data types. For example, we would like arithmetic operators to work on
11to display different types in a uniform way.
11to display different types in a uniform way.
12
12
13To achieve this, we use *interfaces*, which are similar to type classes in
13To achieve this, we use *interfaces*, which are similar to type classes in
14−Haskell or traits in Rust. To define an interface, we provide a collection of
14+Haskell or traits in Rust. To define an interface, we provide a collection of
15−overloadable functions. A simple example is the ``Show``
15+overloadable functions. A simple example is the ``Show``
16interface, which is defined in the prelude and provides an interface for
16interface, which is defined in the prelude and provides an interface for
17converting values to ``String``:
17converting values to ``String``:
18
18
@@ -31,7 +31,8 @@ This generates a function of the following type (which we call a
31We can read this as: “under the constraint that ``a`` has an implementation
31We can read this as: “under the constraint that ``a`` has an implementation
32of ``Show``, take an input ``a`` and return a ``String``.” An implementation
32of ``Show``, take an input ``a`` and return a ``String``.” An implementation
33of an interface is defined by giving definitions of the methods of the interface.
33of an interface is defined by giving definitions of the methods of the interface.
34+For example, the
34−For example, the ``Show`` implementation for ``Nat`` could be defined as:
35+``Show`` implementation for ``Nat`` could be defined as:
35
36
36.. code-block:: idris
37.. code-block:: idris
37
38
@@ -48,7 +49,7 @@ Only one implementation of an interface can be given for a type — implementati
48not overlap. Implementation declarations can themselves have constraints.
49not overlap. Implementation declarations can themselves have constraints.
49To help with resolution, the arguments of an implementation must be
50To help with resolution, the arguments of an implementation must be
50constructors (either data or type constructors) or variables
51constructors (either data or type constructors) or variables
51−(i.e. you cannot give an implementation for a function). For
52+(i.e. you cannot give an implementation for a function). For
52example, to define a ``Show`` implementation for vectors, we need to know
53example, to define a ``Show`` implementation for vectors, we need to know
53that there is a ``Show`` implementation for the element type, because we are
54that there is a ``Show`` implementation for the element type, because we are
54going to use it to convert each element to a ``String``:
55going to use it to convert each element to a ``String``:
@@ -533,7 +534,7 @@ Named Implementations
533
534
534It can be desirable to have multiple implementations of an interface for the
535It can be desirable to have multiple implementations of an interface for the
535same type, for example to provide alternative methods for sorting or printing
536same type, for example to provide alternative methods for sorting or printing
536−values. To achieve this, implementations can be *named* as follows:
537+values. To achieve this, implementations can be *named* as follows:
537
538
538.. code-block:: idris
539.. code-block:: idris
539
540
@@ -573,7 +574,7 @@ the prelude defines the following ``Semigroup`` interface:
573 interface Semigroup ty where
574 interface Semigroup ty where
574 (<+>) : ty -> ty -> ty
575 (<+>) : ty -> ty -> ty
575
576
576−Then it defines ``Monoid``, which extends ``Semigroup`` with a “neutral”
577+Then it defines ``Monoid``, which extends ``Semigroup`` with a "neutral"
577value:
578value:
578
579
579.. code-block:: idris
580.. code-block:: idris
docs/tutorial/interp.rst+3−3
@@ -30,7 +30,7 @@ calculated just like any other value:
30 interpTy : Ty -> Type
30 interpTy : Ty -> Type
31 interpTy TyInt = Integer
31 interpTy TyInt = Integer
32 interpTy TyBool = Bool
32 interpTy TyBool = Bool
33− interpTy (TyFun a t) = interpTy a -> interpTy t
33+ interpTy (TyFun A T) = interpTy A -> interpTy T
34
34
35We're going to define a representation of our language in such a way
35We're going to define a representation of our language in such a way
36that only well-typed programs can be represented. We'll index the
36that only well-typed programs can be represented. We'll index the
@@ -106,7 +106,7 @@ the ``Var`` constructor:
106
106
107 Var : HasType i G t -> Expr G t
107 Var : HasType i G t -> Expr G t
108
108
109−So, in an expression ``\x. \y. x y``, the variable ``x`` would have a
109+So, in an expression ``\x,\y. x y``, the variable ``x`` would have a
110de Bruijn index of 1, represented as ``Pop Stop``, and ``y 0``,
110de Bruijn index of 1, represented as ``Pop Stop``, and ``y 0``,
111represented as ``Stop``. We find these by counting the number of
111represented as ``Stop``. We find these by counting the number of
112lambdas between the definition and the use.
112lambdas between the definition and the use.
@@ -194,7 +194,7 @@ each constructor, we translate it into the corresponding Idris value:
194 interp env (If x t e) = if interp env x then interp env t
194 interp env (If x t e) = if interp env x then interp env t
195 else interp env e
195 else interp env e
196
196
197−Let us look at each case in turn. To translate a variable, we simply look it
197+Let us look at each case in turn. To translate a variable, we simply look it
198up in the environment:
198up in the environment:
199
199
200.. code-block:: idris
200.. code-block:: idris
docs/tutorial/introduction.rst+2−2
@@ -6,7 +6,7 @@ Introduction
6
6
7In conventional programming languages, there is a clear distinction
7In conventional programming languages, there is a clear distinction
8between *types* and *values*. For example, in `Haskell
8between *types* and *values*. For example, in `Haskell
9−<https://www.haskell.org>`_, the following are types, representing
9+<http://www.haskell.org>`_, the following are types, representing
10integers, characters, lists of characters, and lists of any value
10integers, characters, lists of characters, and lists of any value
11respectively:
11respectively:
12
12
@@ -49,7 +49,7 @@ Intended Audience
49
49
50This tutorial is intended as a brief introduction to the language, and
50This tutorial is intended as a brief introduction to the language, and
51is aimed at readers already familiar with a functional language such
51is aimed at readers already familiar with a functional language such
52−as `Haskell <https://www.haskell.org>`_ or `OCaml <https://ocaml.org>`_.
52+as `Haskell <http://www.haskell.org>`_ or `OCaml <http://ocaml.org>`_.
53In particular, a certain amount of familiarity with Haskell syntax is
53In particular, a certain amount of familiarity with Haskell syntax is
54assumed, although most concepts will at least be explained
54assumed, although most concepts will at least be explained
55briefly. The reader is also assumed to have some interest in using
55briefly. The reader is also assumed to have some interest in using
docs/tutorial/miscellany.rst+21−21
@@ -8,7 +8,7 @@ In this section we discuss a variety of additional features:
8
8
9+ auto, implicit, and default arguments;
9+ auto, implicit, and default arguments;
10+ literate programming;
10+ literate programming;
11−+ interfacing with external libraries through the foreign function;
11++ interfacing with external libraries through the foreign function
12+ interface;
12+ interface;
13+ type providers;
13+ type providers;
14+ code generation; and
14+ code generation; and
@@ -23,7 +23,7 @@ omitted when they can be inferred by the type checker, e.g.
23.. code-block:: idris
23.. code-block:: idris
24
24
25 index : {a:Type} -> {n:Nat} -> Fin n -> Vect n a -> a
25 index : {a:Type} -> {n:Nat} -> Fin n -> Vect n a -> a
26−
26+
27Auto implicit arguments
27Auto implicit arguments
28------------------------
28------------------------
29
29
@@ -69,17 +69,17 @@ In the case that a proof is not found, it can be provided explicitly as normal:
69.. code-block:: idris
69.. code-block:: idris
70
70
71 head xs {p = ?headProof}
71 head xs {p = ?headProof}
72−
72+
73Default implicit arguments
73Default implicit arguments
74---------------------------
74---------------------------
75
75
76−Besides having Idris automatically find a value of a given type, sometimes we
76+Besides having Idris automatically find a value of a given type, sometimes we
77want to have an implicit argument with a specific default value. In Idris, we can
77want to have an implicit argument with a specific default value. In Idris, we can
78do this using the ``default`` annotation. While this is primarily intended to assist
78do this using the ``default`` annotation. While this is primarily intended to assist
79−in automatically constructing a proof where auto fails, or finds an unhelpful value,
79+in automatically constructing a proof where auto fails, or finds an unhelpful value,
80−it might be easier to first consider a simpler case, not involving proofs.
80+it might be easier to first consider a simpler case, not involving proofs.
81
81
82−If we want to compute the n'th fibonacci number (and defining the 0th fibonacci
82+If we want to compute the n'th fibonacci number (and defining the 0th fibonacci
83number as 0), we could write:
83number as 0), we could write:
84
84
85.. code-block:: idris
85.. code-block:: idris
@@ -89,8 +89,8 @@ number as 0), we could write:
89 fibonacci {lag} {lead} (S n) = fibonacci {lag=lead} {lead=lag+lead} n
89 fibonacci {lag} {lead} (S n) = fibonacci {lag=lead} {lead=lag+lead} n
90
90
91After this definition, ``fibonacci 5`` is equivalent to ``fibonacci {lag=0} {lead=1} 5``,
91After this definition, ``fibonacci 5`` is equivalent to ``fibonacci {lag=0} {lead=1} 5``,
92−and will return the 5th fibonacci number. Note that while this works, this is not the
92+and will return the 5th fibonacci number. Note that while this works, this is not the
93−intended use of the ``default`` annotation. It is included here for illustrative purposes
93+intended use of the ``default`` annotation. It is included here for illustrative purposes
94only. Usually, ``default`` is used to provide things like a custom proof search script.
94only. Usually, ``default`` is used to provide things like a custom proof search script.
95
95
96
96
@@ -131,7 +131,7 @@ an extension of ``.lidr`` then it is assumed to be a literate file. In
131literate programs, everything is assumed to be a comment unless the line
131literate programs, everything is assumed to be a comment unless the line
132begins with a greater than sign ``>``, for example:
132begins with a greater than sign ``>``, for example:
133
133
134−.. code-block:: literate-idris
134+.. code-block:: idris
135
135
136 > module literate
136 > module literate
137
137
@@ -242,7 +242,7 @@ through the following directives:
242Testing foreign function calls
242Testing foreign function calls
243------------------------------
243------------------------------
244
244
245−Normally, the Idris interpreter (used for typechecking and as the REPL)
245+Normally, the Idris interpreter (used for typechecking and at the REPL)
246will not perform IO actions. Additionally, as it neither generates C
246will not perform IO actions. Additionally, as it neither generates C
247code nor compiles to machine code, the ``%lib``, ``%include`` and
247code nor compiles to machine code, the ``%lib``, ``%include`` and
248``%link`` directives have no effect. IO actions and FFI calls can be
248``%link`` directives have no effect. IO actions and FFI calls can be
@@ -329,13 +329,13 @@ are available in an external collection [1]_.
329C Target
329C Target
330========
330========
331
331
332−The default target of Idris is C. Compiling via:
332+The default target of Idris is C. Compiling via :
333
333
334::
334::
335
335
336 $ idris hello.idr -o hello
336 $ idris hello.idr -o hello
337
337
338−is equivalent to:
338+is equivalent to :
339
339
340::
340::
341
341
@@ -344,14 +344,14 @@ is equivalent to:
344When the command above is used, a temporary C source is generated, which
344When the command above is used, a temporary C source is generated, which
345is then compiled into an executable named ``hello``.
345is then compiled into an executable named ``hello``.
346
346
347−In order to view the generated C code, compile via:
347+In order to view the generated C code, compile via :
348
348
349::
349::
350
350
351 $ idris hello.idr -S -o hello.c
351 $ idris hello.idr -S -o hello.c
352
352
353To turn optimisations on, use the ``%flag C`` pragma within the code, as
353To turn optimisations on, use the ``%flag C`` pragma within the code, as
354−is shown below:
354+is shown below :
355
355
356.. code-block:: idris
356.. code-block:: idris
357
357
@@ -368,7 +368,7 @@ is shown below:
368
368
369To compile the generated C with debugging information e.g. to use
369To compile the generated C with debugging information e.g. to use
370``gdb`` to debug segmentation faults in Idris programs, use the
370``gdb`` to debug segmentation faults in Idris programs, use the
371−``%flag C`` pragma to include debugging symbols, as is shown below:
371+``%flag C`` pragma to include debugging symbols, as is shown below :
372
372
373.. code-block:: idris
373.. code-block:: idris
374
374
@@ -503,13 +503,13 @@ And for use in the browser:
503
503
504The given files will be added to the top of the generated code.
504The given files will be added to the top of the generated code.
505For library packages you can also use the ipkg objs option to include the
505For library packages you can also use the ipkg objs option to include the
506−js file in the installation, and use:
506+js file in the installation, and use
507
507
508.. code-block:: idris
508.. code-block:: idris
509
509
510 %include Node "package/external.js"
510 %include Node "package/external.js"
511
511
512−The *JavaScript* and *NodeJS* backends of Idris will also lookup for the file
512+This javascript and node backends idris will also lookup for the file on
513on that location.
513on that location.
514
514
515Including *NodeJS* modules
515Including *NodeJS* modules
@@ -552,7 +552,7 @@ types themselves have types. For example:
552 *universe> :t Vect
552 *universe> :t Vect
553 Vect : Nat -> Type -> Type
553 Vect : Nat -> Type -> Type
554
554
555−But what about the type of ``Type``? If we ask Idris it reports:
555+But what about the type of ``Type``? If we ask Idris it reports
556
556
557::
557::
558
558
@@ -560,8 +560,8 @@ But what about the type of ``Type``? If we ask Idris it reports:
560 Type : Type 1
560 Type : Type 1
561
561
562If ``Type`` were its own type, it would lead to an inconsistency due to
562If ``Type`` were its own type, it would lead to an inconsistency due to
563−`Girard’s paradox <https://www.cs.cmu.edu/afs/cs.cmu.edu/user/kw/www/scans/girard72thesis.pdf>`_,
563+`Girard’s paradox <http://www.cs.cmu.edu/afs/cs.cmu.edu/user/kw/www/scans/girard72thesis.pdf>`_ , so internally there is a
564−so internally there is a *hierarchy* of types (or *universes*):
564+*hierarchy* of types (or *universes*):
565
565
566.. code-block:: idris
566.. code-block:: idris
567
567
docs/tutorial/modules.rst+11−8
@@ -53,7 +53,8 @@ Then, this gives a main program (in a file
53 print (Btree.toList t)
53 print (Btree.toList t)
54
54
55The same names can be defined in multiple modules: names are *qualified* with
55The same names can be defined in multiple modules: names are *qualified* with
56−the name of the module. The names defined in the ``Btree`` module are, in full:
56+the name of the module. The names defined in the ``Btree`` module are, in
57+full:
57
58
58+ ``Btree.BTree``
59+ ``Btree.BTree``
59+ ``Btree.Leaf``
60+ ``Btree.Leaf``
@@ -73,7 +74,7 @@ directories. For example, ``import foo.bar`` would import the file
73``foo/bar.idr``, which would conventionally have the module declaration
74``foo/bar.idr``, which would conventionally have the module declaration
74``module foo.bar``. The only requirement for module names is that the
75``module foo.bar``. The only requirement for module names is that the
75main module, with the ``main`` function, must be called
76main module, with the ``main`` function, must be called
76−``Main`` — although its filename need not be ``Main.idr``.
77+``Main``—although its filename need not be ``Main.idr``.
77
78
78Export Modifiers
79Export Modifiers
79================
80================
@@ -81,16 +82,18 @@ Export Modifiers
81Idris allows for fine-grained control over the visibility of a
82Idris allows for fine-grained control over the visibility of a
82module's contents. By default, all names defined in a module are kept
83module's contents. By default, all names defined in a module are kept
83private. This aides in specification of a minimal interface and for
84private. This aides in specification of a minimal interface and for
84−internal details to be left hidden. Idris allows for functions,
85+internal details to be left hidden. Idris allows for functions,
85types, and interfaces to be marked as: ``private``, ``export``, or
86types, and interfaces to be marked as: ``private``, ``export``, or
86−``public export``. Their general meaning is as follows:
87+``public export``. Their general meaning is as follows:
87
88
88−- ``private`` meaning that it's not exported at all. This is the default.
89+- ``private`` meaning that it's not exported at all. This is the
90+ default.
89
91
90- ``export`` meaning that its top level type is exported.
92- ``export`` meaning that its top level type is exported.
91
93
92- ``public export`` meaning that the entire definition is exported.
94- ``public export`` meaning that the entire definition is exported.
93
95
96+
94A further restriction in modifying the visibility is that definitions
97A further restriction in modifying the visibility is that definitions
95must not refer to anything within a lower level of visibility. For
98must not refer to anything within a lower level of visibility. For
96example, ``public export`` definitions cannot use private names, and
99example, ``public export`` definitions cannot use private names, and
@@ -126,9 +129,10 @@ Meaning for Data Types
126
129
127For data types, the meanings are:
130For data types, the meanings are:
128
131
129−- ``export`` the type constructor is exported
132+- ``export`` the type constructor is exported
130
133
131−- ``public export`` the type constructor and data constructors are exported
134+- ``public export`` the type constructor and data constructors are
135+ exported
132
136
133
137
134Meaning for Interfaces
138Meaning for Interfaces
@@ -137,7 +141,6 @@ Meaning for Interfaces
137For interfaces, the meanings are:
141For interfaces, the meanings are:
138
142
139- ``export`` the interface name is exported
143- ``export`` the interface name is exported
140−
141- ``public export`` the interface name, method names and default
144- ``public export`` the interface name, method names and default
142 definitions are exported
145 definitions are exported
143
146
docs/tutorial/packages.rst+29−41
@@ -1,31 +1,26 @@
1−.. _sect-packages:
2−
3********
1********
4Packages
2Packages
5********
3********
6
4
5+
7−Idris includes a simple build system for building packages and executables
6+Idris includes a simple build system for building packages and executables from a named package description file.
8−from a named package description file. These files can be used with the
9−Idris compiler to manage the development process.
7+These files can be used with the Idris compiler to manage the development process .
10
8
11Package Descriptions
9Package Descriptions
12====================
10====================
13
11
14A package description includes the following:
12A package description includes the following:
15
13
16−+ A header, consisting of the keyword ``package`` followed by a package
14++ A header, consisting of the keyword package followed by the package
17 name. Package names can be any valid Idris identifier. The iPKG
15 name. Package names can be any valid Idris identifier. The iPKG
18 format also takes a quoted version that accepts any valid filename.
16 format also takes a quoted version that accepts any valid filename.
19−
20−+ Fields describing package contents, ``<field> = <value>``.
17++ Fields describing package contents, ``<field> = <value>``
21
18
22At least one field must be the modules field, where the value is a
19At least one field must be the modules field, where the value is a
23−comma separated list of modules. For example, given an idris package
20+comma separated list of modules. For example, given an idris package
24``maths`` that has modules ``Maths.idr``, ``Maths.NumOps.idr``,
21``maths`` that has modules ``Maths.idr``, ``Maths.NumOps.idr``,
25``Maths.BinOps.idr``, and ``Maths.HexOps.idr``, the corresponding
22``Maths.BinOps.idr``, and ``Maths.HexOps.idr``, the corresponding
26−package file would be:
23+package file would be::
27−
28−::
29
24
30 package maths
25 package maths
31
26
@@ -43,6 +38,7 @@ of the main Idris repository, and in `third-party libraries
43Using Package files
38Using Package files
44===================
39===================
45
40
41+
46Idris itself is aware about packages, and special commands are
42Idris itself is aware about packages, and special commands are
47available to help with, for example, building packages, installing
43available to help with, for example, building packages, installing
48packages, and cleaning packages. For instance, given the ``maths``
44packages, and cleaning packages. For instance, given the ``maths``
@@ -58,9 +54,7 @@ package from earlier we can use Idris as follows:
58
54
59Once the maths package has been installed, the command line option
55Once the maths package has been installed, the command line option
60``--package maths`` makes it accessible (abbreviated to ``-p maths``).
56``--package maths`` makes it accessible (abbreviated to ``-p maths``).
61−For example:
57+For example::
62−
63−::
64
58
65 idris -p maths Main.idr
59 idris -p maths Main.idr
66
60
@@ -72,18 +66,20 @@ The integrated build system includes a simple testing framework.
72This framework collects functions listed in the ``ipkg`` file under ``tests``.
66This framework collects functions listed in the ``ipkg`` file under ``tests``.
73All test functions must return ``IO ()``.
67All test functions must return ``IO ()``.
74
68
69+
75When you enter ``idris --testpkg yourmodule.ipkg``,
70When you enter ``idris --testpkg yourmodule.ipkg``,
76the build system creates a temporary file in a fresh environment on your machine
71the build system creates a temporary file in a fresh environment on your machine
77by listing the ``tests`` functions under a single ``main`` function.
72by listing the ``tests`` functions under a single ``main`` function.
78It compiles this temporary file to an executable and then executes it.
73It compiles this temporary file to an executable and then executes it.
79
74
75+
80The tests themselves are responsible for reporting their success or failure.
76The tests themselves are responsible for reporting their success or failure.
81Test functions commonly use ``putStrLn`` to report test results.
77Test functions commonly use ``putStrLn`` to report test results.
82The test framework does not impose any standards for reporting and consequently
78The test framework does not impose any standards for reporting and consequently
83does not aggregate test results.
79does not aggregate test results.
84
80
81+
85−For example, lets take the following list of functions that are defined in a
82+For example, lets take the following list of functions that are defined in a module called ``NumOps`` for a sample package ``maths``.
86−module called ``NumOps`` for a sample package ``maths``:
87
83
88.. name: Math/NumOps.idr
84.. name: Math/NumOps.idr
89.. code-block:: idris
85.. code-block:: idris
@@ -98,8 +94,7 @@ module called ``NumOps`` for a sample package ``maths``:
98 triple : Num a => a -> a
94 triple : Num a => a -> a
99 triple a = a + double a
95 triple a = a + double a
100
96
101−
102−A simple test module, with a qualified name of ``Test.NumOps`` can be declared as:
97+A simple test module, with a qualified name of ``Test.NumOps`` can be declared as
103
98
104.. name: Math/TestOps.idr
99.. name: Math/TestOps.idr
105.. code-block:: idris
100.. code-block:: idris
@@ -127,11 +122,8 @@ A simple test module, with a qualified name of ``Test.NumOps`` can be declared a
127 testTriple = assertNotEq (triple 2) 5
122 testTriple = assertNotEq (triple 2) 5
128
123
129
124
130−The functions ``assertEq`` and ``assertNotEq`` are used to run expected passing,
125+The functions ``assertEq`` and ``assertNotEq`` are used to run expected passing, and failing, equality tests.
131−and failing, equality tests. The actual tests are ``testDouble`` and ``testTriple``,
132−and are declared in the ``maths.ipkg`` file as follows:
126+The actual tests are ``testDouble`` and ``testTriple``, and are declared in the ``maths.ipkg`` file as follows::
133−
134−::
135
127
136 package maths
128 package maths
137
129
@@ -142,9 +134,7 @@ and are declared in the ``maths.ipkg`` file as follows:
142 , Test.NumOps.testTriple
134 , Test.NumOps.testTriple
143
135
144
136
145−The testing framework can then be invoked using ``idris --testpkg maths.ipkg``:
137+The testing framework can then be invoked using ``idris --testpkg maths.ipkg``::
146−
147−::
148
138
149 > idris --testpkg maths.ipkg
139 > idris --testpkg maths.ipkg
150 Type checking ./Maths/NumOps.idr
140 Type checking ./Maths/NumOps.idr
@@ -156,27 +146,25 @@ The testing framework can then be invoked using ``idris --testpkg maths.ipkg``:
156Note how both tests have reported success by printing ``Test Passed``
146Note how both tests have reported success by printing ``Test Passed``
157as we arranged for with the ``assertEq`` and ``assertNoEq`` functions.
147as we arranged for with the ``assertEq`` and ``assertNoEq`` functions.
158
148
159−Package Dependencies Using Atom
149+Package Dependencies Using Atom
160===============================
150===============================
161
151
162−If you are using the Atom editor and have a dependency on another package,
152+If you are using the Atom editor and have a dependency on another package,
163−corresponding to for instance ``import Lightyear`` or ``import Pruviloj``,
153+corresponding to for instance ``import Lightyear`` or ``import Pruviloj``,
164−you need to let Atom know that it should be loaded. The easiest way to
154+you need to let Atom know that it should be loaded. The easiest way to
165−accomplish that is with a .ipkg file. The general contents of an ipkg file
155+accomplish that is with a .ipkg file. The general contents of an ipkg file
166−will be described in the next section of the tutorial, but for now here is
156+will be described in the next section of the tutorial, but for now here is
167−a simple recipe for this trivial case:
157+a simple recipe for this trivial case.
168−
169−- Create a folder myProject.
170
158
171−- Add a file myProject.ipkg containing just a couple of lines:
159+- Create a folder myProject.
172
160
173−.. code-block:: idris
161+- Add a file myProject.ipkg containing just a couple of lines:
174
162
175− package myProject
163+``package myProject``
176
164
177− pkgs = pruviloj, lightyear
165+``pkgs = pruviloj, lightyear``
178
166
179−- In Atom, use the File menu to Open Folder myProject.
167+- In Atom, use the File menu to Open Folder myProject.
180
168
181More information
169More information
182================
170================
docs/tutorial/syntax.rst+7−7
@@ -34,7 +34,7 @@ rule, and the right hand side describes its expansion. The syntax rule
34itself consists of:
34itself consists of:
35
35
36- **Keywords** — here, ``if``, ``then`` and ``else``, which must be
36- **Keywords** — here, ``if``, ``then`` and ``else``, which must be
37− valid identifiers.
37+ valid identifiers
38
38
39- **Non-terminals** — included in square brackets, ``[test]``, ``[t]``
39- **Non-terminals** — included in square brackets, ``[test]``, ``[t]``
40 and ``[e]`` here, which stand for arbitrary expressions. To avoid
40 and ``[e]`` here, which stand for arbitrary expressions. To avoid
@@ -44,9 +44,9 @@ itself consists of:
44- **Names** — included in braces, which stand for names which may be
44- **Names** — included in braces, which stand for names which may be
45 bound on the right hand side.
45 bound on the right hand side.
46
46
47−- **Symbols** — included in quotations marks, e.g. ``":="``. This can
47+- **Symbols** — included in quotations marks, e.g. ``:=``. This can
48 also be used to include reserved words in syntax rules, such as
48 also be used to include reserved words in syntax rules, such as
49− ``"let"`` or ``"in"``.
49+ ``let`` or ``in``.
50
50
51The limitations on the form of a syntax rule are that it must include
51The limitations on the form of a syntax rule are that it must include
52at least one symbol or keyword, and there must be no repeated
52at least one symbol or keyword, and there must be no repeated
@@ -63,7 +63,7 @@ recursive. The following syntax extensions would therefore be valid:
63 syntax select [x] from [t] "where" [w] = SelectWhere x t w;
63 syntax select [x] from [t] "where" [w] = SelectWhere x t w;
64 syntax select [x] from [t] = Select x t;
64 syntax select [x] from [t] = Select x t;
65
65
66−Syntax macros can be further restricted to apply only in patterns (i.e.
66+Syntax macros can be further restricted to apply only in patterns (i.e.,
67only on the left hand side of a pattern match clause) or only in terms
67only on the left hand side of a pattern match clause) or only in terms
68(i.e. everywhere but the left hand side of a pattern match clause) by
68(i.e. everywhere but the left hand side of a pattern match clause) by
69being marked as ``pattern`` or ``term`` syntax rules. For example, we
69being marked as ``pattern`` or ``term`` syntax rules. For example, we
@@ -196,16 +196,16 @@ syntax rule, we can even go as far as:
196 Aspects of Declarative Languages (PADL'12), Claudio Russo and
196 Aspects of Declarative Languages (PADL'12), Claudio Russo and
197 Neng-Fa Zhou (Eds.). Springer-Verlag, Berlin, Heidelberg,
197 Neng-Fa Zhou (Eds.). Springer-Verlag, Berlin, Heidelberg,
198 242-257. DOI=10.1007/978-3-642-27694-1_18
198 242-257. DOI=10.1007/978-3-642-27694-1_18
199− https://dx.doi.org/10.1007/978-3-642-27694-1_18
199+ http://dx.doi.org/10.1007/978-3-642-27694-1_18
200
200
201.. [2] Edwin C. Brady. 2011. IDRIS ---: systems programming meets full
201.. [2] Edwin C. Brady. 2011. IDRIS ---: systems programming meets full
202 dependent types. In Proceedings of the 5th ACM workshop on
202 dependent types. In Proceedings of the 5th ACM workshop on
203 Programming languages meets program verification (PLPV
203 Programming languages meets program verification (PLPV
204 '11). ACM, New York, NY, USA,
204 '11). ACM, New York, NY, USA,
205 43-54. DOI=10.1145/1929529.1929536
205 43-54. DOI=10.1145/1929529.1929536
206− https://doi.acm.org/10.1145/1929529.1929536
206+ http://doi.acm.org/10.1145/1929529.1929536
207
207
208.. [3] Edwin Brady and Kevin Hammond. 2010. Correct-by-Construction
208.. [3] Edwin Brady and Kevin Hammond. 2010. Correct-by-Construction
209 Concurrency: Using Dependent Types to Verify Implementations of
209 Concurrency: Using Dependent Types to Verify Implementations of
210 Effectful Resource Usage Protocols. Fundam. Inf. 102, 2 (April
210 Effectful Resource Usage Protocols. Fundam. Inf. 102, 2 (April
211− 2010), 145-176. https://dl.acm.org/citation.cfm?id=1883636
211+ 2010), 145-176. http://dl.acm.org/citation.cfm?id=1883636
docs/tutorial/theorems.rst+3−3
@@ -115,8 +115,8 @@ We can do the same for the reduction behaviour of plus on successors:
115
115
116Even for trivial theorems like these, the proofs are a little tricky to
116Even for trivial theorems like these, the proofs are a little tricky to
117construct in one go. When things get even slightly more complicated, it
117construct in one go. When things get even slightly more complicated, it
118−becomes too much to think about to construct proofs in this “batch
118+becomes too much to think about to construct proofs in this ‘batch
119−mode”.
119+mode’.
120
120
121Idris provides interactive editing capabilities, which can help with
121Idris provides interactive editing capabilities, which can help with
122building proofs. For more details on building proofs interactively in
122building proofs. For more details on building proofs interactively in
@@ -383,7 +383,7 @@ will always be smaller than ``(x :: xs)``:
383 = qsort (filter (< x) xs) ++
383 = qsort (filter (< x) xs) ++
384 (x :: qsort (filter (>= x) xs))
384 (x :: qsort (filter (>= x) xs))
385
385
386−The function ``assert_smaller``, defined in the prelude, is intended to
386+The function ``assert_smaller``, defined in the Prelude, is intended to
387address this problem:
387address this problem:
388
388
389.. code-block:: idris
389.. code-block:: idris
docs/tutorial/typesfuns.rst+31−23
@@ -13,7 +13,8 @@ manipulation, and ``Ptr`` which represents foreign pointers. There are
13also several data types declared in the library, including ``Bool``,
13also several data types declared in the library, including ``Bool``,
14with values ``True`` and ``False``. We can declare some constants with
14with values ``True`` and ``False``. We can declare some constants with
15these types. Enter the following into a file ``Prims.idr`` and load it
15these types. Enter the following into a file ``Prims.idr`` and load it
16−into the Idris interactive environment by typing ``idris Prims.idr``:
16+into the Idris interactive environment by typing ``idris
17+Prims.idr``:
17
18
18.. code-block:: idris
19.. code-block:: idris
19
20
@@ -37,7 +38,7 @@ collection of declarations and definitions. In this example no imports
37have been specified. However Idris programs can consist of several
38have been specified. However Idris programs can consist of several
38modules and the definitions in each module each have their own
39modules and the definitions in each module each have their own
39namespace. This is discussed further in Section
40namespace. This is discussed further in Section
40−:ref:`sect-namespaces`. When writing Idris programs both the order in which
41+:ref:`sect-namespaces`). When writing Idris programs both the order in which
41definitions are given and indentation are significant. Functions and
42definitions are given and indentation are significant. Functions and
42data types must be defined before use, incidentally each definition must
43data types must be defined before use, incidentally each definition must
43have a type declaration, for example see ``x : Int``, ``foo :
44have a type declaration, for example see ``x : Int``, ``foo :
@@ -342,7 +343,7 @@ Vectors
342
343
343A standard example of a dependent data type is the type of “lists with
344A standard example of a dependent data type is the type of “lists with
344length”, conventionally called vectors in the dependent type
345length”, conventionally called vectors in the dependent type
345−literature. They are available as part of the Idris library, by
346+literature. They are available as part of the Idris library, by
346importing ``Data.Vect``, or we can declare them as follows:
347importing ``Data.Vect``, or we can declare them as follows:
347
348
348.. code-block:: idris
349.. code-block:: idris
@@ -520,8 +521,8 @@ help document a function by making the purpose of an argument more
520clear.
521clear.
521
522
522Furthermore, ``{}`` can be used to pattern match on the left hand side, i.e.
523Furthermore, ``{}`` can be used to pattern match on the left hand side, i.e.
523−``{var = pat}`` gets an implicit variable and attempts to pattern match on “pat”;
524+``{var = pat}`` gets an implicit variable and attempts to pattern match on "pat";
524−For example:
525+For example :
525
526
526.. code-block:: idris
527.. code-block:: idris
527
528
@@ -558,6 +559,7 @@ vector. For example:
558 inVect : IsElem 5 Main.testVec
559 inVect : IsElem 5 Main.testVec
559 inVect = There (There Here)
560 inVect = There (There Here)
560
561
562+
561.. important:: Implicit Arguments and Scope
563.. important:: Implicit Arguments and Scope
562
564
563 Within the type signature the typechecker will treat all variables
565 Within the type signature the typechecker will treat all variables
@@ -567,6 +569,7 @@ vector. For example:
567 ``testVec``. In the example above, we have assumed that the code
569 ``testVec``. In the example above, we have assumed that the code
568 lives within the ``Main`` module.
570 lives within the ``Main`` module.
569
571
572+
570If the same implicit arguments are being used a lot, it can make a
573If the same implicit arguments are being used a lot, it can make a
571definition difficult to read. To avoid this problem, a ``using`` block
574definition difficult to read. To avoid this problem, a ``using`` block
572gives the types and ordering of any implicit arguments which can
575gives the types and ordering of any implicit arguments which can
@@ -579,13 +582,15 @@ appear within the block:
579 Here : IsElem x (x :: xs)
582 Here : IsElem x (x :: xs)
580 There : IsElem x xs -> IsElem x (y :: xs)
583 There : IsElem x xs -> IsElem x (y :: xs)
581
584
585+
586+
582Note: Declaration Order and ``mutual`` blocks
587Note: Declaration Order and ``mutual`` blocks
583~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
588~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
584
589
585In general, functions and data types must be defined before use, since
590In general, functions and data types must be defined before use, since
586dependent types allow functions to appear as part of types, and type
591dependent types allow functions to appear as part of types, and type
587checking can rely on how particular functions are defined (though this
592checking can rely on how particular functions are defined (though this
588−is only true of total functions; see Section :ref:`sect-totality`).
593+is only true of total functions; see Section :ref:`sect-totality`)).
589However, this restriction can be relaxed by using a ``mutual`` block,
594However, this restriction can be relaxed by using a ``mutual`` block,
590which allows data types and functions to be defined simultaneously:
595which allows data types and functions to be defined simultaneously:
591
596
@@ -668,7 +673,7 @@ Note that several of these return ``Either``, since they may fail.
668I/O programs will typically need to sequence actions, feeding the
673I/O programs will typically need to sequence actions, feeding the
669output of one computation into the input of the next. ``IO`` is an
674output of one computation into the input of the next. ``IO`` is an
670abstract type, however, so we can’t access the result of a computation
675abstract type, however, so we can’t access the result of a computation
671−directly. Instead, we sequence operations with ``do`` notation:
676+directly. Instead, we sequence operations with ``do`` notation:
672
677
673.. code-block:: idris
678.. code-block:: idris
674
679
@@ -708,7 +713,7 @@ not always the best approach. Consider the following function:
708
713
709This function uses one of the ``t`` or ``e`` arguments, but not both
714This function uses one of the ``t`` or ``e`` arguments, but not both
710(in fact, this is used to implement the ``if...then...else`` construct
715(in fact, this is used to implement the ``if...then...else`` construct
711−as we will see later). We would prefer if *only* the argument which was
716+as we will see later. We would prefer if *only* the argument which was
712used was evaluated. To achieve this, Idris provides a ``Lazy``
717used was evaluated. To achieve this, Idris provides a ``Lazy``
713data type, which allows evaluation to be suspended:
718data type, which allows evaluation to be suspended:
714
719
@@ -792,7 +797,7 @@ infinite loop and cause a stack overflow.
792To fix this we must add explicit ``Inf`` declarations to the constructor
797To fix this we must add explicit ``Inf`` declarations to the constructor
793parameter types, since codata will not add it to constructor parameters of a
798parameter types, since codata will not add it to constructor parameters of a
794**different** type from the one being defined. For example, the following
799**different** type from the one being defined. For example, the following
795−outputs ``1``.
800+outputs "1".
796
801
797.. code-block:: idris
802.. code-block:: idris
798
803
@@ -897,7 +902,7 @@ For more details of the functions available on ``List`` and
897
902
898- ``libs/base/Data/VectType.idr``
903- ``libs/base/Data/VectType.idr``
899
904
900−Functions include filtering, appending, reversing, and so on.
905+Functions include filtering, appending, reversing, and so on.
901
906
902Aside: Anonymous functions and operator sections
907Aside: Anonymous functions and operator sections
903~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
908~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -994,7 +999,7 @@ Dependent Pairs
994---------------
999---------------
995
1000
996Dependent pairs allow the type of the second element of a pair to depend
1001Dependent pairs allow the type of the second element of a pair to depend
997−on the value of the first element:
1002+on the value of the first element.
998
1003
999.. code-block:: idris
1004.. code-block:: idris
1000
1005
@@ -1004,7 +1009,7 @@ on the value of the first element:
1004Again, there is syntactic sugar for this. ``(a : A ** P)`` is the type
1009Again, there is syntactic sugar for this. ``(a : A ** P)`` is the type
1005of a pair of A and P, where the name ``a`` can occur inside ``P``.
1010of a pair of A and P, where the name ``a`` can occur inside ``P``.
1006``( a ** p )`` constructs a value of this type. For example, we can
1011``( a ** p )`` constructs a value of this type. For example, we can
1007−pair a number with a ``Vect`` of a particular length:
1012+pair a number with a ``Vect`` of a particular length.
1008
1013
1009.. code-block:: idris
1014.. code-block:: idris
1010
1015
@@ -1012,7 +1017,7 @@ pair a number with a ``Vect`` of a particular length:
1012 vec = (2 ** [3, 4])
1017 vec = (2 ** [3, 4])
1013
1018
1014If you like, you can write it out the long way, the two are precisely
1019If you like, you can write it out the long way, the two are precisely
1015−equivalent:
1020+equivalent.
1016
1021
1017.. code-block:: idris
1022.. code-block:: idris
1018
1023
@@ -1065,7 +1070,7 @@ intermediate values:
1065
1070
1066We will see more on ``with`` notation later.
1071We will see more on ``with`` notation later.
1067
1072
1068−Dependent pairs are sometimes referred to as “Sigma types”.
1073+Dependent pairs are sometimes referred to as “sigma types”.
1069
1074
1070Records
1075Records
1071-------
1076-------
@@ -1075,7 +1080,7 @@ Records
1075automatically generating field access and update functions. Unlike
1080automatically generating field access and update functions. Unlike
1076the syntax used for data structures, records in Idris follow a
1081the syntax used for data structures, records in Idris follow a
1077different syntax to that seen with Haskell. For example, we can
1082different syntax to that seen with Haskell. For example, we can
1078−represent a person’s name and age in a record:
1083+represent a person's name and age in a record:
1079
1084
1080.. code-block:: idris
1085.. code-block:: idris
1081
1086
@@ -1087,11 +1092,12 @@ represent a person’s name and age in a record:
1087 fred : Person
1092 fred : Person
1088 fred = MkPerson "Fred" "Joe" "Bloggs" 30
1093 fred = MkPerson "Fred" "Joe" "Bloggs" 30
1089
1094
1095+
1090The constructor name is provided using the ``constructor`` keyword,
1096The constructor name is provided using the ``constructor`` keyword,
1091and the *fields* are then given which are in an indented block
1097and the *fields* are then given which are in an indented block
1092following the `where` keyword (here, ``firstName``, ``middleName``,
1098following the `where` keyword (here, ``firstName``, ``middleName``,
1093``lastName``, and ``age``). You can declare multiple fields on a
1099``lastName``, and ``age``). You can declare multiple fields on a
1094−single line, provided that they have the same type. The field names
1100+single line, provided that they have the same type. The field names
1095can be used to access the field values:
1101can be used to access the field values:
1096
1102
1097::
1103::
@@ -1165,7 +1171,7 @@ syntax:
1165 record { a->b->c = val } x
1171 record { a->b->c = val } x
1166
1172
1167This returns a new record, with the field accessed by the path
1173This returns a new record, with the field accessed by the path
1168−``a->b->c`` set to ``val``. The syntax is first class, i.e. ``record {
1174+``a->b->c`` set to ``val``. The syntax is first class, i.e. ``record {
1169a->b->c = val }`` itself has a function type. Symmetrically, the field
1175a->b->c = val }`` itself has a function type. Symmetrically, the field
1170can also be accessed with the following syntax:
1176can also be accessed with the following syntax:
1171
1177
@@ -1190,10 +1196,12 @@ name. For example, a pair type could be defined as follows:
1190 fst : a
1196 fst : a
1191 snd : b
1197 snd : b
1192
1198
1199+
1193−Using the ``Class`` record from earlier, the size of the class can be
1200+Using the ``class`` record from earlier, the size of the class can be
1194restricted using a ``Vect`` and the size included in the type by parameterising
1201restricted using a ``Vect`` and the size included in the type by parameterising
1195the record with the size. For example:
1202the record with the size. For example:
1196
1203
1204+
1197.. code-block:: idris
1205.. code-block:: idris
1198
1206
1199 record SizedClass (size : Nat) where
1207 record SizedClass (size : Nat) where
@@ -1206,7 +1214,7 @@ function from earlier, since that would change the size of the class. A
1206function to add a student must now specify in the type that the
1214function to add a student must now specify in the type that the
1207size of the class has been increased by one. As the size is specified
1215size of the class has been increased by one. As the size is specified
1208using natural numbers, the new value can be incremented using the
1216using natural numbers, the new value can be incremented using the
1209−``S`` constructor:
1217+``S`` constructor.
1210
1218
1211.. code-block:: idris
1219.. code-block:: idris
1212
1220
@@ -1319,7 +1327,7 @@ matching ``let`` and lambda bindings. It will *only* work if:
1319- Each branch *matches* a value of the same type, and *returns* a
1327- Each branch *matches* a value of the same type, and *returns* a
1320 value of the same type.
1328 value of the same type.
1321
1329
1322−- The type of the result is “known”. i.e. the type of the expression
1330+- The type of the result is "known". i.e. the type of the expression
1323 can be determined *without* type checking the ``case``-expression
1331 can be determined *without* type checking the ``case``-expression
1324 itself.
1332 itself.
1325
1333
@@ -1329,7 +1337,7 @@ Totality
1329Idris distinguishes between *total* and *partial* functions.
1337Idris distinguishes between *total* and *partial* functions.
1330A total function is a function that either:
1338A total function is a function that either:
1331
1339
1332−+ Terminates for all possible inputs, or
1340++ Terminates for all possible inputs, or
1333+ Produces a non-empty, finite, prefix of a possibly infinite result
1341+ Produces a non-empty, finite, prefix of a possibly infinite result
1334
1342
1335If a function is total, we can consider its type a precise description of what
1343If a function is total, we can consider its type a precise description of what
@@ -1337,12 +1345,12 @@ that function will do. For example, if we have a function with a return
1337type of ``String`` we know something different, depending on whether or not
1345type of ``String`` we know something different, depending on whether or not
1338it's total:
1346it's total:
1339
1347
1340−+ If it's total, it will return a value of type ``String`` in finite time;
1348++ If it's total, it will return a value of type ``String`` in finite time
1341+ If it's partial, then as long as it doesn't crash or enter an infinite loop,
1349+ If it's partial, then as long as it doesn't crash or enter an infinite loop,
1342 it will return a ``String``.
1350 it will return a ``String``.
1343
1351
1344Idris makes this distinction so that it knows which functions are safe to
1352Idris makes this distinction so that it knows which functions are safe to
1345−evaluate while type checking (as we've seen with :ref:`sect-fctypes`). After all,
1353+evaluate while type checking (as we've seen with :ref:`sect-fctypes`). After all,
1346if it tries to evaluate a function during type checking which doesn't
1354if it tries to evaluate a function during type checking which doesn't
1347terminate, then type checking won't terminate!
1355terminate, then type checking won't terminate!
1348Therefore, only total functions will be evaluated during type checking.
1356Therefore, only total functions will be evaluated during type checking.
docs/tutorial/views.rst+5−15
@@ -58,17 +58,6 @@ extraneous and may be omitted:
58 filter p (x :: xs) with (filter p xs)
58 filter p (x :: xs) with (filter p xs)
59 | ( _ ** xs' ) = if (p x) then ( _ ** x :: xs' ) else ( _ ** xs' )
59 | ( _ ** xs' ) = if (p x) then ( _ ** x :: xs' ) else ( _ ** xs' )
60
60
61−``with`` clauses can also be nested:
62−
63−.. code-block:: idris
64−
65− foo : Int -> Int -> Bool
66− foo n m with (succ n)
67− foo _ m | 2 with (succ m)
68− foo _ _ | 2 | 3 = True
69− foo _ _ | 2 | _ = False
70− foo _ _ | _ = False
71−
72If the intermediate computation itself has a dependent type, then the
61If the intermediate computation itself has a dependent type, then the
73result can affect the forms of other arguments — we can learn the form
62result can affect the forms of other arguments — we can learn the form
74of one value by testing another. In these cases, view refined argument
63of one value by testing another. In these cases, view refined argument
@@ -114,14 +103,14 @@ patterns left of the ``|``. That is:
114 ``Parity (n + n)`` from the ``Even`` constructor definition. So
103 ``Parity (n + n)`` from the ``Even`` constructor definition. So
115 ``(j + j)`` replaces ``k`` on the left side of ``|``, and the
104 ``(j + j)`` replaces ``k`` on the left side of ``|``, and the
116 ``Even`` constructor appears on the right side. The natural number
105 ``Even`` constructor appears on the right side. The natural number
117− ``j`` in the refined pattern can be used on the right side of the
106+ ``j`` in the refined pattern can be used on the ride side of the
118 ``=`` sign.
107 ``=`` sign.
119
108
120- Otherwise, when ``parity k`` evaluates to ``Odd``, the original
109- Otherwise, when ``parity k`` evaluates to ``Odd``, the original
121 argument ``k`` is refined to ``S (j + j)`` according to ``Parity (S
110 argument ``k`` is refined to ``S (j + j)`` according to ``Parity (S
122 (n + n))`` from the ``Odd`` constructor definition, and ``Odd`` now
111 (n + n))`` from the ``Odd`` constructor definition, and ``Odd`` now
123− appears on the right side of ``|``, again with the natural number
112+ appears on the ride side of ``|``, again with the natural number
124− ``j`` used on the right side of the ``=`` sign.
113+ ``j`` used on the ride side of the ``=`` sign.
125
114
126Note that there is a function in the patterns (``+``) and repeated
115Note that there is a function in the patterns (``+``) and repeated
127occurrences of ``j`` - this is allowed because another argument has
116occurrences of ``j`` - this is allowed because another argument has
@@ -153,4 +142,5 @@ generated by the pattern match will be in scope and named ``p``. For example:
153
142
154.. [1] Conor McBride and James McKinna. 2004. The view from the
143.. [1] Conor McBride and James McKinna. 2004. The view from the
155 left. J. Funct. Program. 14, 1 (January 2004),
144 left. J. Funct. Program. 14, 1 (January 2004),
156− 69-111. https://doi.org/10.1017/S0956796803004829
145+ 69-111. DOI=10.1017/S0956796803004829
146+ http://dx.doi.org/10.1017/S0956796803004829ñ
idris-tutorial.pdf

Binary file not shown.

idris.cabal+55−110
@@ -1,11 +1,10 @@
1−Cabal-Version: 2.4
2Name: idris
1Name: idris
3−Version: 1.3.2
2+Version: 1.2.0
4−License: BSD-3-Clause
3+License: BSD3
5License-file: LICENSE
4License-file: LICENSE
6Author: Edwin Brady
5Author: Edwin Brady
7Maintainer: Edwin Brady <eb@cs.st-andrews.ac.uk>
6Maintainer: Edwin Brady <eb@cs.st-andrews.ac.uk>
8−Homepage: https://www.idris-lang.org/
7+Homepage: http://www.idris-lang.org/
9Bug-reports: https://github.com/idris-lang/Idris-dev/issues
8Bug-reports: https://github.com/idris-lang/Idris-dev/issues
10
9
11Stability: Beta
10Stability: Beta
@@ -17,7 +16,7 @@ Description: Idris is a general purpose language with full dependent types.
17 meaning that some aspects of a program's behaviour can be
16 meaning that some aspects of a program's behaviour can be
18 specified precisely in the type. The language is closely
17 specified precisely in the type. The language is closely
19 related to Epigram and Agda. There is a tutorial at
18 related to Epigram and Agda. There is a tutorial at
20− <https://www.idris-lang.org/documentation>.
19+ <http://www.idris-lang.org/documentation>.
21 Features include:
20 Features include:
22 .
21 .
23 * Full, first class, dependent types with dependent pattern matching
22 * Full, first class, dependent types with dependent pattern matching
@@ -42,25 +41,42 @@ Description: Idris is a general purpose language with full dependent types.
42 .
41 .
43 * Hugs style interactive environment
42 * Hugs style interactive environment
44
43
44+Cabal-Version: >= 1.22
45+
45Build-type: Custom
46Build-type: Custom
46
47
47Tested-With: GHC == 7.10.3, GHC == 8.0.1
48Tested-With: GHC == 7.10.3, GHC == 8.0.1
48
49
49−-- NOTE: due to https://github.com/haskell/cabal/issues/6125 the use of ** is
50−-- heavily discouraged.
51Data-files: idrisdoc/styles.css
50Data-files: idrisdoc/styles.css
52− jsrts/jsbn/*.js
51+ jsrts/jsbn/jsbn-browser.js
53− jsrts/*.js
52+ jsrts/jsbn/jsbn-node.js
53+ jsrts/Runtime-common.js
54+ jsrts/Runtime-javascript.js
55+ jsrts/Runtime-node.js
54 jsrts/jsbn/LICENSE
56 jsrts/jsbn/LICENSE
55− rts/Makefile
56− rts/*.c
57− rts/seL4/*.c
58− rts/arduino/*.c
57+ rts/arduino/idris_main.c
59− rts/windows/*.c
58+ rts/idris_bitstring.c
60− rts/windows/*.h
59+ rts/idris_bitstring.h
61− rts/*.h
60+ rts/idris_gc.c
62− rts/seL4/CMakeLists.txt
61+ rts/idris_gc.h
63− rts/seL4/README.md
62+ rts/idris_gmp.c
63+ rts/idris_gmp.h
64+ rts/idris_heap.c
65+ rts/idris_heap.h
66+ rts/idris_main.c
67+ rts/idris_net.c
68+ rts/idris_net.h
69+ rts/idris_opts.c
70+ rts/idris_opts.h
71+ rts/idris_rts.c
72+ rts/idris_rts.h
73+ rts/idris_stats.c
74+ rts/idris_stats.h
75+ rts/idris_stdfgn.c
76+ rts/idris_stdfgn.h
77+ rts/mini-gmp.c
78+ rts/mini-gmp.h
79+ rts/libtest.c
64
80
65Extra-doc-files:
81Extra-doc-files:
66 CHANGELOG.md
82 CHANGELOG.md
@@ -70,75 +86,13 @@ Extra-doc-files:
70 README.md
86 README.md
71 RELEASE-CHECKS.md
87 RELEASE-CHECKS.md
72 idris-tutorial.pdf
88 idris-tutorial.pdf
73− man/idris.1
74 samples/effects/*.idr
89 samples/effects/*.idr
75 samples/misc/*.idr
90 samples/misc/*.idr
76− samples/tutorial/*.idr
77− samples/ST/*.idr
78− samples/ST/Graphics/*.idr
79− samples/ST/Net/*.idr
80 samples/misc/*.lidr
91 samples/misc/*.lidr
92+ samples/tutorial/*.idr
81
93
82-- extra-source-files is generated by Setup.hs using `git --ls-files`.
94-- extra-source-files is generated by Setup.hs using `git --ls-files`.
83Extra-source-files:
95Extra-source-files:
84− Makefile
85− config.mk
86− custom.mk-alldeps
87− mkpkg.sh
88− stack-shell.nix
89− stack.yaml
90− stylize.sh
91− win-release.sh
92−
93− benchmarks/*.pl
94− benchmarks/fasta/*.idr
95− benchmarks/fasta/*.ipkg
96− benchmarks/pidigits/*.idr
97− benchmarks/pidigits/*.ipkg
98− benchmarks/quasigroups/*.idr
99− benchmarks/quasigroups/*.ipkg
100− benchmarks/trivial/*.idr
101− benchmarks/trivial/*.ipkg
102− benchmarks/quasigroups/board
103−
104− icons/*.png
105− icons/*.ico
106− icons/*.rc
107− icons/*.svg
108− icons/*.xml
109−
110− libs/**/*.idr
111− libs/**/*.ipkg
112− libs/**/*.txt
113− libs/Makefile
114− libs/base/Makefile
115− libs/contrib/Makefile
116− libs/effects/Makefile
117− libs/prelude/Makefile
118− libs/pruviloj/Makefile
119−
120− scripts/generate-multi-ghc-travis-template
121− scripts/runidris
122− scripts/runidris-node
123−
124− src/.ghci
125−
126− test/*.md
127− test/*.hs
128− test/**/*.idr
129− test/**/*.lidr
130− test/**/*.ipkg
131− test/**/*.out
132− test/**/*.sh
133− test/**/*.c
134− test/**/*.h
135− test/**/*.in
136− test/**/*.txt
137− test/**/*.js
138− test/base001/Makefile
139− test/ffi004/theOtherType
140− test/ffi004/theType
141− test/scripts/timeout
142
96
143source-repository head
97source-repository head
144 type: git
98 type: git
@@ -146,7 +100,7 @@ source-repository head
146
100
147custom-setup
101custom-setup
148 setup-depends:
102 setup-depends:
149− Cabal >= 2.4 && < 3.1,
103+ Cabal >= 1.10 && <2.3,
150 base >= 4 && <5,
104 base >= 4 && <5,
151 directory,
105 directory,
152 filepath,
106 filepath,
@@ -307,63 +261,58 @@ Library
307 Util.Pretty
261 Util.Pretty
308 , Util.Net
262 , Util.Net
309
263
264+
265+
266+ -- Auto Generated
310 , Paths_idris
267 , Paths_idris
311 , Version_idris
268 , Version_idris
312 , Tools_idris
269 , Tools_idris
313 , BuildFlags_idris
270 , BuildFlags_idris
314
271
315− -- Auto Generated
316− Autogen-modules: Paths_idris
317− , Version_idris
318− , Tools_idris
319− , BuildFlags_idris
320−
321 Build-depends: base >=4 && <5
272 Build-depends: base >=4 && <5
322− , aeson >= 0.6 && < 1.5
273+ , aeson >= 0.6 && < 1.3
323 , annotated-wl-pprint >= 0.7 && < 0.8
274 , annotated-wl-pprint >= 0.7 && < 0.8
324− , ansi-terminal < 0.11
275+ , ansi-terminal < 0.9
325 , ansi-wl-pprint < 0.7
276 , ansi-wl-pprint < 0.7
326 , array >= 0.4.0.1 && < 0.6
277 , array >= 0.4.0.1 && < 0.6
327 , base64-bytestring < 1.1
278 , base64-bytestring < 1.1
328 , binary >= 0.8.4.1 && < 0.9
279 , binary >= 0.8.4.1 && < 0.9
329 , blaze-html >= 0.6.1.3 && < 0.10
280 , blaze-html >= 0.6.1.3 && < 0.10
330− , blaze-markup >= 0.5.2.1 && < 0.10
281+ , blaze-markup >= 0.5.2.1 && < 0.9
331 , bytestring < 0.11
282 , bytestring < 0.11
332− , cheapskate >= 0.1.1.2 && < 0.2
283+ , cheapskate >= 0.1.1 && < 0.2
333− , code-page >= 0.1 && < 0.3
284+ , code-page >= 0.1 && < 0.2
334− , containers >= 0.5 && < 0.7
285+ , containers >= 0.5 && < 0.6
335 , deepseq < 1.5
286 , deepseq < 1.5
336 , directory >= 1.2.2.0 && < 1.2.3.0 || > 1.2.3.0
287 , directory >= 1.2.2.0 && < 1.2.3.0 || > 1.2.3.0
337 , filepath < 1.5
288 , filepath < 1.5
338− , fingertree >= 0.1.4.1 && < 0.2
289+ , fingertree >= 0.1 && < 0.2
339 , haskeline >= 0.7 && < 0.8
290 , haskeline >= 0.7 && < 0.8
340 , ieee754 >= 0.7 && < 0.9
291 , ieee754 >= 0.7 && < 0.9
341− , megaparsec >= 7.0.4 && < 9
292+ , megaparsec >= 6.2
342 , mtl >= 2.1 && < 2.3
293 , mtl >= 2.1 && < 2.3
343− , network >= 2.7 && < 3.1.2
294+ , network < 2.7
344− , optparse-applicative >= 0.13 && < 0.16
295+ , optparse-applicative >= 0.13 && < 0.15
345− , parser-combinators >= 1.0.0
346 , pretty < 1.2
296 , pretty < 1.2
347 , process < 1.7
297 , process < 1.7
348 , regex-tdfa >= 1.2
298 , regex-tdfa >= 1.2
349 , safe >= 0.3.9
299 , safe >= 0.3.9
350 , split < 0.3
300 , split < 0.3
351 , terminal-size < 0.4
301 , terminal-size < 0.4
352− , text >=1.2.1.0 && < 1.4
302+ , text >=1.2.1.0 && < 1.3
353− , time >= 1.4 && < 2.0
303+ , time >= 1.4 && < 1.9
354 , transformers >= 0.5 && < 0.6
304 , transformers >= 0.5 && < 0.6
355 , uniplate >=1.6 && < 1.7
305 , uniplate >=1.6 && < 1.7
356 , unordered-containers < 0.3
306 , unordered-containers < 0.3
357 , utf8-string < 1.1
307 , utf8-string < 1.1
358 , vector < 0.13
308 , vector < 0.13
359 , vector-binary-instances < 0.3
309 , vector-binary-instances < 0.3
360− , zip-archive > 0.2.3.5 && < 0.5
310+ , zip-archive > 0.2.3.5 && < 0.4
361− , fsnotify >= 0.2 && < 0.4
311+ , fsnotify >= 0.2 && < 2.2
362 , async < 2.3
312 , async < 2.3
363
313
364 if !impl(ghc >= 8.0)
314 if !impl(ghc >= 8.0)
365− Build-Depends: semigroups == 0.18.*
315+ Build-Depends: semigroups == 0.18.*
366− , fail == 4.9.0.*
367
316
368 Default-Language: Haskell2010
317 Default-Language: Haskell2010
369 ghc-prof-options: -auto-all -caf-all
318 ghc-prof-options: -auto-all -caf-all
@@ -382,7 +331,6 @@ Library
382 cpp-options: -DIDRIS_GMP
331 cpp-options: -DIDRIS_GMP
383 if flag(freestanding)
332 if flag(freestanding)
384 other-modules: Target_idris
333 other-modules: Target_idris
385− autogen-modules: Target_idris
386 cpp-options: -DFREESTANDING
334 cpp-options: -DFREESTANDING
387 if flag(CI)
335 if flag(CI)
388 ghc-options: -Werror
336 ghc-options: -Werror
@@ -416,7 +364,7 @@ Test-suite regression-and-feature-tests
416 , filepath
364 , filepath
417 , directory
365 , directory
418 , haskeline >= 0.7
366 , haskeline >= 0.7
419− , optparse-applicative >= 0.13 && < 0.16
367+ , optparse-applicative >= 0.13 && < 0.15
420 , tagged
368 , tagged
421 , tasty >= 0.8
369 , tasty >= 0.8
422 , tasty-golden >= 2.0
370 , tasty-golden >= 2.0
@@ -431,7 +379,6 @@ Test-suite regression-and-feature-tests
431
379
432Executable idris-codegen-c
380Executable idris-codegen-c
433 Main-is: Main.hs
381 Main-is: Main.hs
434− autogen-modules: Paths_idris
435 other-modules: Paths_idris
382 other-modules: Paths_idris
436 hs-source-dirs: codegen/idris-codegen-c
383 hs-source-dirs: codegen/idris-codegen-c
437
384
@@ -447,7 +394,6 @@ Executable idris-codegen-c
447
394
448Executable idris-codegen-javascript
395Executable idris-codegen-javascript
449 Main-is: Main.hs
396 Main-is: Main.hs
450− autogen-modules: Paths_idris
451 other-modules: Paths_idris
397 other-modules: Paths_idris
452 hs-source-dirs: codegen/idris-codegen-javascript
398 hs-source-dirs: codegen/idris-codegen-javascript
453
399
@@ -463,7 +409,6 @@ Executable idris-codegen-javascript
463
409
464Executable idris-codegen-node
410Executable idris-codegen-node
465 Main-is: Main.hs
411 Main-is: Main.hs
466− autogen-modules: Paths_idris
467 other-modules: Paths_idris
412 other-modules: Paths_idris
468 hs-source-dirs: codegen/idris-codegen-node
413 hs-source-dirs: codegen/idris-codegen-node
469
414
jsrts/Runtime-javascript.js+2−6
@@ -7,9 +7,5 @@ $JSRTS.prim_systemInfo = function (index) {
7 }
7 }
8 return "";
8 return "";
9};
9};
10−
11−$JSRTS.prim_writeStr = function (x) { return console.log(x) };
10+$JSRTS.prim_writeStr = function (x) { return console.log(x) }
12−
13−$JSRTS.prim_readStr = function () { return prompt('Prelude.getLine') };
11+$JSRTS.prim_readStr = function () { return prompt('Prelude.getLine') };
14−
15−$JSRTS.die = function (message) { throw new Error(message) };
jsrts/Runtime-node.js+4−13
@@ -1,7 +1,5 @@
1$JSRTS.os = require('os');
1$JSRTS.os = require('os');
2−
3$JSRTS.fs = require('fs');
2$JSRTS.fs = require('fs');
4−
5$JSRTS.prim_systemInfo = function (index) {
3$JSRTS.prim_systemInfo = function (index) {
6 switch (index) {
4 switch (index) {
7 case 0:
5 case 0:
@@ -11,12 +9,10 @@ $JSRTS.prim_systemInfo = function (index) {
11 }
9 }
12 return "";
10 return "";
13};
11};
14−
15−$JSRTS.prim_writeStr = function (x) { return process.stdout.write(x) };
12+$JSRTS.prim_writeStr = function (x) { return process.stdout.write(x) }
16−
17$JSRTS.prim_readStr = function () {
13$JSRTS.prim_readStr = function () {
18 var ret = '';
14 var ret = '';
19− var b = Buffer.alloc(1024);
15+ var b = new Buffer(1024);
20 var i = 0;
16 var i = 0;
21 while (true) {
17 while (true) {
22 $JSRTS.fs.readSync(0, b, i, 1)
18 $JSRTS.fs.readSync(0, b, i, 1)
@@ -26,15 +22,10 @@ $JSRTS.prim_readStr = function () {
26 }
22 }
27 i++;
23 i++;
28 if (i == b.length) {
24 if (i == b.length) {
29− var nb = Buffer.alloc(b.length * 2);
25+ var nb = new Buffer(b.length * 2);
30 b.copy(nb)
26 b.copy(nb)
31 b = nb;
27 b = nb;
32 }
28 }
33 }
29 }
34 return ret;
30 return ret;
35−};
31+};
36−
37−$JSRTS.die = function (message) {
38− console.error(message);
39− process.exit(-1);
40−};
libs/base/Control/Catchable.idr−1
@@ -7,7 +7,6 @@ import Control.Monad.RWS
7import Control.Monad.Trans
7import Control.Monad.Trans
8
8
9%access public export
9%access public export
10−%default total
11
10
12interface Catchable (m : Type -> Type) t | m where
11interface Catchable (m : Type -> Type) t | m where
13 throw : t -> m a
12 throw : t -> m a
libs/base/Control/Isomorphism.idr+29−32
@@ -8,42 +8,35 @@ import Control.Category
8%access public export
8%access public export
9
9
10||| An isomorphism between two types
10||| An isomorphism between two types
11−record Iso a b where
11+data Iso : Type -> Type -> Type where
12− constructor MkIso
13− to : a -> b
12+ MkIso : (to : a -> b) ->
14− from : b -> a
13+ (from : b -> a) ->
15− toFrom : (y : b) -> to (from y) = y
14+ (toFrom : (y : b) -> to (from y) = y) ->
16− fromTo : (x : a) -> from (to x) = x
15+ (fromTo : (x : a) -> from (to x) = x) ->
16+ Iso a b
17
17
18-- Isomorphism properties
18-- Isomorphism properties
19
19
20−||| Isomorphism is reflexive
20+||| Isomorphism is Reflexive
21isoRefl : Iso a a
21isoRefl : Iso a a
22−isoRefl = MkIso id id (\_ => Refl) (\_ => Refl)
22+isoRefl = MkIso id id (\x => Refl) (\x => Refl)
23
23
24||| Isomorphism is transitive
24||| Isomorphism is transitive
25isoTrans : Iso a b -> Iso b c -> Iso a c
25isoTrans : Iso a b -> Iso b c -> Iso a c
26isoTrans (MkIso to from toFrom fromTo) (MkIso to' from' toFrom' fromTo') =
26isoTrans (MkIso to from toFrom fromTo) (MkIso to' from' toFrom' fromTo') =
27− MkIso xto xfrom xtoFrom xfromTo where
27+ MkIso (\x => to' (to x))
28− xto : a -> c
28+ (\y => from (from' y))
29− xto = to' . to
29+ (\y => (to' (to (from (from' y)))) ={ cong (toFrom (from' y)) }=
30− xfrom : c -> a
31− xfrom = from . from'
32− xtoFrom : (z : c) -> xto (xfrom z) = z
33− xtoFrom z = rewrite toFrom $ from' z in toFrom' z
30+ (to' (from' y)) ={ toFrom' y }=
34− xfromTo : (x : a) -> xfrom (xto x) = x
31+ y QED)
32+ (\x => (from (from' (to' (to x)))) ={ cong (fromTo' (to x)) }=
35− xfromTo x = rewrite fromTo' (to x) in fromTo x
33+ (from (to x)) ={ fromTo x }=
34+ x QED)
36
35
37Category Iso where
36Category Iso where
38 id = isoRefl
37 id = isoRefl
39 (.) = flip isoTrans
38 (.) = flip isoTrans
40
39
41−Semigroup (Iso a a) where
42− (<+>) = isoTrans
43−
44−Monoid (Iso a a) where
45− neutral = isoRefl
46−
47||| Isomorphism is symmetric
40||| Isomorphism is symmetric
48isoSym : Iso a b -> Iso b a
41isoSym : Iso a b -> Iso b a
49isoSym (MkIso to from toFrom fromTo) = MkIso from to fromTo toFrom
42isoSym (MkIso to from toFrom fromTo) = MkIso from to fromTo toFrom
@@ -100,7 +93,8 @@ eitherBotRight = isoTrans eitherComm eitherBotLeft
100
93
101||| Isomorphism is a congruence with regards to disjunction
94||| Isomorphism is a congruence with regards to disjunction
102eitherCong : Iso a a' -> Iso b b' -> Iso (Either a b) (Either a' b')
95eitherCong : Iso a a' -> Iso b b' -> Iso (Either a b) (Either a' b')
96+eitherCong {a = a} {a' = a'} {b = b} {b' = b'}
103−eitherCong (MkIso to from toFrom fromTo)
97+ (MkIso to from toFrom fromTo)
104 (MkIso to' from' toFrom' fromTo') =
98 (MkIso to' from' toFrom' fromTo') =
105 MkIso (eitherMap to to') (eitherMap from from') ok1 ok2
99 MkIso (eitherMap to to') (eitherMap from from') ok1 ok2
106 where eitherMap : (c -> c') -> (d -> d') -> Either c d -> Either c' d'
100 where eitherMap : (c -> c') -> (d -> d') -> Either c d -> Either c' d'
@@ -143,7 +137,9 @@ pairAssoc = MkIso to from ok1 ok2
143
137
144||| Conjunction with truth is a no-op
138||| Conjunction with truth is a no-op
145pairUnitRight : Iso (a, ()) a
139pairUnitRight : Iso (a, ()) a
146−pairUnitRight = MkIso fst (\x => (x, ())) (\_ => Refl) (\(_, ()) => Refl)
140+pairUnitRight = MkIso fst (\x => (x, ())) (\x => Refl) ok
141+ where ok : (x : (a, ())) -> (fst x, ()) = x
142+ ok (x, ()) = Refl
147
143
148||| Conjunction with truth is a no-op
144||| Conjunction with truth is a no-op
149pairUnitLeft : Iso ((), a) a
145pairUnitLeft : Iso ((), a) a
@@ -159,7 +155,8 @@ pairBotRight = isoTrans pairComm pairBotLeft
159
155
160||| Isomorphism is a congruence with regards to conjunction
156||| Isomorphism is a congruence with regards to conjunction
161pairCong : Iso a a' -> Iso b b' -> Iso (a, b) (a', b')
157pairCong : Iso a a' -> Iso b b' -> Iso (a, b) (a', b')
158+pairCong {a = a} {a' = a'} {b = b} {b' = b'}
162−pairCong (MkIso to from toFrom fromTo)
159+ (MkIso to from toFrom fromTo)
163 (MkIso to' from' toFrom' fromTo') =
160 (MkIso to' from' toFrom' fromTo') =
164 MkIso to'' from'' iso1 iso2
161 MkIso to'' from'' iso1 iso2
165 where to'' : (a, b) -> (a', b')
162 where to'' : (a, b) -> (a', b')
@@ -202,7 +199,7 @@ distribLeft = MkIso to from toFrom fromTo
202
199
203||| Products distribute over sums
200||| Products distribute over sums
204distribRight : Iso (a, Either b c) (Either (a, b) (a, c))
201distribRight : Iso (a, Either b c) (Either (a, b) (a, c))
205−distribRight = (pairComm `isoTrans` distribLeft) `isoTrans` eitherCong pairComm pairComm
202+distribRight {a} {b} {c} = (pairComm `isoTrans` distribLeft) `isoTrans` eitherCong pairComm pairComm
206
203
207
204
208-- Enable preorder reasoning syntax over isomorphisms
205-- Enable preorder reasoning syntax over isomorphisms
@@ -219,7 +216,7 @@ step a iso1 iso2 = isoTrans iso1 iso2
219-- Isomorphisms over Maybe
216-- Isomorphisms over Maybe
220||| Isomorphism is a congruence with respect to Maybe
217||| Isomorphism is a congruence with respect to Maybe
221maybeCong : Iso a b -> Iso (Maybe a) (Maybe b)
218maybeCong : Iso a b -> Iso (Maybe a) (Maybe b)
222−maybeCong (MkIso to from toFrom fromTo) = MkIso (map to) (map from) ok1 ok2
219+maybeCong {a} {b} (MkIso to from toFrom fromTo) = MkIso (map to) (map from) ok1 ok2
223 where ok1 : (y : Maybe b) -> map to (map from y) = y
220 where ok1 : (y : Maybe b) -> map to (map from y) = y
224 ok1 Nothing = Refl
221 ok1 Nothing = Refl
225 ok1 (Just x) = (Just (to (from x))) ={ cong (toFrom x) }= (Just x) QED
222 ok1 (Just x) = (Just (to (from x))) ={ cong (toFrom x) }= (Just x) QED
@@ -250,7 +247,7 @@ maybeVoidUnit = (Maybe Void) ={ maybeEither }=
250 () QED
247 () QED
251
248
252eitherMaybeLeftMaybe : Iso (Either (Maybe a) b) (Maybe (Either a b))
249eitherMaybeLeftMaybe : Iso (Either (Maybe a) b) (Maybe (Either a b))
253−eitherMaybeLeftMaybe =
250+eitherMaybeLeftMaybe {a} {b} =
254 (Either (Maybe a) b) ={ eitherCongLeft maybeEither }=
251 (Either (Maybe a) b) ={ eitherCongLeft maybeEither }=
255 (Either (Either a ()) b) ={ eitherAssoc }=
252 (Either (Either a ()) b) ={ eitherAssoc }=
256 (Either a (Either () b)) ={ eitherCongRight eitherComm }=
253 (Either a (Either () b)) ={ eitherCongRight eitherComm }=
@@ -260,7 +257,7 @@ eitherMaybeLeftMaybe =
260
257
261
258
262eitherMaybeRightMaybe : Iso (Either a (Maybe b)) (Maybe (Either a b))
259eitherMaybeRightMaybe : Iso (Either a (Maybe b)) (Maybe (Either a b))
263−eitherMaybeRightMaybe =
260+eitherMaybeRightMaybe {a} {b} =
264 (Either a (Maybe b)) ={ eitherComm }=
261 (Either a (Maybe b)) ={ eitherComm }=
265 (Either (Maybe b) a) ={ eitherMaybeLeftMaybe }=
262 (Either (Maybe b) a) ={ eitherMaybeLeftMaybe }=
266 (Maybe (Either b a)) ={ maybeCong eitherComm }=
263 (Maybe (Either b a)) ={ maybeCong eitherComm }=
@@ -285,8 +282,8 @@ maybeIsoS = MkIso forth back fb bf
285 fb (FS x) = Refl
282 fb (FS x) = Refl
286
283
287finZeroBot : Iso (Fin 0) Void
284finZeroBot : Iso (Fin 0) Void
288−finZeroBot = MkIso (void . uninhabited)
285+finZeroBot = MkIso (\x => void (uninhabited x))
289− void
286+ (\x => void x)
290 (\x => void x)
287 (\x => void x)
291 (\x => void (uninhabited x))
288 (\x => void (uninhabited x))
292
289
libs/base/Control/Monad/Identity.idr−6
@@ -29,9 +29,3 @@ Enum a => Enum (Identity a) where
29 toNat (Id x) = toNat x
29 toNat (Id x) = toNat x
30 fromNat n = Id $ fromNat n
30 fromNat n = Id $ fromNat n
31 pred (Id n) = Id $ pred n
31 pred (Id n) = Id $ pred n
32−
33−(Semigroup a) => Semigroup (Identity a) where
34− (<+>) x y = Id (runIdentity x <+> runIdentity y)
35−
36−(Monoid a) => Monoid (Identity a) where
37− neutral = Id (neutral)
libs/base/Control/Monad/Writer.idr−3
@@ -64,6 +64,3 @@ censor f m = pass $ do a <- m
64||| The Writer monad itself. See the MonadWriter interface
64||| The Writer monad itself. See the MonadWriter interface
65Writer : Type -> Type -> Type
65Writer : Type -> Type -> Type
66Writer w a = WriterT w Identity a
66Writer w a = WriterT w Identity a
67−
68−runWriter : Writer w a -> (a, w)
69−runWriter = runIdentity . runWriterT
libs/base/Data/Buffer.idr+4−5
@@ -21,12 +21,11 @@ record Buffer where
21||| fails
21||| fails
22export
22export
23newBuffer : (size : Int) -> IO (Maybe Buffer)
23newBuffer : (size : Int) -> IO (Maybe Buffer)
24−newBuffer size = do vm <- getMyVM
25− bptr <- foreign FFI_C "idris_newBuffer" (Ptr -> Int -> IO ManagedPtr)
24+newBuffer size = do bptr <- foreign FFI_C "idris_newBuffer" (Int -> IO Ptr)
26− vm size
25+ size
27− bad <- nullManagedPtr bptr
26+ bad <- nullPtr bptr
28 if bad then pure Nothing
27 if bad then pure Nothing
29− else pure (Just (MkBuffer bptr size 0))
28+ else pure (Just (MkBuffer (prim__registerPtr bptr (size + 8)) size 0))
30
29
31||| Reset the 'next location' pointer of the buffer to 0.
30||| Reset the 'next location' pointer of the buffer to 0.
32||| The 'next location' pointer gives the location for the next file read/write
31||| The 'next location' pointer gives the location for the next file read/write
libs/base/Data/Complex.idr+12−7
@@ -27,6 +27,18 @@ implementation Show a => Show (Complex a) where
27 plus_i = User 6
27 plus_i = User 6
28
28
29
29
30+-- when we have an interface 'Fractional' (which contains Double),
31+-- we can do:
32+{-
33+implementation Fractional a => Fractional (Complex a) where
34+ (/) (a:+b) (c:+d) = let
35+ real = (a*c+b*d)/(c*c+d*d)
36+ imag = (b*c-a*d)/(c*c+d*d)
37+ in
38+ (real:+imag)
39+-}
40+
41+
30
42
31------------------------------ Polarform
43------------------------------ Polarform
32
44
@@ -66,10 +78,3 @@ implementation Neg a => Neg (Complex a) where
66-- operates on Double.
78-- operates on Double.
67implementation Abs (Complex Double) where
79implementation Abs (Complex Double) where
68 abs (a:+b) = (magnitude (a:+b):+0)
80 abs (a:+b) = (magnitude (a:+b):+0)
69−
70−implementation (Neg a, Fractional a) => Fractional (Complex a) where
71− (/) (a:+b) (c:+d) = let
72− real = (a*c+b*d)/(c*c+d*d)
73− imag = (b*c-a*d)/(c*c+d*d)
74− in
75− (real:+imag)
libs/base/Data/Fin.idr−9
@@ -65,11 +65,6 @@ weakenN : (n : Nat) -> Fin m -> Fin (m + n)
65weakenN n FZ = FZ
65weakenN n FZ = FZ
66weakenN n (FS f) = FS (weakenN n f)
66weakenN n (FS f) = FS (weakenN n f)
67
67
68−||| Weaken the bound on a Fin using an inequality proof
69−weakenLTE : LTE n m -> Fin n -> Fin m
70−weakenLTE (LTESucc p) FZ = FZ
71−weakenLTE (LTESucc p) (FS f) = FS $ weakenLTE p f
72−
73||| Attempt to tighten the bound on a Fin.
68||| Attempt to tighten the bound on a Fin.
74||| Return `Left` if the bound could not be tightened, or `Right` if it could.
69||| Return `Left` if the bound could not be tightened, or `Right` if it could.
75strengthen : Fin (S n) -> Either (Fin (S n)) (Fin n)
70strengthen : Fin (S n) -> Either (Fin (S n)) (Fin n)
@@ -106,10 +101,6 @@ implementation MinBound (Fin (S n)) where
106implementation MaxBound (Fin (S n)) where
101implementation MaxBound (Fin (S n)) where
107 maxBound = last
102 maxBound = last
108
103
109−||| Add two Fins
110−addFin : (x : Fin n) -> (y : Fin m) -> Fin (finToNat x + m)
111−addFin FZ y = y
112−addFin (FS x) y = FS $ addFin x y
113
104
114-- Construct a Fin from an integer literal which must fit in the given Fin
105-- Construct a Fin from an integer literal which must fit in the given Fin
115
106
libs/base/Data/IORef.idr−2
@@ -1,7 +1,5 @@
1module Data.IORef
1module Data.IORef
2
2
3−%default total
4−
5||| A mutable variable in the IO monad.
3||| A mutable variable in the IO monad.
6export
4export
7data IORef a = MkIORef a
5data IORef a = MkIORef a
libs/base/Data/List/Quantifiers.idr−5
@@ -75,8 +75,3 @@ all d (x::xs) with (d x)
75 case all d xs of
75 case all d xs of
76 Yes prf' => Yes (prf :: prf')
76 Yes prf' => Yes (prf :: prf')
77 No prf' => No (notAllThere prf')
77 No prf' => No (notAllThere prf')
78−
79−||| Given a proof of membership for some element, extract the property proof for it
80−indexAll : Elem x xs -> All p xs -> p x
81−indexAll Here (p::_ ) = p
82−indexAll (There e) ( _::ps) = indexAll e ps
libs/base/Data/Morphisms.idr+27−43
@@ -1,61 +1,45 @@
1module Data.Morphisms
1module Data.Morphisms
2
2
3−%default total
4%access public export
3%access public export
5
4
6−record Morphism a b where
5+data Morphism : Type -> Type -> Type where
7− constructor Mor
6+ Mor : (a -> b) -> Morphism a b
8− applyMor : a -> b
9−infixr 1 ~>
10−(~>) : Type -> Type -> Type
11−(~>) = Morphism
12
7
13−record Endomorphism a where
8+data Endomorphism : Type -> Type where
14− constructor Endo
9+ Endo : (a -> a) -> Endomorphism a
15− applyEndo : a -> a
16
10
17−record Kleislimorphism (f : Type -> Type) a b where
11+data Kleislimorphism : (Type -> Type) -> Type -> Type -> Type where
18− constructor Kleisli
12+ Kleisli : Monad m => (a -> m b) -> Kleislimorphism m a b
19− applyKleisli : a -> f b
20
13
21−Functor (Morphism r) where
14+applyKleisli : Monad m => (Kleislimorphism m a b) -> a -> m b
22− map f (Mor a) = Mor $ f . a
15+applyKleisli (Kleisli f) a = f a
23
16
24−Applicative (Morphism r) where
17+applyMor : Morphism a b -> a -> b
25− pure a = Mor $ const a
26− (Mor f) <*> (Mor a) = Mor $ \r => f r $ a r
18+applyMor (Mor f) a = f a
27
19
20+applyEndo : Endomorphism a -> a -> a
21+applyEndo (Endo f) a = f a
22+
28−Monad (Morphism r) where
23+implementation Functor (Morphism r) where
29− (Mor h) >>= f = Mor $ \r => applyMor (f $ h r) r
24+ map f (Mor a) = Mor (f . a)
30
25
31−Semigroup a => Semigroup (Morphism r a) where
26+implementation Applicative (Morphism r) where
32− f <+> g = [| f <+> g |]
27+ pure a = Mor $ const a
28+ (Mor f) <*> (Mor a) = Mor $ \r => f r $ a r
33
29
34−Monoid a => Monoid (Morphism r a) where
30+implementation Monad (Morphism r) where
35− neutral = [| neutral |]
31+ (Mor h) >>= f = Mor $ \r => applyMor (f $ h r) r
36
32
37−Semigroup (Endomorphism a) where
33+implementation Semigroup (Endomorphism a) where
38 (Endo f) <+> (Endo g) = Endo $ g . f
34 (Endo f) <+> (Endo g) = Endo $ g . f
39
35
40−Monoid (Endomorphism a) where
36+implementation Monoid (Endomorphism a) where
41 neutral = Endo id
37 neutral = Endo id
42
38
43−Functor f => Functor (Kleislimorphism f a) where
39+infixr 1 ~>
44− map f (Kleisli g) = Kleisli (map f . g)
45−
46−Applicative f => Applicative (Kleislimorphism f a) where
47− pure a = Kleisli $ const $ pure a
48− (Kleisli f) <*> (Kleisli a) = Kleisli $ \r => f r <*> a r
49−
50−Monad f => Monad (Kleislimorphism f a) where
51− (Kleisli f) >>= g = Kleisli $ \r => applyKleisli (g !(f r)) r
52−
53−-- Applicative is a bit too strong, but there is no suitable superclass
54−(Semigroup a, Applicative f) => Semigroup (Kleislimorphism f r a) where
55− f <+> g = [| f <+> g |]
56
40
57−(Monoid a, Applicative f) => Monoid (Kleislimorphism f r a) where
41+(~>) : Type -> Type -> Type
58− neutral = [| neutral |]
42+a ~> b = Morphism a b
59
43
60Cast (Endomorphism a) (Morphism a a) where
44Cast (Endomorphism a) (Morphism a a) where
61 cast (Endo f) = Mor f
45 cast (Endo f) = Mor f
@@ -63,8 +47,8 @@ Cast (Endomorphism a) (Morphism a a) where
63Cast (Morphism a a) (Endomorphism a) where
47Cast (Morphism a a) (Endomorphism a) where
64 cast (Mor f) = Endo f
48 cast (Mor f) = Endo f
65
49
66−Cast (Morphism a (f b)) (Kleislimorphism f a b) where
50+Monad m => Cast (Morphism a (m b)) (Kleislimorphism m a b) where
67 cast (Mor f) = Kleisli f
51 cast (Mor f) = Kleisli f
68
52
69−Cast (Kleislimorphism f a b) (Morphism a (f b)) where
53+Cast (Kleislimorphism m a b) (Morphism a (m b)) where
70 cast (Kleisli f) = Mor f
54 cast (Kleisli f) = Mor f
libs/base/Data/Nat/Views.idr+1−1
@@ -14,7 +14,7 @@ data HalfRec : Nat -> Type where
14 HalfRecOdd : {n : Nat} -> (rec : Lazy (HalfRec n)) -> HalfRec (S (n + n))
14 HalfRecOdd : {n : Nat} -> (rec : Lazy (HalfRec n)) -> HalfRec (S (n + n))
15
15
16||| Covering function for the `Half` view
16||| Covering function for the `Half` view
17−public export
17+export
18half : (n : Nat) -> Half n
18half : (n : Nat) -> Half n
19half Z = HalfEven {n=0}
19half Z = HalfEven {n=0}
20half (S k) with (half k)
20half (S k) with (half k)
libs/base/Data/So.idr+1−11
@@ -12,7 +12,7 @@ module Data.So
12||| If you find yourself using `So` for something other than primitive types,
12||| If you find yourself using `So` for something other than primitive types,
13||| it may be appropriate to define a type of evidence for the property that you
13||| it may be appropriate to define a type of evidence for the property that you
14||| care about instead.
14||| care about instead.
15−data So : Bool -> Type where
15+data So : Bool -> Type where
16 Oh : So True
16 Oh : So True
17
17
18implementation Uninhabited (So False) where
18implementation Uninhabited (So False) where
@@ -23,14 +23,4 @@ choose : (b : Bool) -> Either (So b) (So (not b))
23choose True = Left Oh
23choose True = Left Oh
24choose False = Right Oh
24choose False = Right Oh
25
25
26−||| Absurd when you have proof that both `b` and `not b` is true.
27−export
28−soAbsurd : So b -> So (not b) -> Void
29−soAbsurd sb snb with (sb)
30− | Oh = uninhabited snb
31−
32−||| Transmission between usage of value-level `not` and type-level `Not`.
33−export
34−soNotToNotSo : So (not b) -> Not (So b)
35−soNotToNotSo = flip soAbsurd
36
26
libs/base/Data/Vect.idr+21−398
@@ -45,64 +45,36 @@ lengthCorrect (S n) (x :: xs) = rewrite lengthCorrect n xs in Refl
45--------------------------------------------------------------------------------
45--------------------------------------------------------------------------------
46
46
47||| All but the first element of the vector
47||| All but the first element of the vector
48−|||
49−||| ```idris example
50−||| tail [1,2,3,4]
51−||| ```
52tail : Vect (S len) elem -> Vect len elem
48tail : Vect (S len) elem -> Vect len elem
53tail (x::xs) = xs
49tail (x::xs) = xs
54
50
55||| Only the first element of the vector
51||| Only the first element of the vector
56−|||
57−||| ```idris example
58−||| head [1,2,3,4]
59−||| ```
60head : Vect (S len) elem -> elem
52head : Vect (S len) elem -> elem
61head (x::xs) = x
53head (x::xs) = x
62
54
63||| The last element of the vector
55||| The last element of the vector
64−|||
65−||| ```idris example
66−||| last [1,2,3,4]
67−||| ```
68last : Vect (S len) elem -> elem
56last : Vect (S len) elem -> elem
69last (x::[]) = x
57last (x::[]) = x
70last (x::y::ys) = last $ y::ys
58last (x::y::ys) = last $ y::ys
71
59
72||| All but the last element of the vector
60||| All but the last element of the vector
73−|||
74−||| ```idris example
75−||| init [1,2,3,4]
76−||| ```
77init : Vect (S len) elem -> Vect len elem
61init : Vect (S len) elem -> Vect len elem
78init (x::[]) = []
62init (x::[]) = []
79init (x::y::ys) = x :: init (y::ys)
63init (x::y::ys) = x :: init (y::ys)
80
64
81||| Extract a particular element from a vector
65||| Extract a particular element from a vector
82−|||
83−||| ```idris example
84−||| index 1 [1,2,3,4]
85−||| ```
86index : Fin len -> Vect len elem -> elem
66index : Fin len -> Vect len elem -> elem
87index FZ (x::xs) = x
67index FZ (x::xs) = x
88index (FS k) (x::xs) = index k xs
68index (FS k) (x::xs) = index k xs
89
69
90
70
91||| Insert an element at a particular index
71||| Insert an element at a particular index
92−|||
93−||| ```idris example
94−||| insertAt 1 8 [1,2,3,4]
95−||| ```
96insertAt : Fin (S len) -> elem -> Vect len elem -> Vect (S len) elem
72insertAt : Fin (S len) -> elem -> Vect len elem -> Vect (S len) elem
97insertAt FZ y xs = y :: xs
73insertAt FZ y xs = y :: xs
98insertAt (FS k) y (x::xs) = x :: insertAt k y xs
74insertAt (FS k) y (x::xs) = x :: insertAt k y xs
99insertAt (FS k) y [] = absurd k
75insertAt (FS k) y [] = absurd k
100
76
101||| Construct a new vector consisting of all but the indicated element
77||| Construct a new vector consisting of all but the indicated element
102−|||
103−||| ```idris example
104−||| deleteAt 1 [1,2,3,4]
105−||| ```
106deleteAt : Fin (S len) -> Vect (S len) elem -> Vect len elem
78deleteAt : Fin (S len) -> Vect (S len) elem -> Vect len elem
107deleteAt FZ (x::xs) = xs
79deleteAt FZ (x::xs) = xs
108deleteAt {len = S m} (FS k) (x::xs) = x :: deleteAt k xs
80deleteAt {len = S m} (FS k) (x::xs) = x :: deleteAt k xs
@@ -110,10 +82,6 @@ deleteAt {len = Z} (FS k) (x::xs) = absurd k
110deleteAt _ [] impossible
82deleteAt _ [] impossible
111
83
112||| Replace an element at a particlar index with another
84||| Replace an element at a particlar index with another
113−|||
114−||| ```idris example
115−||| replaceAt 1 8 [1,2,3,4]
116−||| ```
117replaceAt : Fin len -> elem -> Vect len elem -> Vect len elem
85replaceAt : Fin len -> elem -> Vect len elem -> Vect len elem
118replaceAt FZ y (x::xs) = y :: xs
86replaceAt FZ y (x::xs) = y :: xs
119replaceAt (FS k) y (x::xs) = x :: replaceAt k y xs
87replaceAt (FS k) y (x::xs) = x :: replaceAt k y xs
@@ -122,10 +90,6 @@ replaceAt (FS k) y (x::xs) = x :: replaceAt k y xs
122||| @ i the index to replace at
90||| @ i the index to replace at
123||| @ f the update function
91||| @ f the update function
124||| @ xs the vector to replace in
92||| @ xs the vector to replace in
125−|||
126−||| ```idris example
127−||| updateAt 1 (+10) [1,2,3,4]
128−||| ```
129updateAt : (i : Fin len) -> (f : elem -> elem) -> (xs : Vect len elem) -> Vect len elem
93updateAt : (i : Fin len) -> (f : elem -> elem) -> (xs : Vect len elem) -> Vect len elem
130updateAt FZ f (x::xs) = f x :: xs
94updateAt FZ f (x::xs) = f x :: xs
131updateAt (FS k) f (x::xs) = x :: updateAt k f xs
95updateAt (FS k) f (x::xs) = x :: updateAt k f xs
@@ -136,54 +100,20 @@ updateAt (FS k) f (x::xs) = x :: updateAt k f xs
136
100
137||| Get the first n elements of a Vect
101||| Get the first n elements of a Vect
138||| @ n the number of elements to take
102||| @ n the number of elements to take
139−|||
140−||| ```idris example
141−||| take 2 [1,2,3,4]
142−||| ```
143take : (n : Nat) -> Vect (n + m) elem -> Vect n elem
103take : (n : Nat) -> Vect (n + m) elem -> Vect n elem
144take Z xs = []
104take Z xs = []
145take (S k) (x :: xs) = x :: take k xs
105take (S k) (x :: xs) = x :: take k xs
146
106
147||| Remove the first n elements of a Vect
107||| Remove the first n elements of a Vect
148||| @ n the number of elements to remove
108||| @ n the number of elements to remove
149−|||
150−||| ```idris example
151−||| drop 2 [1,2,3,4]
152−||| ```
153drop : (n : Nat) -> Vect (n + m) elem -> Vect m elem
109drop : (n : Nat) -> Vect (n + m) elem -> Vect m elem
154drop Z xs = xs
110drop Z xs = xs
155drop (S k) (x :: xs) = drop k xs
111drop (S k) (x :: xs) = drop k xs
156
112
157−||| Take up to the first n elements of a Vect if they exist.
158−||| @ n the maximum number of elements to take
159−|||
160−||| ```idris example
161−||| takeUpto 10 [1,2,3,4]
162−||| ```
163−takeUpto : (x : Nat) -> Vect n elem -> Vect (minimum x n) elem
164−takeUpto Z ys = []
165−takeUpto x [] = rewrite minimumZeroZeroLeft x in []
166−takeUpto (S x) (y::ys) = y :: takeUpto x ys
167−
168−||| Drop up to the first n elements of a Vect if they exist.
169−||| @ n the maximum number of elements to remove.
170−|||
171−||| ```idris example
172−||| dropUpto 10 [1,2,3,4]
173−||| ```
174−dropUpto : (x : Nat) -> Vect n elem -> Vect (n `minus` minimum x n) elem
175−dropUpto Z ys {n} = rewrite minusZeroRight n in ys
176−dropUpto x [] = []
177−dropUpto (S x) (y :: ys) = dropUpto x ys
178−
179||| Take the longest prefix of a Vect such that all elements satisfy some
113||| Take the longest prefix of a Vect such that all elements satisfy some
180||| Boolean predicate.
114||| Boolean predicate.
181|||
115|||
182||| @ p the predicate
116||| @ p the predicate
183−|||
184−||| ```idris example
185−||| takeWhile (<3) [1,2,3,4]
186−||| ```
187takeWhile : (p : elem -> Bool) -> Vect len elem -> (q ** Vect q elem)
117takeWhile : (p : elem -> Bool) -> Vect len elem -> (q ** Vect q elem)
188takeWhile p [] = (_ ** [])
118takeWhile p [] = (_ ** [])
189takeWhile p (x::xs) =
119takeWhile p (x::xs) =
@@ -197,10 +127,6 @@ takeWhile p (x::xs) =
197||| Boolean predicate.
127||| Boolean predicate.
198|||
128|||
199||| @ p the predicate
129||| @ p the predicate
200−|||
201−||| ```idris example
202−||| dropWhile (<3) [1,2,3,4]
203−||| ```
204dropWhile : (p : elem -> Bool) -> Vect len elem -> (q ** Vect q elem)
130dropWhile : (p : elem -> Bool) -> Vect len elem -> (q ** Vect q elem)
205dropWhile p [] = (_ ** [])
131dropWhile p [] = (_ ** [])
206dropWhile p (x::xs) =
132dropWhile p (x::xs) =
@@ -214,10 +140,6 @@ dropWhile p (x::xs) =
214--------------------------------------------------------------------------------
140--------------------------------------------------------------------------------
215
141
216||| Reverse the order of the elements of a vector
142||| Reverse the order of the elements of a vector
217−|||
218−||| ```idris example
219−||| reverse [1,2,3,4]
220−||| ```
221reverse : Vect len elem -> Vect len elem
143reverse : Vect len elem -> Vect len elem
222reverse xs = go [] xs
144reverse xs = go [] xs
223 where go : Vect n elem -> Vect m elem -> Vect (n+m) elem
145 where go : Vect n elem -> Vect m elem -> Vect (n+m) elem
@@ -228,10 +150,6 @@ reverse xs = go [] xs
228||| Alternate an element between the other elements of a vector
150||| Alternate an element between the other elements of a vector
229||| @ sep the element to intersperse
151||| @ sep the element to intersperse
230||| @ xs the vector to separate with `sep`
152||| @ xs the vector to separate with `sep`
231−|||
232−||| ```idris example
233−||| intersperse 0 [1,2,3,4]
234−||| ```
235intersperse : (sep : elem) -> (xs : Vect len elem) -> Vect (len + pred len) elem
153intersperse : (sep : elem) -> (xs : Vect len elem) -> Vect (len + pred len) elem
236intersperse sep [] = []
154intersperse sep [] = []
237intersperse sep (x::xs) = x :: intersperse' sep xs
155intersperse sep (x::xs) = x :: intersperse' sep xs
@@ -256,10 +174,6 @@ fromList' {len} ys (x::xs) =
256||| Convert a list to a vector.
174||| Convert a list to a vector.
257|||
175|||
258||| The length of the list should be statically known.
176||| The length of the list should be statically known.
259−|||
260−||| ```idris example
261−||| fromList [1,2,3,4]
262−||| ```
263fromList : (l : List elem) -> Vect (length l) elem
177fromList : (l : List elem) -> Vect (length l) elem
264fromList l =
178fromList l =
265 rewrite (sym $ plusZeroRightNeutral (length l)) in
179 rewrite (sym $ plusZeroRightNeutral (length l)) in
@@ -270,31 +184,19 @@ fromList l =
270--------------------------------------------------------------------------------
184--------------------------------------------------------------------------------
271
185
272||| Append two vectors
186||| Append two vectors
273−|||
274−||| ```idris example
275−||| [1,2,3,4] ++ [5,6]
276−||| ```
277(++) : (xs : Vect m elem) -> (ys : Vect n elem) -> Vect (m + n) elem
187(++) : (xs : Vect m elem) -> (ys : Vect n elem) -> Vect (m + n) elem
278(++) [] ys = ys
188(++) [] ys = ys
279(++) (x::xs) ys = x :: xs ++ ys
189(++) (x::xs) ys = x :: xs ++ ys
280
190
281−||| Repeat some value some number of times.
191+||| Repeate some value some number of times.
282|||
192|||
283||| @ len the number of times to repeat it
193||| @ len the number of times to repeat it
284||| @ x the value to repeat
194||| @ x the value to repeat
285−|||
286−||| ```idris example
287−||| replicate 4 1
288−||| ```
289replicate : (len : Nat) -> (x : elem) -> Vect len elem
195replicate : (len : Nat) -> (x : elem) -> Vect len elem
290replicate Z x = []
196replicate Z x = []
291replicate (S k) x = x :: replicate k x
197replicate (S k) x = x :: replicate k x
292
198
293||| Merge two ordered vectors
199||| Merge two ordered vectors
294−|||
295−||| ```idris example
296−||| mergeBy compare (fromList [1,3,5]) (fromList [2,3,4,5,6])
297−||| ```
298mergeBy : (elem -> elem -> Ordering) -> (xs : Vect n elem) -> (ys : Vect m elem) -> Vect (n + m) elem
200mergeBy : (elem -> elem -> Ordering) -> (xs : Vect n elem) -> (ys : Vect m elem) -> Vect (n + m) elem
299mergeBy order [] [] = []
201mergeBy order [] [] = []
300mergeBy order [] (x :: xs) = x :: xs
202mergeBy order [] (x :: xs) = x :: xs
@@ -318,54 +220,30 @@ merge = mergeBy compare
318||| @ f the function to combine elements with
220||| @ f the function to combine elements with
319||| @ xs the first vector of elements
221||| @ xs the first vector of elements
320||| @ ys the second vector of elements
222||| @ ys the second vector of elements
321−|||
322−||| ```idris example
323−||| zipWith (+) (fromList [1,2,3,4]) (fromList [5,6,7,8])
324−||| ```
325zipWith : (f : a -> b -> c) -> (xs : Vect n a) -> (ys : Vect n b) -> Vect n c
223zipWith : (f : a -> b -> c) -> (xs : Vect n a) -> (ys : Vect n b) -> Vect n c
326zipWith f [] [] = []
224zipWith f [] [] = []
327zipWith f (x::xs) (y::ys) = f x y :: zipWith f xs ys
225zipWith f (x::xs) (y::ys) = f x y :: zipWith f xs ys
328
226
329||| Combine three equal-length vectors into a vector with some function
227||| Combine three equal-length vectors into a vector with some function
330−|||
331−||| ```idris example
332−||| zipWith3 (\x,y,z => x+y+z) (fromList [1,2,3,4]) (fromList [5,6,7,8]) (fromList [1,1,1,1])
333−||| ```
334zipWith3 : (a -> b -> c -> d) -> (xs : Vect n a) -> (ys : Vect n b) -> (zs : Vect n c) -> Vect n d
228zipWith3 : (a -> b -> c -> d) -> (xs : Vect n a) -> (ys : Vect n b) -> (zs : Vect n c) -> Vect n d
335zipWith3 f [] [] [] = []
229zipWith3 f [] [] [] = []
336zipWith3 f (x::xs) (y::ys) (z::zs) = f x y z :: zipWith3 f xs ys zs
230zipWith3 f (x::xs) (y::ys) (z::zs) = f x y z :: zipWith3 f xs ys zs
337
231
338||| Combine two equal-length vectors pairwise
232||| Combine two equal-length vectors pairwise
339−|||
340−||| ```idris example
341−||| zip (fromList [1,2,3,4]) (fromList [1,2,3,4])
342−||| ```
343zip : (xs : Vect n a) -> (ys : Vect n b) -> Vect n (a, b)
233zip : (xs : Vect n a) -> (ys : Vect n b) -> Vect n (a, b)
344zip = zipWith (\x,y => (x,y))
234zip = zipWith (\x,y => (x,y))
345
235
346||| Combine three equal-length vectors elementwise into a vector of tuples
236||| Combine three equal-length vectors elementwise into a vector of tuples
347−|||
348−||| ```idris example
349−||| zip3 (fromList [1,2,3,4]) (fromList [1,2,3,4]) (fromList [1,2,3,4])
350−||| ```
351zip3 : (xs : Vect n a) -> (ys : Vect n b) -> (zs : Vect n c) -> Vect n (a, b, c)
237zip3 : (xs : Vect n a) -> (ys : Vect n b) -> (zs : Vect n c) -> Vect n (a, b, c)
352zip3 = zipWith3 (\x,y,z => (x,y,z))
238zip3 = zipWith3 (\x,y,z => (x,y,z))
353
239
354||| Convert a vector of pairs to a pair of vectors
240||| Convert a vector of pairs to a pair of vectors
355−|||
356−||| ```idris example
357−||| unzip (fromList [(1,2), (1,2)])
358−||| ```
359unzip : (xs : Vect n (a, b)) -> (Vect n a, Vect n b)
241unzip : (xs : Vect n (a, b)) -> (Vect n a, Vect n b)
360unzip [] = ([], [])
242unzip [] = ([], [])
361unzip ((l, r)::xs) with (unzip xs)
243unzip ((l, r)::xs) with (unzip xs)
362 | (lefts, rights) = (l::lefts, r::rights)
244 | (lefts, rights) = (l::lefts, r::rights)
363
245
364||| Convert a vector of three-tuples to a triplet of vectors
246||| Convert a vector of three-tuples to a triplet of vectors
365−|||
366−||| ```idris example
367−||| unzip3 (fromList [(1,2,3), (1,2,3)])
368−||| ```
369unzip3 : (xs : Vect n (a, b, c)) -> (Vect n a, Vect n b, Vect n c)
247unzip3 : (xs : Vect n (a, b, c)) -> (Vect n a, Vect n b, Vect n c)
370unzip3 [] = ([], [], [])
248unzip3 [] = ([], [], [])
371unzip3 ((l,c,r)::xs) with (unzip3 xs)
249unzip3 ((l,c,r)::xs) with (unzip3 xs)
@@ -407,10 +285,6 @@ implementation Functor (Vect n) where
407|||
285|||
408||| @ f the partial function (expressed by returning `Maybe`)
286||| @ f the partial function (expressed by returning `Maybe`)
409||| @ xs the vector to check for results
287||| @ xs the vector to check for results
410−|||
411−||| ```idris example
412−||| mapMaybe ((find (=='a')) . unpack) (fromList ["abc","ade","bgh","xyz"])
413−||| ```
414mapMaybe : (f : a -> Maybe b) -> (xs : Vect len a) -> (m : Nat ** Vect m b)
288mapMaybe : (f : a -> Maybe b) -> (xs : Vect len a) -> (m : Nat ** Vect m b)
415mapMaybe f [] = (_ ** [])
289mapMaybe f [] = (_ ** [])
416mapMaybe f (x::xs) =
290mapMaybe f (x::xs) =
@@ -419,6 +293,7 @@ mapMaybe f (x::xs) =
419 Just y => (S len ** y :: ys)
293 Just y => (S len ** y :: ys)
420 Nothing => ( len ** ys)
294 Nothing => ( len ** ys)
421
295
296+
422--------------------------------------------------------------------------------
297--------------------------------------------------------------------------------
423-- Folds
298-- Folds
424--------------------------------------------------------------------------------
299--------------------------------------------------------------------------------
@@ -435,41 +310,23 @@ implementation Foldable (Vect n) where
435--------------------------------------------------------------------------------
310--------------------------------------------------------------------------------
436
311
437||| Flatten a vector of equal-length vectors
312||| Flatten a vector of equal-length vectors
438−|||
439−||| ```idris example
440−||| concat [[1,2,3], [4,5,6]]
441−||| ```
442concat : (xss : Vect m (Vect n elem)) -> Vect (m * n) elem
313concat : (xss : Vect m (Vect n elem)) -> Vect (m * n) elem
443concat [] = []
314concat [] = []
444concat (v::vs) = v ++ concat vs
315concat (v::vs) = v ++ concat vs
445
316
446||| Foldr without seeding the accumulator
317||| Foldr without seeding the accumulator
447−|||
448−||| ```idris example
449−||| foldr1 (-) (fromList [1,2,3])
450−||| ```
451foldr1 : (t -> t -> t) -> Vect (S n) t -> t
318foldr1 : (t -> t -> t) -> Vect (S n) t -> t
452−foldr1 f [x] = x
319+foldr1 f (x::xs) = foldr f x xs
453−foldr1 f (x::y::xs) = f x (foldr1 f (y::xs))
454
320
455||| Foldl without seeding the accumulator
321||| Foldl without seeding the accumulator
456−|||
457−||| ```idris example
458−||| foldl1 (-) (fromList [1,2,3])
459−||| ```
460foldl1 : (t -> t -> t) -> Vect (S n) t -> t
322foldl1 : (t -> t -> t) -> Vect (S n) t -> t
461foldl1 f (x::xs) = foldl f x xs
323foldl1 f (x::xs) = foldl f x xs
462−
463--------------------------------------------------------------------------------
324--------------------------------------------------------------------------------
464-- Scans
325-- Scans
465--------------------------------------------------------------------------------
326--------------------------------------------------------------------------------
466
327
467||| The scanl function is similar to foldl, but returns all the intermediate
328||| The scanl function is similar to foldl, but returns all the intermediate
468||| accumulator states in the form of a vector.
329||| accumulator states in the form of a vector.
469−|||
470−||| ```idris example
471−||| scanl (-) 0 (fromList [1,2,3])
472−||| ```
473scanl : (res -> elem -> res) -> res -> Vect len elem -> Vect (S len) res
330scanl : (res -> elem -> res) -> res -> Vect len elem -> Vect (S len) res
474scanl f q [] = [q]
331scanl f q [] = [q]
475scanl f q (x::xs) = q :: scanl f (f q x) xs
332scanl f q (x::xs) = q :: scanl f (f q x) xs
@@ -478,10 +335,6 @@ scanl f q (x::xs) = q :: scanl f (f q x) xs
478||| starting value.
335||| starting value.
479||| It assumes the first element of the vector to be the starting value and then
336||| It assumes the first element of the vector to be the starting value and then
480||| starts the fold with the element following it.
337||| starts the fold with the element following it.
481−|||
482−||| ```idris example
483−||| scanl1 (-) (fromList [1,2,3])
484−||| ```
485scanl1 : (elem -> elem -> elem) -> Vect len elem -> Vect len elem
338scanl1 : (elem -> elem -> elem) -> Vect len elem -> Vect len elem
486scanl1 f [] = []
339scanl1 f [] = []
487scanl1 f (x::xs) = scanl f x xs
340scanl1 f (x::xs) = scanl f x xs
@@ -494,10 +347,6 @@ scanl1 f (x::xs) = scanl f x xs
494||| @ p the equality test
347||| @ p the equality test
495||| @ e the item to search for
348||| @ e the item to search for
496||| @ xs the vector to search in
349||| @ xs the vector to search in
497−|||
498−||| ```idris example
499−||| elemBy (==) 2 [1,2,3,4]
500−||| ```
501elemBy : (p : elem -> elem -> Bool) -> (e : elem) -> (xs : Vect len elem) -> Bool
350elemBy : (p : elem -> elem -> Bool) -> (e : elem) -> (xs : Vect len elem) -> Bool
502elemBy p e [] = False
351elemBy p e [] = False
503elemBy p e (x::xs) = p e x || elemBy p e xs
352elemBy p e (x::xs) = p e x || elemBy p e xs
@@ -505,29 +354,17 @@ elemBy p e (x::xs) = p e x || elemBy p e xs
505||| Use the default Boolean equality on elements to search for an item
354||| Use the default Boolean equality on elements to search for an item
506||| @ x what to search for
355||| @ x what to search for
507||| @ xs where to search
356||| @ xs where to search
508−|||
509−||| ```idris example
510−||| elem 3 [1,2,3,4]
511−||| ```
512elem : Eq elem => (x : elem) -> (xs : Vect len elem) -> Bool
357elem : Eq elem => (x : elem) -> (xs : Vect len elem) -> Bool
513elem = elemBy (==)
358elem = elemBy (==)
514
359
515||| Find the association of some key with a user-provided comparison
360||| Find the association of some key with a user-provided comparison
516||| @ p the comparison operator for keys (True if they match)
361||| @ p the comparison operator for keys (True if they match)
517||| @ e the key to look for
362||| @ e the key to look for
518−|||
519−||| ```idris example
520−||| lookupBy (==) 2 [(1, 'a'), (2, 'b'), (3, 'c')]
521−||| ```
522lookupBy : (p : key -> key -> Bool) -> (e : key) -> (xs : Vect n (key, val)) -> Maybe val
363lookupBy : (p : key -> key -> Bool) -> (e : key) -> (xs : Vect n (key, val)) -> Maybe val
523lookupBy p e [] = Nothing
364lookupBy p e [] = Nothing
524lookupBy p e ((l, r)::xs) = if p e l then Just r else lookupBy p e xs
365lookupBy p e ((l, r)::xs) = if p e l then Just r else lookupBy p e xs
525
366
526||| Find the assocation of some key using the default Boolean equality test
367||| Find the assocation of some key using the default Boolean equality test
527−|||
528−||| ```idris example
529−||| lookup 3 [(1, 'a'), (2, 'b'), (3, 'c')]
530−||| ```
531lookup : Eq key => key -> Vect n (key, val) -> Maybe val
368lookup : Eq key => key -> Vect n (key, val) -> Maybe val
532lookup = lookupBy (==)
369lookup = lookupBy (==)
533
370
@@ -535,19 +372,11 @@ lookup = lookupBy (==)
535||| @ p the comparison operator
372||| @ p the comparison operator
536||| @ elems the vector to search
373||| @ elems the vector to search
537||| @ xs what to search for
374||| @ xs what to search for
538−|||
539−||| ```idris example
540−||| hasAnyBy (==) [2,5] [1,2,3,4]
541−||| ```
542hasAnyBy : (p : elem -> elem -> Bool) -> (elems : Vect m elem) -> (xs : Vect len elem) -> Bool
375hasAnyBy : (p : elem -> elem -> Bool) -> (elems : Vect m elem) -> (xs : Vect len elem) -> Bool
543hasAnyBy p elems [] = False
376hasAnyBy p elems [] = False
544hasAnyBy p elems (x::xs) = elemBy p x elems || hasAnyBy p elems xs
377hasAnyBy p elems (x::xs) = elemBy p x elems || hasAnyBy p elems xs
545
378
546||| Check if any element of xs is found in elems using the default Boolean equality test
379||| Check if any element of xs is found in elems using the default Boolean equality test
547−|||
548−||| ```idris example
549−||| hasAny [2,5] [1,2,3,4]
550−||| ```
551hasAny : Eq elem => Vect m elem -> Vect len elem -> Bool
380hasAny : Eq elem => Vect m elem -> Vect len elem -> Bool
552hasAny = hasAnyBy (==)
381hasAny = hasAnyBy (==)
553
382
@@ -557,62 +386,30 @@ hasAny = hasAnyBy (==)
557
386
558||| Find the first element of the vector that satisfies some test
387||| Find the first element of the vector that satisfies some test
559||| @ p the test to satisfy
388||| @ p the test to satisfy
560−|||
561−||| ```idris example
562−||| find (== 3) [1,2,3,4]
563−||| ```
564find : (p : elem -> Bool) -> (xs : Vect len elem) -> Maybe elem
389find : (p : elem -> Bool) -> (xs : Vect len elem) -> Maybe elem
565find p [] = Nothing
390find p [] = Nothing
566find p (x::xs) = if p x then Just x else find p xs
391find p (x::xs) = if p x then Just x else find p xs
567
392
568||| Find the index of the first element of the vector that satisfies some test
393||| Find the index of the first element of the vector that satisfies some test
569−|||
570−||| ```idris example
571−||| findIndex (== 3) [1,2,3,4]
572−||| ```
573findIndex : (elem -> Bool) -> Vect len elem -> Maybe (Fin len)
394findIndex : (elem -> Bool) -> Vect len elem -> Maybe (Fin len)
574findIndex p [] = Nothing
395findIndex p [] = Nothing
575findIndex p (x :: xs) = if p x then Just 0 else map FS (findIndex p xs)
396findIndex p (x :: xs) = if p x then Just 0 else map FS (findIndex p xs)
576
397
577||| Find the indices of all elements that satisfy some test
398||| Find the indices of all elements that satisfy some test
578−|||
579−||| ```idris example
580−||| findIndices (< 3) [1,2,3,4]
581−||| ```
582findIndices : (elem -> Bool) -> Vect m elem -> List (Fin m)
399findIndices : (elem -> Bool) -> Vect m elem -> List (Fin m)
583findIndices p [] = []
400findIndices p [] = []
584findIndices p (x :: xs) = let is = map FS $ findIndices p xs
401findIndices p (x :: xs) = let is = map FS $ findIndices p xs
585 in if p x then 0 :: is else is
402 in if p x then 0 :: is else is
586
403
587−||| Find the index of the first element of the vector that satisfies some test
588−|||
589−||| ```idris example
590−||| elemIndexBy (==) 3 [1,2,3,4]
591−||| ```
592elemIndexBy : (elem -> elem -> Bool) -> elem -> Vect m elem -> Maybe (Fin m)
404elemIndexBy : (elem -> elem -> Bool) -> elem -> Vect m elem -> Maybe (Fin m)
593elemIndexBy p e = findIndex $ p e
405elemIndexBy p e = findIndex $ p e
594
406
595−||| Find the index of the first element of the vector equal to the given one.
596−|||
597−||| ```idris example
598−||| elemIndex 3 [1,2,3,4]
599−||| ```
600elemIndex : Eq elem => elem -> Vect m elem -> Maybe (Fin m)
407elemIndex : Eq elem => elem -> Vect m elem -> Maybe (Fin m)
601elemIndex = elemIndexBy (==)
408elemIndex = elemIndexBy (==)
602
409
603−||| Find the indices of all elements that satisfy some test
604−|||
605−||| ```idris example
606−||| elemIndicesBy (<=) 3 [1,2,3,4]
607−||| ```
608elemIndicesBy : (elem -> elem -> Bool) -> elem -> Vect m elem -> List (Fin m)
410elemIndicesBy : (elem -> elem -> Bool) -> elem -> Vect m elem -> List (Fin m)
609elemIndicesBy p e = findIndices $ p e
411elemIndicesBy p e = findIndices $ p e
610
412
611−||| Find the indices of all elements uquals to the given one
612−|||
613−||| ```idris example
614−||| elemIndices 3 [1,2,3,4,3]
615−||| ```
616elemIndices : Eq elem => elem -> Vect m elem -> List (Fin m)
413elemIndices : Eq elem => elem -> Vect m elem -> List (Fin m)
617elemIndices = elemIndicesBy (==)
414elemIndices = elemIndicesBy (==)
618
415
@@ -621,10 +418,6 @@ elemIndices = elemIndicesBy (==)
621--------------------------------------------------------------------------------
418--------------------------------------------------------------------------------
622
419
623||| Find all elements of a vector that satisfy some test
420||| Find all elements of a vector that satisfy some test
624−|||
625−||| ```idris example
626−||| filter (< 3) (fromList [1,2,3,4])
627−||| ```
628filter : (elem -> Bool) -> Vect len elem -> (p ** Vect p elem)
421filter : (elem -> Bool) -> Vect len elem -> (p ** Vect p elem)
629filter p [] = ( _ ** [] )
422filter p [] = ( _ ** [] )
630filter p (x::xs) =
423filter p (x::xs) =
@@ -635,10 +428,6 @@ filter p (x::xs) =
635 (_ ** tail)
428 (_ ** tail)
636
429
637||| Make the elements of some vector unique by some test
430||| Make the elements of some vector unique by some test
638−|||
639−||| ```idris example
640−||| nubBy (==) (fromList [1,2,2,3,4,4])
641−||| ```
642nubBy : (elem -> elem -> Bool) -> Vect len elem -> (p ** Vect p elem)
431nubBy : (elem -> elem -> Bool) -> Vect len elem -> (p ** Vect p elem)
643nubBy = nubBy' []
432nubBy = nubBy' []
644 where
433 where
@@ -650,29 +439,15 @@ nubBy = nubBy' []
650 | (_ ** tail) = (_ ** x::tail)
439 | (_ ** tail) = (_ ** x::tail)
651
440
652||| Make the elements of some vector unique by the default Boolean equality
441||| Make the elements of some vector unique by the default Boolean equality
653−|||
654−||| ```idris example
655−||| nub (fromList [1,2,2,3,4,4])
656−||| ```
657nub : Eq elem => Vect len elem -> (p ** Vect p elem)
442nub : Eq elem => Vect len elem -> (p ** Vect p elem)
658nub = nubBy (==)
443nub = nubBy (==)
659
444
660−||| Delete first element from list according to some test
661−|||
662−||| ```idris example
663−||| deleteBy (<) 3 (fromList [1,2,2,3,4,4])
664−||| ```
665deleteBy : (elem -> elem -> Bool) -> elem -> Vect len elem -> (p ** Vect p elem)
445deleteBy : (elem -> elem -> Bool) -> elem -> Vect len elem -> (p ** Vect p elem)
666deleteBy _ _ [] = (_ ** [])
446deleteBy _ _ [] = (_ ** [])
667deleteBy eq x (y::ys) =
447deleteBy eq x (y::ys) =
668 let (len ** zs) = deleteBy eq x ys
448 let (len ** zs) = deleteBy eq x ys
669 in if x `eq` y then (_ ** ys) else (S len ** y ::zs)
449 in if x `eq` y then (_ ** ys) else (S len ** y ::zs)
670
450
671−||| Delete first element from list equal to the given one
672−|||
673−||| ```idris example
674−||| delete 2 (fromList [1,2,2,3,4,4])
675−||| ```
676delete : (Eq elem) => elem -> Vect len elem -> (p ** Vect p elem)
451delete : (Eq elem) => elem -> Vect len elem -> (p ** Vect p elem)
677delete = deleteBy (==)
452delete = deleteBy (==)
678
453
@@ -680,28 +455,14 @@ delete = deleteBy (==)
680-- Splitting and breaking lists
455-- Splitting and breaking lists
681--------------------------------------------------------------------------------
456--------------------------------------------------------------------------------
682
457
683−||| A tuple where the first element is a `Vect` of the `n` first elements and
458+||| A tuple where the first element is a Vect of the n first elements and
684−||| the second element is a `Vect` of the remaining elements of the original.
459+||| the second element is a Vect of the remaining elements of the original Vect
685−||| It is equivalent to `(take n xs, drop n xs)` (`splitAtTakeDrop`),
460+||| It is equivalent to (take n xs, drop n xs)
686−||| but is more efficient.
687−|||
688||| @ n the index to split at
461||| @ n the index to split at
689−||| @ xs the `Vect` to split in two
462+||| @ xs the Vect to split in two
690−|||
691−||| ```idris example
692−||| splitAt 2 (fromList [1,2,3,4])
693−||| ```
694splitAt : (n : Nat) -> (xs : Vect (n + m) elem) -> (Vect n elem, Vect m elem)
463splitAt : (n : Nat) -> (xs : Vect (n + m) elem) -> (Vect n elem, Vect m elem)
695−splitAt Z xs = ([], xs)
464+splitAt n xs = (take n xs, drop n xs)
696−splitAt (S k) (x :: xs) with (splitAt k xs)
697− | (tk, dr) = (x :: tk, dr)
698
465
699−||| A tuple where the first element is a `Vect` of the `n` elements passing given test
700−||| and the second element is a `Vect` of the remaining elements of the original.
701−|||
702−||| ```idris example
703−||| partition (== 2) (fromList [1,2,3,2,4])
704−||| ```
705partition : (elem -> Bool) -> Vect len elem -> ((p ** Vect p elem), (q ** Vect q elem))
466partition : (elem -> Bool) -> Vect len elem -> ((p ** Vect p elem), (q ** Vect q elem))
706partition p [] = ((_ ** []), (_ ** []))
467partition p [] = ((_ ** []), (_ ** []))
707partition p (x::xs) =
468partition p (x::xs) =
@@ -715,37 +476,17 @@ partition p (x::xs) =
715-- Predicates
476-- Predicates
716--------------------------------------------------------------------------------
477--------------------------------------------------------------------------------
717
478
718−||| Verify vector prefix
719−|||
720−||| ```idris example
721−||| isPrefixOfBy (==) (fromList [1,2]) (fromList [1,2,3,4])
722−||| ```
723isPrefixOfBy : (elem -> elem -> Bool) -> Vect m elem -> Vect len elem -> Bool
479isPrefixOfBy : (elem -> elem -> Bool) -> Vect m elem -> Vect len elem -> Bool
724isPrefixOfBy p [] right = True
480isPrefixOfBy p [] right = True
725isPrefixOfBy p left [] = False
481isPrefixOfBy p left [] = False
726isPrefixOfBy p (x::xs) (y::ys) = p x y && isPrefixOfBy p xs ys
482isPrefixOfBy p (x::xs) (y::ys) = p x y && isPrefixOfBy p xs ys
727
483
728−||| Verify vector prefix
729−|||
730−||| ```idris example
731−||| isPrefixOf (fromList [1,2]) (fromList [1,2,3,4])
732−||| ```
733isPrefixOf : Eq elem => Vect m elem -> Vect len elem -> Bool
484isPrefixOf : Eq elem => Vect m elem -> Vect len elem -> Bool
734isPrefixOf = isPrefixOfBy (==)
485isPrefixOf = isPrefixOfBy (==)
735
486
736−||| Verify vector suffix
737−|||
738−||| ```idris example
739−||| isSuffixOfBy (==) (fromList [3,4]) (fromList [1,2,3,4])
740−||| ```
741isSuffixOfBy : (elem -> elem -> Bool) -> Vect m elem -> Vect len elem -> Bool
487isSuffixOfBy : (elem -> elem -> Bool) -> Vect m elem -> Vect len elem -> Bool
742isSuffixOfBy p left right = isPrefixOfBy p (reverse left) (reverse right)
488isSuffixOfBy p left right = isPrefixOfBy p (reverse left) (reverse right)
743
489
744−||| Verify vector suffix
745−|||
746−||| ```idris example
747−||| isSuffixOf (fromList [3,4]) (fromList [1,2,3,4])
748−||| ```
749isSuffixOf : Eq elem => Vect m elem -> Vect len elem -> Bool
490isSuffixOf : Eq elem => Vect m elem -> Vect len elem -> Bool
750isSuffixOf = isSuffixOfBy (==)
491isSuffixOf = isSuffixOfBy (==)
751
492
@@ -753,20 +494,10 @@ isSuffixOf = isSuffixOfBy (==)
753-- Conversions
494-- Conversions
754--------------------------------------------------------------------------------
495--------------------------------------------------------------------------------
755
496
756−||| Convert Maybe type into Vect
757−|||
758−||| ```idris example
759−||| maybeToVect (Just 2)
760−||| ```
761maybeToVect : Maybe elem -> (p ** Vect p elem)
497maybeToVect : Maybe elem -> (p ** Vect p elem)
762maybeToVect Nothing = (_ ** [])
498maybeToVect Nothing = (_ ** [])
763maybeToVect (Just j) = (_ ** [j])
499maybeToVect (Just j) = (_ ** [j])
764
500
765−||| Convert first element of Vect (if exists) into Maybe.
766−|||
767−||| ```idris example
768−||| vectToMaybe [2]
769−||| ```
770vectToMaybe : Vect len elem -> Maybe elem
501vectToMaybe : Vect len elem -> Maybe elem
771vectToMaybe [] = Nothing
502vectToMaybe [] = Nothing
772vectToMaybe (x::xs) = Just x
503vectToMaybe (x::xs) = Just x
@@ -775,11 +506,6 @@ vectToMaybe (x::xs) = Just x
775-- Misc
506-- Misc
776--------------------------------------------------------------------------------
507--------------------------------------------------------------------------------
777
508
778−||| Filter out Nothings from Vect
779−|||
780−||| ```idris example
781−||| catMaybes [Just 1, Just 2, Nothing, Nothing, Just 5]
782−||| ```
783catMaybes : Vect n (Maybe elem) -> (p ** Vect p elem)
509catMaybes : Vect n (Maybe elem) -> (p ** Vect p elem)
784catMaybes [] = (_ ** [])
510catMaybes [] = (_ ** [])
785catMaybes (Nothing::xs) = catMaybes xs
511catMaybes (Nothing::xs) = catMaybes xs
@@ -787,11 +513,6 @@ catMaybes ((Just j)::xs) =
787 let (_ ** tail) = catMaybes xs
513 let (_ ** tail) = catMaybes xs
788 in (_ ** j::tail)
514 in (_ ** j::tail)
789
515
790−||| Get diagonal elements
791−|||
792−||| ```idris example
793−||| diag [[1,2,3], [4,5,6], [7,8,9]]
794−||| ```
795diag : Vect len (Vect len elem) -> Vect len elem
516diag : Vect len (Vect len elem) -> Vect len elem
796diag [] = []
517diag [] = []
797diag ((x::xs)::xss) = x :: diag (map tail xss)
518diag ((x::xs)::xss) = x :: diag (map tail xss)
@@ -800,18 +521,12 @@ range : {len : Nat} -> Vect len (Fin len)
800range {len=Z} = []
521range {len=Z} = []
801range {len=S _} = FZ :: map FS range
522range {len=S _} = FZ :: map FS range
802
523
803−||| Transpose a `Vect` of `Vect`s, turning rows into columns and vice versa.
524+||| Transpose a Vect of Vects, turning rows into columns and vice versa.
804−|||
805−||| This is like zipping all the inner `Vect`s together and is equivalent to `traverse id` (`transposeTraverse`).
806|||
525|||
807||| As the types ensure rectangularity, this is an involution, unlike `Prelude.List.transpose`.
526||| As the types ensure rectangularity, this is an involution, unlike `Prelude.List.transpose`.
808−|||
809−||| ```idris example
810−||| transpose [[1,2], [3,4], [5,6], [7,8]]
811−||| ```
812−transpose : Vect m (Vect n elem) -> Vect n (Vect m elem)
527+transpose : {n : Nat} -> Vect m (Vect n elem) -> Vect n (Vect m elem)
813−transpose [] = replicate _ [] -- = [| [] |]
528+transpose [] = replicate _ []
814−transpose (x :: xs) = zipWith (::) x (transpose xs) -- = [| x :: xs |]
529+transpose (x :: xs) = zipWith (::) x (transpose xs)
815
530
816--------------------------------------------------------------------------------
531--------------------------------------------------------------------------------
817-- Applicative/Monad/Traversable
532-- Applicative/Monad/Traversable
@@ -819,6 +534,7 @@ transpose (x :: xs) = zipWith (::) x (transpose xs) -- = [| x :: xs |]
819
534
820implementation Applicative (Vect k) where
535implementation Applicative (Vect k) where
821 pure = replicate _
536 pure = replicate _
537+
822 fs <*> vs = zipWith apply fs vs
538 fs <*> vs = zipWith apply fs vs
823
539
824||| This monad is different from the List monad, (>>=)
540||| This monad is different from the List monad, (>>=)
@@ -827,8 +543,8 @@ implementation Monad (Vect len) where
827 m >>= f = diag (map f m)
543 m >>= f = diag (map f m)
828
544
829implementation Traversable (Vect n) where
545implementation Traversable (Vect n) where
830− traverse f [] = [| [] |]
546+ traverse f [] = pure Vect.Nil
831− traverse f (x :: xs) = [| f x :: traverse f xs |]
547+ traverse f (x::xs) = [| Vect.(::) (f x) (traverse f xs) |]
832
548
833--------------------------------------------------------------------------------
549--------------------------------------------------------------------------------
834-- Show
550-- Show
@@ -837,29 +553,13 @@ implementation Traversable (Vect n) where
837implementation Show elem => Show (Vect len elem) where
553implementation Show elem => Show (Vect len elem) where
838 show = show . toList
554 show = show . toList
839
555
840−--------------------------------------------------------------------------------
841−-- Uninhabited
842−--------------------------------------------------------------------------------
843−
844−Uninhabited a => Uninhabited (Vect (S n) a) where
845− uninhabited (x :: _) = uninhabited x
846−
847--------------------------------------------------------------------------------
556--------------------------------------------------------------------------------
848-- Properties
557-- Properties
849--------------------------------------------------------------------------------
558--------------------------------------------------------------------------------
850
559
851−vectMustBeNil : (xs : Vect Z a) -> xs = []
852−vectMustBeNil [] = Refl
853−
854vectConsCong : (x : elem) -> (xs : Vect len elem) -> (ys : Vect m elem) -> (xs = ys) -> (x :: xs = x :: ys)
560vectConsCong : (x : elem) -> (xs : Vect len elem) -> (ys : Vect m elem) -> (xs = ys) -> (x :: xs = x :: ys)
855vectConsCong x xs xs Refl = Refl
561vectConsCong x xs xs Refl = Refl
856
562
857−vectInjective1 : {xs : Vect n a} -> {ys : Vect m b} -> x :: xs ~=~ y :: ys -> x ~=~ y
858−vectInjective1 Refl = Refl
859−
860−vectInjective2 : {xs : Vect n a} -> {ys : Vect m b} -> x :: xs ~=~ y :: ys -> xs ~=~ ys
861−vectInjective2 Refl = Refl
862−
863vectNilRightNeutral : (xs : Vect n a) -> xs ++ [] = xs
563vectNilRightNeutral : (xs : Vect n a) -> xs ++ [] = xs
864vectNilRightNeutral [] = Refl
564vectNilRightNeutral [] = Refl
865vectNilRightNeutral (x :: xs) =
565vectNilRightNeutral (x :: xs) =
@@ -873,93 +573,16 @@ vectAppendAssociative [] y z = Refl
873vectAppendAssociative (x :: xs) ys zs =
573vectAppendAssociative (x :: xs) ys zs =
874 vectConsCong _ _ _ (vectAppendAssociative xs ys zs)
574 vectConsCong _ _ _ (vectAppendAssociative xs ys zs)
875
575
876−||| Adding a prefix and then taking the prefix gets the prefix. Or,
877−||| adding a suffix and then dropping the suffix does nothing.
878−takePrefix : (ns : Vect n a) -> (ms : Vect m a) -> take n (ns ++ ms) = ns
879−takePrefix [] _ = Refl
880−takePrefix (n :: ns) ms = cong $ takePrefix ns ms
881−
882−||| Adding a prefix and then dropping the prefix does nothing. Or,
883−||| adding a suffix and then taking the suffix gets the suffix.
884−dropPrefix : (ns : Vect n a) -> (ms : Vect m a) -> drop n (ns ++ ms) = ms
885−dropPrefix [] ms = Refl
886−dropPrefix (_ :: ns) ms = dropPrefix ns ms
887−
888−||| `take n . take (n + m) = take n`
889−takeTake : (n : Nat) -> (m : Nat) ->
890− (xs : Vect ((n + m) + l) a) -> (ys : Vect (n + (m + l)) a) ->
891− xs ~=~ ys ->
892− take n (take (n + m) xs) = take n ys
893−takeTake Z m _ _ _ = Refl
894−takeTake (S n) m (x :: xs) (y :: ys) prf = rewrite vectInjective1 prf in cong (takeTake n m xs ys (vectInjective2 prf))
895−
896−||| `drop (n + m) = drop m . drop n`
897−dropDrop : (n : Nat) -> (m : Nat) ->
898− (xs : Vect ((n + m) + l) a) -> (ys : Vect (n + (m + l)) a) ->
899− xs ~=~ ys ->
900− drop (n + m) xs = drop m (drop n ys)
901−dropDrop Z m xs xs Refl = Refl
902−dropDrop (S n) m (_ :: xs) (_ :: ys) prf = dropDrop n m xs ys (vectInjective2 prf)
903−
904−||| A `Vect` may be restored from its components.
905−takeDropConcat : (n : Nat) -> (xs : Vect (n + m) a) -> take n xs ++ drop n xs = xs
906−takeDropConcat Z xs = Refl
907−takeDropConcat (S n) (x :: xs) = cong $ takeDropConcat n xs
908−
909−||| `drop n . take (n + m) = take m . drop n`.
910−|||
911−||| Or: there are two ways to extract a subsequence.
912−dropTakeTakeDrop : (n : Nat) -> (m : Nat) ->
913− (xs : Vect ((n + m) + l) a) -> (ys : Vect (n + (m + l)) a) ->
914− xs ~=~ ys ->
915− drop n (take (n + m) xs) = take m (drop n ys)
916−dropTakeTakeDrop Z m xs xs Refl = Refl
917−dropTakeTakeDrop (S n) m (_ :: xs) (_ :: ys) prf = dropTakeTakeDrop n m xs ys (vectInjective2 prf)
918−
919−splitAtTakeDrop : (n : Nat) -> (xs : Vect (n + m) a) -> splitAt n xs = (take n xs, drop n xs)
920−splitAtTakeDrop Z xs = Refl
921−splitAtTakeDrop (S k) (x :: xs) with (splitAt k xs) proof p
922− | (tk, dr) = let prf = trans p (splitAtTakeDrop k xs)
923− in aux (cong {f=(x ::) . fst} prf) (cong {f=snd} prf)
924− where aux : {a, b : Type} -> {w, x : a} -> {y, z : b} -> w = x -> y = z -> (w, y) = (x, z)
925− aux Refl Refl = Refl
926−
927−zipWithIsLiftA2 : (f : a -> b -> c) -> (as : Vect n a) -> (bs : Vect n b) -> zipWith f as bs = [| f as bs |]
928−zipWithIsLiftA2 _ [] [] = Refl
929−zipWithIsLiftA2 f (a :: as) (b :: bs) = rewrite zipWithIsLiftA2 f as bs in Refl
930−zipWithIsLiftA3 : (f : a -> b -> c -> d) -> (as : Vect n a) -> (bs : Vect n b) -> (cs : Vect n c) -> zipWith3 f as bs cs = [| f as bs cs |]
931−zipWithIsLiftA3 _ [] [] [] = Refl
932−zipWithIsLiftA3 f (a :: as) (b :: bs) (c :: cs) = rewrite zipWithIsLiftA3 f as bs cs in Refl
933−
934−-- Note relationship to Applicative (Morphism (Fin n))
935−indexReplicate : (x : a) -> (n : Nat) -> (i : Fin n) -> index i (replicate n x) = x
936−indexReplicate x (S n) FZ = Refl
937−indexReplicate x (S n) (FS i) = indexReplicate x n i
938−indexZipWith : (f : a -> b -> c) -> (as : Vect n a) -> (bs : Vect n b) -> (i : Fin n) -> index i (zipWith f as bs) = f (index i as) (index i bs)
939−indexZipWith f (a :: _) (b :: _) FZ = Refl
940−indexZipWith f (_ :: as) (_ :: bs) (FS i) = indexZipWith f as bs i
941−indexTranspose : (x : Fin o) -> (y : Fin i) -> (xss : Vect o (Vect i a)) -> index y (index x xss) = index x (index y (transpose xss))
942−indexTranspose x y (xs :: xss) = rewrite prf in
943− rewrite sym $ indexZipWith Vect.(::) xs (transpose xss) y in Refl
944− where prf : index y (index x (xs :: xss)) = index x (index y xs :: index y (transpose xss))
945− prf = case x of
946− FZ => Refl
947− FS k => indexTranspose k y xss
948−
949−transposeTraverse : (xss : Vect o (Vect i a)) -> transpose xss = traverse Basics.id xss
950−transposeTraverse [] = Refl
951−transposeTraverse (xs :: xss) = rewrite zipWithIsLiftA2 Vect.(::) xs (transpose xss) in cong (transposeTraverse xss)
952−
953−traverseIdCons : (xs : Vect o a) -> (xss : Vect o (Vect i a)) -> traverse Basics.id [| xs :: xss |] = xs :: traverse Basics.id xss
954−traverseIdCons [] [] = Refl
955−traverseIdCons (x :: xs) (ys :: xss) = rewrite traverseIdCons xs xss in Refl
956−transposeCons : (xs : Vect o a) -> (xss : Vect o (Vect i a)) -> transpose (zipWith (::) xs xss) = xs :: transpose xss
957−transposeCons xs xss = rewrite zipWithIsLiftA2 Vect.(::) xs xss in rewrite transposeTraverse (pure (::) <*> xs <*> xss) in rewrite transposeTraverse xss in traverseIdCons xs xss
958−
959--------------------------------------------------------------------------------
576--------------------------------------------------------------------------------
960-- DecEq
577-- DecEq
961--------------------------------------------------------------------------------
578--------------------------------------------------------------------------------
962
579
580+vectInjective1 : {xs, ys : Vect n a} -> {x, y : a} -> x :: xs = y :: ys -> x = y
581+vectInjective1 {x=x} {y=x} {xs=xs} {ys=xs} Refl = Refl
582+
583+vectInjective2 : {xs, ys : Vect n a} -> {x, y : a} -> x :: xs = y :: ys -> xs = ys
584+vectInjective2 {x=x} {y=x} {xs=xs} {ys=xs} Refl = Refl
585+
963implementation DecEq a => DecEq (Vect n a) where
586implementation DecEq a => DecEq (Vect n a) where
964 decEq [] [] = Yes Refl
587 decEq [] [] = Yes Refl
965 decEq (x :: xs) (y :: ys) with (decEq x y)
588 decEq (x :: xs) (y :: ys) with (decEq x y)
libs/base/System.idr−13
@@ -93,19 +93,6 @@ time : IO Integer
93time = do MkRaw t <- foreign FFI_C "idris_time" (IO (Raw Integer))
93time = do MkRaw t <- foreign FFI_C "idris_time" (IO (Raw Integer))
94 pure t
94 pure t
95
95
96−||| Wall clock time
97−record Clock where
98− constructor MkClock
99− seconds : Integer
100− nanoseconds : Integer
101−
102−||| Get the system's wall clock time.
103−clockTime : IO Clock
104−clockTime
105− = do vm <- getMyVM
106− MkRaw c <- foreign FFI_C "idris_clock" (Ptr -> IO (Raw Clock)) vm
107− pure c
108−
109||| Specify interval to sleep for in microseconds, must be nonnegative
96||| Specify interval to sleep for in microseconds, must be nonnegative
110usleep : (i : Int) -> { auto prf : So (i >= 0) } -> IO ()
97usleep : (i : Int) -> { auto prf : So (i >= 0) } -> IO ()
111usleep i = foreign FFI_C "idris_usleep" (Int -> IO ()) i
98usleep i = foreign FFI_C "idris_usleep" (Int -> IO ()) i
libs/base/System/Concurrency/Raw.idr+10−9
@@ -8,7 +8,7 @@ import System
8
8
9||| Send a message of any type to the thread with the given thread id
9||| Send a message of any type to the thread with the given thread id
10||| Returns channel ID if the message was sent successfully, 0 otherwise
10||| Returns channel ID if the message was sent successfully, 0 otherwise
11−|||
11+|||
12||| @channel an ID of a specific channel to send the message on. If 0,
12||| @channel an ID of a specific channel to send the message on. If 0,
13||| the receiver will create a new channel ID
13||| the receiver will create a new channel ID
14sendToThread : (thread_id : Ptr) -> (channel : Int) -> a -> IO Int
14sendToThread : (thread_id : Ptr) -> (channel : Int) -> a -> IO Int
@@ -29,7 +29,7 @@ checkMsgs = do me <- getMyVM
29checkMsgsTimeout : Int -> IO Bool
29checkMsgsTimeout : Int -> IO Bool
30checkMsgsTimeout timeout
30checkMsgsTimeout timeout
31 = do me <- getMyVM
31 = do me <- getMyVM
32− msgs <- foreign FFI_C "idris_checkMessagesTimeout"
32+ msgs <- foreign FFI_C "idris_checkMessagesTimeout"
33 (Ptr -> Int -> IO Ptr) me timeout
33 (Ptr -> Int -> IO Ptr) me timeout
34 null <- nullPtr msgs
34 null <- nullPtr msgs
35 pure (not null)
35 pure (not null)
@@ -43,7 +43,7 @@ channel_id : Ptr -> IO Int
43channel_id msg = foreign FFI_C "idris_getChannel" (Ptr -> IO Int) msg
43channel_id msg = foreign FFI_C "idris_getChannel" (Ptr -> IO Int) msg
44
44
45||| Check for messages initiating a conversation in the process inbox.
45||| Check for messages initiating a conversation in the process inbox.
46−||| Returns either 'Nothing', if none, or 'Just (pid, channel)' as pid
46+||| Returns either 'Nothing', if none, or 'Just (pid, channel)' as pid
47||| of sender and new channel id.
47||| of sender and new channel id.
48listenMsgs : IO (Maybe (Ptr, Int))
48listenMsgs : IO (Maybe (Ptr, Int))
49listenMsgs = do me <- getMyVM
49listenMsgs = do me <- getMyVM
@@ -58,7 +58,7 @@ listenMsgs = do me <- getMyVM
58||| Check for messages from a specific sender/channel in the process inbox
58||| Check for messages from a specific sender/channel in the process inbox
59||| If channel is '0', accept on any channel.
59||| If channel is '0', accept on any channel.
60checkMsgsFrom : Ptr -> (channel : Int) -> IO Bool
60checkMsgsFrom : Ptr -> (channel : Int) -> IO Bool
61−checkMsgsFrom sender channel
61+checkMsgsFrom sender channel
62 = do me <- getMyVM
62 = do me <- getMyVM
63 msgs <- foreign FFI_C "idris_checkMessagesFrom" (Ptr -> Int -> Ptr -> IO Ptr)
63 msgs <- foreign FFI_C "idris_checkMessagesFrom" (Ptr -> Int -> Ptr -> IO Ptr)
64 me channel sender
64 me channel sender
@@ -73,7 +73,6 @@ getMsg : IO a
73getMsg {a} = do me <- getMyVM
73getMsg {a} = do me <- getMyVM
74 m <- foreign FFI_C "idris_recvMessage" (Ptr -> IO Ptr) me
74 m <- foreign FFI_C "idris_recvMessage" (Ptr -> IO Ptr) me
75 MkRaw x <- foreign FFI_C "idris_getMsg" (Ptr -> IO (Raw a)) m
75 MkRaw x <- foreign FFI_C "idris_getMsg" (Ptr -> IO (Raw a)) m
76− foreign FFI_C "idris_freeMsg" (Ptr -> IO ()) m
77 pure x
76 pure x
78
77
79||| Check inbox for messages. If there are none, blocks until a message
78||| Check inbox for messages. If there are none, blocks until a message
@@ -81,9 +80,9 @@ getMsg {a} = do me <- getMyVM
81||| Note that this is not at all type safe! It is intended to be used in
80||| Note that this is not at all type safe! It is intended to be used in
82||| a type safe wrapper.
81||| a type safe wrapper.
83getMsgWithSender : IO (Ptr, Int, a)
82getMsgWithSender : IO (Ptr, Int, a)
84−getMsgWithSender {a}
83+getMsgWithSender {a}
85 = do me <- getMyVM
84 = do me <- getMyVM
86− m <- foreign FFI_C "idris_recvMessage"
85+ m <- foreign FFI_C "idris_recvMessage"
87 (Ptr -> IO Ptr) me
86 (Ptr -> IO Ptr) me
88 MkRaw x <- foreign FFI_C "idris_getMsg" (Ptr -> IO (Raw a)) m
87 MkRaw x <- foreign FFI_C "idris_getMsg" (Ptr -> IO (Raw a)) m
89 vm <- sender m
88 vm <- sender m
@@ -95,12 +94,12 @@ getMsgWithSender {a}
95||| blocks until a message arrives. Returns `Nothing` if the sender isn't
94||| blocks until a message arrives. Returns `Nothing` if the sender isn't
96||| alive
95||| alive
97getMsgFrom : Ptr -> (channel : Int) -> IO (Maybe a)
96getMsgFrom : Ptr -> (channel : Int) -> IO (Maybe a)
98−getMsgFrom {a} sender channel
97+getMsgFrom {a} sender channel
99 = do me <- getMyVM
98 = do me <- getMyVM
100 m <- foreign FFI_C "idris_recvMessageFrom"
99 m <- foreign FFI_C "idris_recvMessageFrom"
101 (Ptr -> Int -> Ptr -> IO Ptr) me channel sender
100 (Ptr -> Int -> Ptr -> IO Ptr) me channel sender
102 null <- nullPtr m
101 null <- nullPtr m
103− if null
102+ if null
104 then pure Nothing
103 then pure Nothing
105 else do
104 else do
106 MkRaw x <- foreign FFI_C "idris_getMsg" (Ptr -> IO (Raw a)) m
105 MkRaw x <- foreign FFI_C "idris_getMsg" (Ptr -> IO (Raw a)) m
@@ -111,3 +110,5 @@ stopThread : IO a
111stopThread = do vm <- getMyVM
110stopThread = do vm <- getMyVM
112 MkRaw res <- foreign FFI_C "idris_stopThread" (Ptr -> IO (Raw a)) vm
111 MkRaw res <- foreign FFI_C "idris_stopThread" (Ptr -> IO (Raw a)) vm
113 pure res
112 pure res
113+
114+
libs/contrib/Control/Algebra.idr−14
@@ -126,20 +126,6 @@ pow' : RingWithUnity a => a -> Nat -> a
126pow' _ Z = unity
126pow' _ Z = unity
127pow' x (S n) = x <.> pow' x n
127pow' x (S n) = x <.> pow' x n
128
128
129−-- TODO: This can be more efficient:
130−-- stimes 5 x = x <+> (x <+> (x <+> (x <+> x)))
131−-- = x <+> ((x <+> x) <+> (x <+> x))
132−-- = let y = x <+> x in x <+> (y <+> y)
133−-- 4 <+>s into 3 <+>
134−||| Combine `n` copies of a value with `<+>`
135−stimes : Semigroup a => (n : Nat) -> {auto prf : IsSucc n} -> a -> a
136−stimes (S Z) x = x
137−stimes (S (S k)) x = x <+> stimes (S k) x
138−
139−||| Like `stimes`, but accepting `Z` as argument.
140−mtimes : Monoid a => (n : Nat) -> a -> a
141−mtimes Z x = neutral
142−mtimes (S k) x = stimes (S k) x
143
129
144-- XXX todo:
130-- XXX todo:
145-- Structures where "abs" make sense.
131-- Structures where "abs" make sense.
libs/contrib/Control/Algebra/Lattice.idr−16
@@ -25,9 +25,6 @@ implementation JoinSemilattice Nat where
25implementation Ord a => JoinSemilattice (MaxiphobicHeap a) where
25implementation Ord a => JoinSemilattice (MaxiphobicHeap a) where
26 join = merge
26 join = merge
27
27
28−JoinSemilattice Bool where
29− join a b = a || b
30−
31||| Sets equipped with a binary operation that is commutative, associative and
28||| Sets equipped with a binary operation that is commutative, associative and
32||| idempotent. Must satisfy the following laws:
29||| idempotent. Must satisfy the following laws:
33|||
30|||
@@ -45,9 +42,6 @@ interface MeetSemilattice a where
45implementation MeetSemilattice Nat where
42implementation MeetSemilattice Nat where
46 meet = minimum
43 meet = minimum
47
44
48−MeetSemilattice Bool where
49− meet a b = a && b
50−
51||| Sets equipped with a binary operation that is commutative, associative and
45||| Sets equipped with a binary operation that is commutative, associative and
52||| idempotent and supplied with a unitary element. Must satisfy the following
46||| idempotent and supplied with a unitary element. Must satisfy the following
53||| laws:
47||| laws:
@@ -69,9 +63,6 @@ interface JoinSemilattice a => BoundedJoinSemilattice a where
69implementation BoundedJoinSemilattice Nat where
63implementation BoundedJoinSemilattice Nat where
70 bottom = Z
64 bottom = Z
71
65
72−BoundedJoinSemilattice Bool where
73− bottom = False
74−
75||| Sets equipped with a binary operation that is commutative, associative and
66||| Sets equipped with a binary operation that is commutative, associative and
76||| idempotent and supplied with a unitary element. Must satisfy the following
67||| idempotent and supplied with a unitary element. Must satisfy the following
77||| laws:
68||| laws:
@@ -90,9 +81,6 @@ BoundedJoinSemilattice Bool where
90interface MeetSemilattice a => BoundedMeetSemilattice a where
81interface MeetSemilattice a => BoundedMeetSemilattice a where
91 top : a
82 top : a
92
83
93−BoundedMeetSemilattice Bool where
94− top = True
95−
96||| Sets equipped with two binary operations that are both commutative,
84||| Sets equipped with two binary operations that are both commutative,
97||| associative and idempotent, along with absorbtion laws for relating the two
85||| associative and idempotent, along with absorbtion laws for relating the two
98||| binary operations. Must satisfy the following:
86||| binary operations. Must satisfy the following:
@@ -113,8 +101,6 @@ interface (JoinSemilattice a, MeetSemilattice a) => Lattice a where { }
113
101
114implementation Lattice Nat where { }
102implementation Lattice Nat where { }
115
103
116−Lattice Bool where { }
117−
118||| Sets equipped with two binary operations that are both commutative,
104||| Sets equipped with two binary operations that are both commutative,
119||| associative and idempotent and supplied with neutral elements, along with
105||| associative and idempotent and supplied with neutral elements, along with
120||| absorbtion laws for relating the two binary operations. Must satisfy the
106||| absorbtion laws for relating the two binary operations. Must satisfy the
@@ -136,5 +122,3 @@ Lattice Bool where { }
136||| forall a, meet a top == top
122||| forall a, meet a top == top
137||| forall a, join a bottom == bottom
123||| forall a, join a bottom == bottom
138interface (BoundedJoinSemilattice a, BoundedMeetSemilattice a) => BoundedLattice a where { }
124interface (BoundedJoinSemilattice a, BoundedMeetSemilattice a) => BoundedLattice a where { }
139−
140−BoundedLattice Bool where { }
libs/contrib/Control/Algebra/Laws.idrdeleted−153
@@ -1,153 +0,0 @@
1−module Control.Algebra.Laws
2−
3−import Prelude.Algebra as A
4−import Control.Algebra
5−import Interfaces.Verified
6−
7−%access export
8−
9−||| -(-x) = x in any verified group.
10−inverseSquaredIsIdentity : VerifiedGroup t => (x : t) ->
11− inverse (inverse x) = x
12−inverseSquaredIsIdentity x =
13− let
14− ix = inverse x
15− iix = inverse ix
16− in
17− rewrite sym $ monoidNeutralIsNeutralR iix in
18− rewrite sym $ groupInverseIsInverseL x in
19− rewrite sym $ semigroupOpIsAssociative x ix iix in
20− rewrite groupInverseIsInverseL ix in
21− monoidNeutralIsNeutralL x
22−
23−||| -0 = 0 in any verified group.
24−inverseNeutralIsNeutral : VerifiedGroup t =>
25− inverse (the t A.neutral) = A.neutral
26−inverseNeutralIsNeutral {t} =
27− let e = the t neutral in
28− rewrite sym $ cong {f = inverse} (groupInverseIsInverseL e) in
29− rewrite monoidNeutralIsNeutralR $ inverse e in
30− inverseSquaredIsIdentity e
31−
32−||| -(x + y) = -y + -x in any verified group.
33−inverseOfSum : VerifiedGroup t => (l, r : t) ->
34− inverse (l <+> r) = inverse r <+> inverse l
35−inverseOfSum {t} l r =
36− let
37− e = the t neutral
38− il = inverse l
39− ir = inverse r
40− sum = l <+> r
41− ilr = inverse sum
42− iril = ir <+> il
43− ile = il <+> e
44− in
45− -- expand
46− rewrite sym $ monoidNeutralIsNeutralR ilr in
47− rewrite sym $ groupInverseIsInverseR r in
48− rewrite sym $ monoidNeutralIsNeutralL ir in
49− rewrite sym $ groupInverseIsInverseR l in
50− -- shuffle
51− rewrite semigroupOpIsAssociative ir il l in
52− rewrite sym $ semigroupOpIsAssociative iril l r in
53− rewrite sym $ semigroupOpIsAssociative iril sum ilr in
54− -- contract
55− rewrite sym $ monoidNeutralIsNeutralL il in
56− rewrite groupInverseIsInverseL sum in
57− rewrite sym $ semigroupOpIsAssociative (ir <+> ile) l ile in
58− rewrite semigroupOpIsAssociative l il e in
59− rewrite groupInverseIsInverseL l in
60− rewrite monoidNeutralIsNeutralL e in
61− Refl
62−
63−||| -(x + y) = -x + -y in any verified abelian group.
64−inverseDistributesOverGroupOp : VerifiedAbelianGroup t => (l, r : t) ->
65− inverse (l <+> r) = inverse l <+> inverse r
66−inverseDistributesOverGroupOp l r =
67− rewrite abelianGroupOpIsCommutative (inverse l) (inverse r) in
68− inverseOfSum l r
69−
70−||| Anything multiplied by zero yields zero back in a verified ring.
71−multNeutralAbsorbingL : VerifiedRing t => (r : t) ->
72− A.neutral <.> r = A.neutral
73−multNeutralAbsorbingL {t} r =
74− let
75− e = the t neutral
76− ir = inverse r
77− exr = e <.> r
78− iexr = inverse exr
79− in
80− rewrite sym $ monoidNeutralIsNeutralR exr in
81− rewrite sym $ groupInverseIsInverseR exr in
82− rewrite sym $ semigroupOpIsAssociative iexr exr ((iexr <+> exr) <.> r) in
83− rewrite groupInverseIsInverseR exr in
84− rewrite sym $ ringOpIsDistributiveR e e r in
85− rewrite monoidNeutralIsNeutralR e in
86− groupInverseIsInverseR exr
87−
88−||| Anything multiplied by zero yields zero back in a verified ring.
89−multNeutralAbsorbingR : VerifiedRing t => (l : t) ->
90− l <.> A.neutral = A.neutral
91−multNeutralAbsorbingR {t} l =
92− let
93− e = the t neutral
94− il = inverse l
95− lxe = l <.> e
96− ilxe = inverse lxe
97− in
98− rewrite sym $ monoidNeutralIsNeutralL lxe in
99− rewrite sym $ groupInverseIsInverseL lxe in
100− rewrite semigroupOpIsAssociative (l <.> (lxe <+> ilxe)) lxe ilxe in
101− rewrite groupInverseIsInverseL lxe in
102− rewrite sym $ ringOpIsDistributiveL l e e in
103− rewrite monoidNeutralIsNeutralL e in
104− groupInverseIsInverseL lxe
105−
106−||| Inverse operator can be extracted before multiplication.
107−||| (-x)y = -(xy)
108−multInverseInversesL : VerifiedRing t => (l, r : t) ->
109− inverse l <.> r = inverse (l <.> r)
110−multInverseInversesL l r =
111− let
112− il = inverse l
113− lxr = l <.> r
114− ilxr = il <.> r
115− i_lxr = inverse lxr
116− in
117− rewrite sym $ monoidNeutralIsNeutralR ilxr in
118− rewrite sym $ groupInverseIsInverseR lxr in
119− rewrite sym $ semigroupOpIsAssociative i_lxr lxr ilxr in
120− rewrite sym $ ringOpIsDistributiveR l il r in
121− rewrite groupInverseIsInverseL l in
122− rewrite multNeutralAbsorbingL r in
123− monoidNeutralIsNeutralL i_lxr
124−
125−||| Inverse operator can be extracted before multiplication.
126−||| x(-y) = -(xy)
127−multInverseInversesR : VerifiedRing t => (l, r : t) ->
128− l <.> inverse r = inverse (l <.> r)
129−multInverseInversesR l r =
130− let
131− ir = inverse r
132− lxr = l <.> r
133− lxir = l <.> ir
134− ilxr = inverse lxr
135− in
136− rewrite sym $ monoidNeutralIsNeutralL lxir in
137− rewrite sym $ groupInverseIsInverseL lxr in
138− rewrite semigroupOpIsAssociative lxir lxr ilxr in
139− rewrite sym $ ringOpIsDistributiveL l ir r in
140− rewrite groupInverseIsInverseR r in
141− rewrite multNeutralAbsorbingR l in
142− monoidNeutralIsNeutralR ilxr
143−
144−||| Multiplication of inverses is the same as multiplication of
145−||| original elements.
146−||| (-x)(-y) = xy
147−multNegativeByNegativeIsPositive : VerifiedRing t => (l, r : t) ->
148− inverse l <.> inverse r = l <.> r
149−multNegativeByNegativeIsPositive l r =
150− rewrite multInverseInversesR (inverse l) r in
151− rewrite sym $ multInverseInversesL (inverse l) r in
152− rewrite inverseSquaredIsIdentity l in
153− Refl
libs/contrib/Control/Isomorphism/Extra.idrdeleted−42
@@ -1,42 +0,0 @@
1−module Control.Isomorphism.Extra
2−
3−import Control.Isomorphism
4−import Interfaces.Verified
5−
6−%default total
7−%access public export
8−
9−||| Form an `Iso` that is the identity for almost all inputs, except it will swap either of the arguments for the other.
10−||| It is the same function in both directions.
11−|||
12−||| @ l the value that will be turned into `r`
13−||| @ r the value that will be turned into `l`
14−swapped : DecEq a => (l : a) -> (r : a) -> Iso a a
15−swapped {a} l r = MkIso swap swap prf prf
16− where swap : a -> a
17− swap x = case decEq l x of { Yes _ => r; No _ => case decEq r x of { Yes _ => l; No _ => x } }
18− prf : (x : a) -> swap (swap x) = x
19− prf x with (decEq l x)
20− | (Yes lex) with (decEq r x)
21− | (Yes rex) with (decEq l r)
22− | (Yes ler) = rex
23− | (No lnr) = absurd $ lnr $ trans lex $ sym rex
24− | (No rnx) with (decEq l r)
25− | (Yes ler) = absurd $ rnx $ trans (sym ler) lex
26− | (No lnr) with (decEq r r)
27− | (Yes Refl) = lex
28− | (No rnr) = absurd $ rnr Refl
29− | (No lnx) with (decEq r x)
30− | (Yes rex) with (decEq l l)
31− | (Yes Refl) = rex
32− | (No lnl) = absurd $ lnl Refl
33− | (No rnx) with (decEq l x)
34− | (Yes lex) = absurd $ lnx lex
35− | (No lnx') with (decEq r x)
36− | (Yes rex) = absurd $ rnx rex
37− | (No rnx') = Refl
38−
39−mapIso : VerifiedFunctor f => Iso a b -> Iso (f a) (f b)
40−mapIso {f} (MkIso to from toFrom fromTo) = MkIso (map to) (map from) (prf to from toFrom) (prf from to fromTo)
41− where prf : {a : Type} -> {b : Type} -> (to : a -> b) -> (from : b -> a) -> (toFrom : (x : b) -> to (from x) = x) -> (x : f b) -> map to (map from x) = x
42− prf to' from' toFrom' x = rewrite sym $ functorComposition x from' to' in functorIdentity (to' . from') toFrom' x
libs/contrib/Control/Isomorphism/Fin.idrdeleted−54
@@ -1,54 +0,0 @@
1−module Control.Isomorphism.Fin
2−
3−import Control.Isomorphism
4−import Data.Fin
5−
6−%default total
7−%access public export
8−
9−strengthenLeft : (i : Fin (S n)) -> (prf : strengthen i = Left x) -> i = Fin.last
10−strengthenLeft {n = Z} FZ Refl = Refl
11−strengthenLeft {n = S _} FZ Refl impossible
12−strengthenLeft {n = S k} (FS x) prf with (strengthen x) proof p
13− | (Left l) = rewrite strengthenLeft x (sym p) in Refl
14− | (Right r) = absurd $ leftNotRight $ sym prf
15−strengthenRight : (i : Fin (S n)) -> (prf : strengthen i = Right x) -> weaken x = i
16−strengthenRight {n = Z} FZ Refl impossible
17−strengthenRight {n = S _} FZ Refl = Refl
18−strengthenRight {n = S k} (FS x) prf with (strengthen x) proof p
19− | (Left l) = absurd $ leftNotRight prf
20− | (Right r) = rewrite rightInjective $ sym prf in rewrite strengthenRight x $ sym p in Refl
21−strengthenLast : (n : Nat) -> strengthen (last {n=n}) = Left last
22−strengthenLast Z = Refl
23−strengthenLast (S k) with (strengthen (last {n=k})) proof p
24− | (Left l) = cong {f = Left . FS} $ leftInjective $ trans p $ strengthenLast k
25− | (Right _) with (trans p (strengthenLast k))
26− | Refl impossible
27−strengthenWeaken : (n : Fin k) -> strengthen (weaken n) = Right n
28−strengthenWeaken FZ = Refl
29−strengthenWeaken (FS n) with (strengthen (weaken n)) proof p
30− | (Left _) with (trans p (strengthenWeaken n))
31− | Refl impossible
32− | (Right r) = cong {f = Right . FS} $ rightInjective $ trans p $ strengthenWeaken n
33−
34−||| Sends `FZ` to `last`, and `FS x` to `x`.
35−rotatedDown : Iso (Fin n) (Fin n)
36−rotatedDown = MkIso to from toFrom fromTo
37− where to : Fin k -> Fin k
38− to FZ = last
39− to (FS x) = weaken x
40− from : Fin k -> Fin k
41− from {k = Z} _ impossible
42− from {k = S k} j = either (const FZ) FS $ strengthen j
43− toFrom : (j : Fin k) -> to (from j) = j
44− toFrom {k = S Z} FZ = Refl
45− toFrom {k = S (S k)} FZ = Refl
46− toFrom {k = S (S k)} (FS i) with (strengthen i) proof p
47− toFrom {k = S (S k)} (FS i) | (Left l) = rewrite strengthenLeft i (sym p) in Refl
48− toFrom {k = S (S k)} (FS i) | (Right r) = rewrite strengthenRight i (sym p) in Refl
49− fromTo : (j : Fin k) -> from (to j) = j
50− fromTo {k = S k} FZ = rewrite strengthenLast k in Refl
51− fromTo (FS x) = rewrite strengthenWeaken x in Refl
52−||| Sends `last` to `FZ` and every other `x` to `FS x`.
53−rotatedUp : Iso (Fin n) (Fin n)
54−rotatedUp = isoSym rotatedDown
libs/contrib/Control/Isomorphism/Vect.idrdeleted−155
@@ -1,155 +0,0 @@
1−module Control.Isomorphism.Vect
2−
3−import Control.Isomorphism
4−import Data.Vect
5−import Interfaces.Verified
6−
7−%default total
8−%access public export
9−
10−||| `Vect Z a` has only one value: `[]`.
11−nilUnit : Iso (Vect Z a) ()
12−nilUnit = MkIso (const ()) (const []) (\() => Refl) (\[] => Refl)
13−
14−||| A `Vect (S Z) a` is just an `a`.
15−oneIdentity : Iso (Vect (S Z) a) a
16−oneIdentity = MkIso to (\x => [x]) (\x => Refl) (\[x] => Refl)
17− where to : Vect 1 a -> a
18− to [x] = x
19−
20−||| Moves between `x :: xs` and `(x, xs)`.
21−consPair : Iso (Vect (S n) a) (a, Vect n a)
22−consPair = MkIso to (uncurry (::)) (\(x, xs) => Refl) (\(x :: xs) => Refl)
23− where to : Vect (S n) a -> (a, Vect n a)
24− to (x :: xs) = (x, xs)
25−
26−||| An `Iso` based on `splitAt` and `(++)`.
27−splitPair : Iso (Vect (n + m) a) (Vect n a, Vect m a)
28−splitPair {n} {m} = MkIso (splitAt n) (uncurry (++)) toFrom fromTo
29− where pairify : q = w -> e = r -> (q, e) = (w, r)
30− pairify Refl Refl = Refl
31− toFrom (ns, ms) = trans (splitAtTakeDrop n (ns ++ ms)) $ pairify (takePrefix ns ms) (dropPrefix ns ms)
32− fromTo xs = rewrite splitAtTakeDrop {m} n xs in takeDropConcat n xs
33−
34−||| An `Iso` based on `zip` and `unzip`.
35−zipped : Iso (Vect n a, Vect n b) (Vect n (a, b))
36−zipped = MkIso (uncurry zip) unzip toFrom (\(as, bs) => fromTo as bs)
37− where toFrom : {n : Nat} -> (xs : Vect n (a, b)) -> uncurry Vect.zip (unzip xs) = xs
38− toFrom [] = Refl
39− toFrom ((a, b) :: xs) with (unzip xs) proof p
40− | (as, bs) = cong $ trans (cong p) (toFrom xs)
41− fromTo : {n : Nat} -> (as : Vect n a) -> (bs : Vect n b) -> unzip (zip as bs) = (as, bs)
42− fromTo [] [] = Refl
43− fromTo (a :: as) (b :: bs) = rewrite fromTo as bs in Refl
44−
45−||| An `Iso` based on `zip3` and `unzip3`.
46−zipped3 : Iso (Vect n a, Vect n b, Vect n c) (Vect n (a, b, c))
47−zipped3 = MkIso (uncurrry zip3) unzip3 toFrom (\(as, bs, cs) => fromTo as bs cs)
48− where uncurrry : (w -> x -> y -> z) -> ((w, x, y) -> z)
49− uncurrry w (x, y, z) = w x y z
50− toFrom : {n : Nat} -> (xs : Vect n (a, b, c)) -> uncurrry Vect.zip3 (unzip3 xs) = xs
51− toFrom [] = Refl
52− toFrom ((a, b, c) :: xs) with (unzip3 xs) proof p
53− | (as, bs, cs) = cong $ trans (cong p) (toFrom xs)
54− fromTo : {n : Nat} -> (as : Vect n a) -> (bs : Vect n b) -> (cs : Vect n c) -> unzip3 (zip3 as bs cs) = (as, bs, cs)
55− fromTo [] [] [] = Refl
56− fromTo (a :: as) (b :: bs) (c :: cs) = rewrite fromTo as bs cs in Refl
57−
58−||| An `Iso` based on `transpose`.
59−transposition : Iso (Vect o (Vect i a)) (Vect i (Vect o a))
60−transposition {a} = MkIso transpose transpose prf prf
61− where prf : {i : Nat} -> {o : Nat} -> (xss : Vect o (Vect i a)) -> transpose (transpose xss) = xss
62− prf [] = vectMustBeNil $ transpose [| [] |]
63− prf (xs :: xss) = rewrite transposeCons xs (transpose xss) in cong (prf xss)
64−
65−||| Split the `Vect` every `m` elements, making `n` `Vect m a`s.
66−||| The result is rectangular and has the same order as the original.
67−|||
68−||| This is the inverse of `concat`.
69−unconcat : Vect (n * m) a -> Vect n (Vect m a)
70−unconcat {n = Z} [] = []
71−unconcat {n = S k} {m} xs with (splitAt m xs)
72− | (xs', xss) = xs' :: unconcat xss
73−||| An `Iso` based on `unconcat` and `concat`.
74−|||
75−||| ```idris example
76−||| from rectangular [[1,2,3],[4,5,6]]
77−||| ```
78−rectangular : Iso (Vect (n * m) a) (Vect n (Vect m a))
79−rectangular = MkIso unconcat concat toFrom fromTo
80− where toFrom : (xss : Vect i (Vect o a)) -> unconcat (concat xss) = xss
81− toFrom {i = Z} [] = Refl
82− toFrom {i = S i} {o} (xs :: xss) = rewrite splitAtTakeDrop o {m = i * o} (xs ++ concat xss) in
83− rewrite takePrefix xs (concat xss) in
84− rewrite dropPrefix xs (concat xss) in
85− cong (toFrom xss)
86− fromTo : (xs : Vect (i * o) a) -> concat (unconcat xs) = xs
87− fromTo {i = Z} [] = Refl
88− fromTo {i = S i} {o} xs = rewrite splitAtTakeDrop o {m = i * o} xs in
89− rewrite fromTo {i} {o} (drop o xs) in
90− takeDropConcat o xs
91−
92−-- Not an Iso because (=) is not extensional, but it works in spirit
93−||| Go through all possible inputs and tabulate the outputs in a `Vect`.
94−|||
95−||| Or: turn a function from indices to values into a `Vect`.
96−||| Or: the inverse of `index`.
97−unindex : (Fin n -> a) -> Vect n a
98−unindex {n = Z} _ = []
99−unindex {n = S k} f = f FZ :: unindex (f . FS)
100−
101−||| Indexing into the table of outputs of `f` is like calling `f` itself.
102−indexUnindex : (i : Fin n) -> (f : Fin n -> a) -> index i (unindex f) = f i
103−indexUnindex FZ _ = Refl
104−indexUnindex (FS k) f = rewrite indexUnindex k (f . FS) in Refl
105−||| Given a function `f`, a `Vect` `xs`, and a proof that calling `f` gives the same result as indexing into `xs`,
106−||| prove that `xs` is the table of outputs of `f`.
107−unindexIndex' : (xs : Vect n a) -> (f : Fin n -> a) -> ((i : Fin n) -> f i = index i xs) -> unindex f = xs
108−unindexIndex' [] _ _ = Refl
109−unindexIndex' (x :: xs) f prf = rewrite prf FZ in rewrite unindexIndex' xs (f . FS) (\i => rewrite prf $ FS i in Refl) in Refl
110−||| If `f` and `g` are extensionally equal (equal outputs for all inputs), then `unindex f = unindex g`.
111−congExtUnindex : (f : Fin n -> a) -> (g : Fin n -> a) -> ((i : Fin n) -> f i = g i) -> unindex f = unindex g
112−congExtUnindex f g p = unindexIndex' (unindex g) f $ \i => trans (p i) $ sym $ indexUnindex i g
113−||| Functions with the same tables are the same themselves.
114−injExtUnindex : (f : Fin n -> a) -> (g : Fin n -> a) -> unindex f = unindex g -> ((i : Fin n) -> f i = g i)
115−injExtUnindex f g p i = rewrite sym $ indexUnindex i f in rewrite sym $ indexUnindex i g in cong p
116−||| A simpler version of `unindexIndex'` which only proves that `unindex` is the inverse of `index`.
117−unindexIndex : (xs : Vect n a) -> unindex (\i => index i xs) = xs
118−unindexIndex xs = unindexIndex' xs (\i => index i xs) (\i => Refl)
119−
120−||| Given a function that computes an index in the input from the index in the output, produce a `Vect o` of elements from the input.
121−|||
122−||| This is the map function of the functor `\i => Vect i a` from `\i, o => Fin o -> Fin i` to `\i, o => Vect i a -> Vect o a`.
123−fromIndices : (Fin o -> Fin i) -> Vect i a -> Vect o a
124−fromIndices f xs = unindex (flip index xs . f)
125−indexFromIndices : (f : Fin o -> Fin i) -> (xs : Vect i a) -> (n : Fin o) -> index n (fromIndices f xs) = index (f n) xs
126−indexFromIndices f xs n = indexUnindex n (\i => index (f i) xs)
127−fromIndicesFromIndices : (to : Fin n -> Fin n) -> (from : Fin n -> Fin n) -> (fromTo : (i : Fin n) -> from (to i) = i) -> (xs : Vect n a) -> fromIndices to (fromIndices from xs) = xs
128−fromIndicesFromIndices to from fromTo xs = unindexIndex' xs (\x => index (to x) (unindex (\x' => index (from x') xs))) $ \i =>
129− rewrite indexUnindex (to i) (\x' => index (from x') xs) in rewrite fromTo i in Refl
130−
131−||| Given a permutation of the indices, provide an `Iso` that can permute a `Vect n` the "same" way. More precisely,
132−||| if the index `i` is sent to `j`, then the element at index `i` ends up at index `j` (`indexPermuted`). An
133−||| `Iso (Fin n) (Fin n)` represents a permutation of the integers `[0, n)` because it ensures that no elements
134−||| are "lost" or "duplicated".
135−|||
136−||| Note this has the *opposite* behavior to `fromIndices`. This function is more "visceral"; it can be imagined
137−||| as shuffling a `Vect` in the same way `map (to permutation)` shuffles `range`. Or, in more categorical terms,
138−||| `fromIndices` represents a contravariant functor from the category `\i, o => Fin i -> Fin o` to `\i, o => Vect i a -> Vect o a`,
139−||| and `permuted` represents that functor restricted to isomorphisms and made covariant with `isoSym`.
140−|||
141−||| ```idris example
142−||| to (permuted (stimes 2 rotatedDown)) [1, 2, 3, 4, 5] == [3, 4, 5, 1, 2]
143−||| to (permuted (swapped 3 0)) [1, 2, 3, 4, 5] == [4, 2, 3, 1, 5]
144−||| ```
145−|||
146−||| @ permutation an `Iso` representing the transformation on the indices
147−permuted : (permutation : Iso (Fin n) (Fin n)) -> Iso (Vect n a) (Vect n a)
148−-- [to, from => f from, f to] is not a typo
149−-- fromIndices needs a function outputIdx => inputIdx, so to "align" the "motion" of the Fins with the elements, to uses from and from uses to.
150−permuted (MkIso toI fromI toFromI fromToI) = MkIso (fromIndices fromI) (fromIndices toI) (fromIndicesFromIndices fromI toI toFromI) (fromIndicesFromIndices toI fromI fromToI)
151−permutedSym : (permutation : Iso (Fin n) (Fin n)) -> permuted (isoSym permutation) = isoSym (permuted permutation)
152−permutedSym (MkIso to from toFrom fromTo) = Refl
153−indexPermuted : (permutation : Iso (Fin n) (Fin n)) -> (i : Fin n) -> (xs : Vect n a) -> index i xs = index (to permutation i) (to (permuted permutation) xs)
154−indexPermuted (MkIso to from toFrom fromTo) i xs = replace {P = \xs' => index i xs' = index (to i) (fromIndices from xs) } (fromIndicesFromIndices to from fromTo xs) $
155− rewrite indexFromIndices to (fromIndices from xs) i in Refl
libs/contrib/Data/Bool/Extra.idr+2−52
@@ -3,12 +3,6 @@ module Data.Bool.Extra
3%access public export
3%access public export
4%default total
4%default total
5
5
6−notInvolutive : (x : Bool) -> not (not x) = x
7−notInvolutive True = Refl
8−notInvolutive False = Refl
9−
10−-- AND
11−
12andSameNeutral : (x : Bool) -> x && x = x
6andSameNeutral : (x : Bool) -> x && x = x
13andSameNeutral False = Refl
7andSameNeutral False = Refl
14andSameNeutral True = Refl
8andSameNeutral True = Refl
@@ -21,20 +15,6 @@ andTrueNeutral : (x : Bool) -> x && True = x
21andTrueNeutral False = Refl
15andTrueNeutral False = Refl
22andTrueNeutral True = Refl
16andTrueNeutral True = Refl
23
17
24−andAssociative : (x, y, z : Bool) -> x && (y && z) = (x && y) && z
25−andAssociative True _ _ = Refl
26−andAssociative False _ _ = Refl
27−
28−andCommutative : (x, y : Bool) -> x && y = y && x
29−andCommutative x True = andTrueNeutral x
30−andCommutative x False = andFalseFalse x
31−
32−andNotFalse : (x : Bool) -> x && not x = False
33−andNotFalse False = Refl
34−andNotFalse True = Refl
35−
36−-- OR
37−
38orSameNeutral : (x : Bool) -> x || x = x
18orSameNeutral : (x : Bool) -> x || x = x
39orSameNeutral False = Refl
19orSameNeutral False = Refl
40orSameNeutral True = Refl
20orSameNeutral True = Refl
@@ -47,36 +27,6 @@ orTrueTrue : (x : Bool) -> x || True = True
47orTrueTrue False = Refl
27orTrueTrue False = Refl
48orTrueTrue True = Refl
28orTrueTrue True = Refl
49
29
50−orAssociative : (x, y, z : Bool) -> x || (y || z) = (x || y) || z
51−orAssociative True _ _ = Refl
52−orAssociative False _ _ = Refl
53−
54−orCommutative : (x, y : Bool) -> x || y = y || x
55−orCommutative x True = orTrueTrue x
56−orCommutative x False = orFalseNeutral x
57−
58−orNotTrue : (x : Bool) -> x || not x = True
59−orNotTrue False = Refl
60−orNotTrue True = Refl
61−
62−-- interaction & De Morgan's laws
63−
64−orSameAndRightNeutral : (x, y : Bool) -> x || (x && y) = x
30+orSameAndRightNeutral : (x, right : Bool) -> x || (x && right) = x
65orSameAndRightNeutral False _ = Refl
31orSameAndRightNeutral False _ = Refl
66−orSameAndRightNeutral True _ = Refl
32+orSameAndRightNeutral True _ = Refl
67−
68−andDistribOrR : (x, y, z : Bool) -> x && (y || z) = (x && y) || (x && z)
69−andDistribOrR False _ _ = Refl
70−andDistribOrR True _ _ = Refl
71−
72−orDistribAndR : (x, y, z : Bool) -> x || (y && z) = (x || y) && (x || z)
73−orDistribAndR False _ _ = Refl
74−orDistribAndR True _ _ = Refl
75−
76−notAndIsOr : (x, y : Bool) -> not (x && y) = not x || not y
77−notAndIsOr False _ = Refl
78−notAndIsOr True _ = Refl
79−
80−notOrIsAnd : (x, y : Bool) -> not (x || y) = not x && not y
81−notOrIsAnd False _ = Refl
82−notOrIsAnd True _ = Refl
libs/contrib/Data/Combinators.idr+2−2
@@ -26,13 +26,13 @@ infixl 9 ...
26(...) = (.) . (.)
26(...) = (.) . (.)
27
27
28||| Warbler, as named in "To Mock a Mockingbird".
28||| Warbler, as named in "To Mock a Mockingbird".
29−||| See https://code.jsoftware.com/wiki/Vocabulary/tilde
29+||| See http://code.jsoftware.com/wiki/Vocabulary/tilde
30||| Equivalent to `join` on the Reader monad (`(->) e` in Haskell)
30||| Equivalent to `join` on the Reader monad (`(->) e` in Haskell)
31reflex : (a -> a -> b) -> (a -> b)
31reflex : (a -> a -> b) -> (a -> b)
32reflex f x = f x x
32reflex f x = f x x
33
33
34||| Phoenix, according to Data.Aviary.
34||| Phoenix, according to Data.Aviary.
35−||| See https://code.jsoftware.com/wiki/Vocabulary/fork.
35+||| See http://code.jsoftware.com/wiki/Vocabulary/fork.
36||| Equivalent to `liftA2` on the Reader monad (`(->) e` in Haskell)
36||| Equivalent to `liftA2` on the Reader monad (`(->) e` in Haskell)
37fork2 : (b -> c -> d) -> (a -> b) -> (a -> c) -> (a -> d)
37fork2 : (b -> c -> d) -> (a -> b) -> (a -> c) -> (a -> d)
38fork2 f g h x = f (g x) (h x)
38fork2 f g h x = f (g x) (h x)
libs/contrib/Data/Fin/Extra.idr+3−80
@@ -2,85 +2,8 @@ module Data.Fin.Extra
2
2
3import Data.Fin
3import Data.Fin
4
4
5−%access public export
6−%default total
7−
8−
9||| Proof that an element **n** of Fin **m** , when converted to Nat is smaller than the bound **m**.
5||| Proof that an element **n** of Fin **m** , when converted to Nat is smaller than the bound **m**.
6+public export
10−elemSmallerThanBound : (n : Fin m) -> LT (finToNat n) m
7+elemSmallerThanBound : (n : Fin m) -> LTE (finToNat n) m
11−elemSmallerThanBound FZ = LTESucc LTEZero
8+elemSmallerThanBound FZ = LTEZero
12elemSmallerThanBound (FS x) = LTESucc (elemSmallerThanBound x)
9elemSmallerThanBound (FS x) = LTESucc (elemSmallerThanBound x)
13−
14−||| Proof that application of finToNat the last element of Fin **S n** gives **n**.
15−finToNatLastIsBound : finToNat (Fin.last {n}) = n
16−finToNatLastIsBound {n=Z} = Refl
17−finToNatLastIsBound {n=S k} = rewrite finToNatLastIsBound {n=k} in Refl
18−
19−||| Proof that an element **n** of Fin **m** , when converted to Nat is smaller than the bound **m**.
20−finToNatWeakenNeutral : {n : Fin m} -> finToNat (weaken n) = finToNat n
21−finToNatWeakenNeutral {n=FZ} = Refl
22−finToNatWeakenNeutral {m=S (S _)} {n=FS _} = cong finToNatWeakenNeutral
23−
24−||| Proof that it's possible to strengthen a weakened element of Fin **m**.
25−strengthenWeakenNeutral : (n : Fin m) -> strengthen (weaken n) = Right n
26−strengthenWeakenNeutral {m=S _} FZ = Refl
27−strengthenWeakenNeutral {m=S (S _)} (FS k) = rewrite strengthenWeakenNeutral k in Refl
28−
29−||| Proof that it's not possible to strengthen the last element of Fin **n**.
30−strengthenLastIsLeft : strengthen (Fin.last {n}) = Left (Fin.last {n})
31−strengthenLastIsLeft {n=Z} = Refl
32−strengthenLastIsLeft {n=S k} = rewrite strengthenLastIsLeft {n=k} in Refl
33−
34−||| Enumerate elements of Fin **n** backwards.
35−invFin : Fin n -> Fin n
36−invFin FZ = last
37−invFin {n=S (S _)} (FS k) = weaken (invFin k)
38−
39−||| Proof that an inverse of a weakened element of Fin **n** is a successive of an inverse of an original element.
40−invWeakenIsSucc : (m : Fin n) -> invFin (weaken m) = FS (invFin m)
41−invWeakenIsSucc FZ = Refl
42−invWeakenIsSucc {n=S (S _)} (FS k) = rewrite invWeakenIsSucc k in Refl
43−
44−||| Proof that double inversion of Fin **n** gives the original.
45−doubleInvFinSame : (m : Fin n) -> invFin (invFin m) = m
46−doubleInvFinSame {n=S Z} FZ = Refl
47−doubleInvFinSame {n=S (S k)} FZ = rewrite doubleInvFinSame {n=S k} FZ in Refl
48−doubleInvFinSame {n=S (S _)} (FS x) = trans (invWeakenIsSucc $ invFin x) (cong $ doubleInvFinSame x)
49−
50−||| Proof that an inverse of the last element of Fin (S **n**) in FZ.
51−invLastIsFZ : invFin (Fin.last {n}) = FZ
52−invLastIsFZ {n=Z} = Refl
53−invLastIsFZ {n=S k} = rewrite invLastIsFZ {n=k} in Refl
54−
55−||| Proof that it's possible to strengthen an inverse of a succesive element of Fin **n**.
56−strengthenNotLastIsRight : (m : Fin (S n)) -> strengthen (invFin (FS m)) = Right (invFin m)
57−strengthenNotLastIsRight m = strengthenWeakenNeutral (invFin m)
58−
59−||| Either tightens the bound on a Fin or proves that it's the last.
60−strengthen' : (m : Fin (S n)) -> Either (m = Fin.last) (m' : Fin n ** finToNat m = finToNat m')
61−strengthen' {n = Z} FZ = Left Refl
62−strengthen' {n = S k} FZ = Right (FZ ** Refl)
63−strengthen' {n = S k} (FS m) with (strengthen' m)
64− | Left eq = Left $ cong eq
65− | Right (m' ** eq) = Right (FS m' ** cong eq)
66−
67−||| A view of Nat as a quotient of some number and a finite remainder.
68−data FractionView : (n : Nat) -> (d : Nat) -> Type where
69− Fraction : (n : Nat) -> (d : Nat) -> {auto ok: GT d Z} ->
70− (q : Nat) -> (r : Fin d) ->
71− q * d + finToNat r = n -> FractionView n d
72−
73−||| Converts Nat to the fractional view with a non-zero divisor.
74−divMod : (n, d : Nat) -> {auto ok: GT d Z} -> FractionView n d
75−divMod Z (S d) = Fraction Z (S d) Z FZ Refl
76−divMod (S n) (S d) with (divMod n (S d))
77− | (Fraction n (S d) q r eq) with (strengthen' r)
78− | Left eq' = Fraction (S n) (S d) (S q) FZ $
79− rewrite sym eq in
80− rewrite trans (cong {f=finToNat} eq') finToNatLastIsBound in
81− cong $ trans
82− (plusZeroRightNeutral (d + q * S d))
83− (plusCommutative d (q * S d))
84− | Right (r' ** eq') = Fraction (S n) (S d) q (FS r') $
85− rewrite sym $ plusSuccRightSucc (q * S d) (finToNat r') in
86− cong $ trans (sym $ cong {f=plus (q * S d)} eq') eq
libs/contrib/Data/List/Extra.idrnew file+44
@@ -0,0 +1,44 @@
1+module Data.List.Extra
2+
3+%default total
4+%access export
5+
6+||| Serves as a specification for reverseOnto.
7+reverseOntoSpec : (xs, ys : List a) -> reverseOnto xs ys = reverse ys ++ xs
8+reverseOntoSpec _ [] = Refl
9+reverseOntoSpec xs (y::ys) =
10+ trans (reverseOntoSpec (y::xs) ys)
11+ (trans (appendAssociative (reverse ys) [y] xs)
12+ (cong {f = \l => l ++ xs} (sym (reverseOntoSpec [y] ys))))
13+
14+||| The reverse of an empty list is an empty list. Together with reverseCons,
15+||| serves as a specification for reverse.
16+reverseNil : reverse [] = []
17+reverseNil = Refl
18+
19+||| The reverse of a cons is the reverse of the tail followed by the head.
20+||| Together with reverseNil serves as a specification for reverse.
21+reverseCons : (x : a) -> (xs : List a) -> reverse (x::xs) = reverse xs ++ [x]
22+reverseCons x xs = reverseOntoSpec [x] xs
23+
24+||| Reversing an append is appending reversals backwards.
25+reverseAppend : (xs, ys : List a) ->
26+ reverse (xs ++ ys) = reverse ys ++ reverse xs
27+reverseAppend [] ys = sym (appendNilRightNeutral (reverse ys))
28+reverseAppend (x :: xs) ys =
29+ trans (trans (reverseCons x (xs ++ ys))
30+ (cong {f = \l => l ++ [x]} (reverseAppend xs ys)))
31+ (sym (trans (cong (reverseCons x xs))
32+ (appendAssociative (reverse ys) (reverse xs) [x])))
33+
34+||| Reversing a singleton list is a no-op.
35+reverseSingletonId : (x : a) -> reverse [x] = [x]
36+reverseSingletonId _ = Refl
37+
38+||| Reversing a reverse gives the original.
39+reverseReverseId : (xs : List a) -> reverse (reverse xs) = xs
40+reverseReverseId [] = Refl
41+reverseReverseId (x :: xs) =
42+ trans (cong (reverseCons x xs))
43+ (trans (reverseAppend (reverse xs) [x])
44+ (cong (reverseReverseId xs)))
libs/contrib/Data/List/Reverse.idrdeleted−99
@@ -1,99 +0,0 @@
1−||| Properties of the reverse function.
2−module Data.List.Reverse
3−
4−%default total
5−%access export
6−
7−||| The final segment of the accumulator is the final segment of the result.
8−reverseOntoAcc : (xs, ys, zs : List a) ->
9− reverseOnto (ys ++ zs) xs = (reverseOnto ys xs) ++ zs
10−reverseOntoAcc [] _ _ = Refl
11−reverseOntoAcc (x :: xs) (ys) (zs) = reverseOntoAcc xs (x :: ys) zs
12−
13−||| Serves as a specification for reverseOnto.
14−reverseOntoSpec : (xs, ys : List a) -> reverseOnto xs ys = reverse ys ++ xs
15−reverseOntoSpec xs ys = reverseOntoAcc ys [] xs
16−
17−||| The reverse of an empty list is an empty list. Together with reverseCons,
18−||| serves as a specification for reverse.
19−reverseNil : reverse [] = []
20−reverseNil = Refl
21−
22−||| The reverse of a cons is the reverse of the tail followed by the head.
23−||| Together with reverseNil serves as a specification for reverse.
24−reverseCons : (x : a) -> (xs : List a) -> reverse (x::xs) = reverse xs ++ [x]
25−reverseCons x xs = reverseOntoSpec [x] xs
26−
27−||| Reversing an append is appending reversals backwards.
28−reverseAppend : (xs, ys : List a) ->
29− reverse (xs ++ ys) = reverse ys ++ reverse xs
30−reverseAppend [] ys = sym (appendNilRightNeutral (reverse ys))
31−reverseAppend (x :: xs) ys =
32− rewrite reverseCons x (xs ++ ys) in
33− rewrite reverseAppend xs ys in
34− rewrite reverseCons x xs in
35− sym $ appendAssociative (reverse ys) (reverse xs) [x]
36−
37−||| A recursive definition of reverse.
38−reverseRec : List a -> List a
39−reverseRec [] = []
40−reverseRec (x :: xs) = reverseRec xs ++ [x]
41−
42−||| The iterative and recursive defintions of reverse are the same.
43−reverseEquiv : (xs : List a) -> reverseRec xs = reverse xs
44−reverseEquiv [] = Refl
45−reverseEquiv (x :: xs) =
46− rewrite reverseEquiv xs in
47− rewrite reverseAppend [x] xs in
48− Refl
49−
50−||| Reversing a singleton list is a no-op.
51−reverseSingletonId : (x : a) -> reverse [x] = [x]
52−reverseSingletonId _ = Refl
53−
54−||| Reversing a reverse gives the original.
55−reverseReverseId : (xs : List a) -> reverse (reverse xs) = xs
56−reverseReverseId [] = Refl
57−reverseReverseId (x :: xs) =
58− rewrite reverseCons x xs in
59− rewrite reverseAppend (reverse xs) [x] in
60− cong $ reverseReverseId xs
61−
62−||| Reversing onto preserves list length.
63−reverseOntoLength : (xs, acc : List a) ->
64− length $ reverseOnto acc xs = length acc + length xs
65−reverseOntoLength [] acc = rewrite plusZeroRightNeutral (length acc) in Refl
66−reverseOntoLength (x :: xs) acc =
67− rewrite reverseOntoLength xs (x :: acc) in
68− plusSuccRightSucc (length acc) (length xs)
69−
70−||| Reversing preserves list length.
71−reverseLength : (xs : List a) -> length $ reverse xs = length xs
72−reverseLength xs = reverseOntoLength xs []
73−
74−||| Equal reversed lists are equal.
75−reverseEqual : (xs, ys : List a) -> reverse xs = reverse ys -> xs = ys
76−reverseEqual xs ys prf =
77− rewrite sym $ reverseReverseId xs in
78− rewrite prf in
79− reverseReverseId ys
80−
81−||| Do geese see God?
82−data Palindrome : (xs : List a) -> Type where
83− Empty : Palindrome []
84− Single : Palindrome [_]
85− Multi : Palindrome xs -> Palindrome $ [x] ++ xs ++ [x]
86−
87−||| A Palindrome reversed is itself.
88−palindromeReverse : (xs : List a) -> Palindrome xs -> reverse xs = xs
89−palindromeReverse [] Empty = Refl
90−palindromeReverse [_] Single = Refl
91−palindromeReverse ([x] ++ ys ++ [x]) (Multi pf) =
92− rewrite reverseAppend ([x] ++ ys) [x] in
93− rewrite reverseAppend [x] ys in
94− rewrite palindromeReverse ys pf in
95− Refl
96−
97−||| Only Palindromes are equal to their own reverse.
98−postulate -- This is a tough one. Any takers?
99−reversePalindrome : (xs : List a) -> reverse xs = xs -> Palindrome xs
libs/contrib/Data/Logic/Propositional.idrdeleted−161
@@ -1,161 +0,0 @@
1−module Data.Logic.Propositional
2−
3−%default total
4−%access public export
5−
6−-- Idris uses intuitionistic logic, so it does not validate the
7−-- principle of excluded middle (PEM) or similar theorems of classical
8−-- logic. But it does validate certain relations among these
9−-- propositions, and that's what's in this file.
10−
11−||| The principle of excluded middle
12−PEM : Type -> Type
13−PEM p = Either p (Not p)
14−
15−||| Double negation elimination
16−DNE : Type -> Type
17−DNE p = Not $ Not p -> p
18−
19−||| The consensus theorem (at least, the interesting part)
20−Consensus : Type -> Type -> Type -> Type
21−Consensus p q r = (q, r) -> Either (p, q) (Not p, r)
22−
23−||| Peirce's law
24−Peirce : Type -> Type -> Type
25−Peirce p q = ((p -> q) -> p) -> p
26−
27−||| Not sure if this one has a name, so call it Frege's law
28−Frege : Type -> Type -> Type -> Type
29−Frege p q r = (p -> r) -> (q -> r) -> ((p -> q) -> q) -> r
30−
31−||| The converse of contraposition: (p -> q) -> Not q -> Not p
32−Transposition : Type -> Type -> Type
33−Transposition p q = (Not q -> Not p) -> p -> q
34−
35−||| This isn't a good name.
36−Switch : Type -> Type
37−Switch p = (Not p -> p) -> p
38−
39−-- PEM and the others can't be proved outright, but it is possible to
40−-- prove the double negations (DN) of all of them.
41−
42−||| The double negation of a proposition
43−DN : Type -> Type
44−DN p = Not $ Not p
45−
46−pemDN : DN $ PEM p
47−pemDN f = f $ Right $ \x => f $ Left x
48−
49−dneDN : DN $ DNE p
50−dneDN f = f $ \g => void $ g $ \x => f $ \_ => x
51−
52−consensusDN : DN $ Consensus p q r
53−consensusDN f = f $ \(y, z) => Right (\x => f $ \(_, _) => Left (x, y), z)
54−
55−peirceDN : DN $ Peirce p q
56−peirceDN f = f $ \g => g $ \x => void $ f $ \_ => x
57−
58−fregeDN : DN $ Frege p q r
59−fregeDN f = f $ \g, h, i => h $ i $ \x => void $ f $ \_, _, _ => g x
60−
61−transpositionDN : DN $ Transposition p q
62−transpositionDN f = f $ \g, x => void $ g (\y => f $ \_, _ => y) x
63−
64−switchDN : DN $ Switch p
65−switchDN f = f $ \g => g $ \x => f $ \_ => x
66−
67−-- It's easy to prove all these theorems assuming PEM.
68−
69−dnePEM : PEM p -> DNE p
70−dnePEM (Left l) _ = l
71−dnePEM (Right r) f = void $ f r
72−
73−consensusPEM : PEM p -> Consensus p q r
74−consensusPEM (Left l) (y, _) = Left (l, y)
75−consensusPEM (Right r) (_, z) = Right (r, z)
76−
77−peircePEM : PEM p -> Peirce p q
78−peircePEM (Left l) _ = l
79−peircePEM (Right r) f = f $ \x => void $ r x
80−
81−fregePEM : PEM p -> Frege p q r
82−fregePEM (Left l) f _ _ = f l
83−fregePEM (Right r) _ g h = g $ h $ \x => void $ r x
84−
85−transpositionPEM : PEM p -> Transposition q p
86−transpositionPEM (Left l) _ _ = l
87−transpositionPEM (Right r) f x = void $ f r x
88−
89−switchPEM : PEM p -> Switch p
90−switchPEM (Left l) _ = l
91−switchPEM (Right r) f = f r
92−
93−-- It's trivial to prove these theorems assuming double negation
94−-- elimination (DNE), since their double negations can all be proved.
95−
96−||| Eliminate double negations
97−EDN : DN p -> DNE p -> p
98−EDN f g = g f
99−
100−pemDNE : DNE $ PEM p -> PEM p
101−pemDNE = EDN pemDN
102−
103−-- It's possible to prove the theorems assuming Peirce's law, but some
104−-- thought must be given to choosing the right instances. Peirce's law
105−-- is therefore weaker than PEM on an instance-by-instance basis, but
106−-- all the instances together are equivalent.
107−
108−pemPeirce : Peirce (PEM p) Void -> PEM p
109−pemPeirce f = f $ \g => Right $ \x => g $ Left x
110−
111−dnePeirce : Peirce p Void -> DNE p
112−dnePeirce f g = f $ \h => void $ g h
113−
114−consensusPeirce : Peirce (Consensus p q r) Void -> Consensus p q r
115−consensusPeirce f (y, z) =
116− f (\g, (_, _) => Right (\x => g (\_ => Left (x, y)), z)) (y, z)
117−
118−fregePeirce : Peirce (Frege p q r) Void -> Frege p q r
119−fregePeirce f g h i =
120− f (\j, _, _, _ => h $ i $ \x => void $ j $ \_, _, _ => g x) g h i
121−
122−transpositionPeirce : Peirce (Transposition p q) Void -> Transposition p q
123−transpositionPeirce f g x =
124− f (\h, _, _ => void $ g (\y => h $ \_, _ => y) x) (\j, _ => g j x) x
125−
126−-- There are a variety of single axioms sufficient for deriving all of
127−-- classical logic. The earliest of these is known as Nicod's axiom,
128−-- but it is written using only nand operators and doesn't lend itself
129−-- to Idris's type system. Meredith's axiom, on the other hand, is
130−-- written using implication and negation.
131−
132−||| Meredith's axiom, sufficient for deriving all of classical logic
133−Meredith : (p, q, r, s, t : Type) -> Type
134−Meredith p q r s t =
135− ((((p -> q) -> Not r -> Not s) -> r) -> t) -> (t -> p) -> s -> p
136−
137−-- The Meredith axiom implies all of classical logic, and so in
138−-- particular it implies PEM, and therefore cannot be proved in
139−-- intuitionistic logic. As usual, however, its double negation can be
140−-- proved.
141−
142−meredithDN : DN $ Meredith p q r s t
143−meredithDN f =
144− f $ \g, h, x =>
145− h $ g $ \i =>
146− void $ i
147− (\y => void $ f $ \_, _, _ => y)
148− (\z => f $ \_, _, _ => h $ g $ \_ => z)
149− x
150−
151−-- Meredith can be proved assuming PEM, since the type system itself
152−-- takes care of the rest.
153−
154−meredithPEM : PEM p -> Meredith p q r s t
155−meredithPEM (Left l) _ _ _ = l
156−meredithPEM (Right r) f g x =
157− g $ f $ \h =>
158− void $ h
159− (\y => void $ r y)
160− (\z => r $ g $ f (\_ => z))
161− x
libs/contrib/Data/Nat.idrdeleted−25
@@ -1,25 +0,0 @@
1−module Data.Nat
2−
3−%default total
4−%access public export
5−
6−diff : Nat -> Nat -> Nat
7−diff k Z = k
8−diff Z j = j
9−diff (S k) (S j) = diff k j
10−
11−ltePlus : LTE m1 n1 -> LTE m2 n2 -> LTE (m1 + m2) (n1 + n2)
12−ltePlus {n1=Z} LTEZero lte = lte
13−ltePlus {n1=S k} LTEZero lte = lteSuccRight $ ltePlus {n1=k} LTEZero lte
14−ltePlus (LTESucc lte1) lte2 = LTESucc $ ltePlus lte1 lte2
15−
16−lteCongPlus : (k : Nat) -> LTE m n -> LTE (m + k) (n + k)
17−lteCongPlus k lte = ltePlus lte lteRefl
18−
19−lteMult : LTE m1 n1 -> LTE m2 n2 -> LTE (m1 * m2) (n1 * n2)
20−lteMult LTEZero _ = LTEZero
21−lteMult {m1=S k} (LTESucc _) LTEZero = rewrite multZeroRightZero k in LTEZero
22−lteMult (LTESucc lte1) (LTESucc lte2) = LTESucc $ ltePlus lte2 $ lteMult lte1 $ LTESucc lte2
23−
24−lteCongMult : (k : Nat) -> LTE m n -> LTE (m * k) (n * k)
25−lteCongMult k lte = lteMult lte lteRefl
libs/contrib/Data/Nat/Ack.idrdeleted−60
@@ -1,60 +0,0 @@
1−||| Properties of the Ackermann function.
2−module Data.Nat.Ackermann
3−
4−%access public export
5−
6−%default total
7−
8−-- Primitive recursive functions are functions that can be calculated
9−-- by programs that don't use unbounded loops. Almost all common
10−-- mathematical functions are primitive recursive.
11−
12−-- Uncomputable functions are functions that can't be calculated by
13−-- any programs at all. One example is the Busy Beaver function:
14−-- BB(k) = the maximum number of steps that can be executed by a
15−-- halting Turing machine with k states.
16−-- The values of the Busy Beaver function are unimaginably large for
17−-- any but the smallest inputs.
18−
19−-- The Ackermann function is the most well-known example of a total
20−-- computable function that is not primitive recursive, i.e. a general
21−-- recursive function. It grows strictly faster than any primitive
22−-- recursive function, but also strictly slower than a function like
23−-- the Busy Beaver.
24−
25−-- There are many variations of the Ackermann function. Here is one
26−-- common definition
27−-- (see https://sites.google.com/site/pointlesslargenumberstuff/home/2/ackermann)
28−-- that uses nested recursion:
29−
30−ackRec : Nat -> Nat -> Nat
31−-- Base rule
32−ackRec Z m = S m
33−-- Prime rule
34−ackRec (S k) Z = ackRec k 1
35−-- Catastrophic rule
36−ackRec (S k) (S j) = ackRec k $ ackRec (S k) j
37−
38−-- The so-called "base rule" and "prime rule" work together to ensure
39−-- termination. Happily, the Idris totality checker has no issues.
40−
41−-- An unusual "repeating" defintion of the function is given in the
42−-- book The Little Typer:
43−
44−ackRep : Nat -> Nat -> Nat
45−ackRep Z = (+) 1
46−ackRep (S k) = repeat (ackRep k)
47− where
48− repeat : (Nat -> Nat) -> Nat -> Nat
49− repeat f Z = f 1
50− repeat f (S k) = f (repeat f k)
51−
52−-- These two definitions don't look like they define the same
53−-- function, but they do:
54−
55−ackRepRec : (n, m : Nat) -> ackRep n m = ackRec n m
56−ackRepRec Z _ = Refl
57−ackRepRec (S k) Z = ackRepRec k 1
58−ackRepRec (S k) (S j) =
59− rewrite sym $ ackRepRec (S k) j in
60− ackRepRec k $ ackRep (S k) j
libs/contrib/Data/Nat/Fact.idrdeleted−56
@@ -1,56 +0,0 @@
1−||| Properties of factorial functions.
2−module Data.Nat.Fact
3−
4−%access public export
5−
6−%default total
7−
8−||| Recursive definition of factorial.
9−factRec : Nat -> Nat
10−factRec Z = 1
11−factRec (S k) = (S k) * factRec k
12−
13−||| Tail-recursive accumulator for factItr.
14−factAcc : Nat -> Nat -> Nat
15−factAcc Z acc = acc
16−factAcc (S k) acc = factAcc k $ (S k) * acc
17−
18−||| Iterative definition of factorial.
19−factItr : Nat -> Nat
20−factItr n = factAcc n 1
21−
22−----------------------------------------
23−
24−||| Multiplicand-shuffling lemma.
25−multShuffle : (a, b, c : Nat) -> a * (b * c) = b * (a * c)
26−multShuffle a b c =
27− rewrite multAssociative a b c in
28− rewrite multCommutative a b in
29− sym $ multAssociative b a c
30−
31−||| Multiplication of the accumulator.
32−factAccMult : (a, b, c : Nat) ->
33− a * factAcc b c = factAcc b (a * c)
34−factAccMult _ Z _ = Refl
35−factAccMult a (S k) c =
36− rewrite factAccMult a k (S k * c) in
37− rewrite multShuffle a (S k) c in
38− Refl
39−
40−||| Addition of accumulators.
41−factAccPlus : (a, b, c : Nat) ->
42− factAcc a b + factAcc a c = factAcc a (b + c)
43−factAccPlus Z _ _ = Refl
44−factAccPlus (S k) b c =
45− rewrite factAccPlus k (S k * b) (S k * c) in
46− rewrite sym $ multDistributesOverPlusRight (S k) b c in
47− Refl
48−
49−||| The recursive and iterative definitions are the equivalent.
50−factRecItr : (n : Nat) -> factRec n = factItr n
51−factRecItr Z = Refl
52−factRecItr (S k) =
53− rewrite factRecItr k in
54− rewrite factAccMult k k 1 in
55− rewrite multOneRightNeutral k in
56− factAccPlus k 1 k
libs/contrib/Data/Nat/Fib.idrdeleted−50
@@ -1,50 +0,0 @@
1−||| Properties of the Fibonacci function.
2−module Data.Nat.Fib
3−
4−%access public export
5−
6−%default total
7−
8−||| Recursive definition of Fibonacci.
9−fibRec : Nat -> Nat
10−fibRec Z = Z
11−fibRec (S Z) = S Z
12−fibRec (S (S k)) = fibRec (S k) + fibRec k
13−
14−||| Accumulator for fibItr.
15−fibAcc : Nat -> Nat -> Nat -> Nat
16−fibAcc Z a _ = a
17−fibAcc (S k) a b = fibAcc k b (a + b)
18−
19−||| Iterative definition of Fibonacci.
20−fibItr : Nat -> Nat
21−fibItr n = fibAcc n 0 1
22−
23−||| Addend shuffling lemma.
24−plusLemma : (a, b, c, d : Nat) -> (a + b) + (c + d) = (a + c) + (b + d)
25−plusLemma a b c d =
26− rewrite sym $ plusAssociative a b (c + d) in
27− rewrite plusAssociative b c d in
28− rewrite plusCommutative b c in
29− rewrite sym $ plusAssociative c b d in
30− plusAssociative a c (b + d)
31−
32−||| Helper lemma for fibacc.
33−fibAdd : (n, a, b, c, d : Nat) ->
34− fibAcc n a b + fibAcc n c d = fibAcc n (a + c) (b + d)
35−fibAdd Z _ _ _ _ = Refl
36−fibAdd (S Z) _ _ _ _ = Refl
37−fibAdd (S (S k)) a b c d =
38− rewrite fibAdd k (a + b) (b + (a + b)) (c + d) (d + (c + d)) in
39− rewrite plusLemma b (a + b) d (c + d) in
40− rewrite plusLemma a b c d in
41− Refl
42−
43−||| Iterative and recursive Fibonacci definitions are equivalent.
44−fibEq : (n : Nat) -> fibRec n = fibItr n
45−fibEq Z = Refl
46−fibEq (S Z) = Refl
47−fibEq (S (S k)) =
48− rewrite fibEq k in
49− rewrite fibEq (S k) in
50− fibAdd k 1 1 0 1
libs/contrib/Data/Nat/Parity.idr+3−204
@@ -2,52 +2,9 @@ module Data.Nat.Parity
2
2
3%access public export
3%access public export
4
4
5−----------------------------------------
5+--------------------------------------------------------------------------------
6−
6+-- Parity
7−-- Type-level, constructive definitions of parity.
7+--------------------------------------------------------------------------------
8−
9−||| A nat is Even when it is twice some other nat.
10−Even : Nat -> Type
11−Even n = (half : Nat ** n = half * 2)
12−
13−||| A nat is Odd when it is one more than twice some other nat.
14−Odd : Nat -> Type
15−Odd n = (haf : Nat ** n = S $ haf * 2)
16−
17−----------------------------------------
18−
19−||| Two more than an Even is Even.
20−add2Even : Even n -> Even (2 + n)
21−add2Even (half ** pf) = (S half ** cong {f = (+) 2} pf)
22−
23−||| Two more than an Odd is Odd.
24−add2Odd : Odd n -> Odd (2 + n)
25−add2Odd (haf ** pf) = (S haf ** cong {f = (+) 2} pf)
26−
27−||| One more than an Even is Odd.
28−succEvenOdd : Even n -> Odd (S n)
29−succEvenOdd (half ** pf) = (half ** cong {f = S} pf)
30−
31−||| One more than an Odd is Even.
32−succOddEven : Odd n -> Even (S n)
33−succOddEven (haf ** pf) = (S haf ** cong {f = S} pf)
34−
35−||| One less than an Odd is Even.
36−predOddEven : Odd (S n) -> Even n
37−predOddEven (haf ** pf) = (haf ** cong {f = Nat.pred} pf)
38−
39−||| A helper fact.
40−succDoublePredPred : S n = k * 2 -> n = S $ (pred k) * 2
41−succDoublePredPred {k = Z} prf = absurd prf
42−succDoublePredPred {k = S _} prf = cong {f = Nat.pred} prf
43−
44−||| One less than an Even is Odd.
45−predEvenOdd : Even (S n) -> Odd n
46−predEvenOdd (half ** pf) = (pred half ** succDoublePredPred pf)
47−
48−----------------------------------------
49−
50−-- Boolean definitions of parity.
51
8
52mutual
9mutual
53 even : Nat -> Bool
10 even : Nat -> Bool
@@ -57,161 +14,3 @@ mutual
57 odd : Nat -> Bool
14 odd : Nat -> Bool
58 odd Z = False
15 odd Z = False
59 odd (S k) = even k
16 odd (S k) = even k
60−
61−----------------------------------------
62−
63−-- The boolean and type-level definitions are equivalent in the sense
64−-- that a proof of one can be gotten from a proof of the other.
65−
66−mutual
67− ||| Evens are even.
68− evenEven : Even n -> even n = True
69− evenEven {n = Z} _ = Refl
70− evenEven {n = S _} pf = oddOdd $ predEvenOdd pf
71−
72− ||| Odds are odd.
73− oddOdd : Odd n -> odd n = True
74− oddOdd {n = Z} (_ ** pf) = absurd pf
75− oddOdd {n = S _} pf = evenEven $ predOddEven pf
76−
77−mutual
78− ||| If it's even, it's Even.
79− evenEvenConverse : even n = True -> Even n
80− evenEvenConverse {n = Z} prf = (0 ** Refl)
81− evenEvenConverse {n = S k} prf =
82− let (haf ** pf) = oddOddConverse prf in
83− (S haf ** cong pf)
84−
85− ||| If it's odd, it's Odd
86− oddOddConverse : odd n = True -> Odd n
87− oddOddConverse {n = Z} prf = absurd prf
88− oddOddConverse {n = S k} prf =
89− let (half ** pf) = evenEvenConverse prf in
90− (half ** cong pf)
91−
92−----------------------------------------
93−
94−||| Every nat is either even or odd.
95−evenorodd : (n : Nat) -> Either (even n = True) (odd n = True)
96−evenorodd Z = Left Refl
97−evenorodd (S k) = case evenorodd k of
98− Left l => Right l
99− Right r => Left r
100−
101−||| Every nat is either Even or Odd.
102−evenOrOdd : (n : Nat) -> Either (Even n) (Odd n)
103−evenOrOdd n = case evenorodd n of
104− Left e => Left $ evenEvenConverse e
105− Right o => Right $ oddOddConverse o
106−
107−||| No nat is both even and odd.
108−notevenandodd : even n = True -> odd n = True -> Void
109−notevenandodd {n = Z} en on = absurd on
110−notevenandodd {n = S _} en on = notevenandodd on en
111−
112−||| No nat is both Even and Odd.
113−notEvenAndOdd : Even n -> Odd n -> Void
114−notEvenAndOdd en on = notevenandodd (evenEven en) (oddOdd on)
115−
116−||| Evenness is decidable.
117−evenDec : (n : Nat) -> Dec $ Even n
118−evenDec n = case evenOrOdd n of
119− Left even => Yes even
120− Right odd => No $ \even => notEvenAndOdd even odd
121−
122−||| Oddness is decidable.
123−oddDec : (n : Nat) -> Dec $ Odd n
124−oddDec n = case evenOrOdd n of
125− Left even => No $ notEvenAndOdd even
126− Right odd => Yes odd
127−
128−----------------------------------------
129−
130−||| An Odd is the successor of an Even.
131−oddSuccEven : Odd n -> (m : Nat ** (n = S m, Even m))
132−oddSuccEven (haf ** pf) = (haf * 2 ** (pf, (haf ** Refl)))
133−
134−||| Even plus Even is Even.
135−evenPlusEven : Even j -> Even k -> Even (j + k)
136−evenPlusEven (half_j ** pf_j) (half_k ** pf_k) =
137− (half_j + half_k **
138− rewrite pf_j in
139− rewrite pf_k in
140− sym $ multDistributesOverPlusLeft half_j half_k 2)
141−
142−||| Odd plus Even is Odd.
143−oddPlusEven : Odd j -> Even k -> Odd (j + k)
144−oddPlusEven oj ek =
145− let
146− (i ** (ipj, ei)) = oddSuccEven oj
147− (half_ik ** eik) = evenPlusEven ei ek
148− in
149− (half_ik **
150− rewrite ipj in
151− cong {f = S} eik)
152−
153−||| Even plus Odd is Odd.
154−evenPlusOdd : Even j -> Odd k -> Odd (j + k)
155−evenPlusOdd {j} {k} ej ok = rewrite plusCommutative j k in oddPlusEven ok ej
156−
157−||| Odd plus Odd is Even.
158−oddPlusOdd : Odd j -> Odd k -> Even (j + k)
159−oddPlusOdd oj ok =
160− let
161− (i ** (ipj, ei)) = oddSuccEven oj
162− (haf_ik ** oik) = evenPlusOdd ei ok
163− in
164− (S haf_ik **
165− rewrite ipj in
166− rewrite oik in
167− Refl)
168−
169−||| A helper fact.
170−multShuffle : (a, b, c : Nat) ->
171− (a * c) * (b * c) = ((a * b) * c) * c
172−multShuffle a b c =
173− rewrite multAssociative (a * c) b c in
174− rewrite multCommutative (a * c) b in
175− rewrite multAssociative b a c in
176− rewrite multCommutative b a in
177− Refl
178−
179−||| Even times Even is Even.
180−evenMultEven : Even j -> Even k -> Even (j * k)
181−evenMultEven (half_j ** pf_j) (half_k ** pf_k) =
182− (half_j * half_k * 2 **
183− rewrite pf_j in
184− rewrite pf_k in
185− multShuffle half_j half_k 2)
186−
187−||| Odd times Even is Even.
188−oddMultEven : Odd j -> Even k -> Even (j * k)
189−oddMultEven oj (half_k ** pf_k) =
190− let
191− (i ** (ipj, ei)) = oddSuccEven oj
192− (half_ik ** oik) = evenMultEven ei (half_k ** pf_k)
193− in
194− (half_k + half_ik **
195− rewrite multDistributesOverPlusLeft half_k half_ik 2 in
196− rewrite ipj in
197− rewrite oik in
198− rewrite pf_k in
199− Refl)
200−
201−||| Even times Odd is Even.
202−evenMultOdd : Even j -> Odd k -> Even (j * k)
203−evenMultOdd {j} {k} ej ok = rewrite multCommutative j k in oddMultEven ok ej
204−
205−||| Odd times Odd is Odd.
206−oddMultOdd : Odd j -> Odd k -> Odd (j * k)
207−oddMultOdd oj (haf_k ** pf_k) =
208− let
209− (i ** (ipj, ei)) = oddSuccEven oj
210− (half_ik ** eik) = evenMultOdd ei (haf_k ** pf_k)
211− in
212− (haf_k + half_ik **
213− rewrite multDistributesOverPlusLeft haf_k half_ik 2 in
214− rewrite ipj in
215− rewrite eik in
216− rewrite pf_k in
217− Refl)
libs/contrib/Data/Sign.idr−29
@@ -5,35 +5,6 @@ module Data.Sign
5||| A representation of signs for signed datatypes such as `ZZ`
5||| A representation of signs for signed datatypes such as `ZZ`
6data Sign = Plus | Zero | Minus
6data Sign = Plus | Zero | Minus
7
7
8−opposite : Sign -> Sign
9−opposite Plus = Minus
10−opposite Zero = Zero
11−opposite Minus = Plus
12−
13−multiply : Sign -> Sign -> Sign
14−multiply Zero _ = Zero
15−multiply _ Zero = Zero
16−multiply Plus x = x
17−multiply Minus x = opposite x
18−
19||| Discover the sign of some type
8||| Discover the sign of some type
20interface Signed t where
9interface Signed t where
21 total sign : t -> Sign
10 total sign : t -> Sign
22−
23−Signed Int where
24− sign x with (compare x 0)
25− | LT = Minus
26− | EQ = Zero
27− | GT = Plus
28−
29−Signed Integer where
30− sign x with (compare x 0)
31− | LT = Minus
32− | EQ = Zero
33− | GT = Plus
34−
35−Signed Double where
36− sign x with (compare x 0.0)
37− | LT = Minus
38− | EQ = Zero
39− | GT = Plus
libs/contrib/Data/SortedMap.idr−8
@@ -201,10 +201,6 @@ export
201empty : Ord k => SortedMap k v
201empty : Ord k => SortedMap k v
202empty = Empty
202empty = Empty
203
203
204−export
205−singleton : Ord k => k -> v -> SortedMap k v
206−singleton k v = M Z (Leaf k v)
207−
208export
204export
209lookup : k -> SortedMap k v -> Maybe v
205lookup : k -> SortedMap k v -> Maybe v
210lookup _ Empty = Nothing
206lookup _ Empty = Nothing
@@ -291,10 +287,6 @@ export
291mergeLeft : SortedMap k v -> SortedMap k v -> SortedMap k v
287mergeLeft : SortedMap k v -> SortedMap k v -> SortedMap k v
292mergeLeft = mergeWith const
288mergeLeft = mergeWith const
293
289
294−export
295−(Show k, Show v) => Show (SortedMap k v) where
296− show m = "fromList " ++ (show $ toList m)
297−
298-- TODO: is this the right variant of merge to use for this? I think it is, but
290-- TODO: is this the right variant of merge to use for this? I think it is, but
299-- I could also see the advantages of using `mergeLeft`. The current approach is
291-- I could also see the advantages of using `mergeLeft`. The current approach is
300-- strictly more powerful I believe, because `mergeLeft` can be emulated with
292-- strictly more powerful I believe, because `mergeLeft` can be emulated with
libs/contrib/Interfaces/Proposition.idrdeleted−32
@@ -1,32 +0,0 @@
1−module Interfaces.Proposition
2−
3−%default total
4−%access public export
5−
6−
7−||| A canonical proof that some type containing no more than one value,
8−||| comprising a mere proposition.
9−interface Proposition t where
10− ||| If there are two values of t, prove that they are actually the same
11− atMostOneValue : (x : t) -> (y : t) -> x = y
12−
13−Proposition () where
14− atMostOneValue () () = Refl
15−
16−Proposition Void where
17− atMostOneValue _ _ impossible
18−
19−Proposition (x = y) where
20− atMostOneValue Refl Refl = Refl
21−
22−Proposition (LTE m n) where
23− atMostOneValue {m=Z} LTEZero LTEZero = Refl
24− atMostOneValue {m=S _} (LTESucc x) (LTESucc y) = cong $ atMostOneValue x y
25−
26−Proposition (NonEmpty xs) where
27− atMostOneValue IsNonEmpty IsNonEmpty = Refl
28−
29−(Proposition a, Proposition b) => Proposition (a, b) where
30− atMostOneValue (x1, y1) (x2, y2) =
31− rewrite atMostOneValue x1 x2 in
32− rewrite atMostOneValue y1 y2 in Refl
libs/contrib/Interfaces/Verified.idr+29−221
@@ -4,11 +4,8 @@ import Control.Algebra
4import Control.Algebra.Lattice
4import Control.Algebra.Lattice
5import Control.Algebra.NumericImplementations
5import Control.Algebra.NumericImplementations
6import Control.Algebra.VectorSpace
6import Control.Algebra.VectorSpace
7−import Data.Vect
8import Data.ZZ
7import Data.ZZ
9−import Data.Bool.Extra
10
8
11−%default total
12%access public export
9%access public export
13
10
14-- Due to these being basically unused and difficult to implement,
11-- Due to these being basically unused and difficult to implement,
@@ -19,42 +16,17 @@ import Data.Bool.Extra
19-- and Monoid).
16-- and Monoid).
20
17
21interface Functor f => VerifiedFunctor (f : Type -> Type) where
18interface Functor f => VerifiedFunctor (f : Type -> Type) where
22− functorIdentity : {a : Type} -> (g : a -> a) -> ((v : a) -> g v = v) -> (x : f a) -> map g x = x
19+ functorIdentity : {a : Type} -> (x : f a) -> map Basics.id x = Basics.id x
23 functorComposition : {a : Type} -> {b : Type} -> (x : f a) ->
20 functorComposition : {a : Type} -> {b : Type} -> (x : f a) ->
24 (g1 : a -> b) -> (g2 : b -> c) ->
21 (g1 : a -> b) -> (g2 : b -> c) ->
25 map (g2 . g1) x = (map g2 . map g1) x
22 map (g2 . g1) x = (map g2 . map g1) x
26
23
27−functorIdentity' : VerifiedFunctor f => (x : f a) -> map Basics.id x = x
28−functorIdentity' {f} = functorIdentity {f} id (\x => Refl)
29−
30−VerifiedFunctor (Pair a) where
31− functorIdentity g p (a,b) = rewrite p b in Refl
32− functorComposition (a,b) g1 g2 = Refl
33−
34−VerifiedFunctor (Either a) where
35− functorIdentity _ _ (Left _) = Refl
36− functorIdentity _ p (Right x) = cong (p x)
37− functorComposition (Left _) _ _ = Refl
38− functorComposition (Right _) _ _ = Refl
39−
40VerifiedFunctor Maybe where
24VerifiedFunctor Maybe where
41− functorIdentity _ _ Nothing = Refl
25+ functorIdentity Nothing = Refl
42− functorIdentity g p (Just x) = rewrite p x in Refl
26+ functorIdentity (Just x) = Refl
43 functorComposition Nothing g1 g2 = Refl
27 functorComposition Nothing g1 g2 = Refl
44 functorComposition (Just x) g1 g2 = Refl
28 functorComposition (Just x) g1 g2 = Refl
45
29
46−VerifiedFunctor List where
47− functorIdentity _ _ [] = Refl
48− functorIdentity g p (x :: xs) = rewrite p x in cong (functorIdentity g p xs)
49− functorComposition [] _ _ = Refl
50− functorComposition (x :: xs) f g = rewrite functorComposition xs f g in Refl
51−
52−VerifiedFunctor (Vect n) where
53− functorIdentity _ _ [] = Refl
54− functorIdentity g p (x :: xs) = rewrite p x in cong (functorIdentity g p xs)
55− functorComposition [] _ _ = Refl
56− functorComposition (x :: xs) f g = rewrite functorComposition xs f g in Refl
57−
58interface (Applicative f, VerifiedFunctor f) => VerifiedApplicative (f : Type -> Type) where
30interface (Applicative f, VerifiedFunctor f) => VerifiedApplicative (f : Type -> Type) where
59 applicativeMap : (x : f a) -> (g : a -> b) ->
31 applicativeMap : (x : f a) -> (g : a -> b) ->
60 map g x = pure g <*> x
32 map g x = pure g <*> x
@@ -66,90 +38,6 @@ interface (Applicative f, VerifiedFunctor f) => VerifiedApplicative (f : Type ->
66 applicativeInterchange : (x : a) -> (g : f (a -> b)) ->
38 applicativeInterchange : (x : a) -> (g : f (a -> b)) ->
67 g <*> pure x = pure (\g' : (a -> b) => g' x) <*> g
39 g <*> pure x = pure (\g' : (a -> b) => g' x) <*> g
68
40
69−VerifiedApplicative (Either a) where
70− applicativeMap (Left x) g = Refl
71− applicativeMap (Right x) g = Refl
72− applicativeIdentity (Left x) = Refl
73− applicativeIdentity (Right x) = Refl
74− applicativeComposition (Left x) (Left y) (Left z) = Refl
75− applicativeComposition (Left x) (Left y) (Right z) = Refl
76− applicativeComposition (Left x) (Right y) (Left z) = Refl
77− applicativeComposition (Left x) (Right y) (Right z) = Refl
78− applicativeComposition (Right x) (Left y) (Left z) = Refl
79− applicativeComposition (Right x) (Left y) (Right z) = Refl
80− applicativeComposition (Right x) (Right y) (Left z) = Refl
81− applicativeComposition (Right x) (Right y) (Right z) = Refl
82− applicativeHomomorphism x g = Refl
83− applicativeInterchange x (Left y) = Refl
84− applicativeInterchange x (Right y) = Refl
85−
86−private
87−foldrConcatEq : (g1 : List (a -> b)) -> (g2 : List (a -> b)) ->
88− (xs : List a) ->
89− foldr (\f, meth => map f xs ++ meth) [] (g1 ++ g2) = foldr (\f, meth => map f xs ++ meth) [] g1 ++ foldr (\f, meth => map f xs ++ meth) [] g2
90−foldrConcatEq [] _ _ = Refl
91−foldrConcatEq (g1 :: gs1) gs2 xs =
92− trans
93− (cong $ foldrConcatEq gs1 gs2 xs)
94− (appendAssociative
95− (map g1 xs)
96− (foldr (\f, meth => map f xs ++ meth) [] gs1)
97− (foldr (\f, meth => map f xs ++ meth) [] gs2))
98−
99−private
100−foldrConcatEq' : (x1 : List a) -> (x2 : List a) ->
101− (g : a -> List b) ->
102− foldr (\x, meth => g x ++ meth) [] (x1 ++ x2) = foldr (\x, meth => g x ++ meth) [] x1 ++ foldr (\x, meth => g x ++ meth) [] x2
103−foldrConcatEq' [] _ _ = Refl
104−foldrConcatEq' (x1 :: xs1) xs2 g =
105− trans
106− (cong {f=((++) $ g x1)} $ foldrConcatEq' xs1 xs2 g)
107− (appendAssociative
108− (g x1)
109− (foldr (\x, meth => g x ++ meth) [] xs1)
110− (foldr (\x, meth => g x ++ meth) [] xs2))
111−
112−private
113−foldrMapCombine : (xs : List a) -> (gs1 : List (a -> b)) -> (g2 : b -> c) ->
114− map g2 (foldr (\g, meth => map g xs ++ meth) [] gs1) =
115− foldr (\g, meth => map g xs ++ meth) [] (map ((.) g2) gs1)
116−foldrMapCombine xs [] g2 = Refl
117−foldrMapCombine xs (g1 :: gs1) g2 =
118− trans
119− (mapAppendDistributive g2 (map g1 xs) (foldr (\g, meth => map g xs ++ meth) [] gs1))
120− (appendCong2 (sym $ functorComposition xs g1 g2) (foldrMapCombine xs gs1 g2))
121−
122−VerifiedApplicative List where
123− applicativeMap [] f = Refl
124− applicativeMap (x :: xs) f = rewrite applicativeMap xs f in Refl
125− applicativeIdentity xs = rewrite sym $ applicativeMap xs id in functorIdentity' xs
126− applicativeComposition _ _ [] = Refl
127− applicativeComposition xs gs1 (g2 :: gs2) = trans
128− (trans
129− (foldrConcatEq (map ((.) g2) gs1) (foldr (\g, meth => map g gs1 ++ meth) [] (map (.) gs2 ++ [])) xs)
130− (cong $ applicativeComposition xs gs1 gs2))
131− (sym $
132− cong {f=(++ foldr (\g, meth => map g (foldr (\g', meth' => map g' xs ++ meth') [] gs1) ++ meth) [] gs2)} $
133− foldrMapCombine xs gs1 g2)
134− applicativeHomomorphism x g = Refl
135− applicativeInterchange x [] = Refl
136− applicativeInterchange x (g :: gs) = cong $ applicativeInterchange x gs
137−
138−VerifiedApplicative (Vect n) where
139− applicativeMap [] f = Refl
140− applicativeMap (x :: xs) f = rewrite applicativeMap xs f in Refl
141− applicativeIdentity xs = rewrite sym $ applicativeMap xs id in functorIdentity' xs
142− applicativeComposition [] [] [] = Refl
143− applicativeComposition (x :: xs) (f :: fs) (g :: gs) = rewrite applicativeComposition xs fs gs in Refl
144− applicativeHomomorphism = prf
145− where prf : with Vect ((x : a) -> (f : a -> b) -> zipWith Basics.apply (replicate m f) (replicate m x) = replicate m (f x))
146− prf {m = Z} x f = Refl
147− prf {m = S k} x f = rewrite prf {m = k} x f in Refl
148− applicativeInterchange = prf
149− where prf : with Vect ((x : a) -> (f : Vect m (a -> b)) -> zipWith Basics.apply f (replicate m x) = zipWith Basics.apply (replicate m (\f' => f' x)) f)
150− prf {m = Z} x [] = Refl
151− prf {m = S k} x (f :: fs) = rewrite prf x fs in Refl
152−
153VerifiedApplicative Maybe where
41VerifiedApplicative Maybe where
154 applicativeMap Nothing g = Refl
42 applicativeMap Nothing g = Refl
155 applicativeMap (Just x) g = Refl
43 applicativeMap (Just x) g = Refl
@@ -177,64 +65,19 @@ interface (Monad m, VerifiedApplicative m) => VerifiedMonad (m : Type -> Type) w
177 monadAssociativity : (mx : m a) -> (f : a -> m b) -> (g : b -> m c) ->
65 monadAssociativity : (mx : m a) -> (f : a -> m b) -> (g : b -> m c) ->
178 (mx >>= f) >>= g = mx >>= (\x => f x >>= g)
66 (mx >>= f) >>= g = mx >>= (\x => f x >>= g)
179
67
180−VerifiedMonad (Either a) where
181− monadApplicative (Left x) (Left y) = Refl
182− monadApplicative (Left x) (Right y) = Refl
183− monadApplicative (Right x) (Left y) = Refl
184− monadApplicative (Right x) (Right y) = Refl
185− monadLeftIdentity x f = Refl
186− monadRightIdentity (Left x) = Refl
187− monadRightIdentity (Right x) = Refl
188− monadAssociativity (Left x) f g = Refl
189− monadAssociativity (Right x) f g = Refl
190−
191VerifiedMonad Maybe where
68VerifiedMonad Maybe where
192− monadApplicative Nothing Nothing = Refl
69+ monadApplicative Nothing Nothing = Refl
193− monadApplicative Nothing (Just x) = Refl
70+ monadApplicative Nothing (Just x) = Refl
194− monadApplicative (Just x) Nothing = Refl
71+ monadApplicative (Just x) Nothing = Refl
195− monadApplicative (Just x) (Just y) = Refl
72+ monadApplicative (Just x) (Just y) = Refl
196− monadLeftIdentity x f = Refl
73+ monadLeftIdentity x f = Refl
197− monadRightIdentity Nothing = Refl
74+ monadRightIdentity Nothing = Refl
198− monadRightIdentity (Just x) = Refl
75+ monadRightIdentity (Just x) = Refl
199− monadAssociativity Nothing f g = Refl
76+ monadAssociativity Nothing f g = Refl
200− monadAssociativity (Just x) f g = Refl
77+ monadAssociativity (Just x) f g = Refl
201−
202−VerifiedMonad List where
203− monadApplicative [] _ = Refl
204− monadApplicative (x :: xs) [] = Refl
205− monadApplicative (g :: gs) xs = appendCong2 (mapFoldrEq g xs) (monadApplicative gs xs) where
206− mapFoldrEq : (f : a -> b) -> (x : List a) -> map f x = foldr (\x1, meth => f x1 :: meth) [] x
207− mapFoldrEq _ [] = Refl
208− mapFoldrEq f (_ :: x) = cong $ mapFoldrEq f x
209− monadLeftIdentity x f = appendNilRightNeutral (f x)
210− monadRightIdentity [] = Refl
211− monadRightIdentity (x :: xs) = cong $ monadRightIdentity xs
212− monadAssociativity [] _ _ = Refl
213− monadAssociativity (x :: xs) g1 g2 =
214− trans
215− (foldrConcatEq' (g1 x) (foldr (\x1, meth => g1 x1 ++ meth) [] xs) g2)
216− (cong $ monadAssociativity xs g1 g2)
217−
218−interface (Alternative f, VerifiedApplicative f) => VerifiedAlternative (f : Type -> Type) where
219− alternativeLeftIdentity : (x : f a) -> Applicative.empty <|> x = x
220− alternativeRightIdentity : (x : f a) -> x <|> Applicative.empty = x
221− alternativeAssociativity : (x : f a) -> (y : f a) -> (z : f a) ->
222− x <|> (y <|> z) = (x <|> y) <|> z
223−
224−VerifiedAlternative Maybe where
225− alternativeLeftIdentity _ = Refl
226− alternativeRightIdentity Nothing = Refl
227− alternativeRightIdentity (Just _) = Refl
228− alternativeAssociativity Nothing _ _ = Refl
229− alternativeAssociativity (Just _) _ _ = Refl
230−
231−VerifiedAlternative List where
232− alternativeLeftIdentity _ = Refl
233− alternativeRightIdentity = appendNilRightNeutral
234− alternativeAssociativity = appendAssociative
235
78
236interface Semigroup a => VerifiedSemigroup a where
79interface Semigroup a => VerifiedSemigroup a where
237− semigroupOpIsAssociative : (l, c, r : a) -> l <+> (c <+> r) = (l <+> c) <+> r
80+ total semigroupOpIsAssociative : (l, c, r : a) -> l <+> (c <+> r) = (l <+> c) <+> r
238
81
239implementation VerifiedSemigroup (List a) where
82implementation VerifiedSemigroup (List a) where
240 semigroupOpIsAssociative = appendAssociative
83 semigroupOpIsAssociative = appendAssociative
@@ -252,8 +95,8 @@ implementation VerifiedSemigroup (List a) where
252 semigroupOpIsAssociative = multAssociativeZ
95 semigroupOpIsAssociative = multAssociativeZ
253
96
254interface (VerifiedSemigroup a, Monoid a) => VerifiedMonoid a where
97interface (VerifiedSemigroup a, Monoid a) => VerifiedMonoid a where
255− monoidNeutralIsNeutralL : (l : a) -> l <+> Algebra.neutral = l
98+ total monoidNeutralIsNeutralL : (l : a) -> l <+> Algebra.neutral = l
256− monoidNeutralIsNeutralR : (r : a) -> Algebra.neutral <+> r = r
99+ total monoidNeutralIsNeutralR : (r : a) -> Algebra.neutral <+> r = r
257
100
258[PlusNatMonoidV] VerifiedMonoid Nat using PlusNatSemiV, PlusNatMonoid where
101[PlusNatMonoidV] VerifiedMonoid Nat using PlusNatSemiV, PlusNatMonoid where
259 monoidNeutralIsNeutralL = plusZeroRightNeutral
102 monoidNeutralIsNeutralL = plusZeroRightNeutral
@@ -276,8 +119,8 @@ implementation VerifiedMonoid (List a) where
276 monoidNeutralIsNeutralR xs = Refl
119 monoidNeutralIsNeutralR xs = Refl
277
120
278interface (VerifiedMonoid a, Group a) => VerifiedGroup a where
121interface (VerifiedMonoid a, Group a) => VerifiedGroup a where
279− groupInverseIsInverseL : (l : a) -> l <+> inverse l = Algebra.neutral
122+ total groupInverseIsInverseL : (l : a) -> l <+> inverse l = Algebra.neutral
280− groupInverseIsInverseR : (r : a) -> inverse r <+> r = Algebra.neutral
123+ total groupInverseIsInverseR : (r : a) -> inverse r <+> r = Algebra.neutral
281
124
282VerifiedGroup ZZ using PlusZZMonoidV where
125VerifiedGroup ZZ using PlusZZMonoidV where
283 groupInverseIsInverseL k = rewrite sym $ multCommutativeZ (NegS 0) k in
126 groupInverseIsInverseL k = rewrite sym $ multCommutativeZ (NegS 0) k in
@@ -290,15 +133,15 @@ VerifiedGroup ZZ using PlusZZMonoidV where
290 plusNegateInverseRZ k
133 plusNegateInverseRZ k
291
134
292interface (VerifiedGroup a, AbelianGroup a) => VerifiedAbelianGroup a where
135interface (VerifiedGroup a, AbelianGroup a) => VerifiedAbelianGroup a where
293− abelianGroupOpIsCommutative : (l, r : a) -> l <+> r = r <+> l
136+ total abelianGroupOpIsCommutative : (l, r : a) -> l <+> r = r <+> l
294
137
295VerifiedAbelianGroup ZZ where
138VerifiedAbelianGroup ZZ where
296 abelianGroupOpIsCommutative = plusCommutativeZ
139 abelianGroupOpIsCommutative = plusCommutativeZ
297
140
298interface (VerifiedAbelianGroup a, Ring a) => VerifiedRing a where
141interface (VerifiedAbelianGroup a, Ring a) => VerifiedRing a where
299− ringOpIsAssociative : (l, c, r : a) -> l <.> (c <.> r) = (l <.> c) <.> r
142+ total ringOpIsAssociative : (l, c, r : a) -> l <.> (c <.> r) = (l <.> c) <.> r
300− ringOpIsDistributiveL : (l, c, r : a) -> l <.> (c <+> r) = (l <.> c) <+> (l <.> r)
143+ total ringOpIsDistributiveL : (l, c, r : a) -> l <.> (c <+> r) = (l <.> c) <+> (l <.> r)
301− ringOpIsDistributiveR : (l, c, r : a) -> (l <+> c) <.> r = (l <.> r) <+> (c <.> r)
144+ total ringOpIsDistributiveR : (l, c, r : a) -> (l <+> c) <.> r = (l <.> r) <+> (c <.> r)
302
145
303VerifiedRing ZZ where
146VerifiedRing ZZ where
304 ringOpIsAssociative = multAssociativeZ
147 ringOpIsAssociative = multAssociativeZ
@@ -306,54 +149,19 @@ VerifiedRing ZZ where
306 ringOpIsDistributiveR = multDistributesOverPlusLeftZ
149 ringOpIsDistributiveR = multDistributesOverPlusLeftZ
307
150
308interface (VerifiedRing a, RingWithUnity a) => VerifiedRingWithUnity a where
151interface (VerifiedRing a, RingWithUnity a) => VerifiedRingWithUnity a where
309− ringWithUnityIsUnityL : (l : a) -> l <.> Algebra.unity = l
152+ total ringWithUnityIsUnityL : (l : a) -> l <.> Algebra.unity = l
310− ringWithUnityIsUnityR : (r : a) -> Algebra.unity <.> r = r
153+ total ringWithUnityIsUnityR : (r : a) -> Algebra.unity <.> r = r
311
154
312VerifiedRingWithUnity ZZ where
155VerifiedRingWithUnity ZZ where
313 ringWithUnityIsUnityL = multOneRightNeutralZ
156 ringWithUnityIsUnityL = multOneRightNeutralZ
314 ringWithUnityIsUnityR = multOneLeftNeutralZ
157 ringWithUnityIsUnityR = multOneLeftNeutralZ
315
158
316interface JoinSemilattice a => VerifiedJoinSemilattice a where
159interface JoinSemilattice a => VerifiedJoinSemilattice a where
317− joinSemilatticeJoinIsAssociative : (l, c, r : a) -> join l (join c r) = join (join l c) r
160+ total joinSemilatticeJoinIsAssociative : (l, c, r : a) -> join l (join c r) = join (join l c) r
318− joinSemilatticeJoinIsCommutative : (l, r : a) -> join l r = join r l
161+ total joinSemilatticeJoinIsCommutative : (l, r : a) -> join l r = join r l
319− joinSemilatticeJoinIsIdempotent : (e : a) -> join e e = e
162+ total joinSemilatticeJoinIsIdempotent : (e : a) -> join e e = e
320−
321−VerifiedJoinSemilattice Nat where
322− joinSemilatticeJoinIsAssociative = maximumAssociative
323− joinSemilatticeJoinIsCommutative = maximumCommutative
324− joinSemilatticeJoinIsIdempotent = maximumIdempotent
325−
326−VerifiedJoinSemilattice Bool where
327− joinSemilatticeJoinIsAssociative = orAssociative
328− joinSemilatticeJoinIsCommutative = orCommutative
329− joinSemilatticeJoinIsIdempotent = orSameNeutral
330
163
331interface MeetSemilattice a => VerifiedMeetSemilattice a where
164interface MeetSemilattice a => VerifiedMeetSemilattice a where
332− meetSemilatticeMeetIsAssociative : (l, c, r : a) -> meet l (meet c r) = meet (meet l c) r
165+ total meetSemilatticeMeetIsAssociative : (l, c, r : a) -> meet l (meet c r) = meet (meet l c) r
333− meetSemilatticeMeetIsCommutative : (l, r : a) -> meet l r = meet r l
166+ total meetSemilatticeMeetIsCommutative : (l, r : a) -> meet l r = meet r l
334− meetSemilatticeMeetIsIdempotent : (e : a) -> meet e e = e
167+ total meetSemilatticeMeetIsIdempotent : (e : a) -> meet e e = e
335−
336−VerifiedMeetSemilattice Nat where
337− meetSemilatticeMeetIsAssociative = minimumAssociative
338− meetSemilatticeMeetIsCommutative = minimumCommutative
339− meetSemilatticeMeetIsIdempotent = minimumIdempotent
340−
341−VerifiedMeetSemilattice Bool where
342− meetSemilatticeMeetIsAssociative = andAssociative
343− meetSemilatticeMeetIsCommutative = andCommutative
344− meetSemilatticeMeetIsIdempotent = andSameNeutral
345−
346−interface (VerifiedJoinSemilattice a, BoundedJoinSemilattice a) => VerifiedBoundedJoinSemilattice a where
347− joinBottomIsIdentity : (x : a) -> join x Lattice.bottom = x
348−
349−VerifiedBoundedJoinSemilattice Nat where
350− joinBottomIsIdentity = maximumZeroNLeft
351−
352−VerifiedBoundedJoinSemilattice Bool where
353− joinBottomIsIdentity = orFalseNeutral
354−
355−interface (VerifiedMeetSemilattice a, BoundedMeetSemilattice a) => VerifiedBoundedMeetSemilattice a where
356− meetTopIsIdentity : (x : a) -> meet x Lattice.top = x
357−
358−VerifiedBoundedMeetSemilattice Bool where
359− meetTopIsIdentity = andTrueNeutral
libs/contrib/Language/JSON.idr+1−1
@@ -1,4 +1,4 @@
1−||| The JSON language, as described at https://json.org/
1+||| The JSON language, as described at http://json.org/
2module Language.JSON
2module Language.JSON
3
3
4import Language.JSON.Lexer
4import Language.JSON.Lexer
libs/contrib/Network/Cgi.idr−3
@@ -30,12 +30,10 @@ data CGI : Type -> Type where
30getAction : CGI a -> CGIInfo -> IO (a, CGIInfo)
30getAction : CGI a -> CGIInfo -> IO (a, CGIInfo)
31getAction (MkCGI act) = act
31getAction (MkCGI act) = act
32
32
33−export
34implementation Functor CGI where
33implementation Functor CGI where
35 map f (MkCGI c) = MkCGI (\s => do (a, i) <- c s
34 map f (MkCGI c) = MkCGI (\s => do (a, i) <- c s
36 pure (f a, i))
35 pure (f a, i))
37
36
38−export
39implementation Applicative CGI where
37implementation Applicative CGI where
40 pure v = MkCGI (\s => pure (v, s))
38 pure v = MkCGI (\s => pure (v, s))
41
39
@@ -43,7 +41,6 @@ implementation Applicative CGI where
43 (c, j) <- b i
41 (c, j) <- b i
44 pure (f c, j))
42 pure (f c, j))
45
43
46−export
47implementation Monad CGI where
44implementation Monad CGI where
48 (>>=) (MkCGI f) k = MkCGI (\s => do v <- f s
45 (>>=) (MkCGI f) k = MkCGI (\s => do v <- f s
49 getAction (k (fst v)) (snd v))
46 getAction (k (fst v)) (snd v))
libs/contrib/Network/Socket/Data.idr+6−6
@@ -71,15 +71,15 @@ Show SocketFamily where
71 show AF_INET6 = "AF_INET6"
71 show AF_INET6 = "AF_INET6"
72
72
73ToCode SocketFamily where
73ToCode SocketFamily where
74− toCode AF_UNSPEC = unsafePerformIO (foreign FFI_C "#AF_UNSPEC" (IO Int))
74+ toCode AF_UNSPEC = 0
75− toCode AF_INET = unsafePerformIO (foreign FFI_C "#AF_INET" (IO Int))
75+ toCode AF_INET = 2
76− toCode AF_INET6 = unsafePerformIO (foreign FFI_C "#AF_INET6" (IO Int))
76+ toCode AF_INET6 = 10
77
77
78getSocketFamily : Int -> Maybe SocketFamily
78getSocketFamily : Int -> Maybe SocketFamily
79getSocketFamily i =
79getSocketFamily i =
80− Prelude.List.lookup i [ (toCode AF_UNSPEC, AF_UNSPEC)
80+ Prelude.List.lookup i [ (0, AF_UNSPEC)
81− , (toCode AF_INET, AF_INET)
81+ , (2, AF_INET)
82− , (toCode AF_INET6, AF_INET6)
82+ , (10, AF_INET6)
83 ]
83 ]
84
84
85-- ------------------------------------------------------------ [ Socket Types ]
85-- ------------------------------------------------------------ [ Socket Types ]
libs/contrib/Text/Lexer.idr+1−25
@@ -160,16 +160,6 @@ hexDigit = pred isHexDigit
160hexDigits : Lexer
160hexDigits : Lexer
161hexDigits = some hexDigit
161hexDigits = some hexDigit
162
162
163−||| Recognise a single octal digit
164−||| /[0-7]/
165−octDigit : Lexer
166−octDigit = pred isOctDigit
167−
168−||| Recognise one or more octal digits
169−||| /[0-7]+/
170−octDigits : Lexer
171−octDigits = some octDigit
172−
173||| Recognise a single alpha character
163||| Recognise a single alpha character
174||| /[A-Za-z]/
164||| /[A-Za-z]/
175alpha : Lexer
165alpha : Lexer
@@ -279,21 +269,7 @@ stringLit = quote (is '"') (escape '\\' any <|> any)
279||| /'(\\\\.|[\^'])'/
269||| /'(\\\\.|[\^'])'/
280charLit : Lexer
270charLit : Lexer
281charLit = let q = '\'' in
271charLit = let q = '\'' in
282− is q <+> (escape '\\' (control <|> any) <|> isNot q) <+> is q
272+ is q <+> (escape '\\' any <|> isNot q) <+> is q
283− where
284− lexStr : List String -> Lexer
285− lexStr [] = fail
286− lexStr (t :: ts) = exact t <|> lexStr ts
287−
288− control : Lexer
289− control = lexStr ["NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",
290− "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI",
291− "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB",
292− "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US",
293− "SP", "DEL"]
294− <|> (is 'x' <+> hexDigits)
295− <|> (is 'o' <+> octDigits)
296− <|> digits
297
273
298||| Recognise an integer literal (possibly with a '-' prefix)
274||| Recognise an integer literal (possibly with a '-' prefix)
299||| /-?[0-9]+/
275||| /-?[0-9]+/
libs/contrib/Text/Lexer/Core.idr+1−1
@@ -82,7 +82,7 @@ getString (MkStrLen str n) = str
82
82
83strIndex : StrLen -> Nat -> Maybe Char
83strIndex : StrLen -> Nat -> Maybe Char
84strIndex (MkStrLen str len) i
84strIndex (MkStrLen str len) i
85− = if cast {to = Integer} i >= cast len then Nothing
85+ = if i >= len then Nothing
86 else Just (assert_total (prim__strIndex str (cast i)))
86 else Just (assert_total (prim__strIndex str (cast i)))
87
87
88mkStr : String -> StrLen
88mkStr : String -> StrLen
libs/contrib/Text/Parser.idr+1−1
@@ -118,7 +118,7 @@ mutual
118||| list of values from `p`, along with a proof that the resulting list is
118||| list of values from `p`, along with a proof that the resulting list is
119||| non-empty.
119||| non-empty.
120someTill' : {c : Bool} ->
120someTill' : {c : Bool} ->
121− (end : Grammar tok c e) ->
121+ (end : Grammar tok c a) ->
122 (p : Grammar tok True a) ->
122 (p : Grammar tok True a) ->
123 Grammar tok True (xs : List a ** NonEmpty xs)
123 Grammar tok True (xs : List a ** NonEmpty xs)
124someTill' end p
124someTill' end p
libs/contrib/Text/PrettyPrint/WL/Core.idr+2−2
@@ -145,9 +145,9 @@ fits w (Line _ _) = if w < 0 then False else True
145
145
146||| Use the Wadler-Leijen algorithm to pretty print the `doc`.
146||| Use the Wadler-Leijen algorithm to pretty print the `doc`.
147||| The algorithm uses a page width of `width` and a ribbon
147||| The algorithm uses a page width of `width` and a ribbon
148−||| width of `(rfrac * width)` characters. The ribbon width is
148+||| width of `(ribbonfrac * width)` characters. The ribbon width is
149||| the maximal amount of non-indentation characters on a line. The
149||| the maximal amount of non-indentation characters on a line. The
150−||| parameter `rfrac` should be between `0.0` and `1.0`. If it is
150+||| parameter `ribbonfrac` should be between `0.0` and `1.0`. If it is
151||| lower or higher, the ribbon width will be 0 or `width`
151||| lower or higher, the ribbon width will be 0 or `width`
152||| respectively.
152||| respectively.
153render : (rfrac : Double)
153render : (rfrac : Double)
libs/contrib/contrib.ipkg+1−9
@@ -8,17 +8,11 @@ modules = CFFI
8
8
9 , Control.Algebra
9 , Control.Algebra
10 , Control.Algebra.Lattice
10 , Control.Algebra.Lattice
11− , Control.Algebra.Laws
12 , Control.Algebra.NumericImplementations
11 , Control.Algebra.NumericImplementations
13 , Control.Algebra.VectorSpace
12 , Control.Algebra.VectorSpace
14
13
15 , Control.Delayed
14 , Control.Delayed
16−
17− , Control.Isomorphism.Extra
18− , Control.Isomorphism.Fin
19 , Control.Isomorphism.Primitives
15 , Control.Isomorphism.Primitives
20− , Control.Isomorphism.Vect
21−
22 , Control.Monad.Syntax
16 , Control.Monad.Syntax
23 , Control.Partial
17 , Control.Partial
24 , Control.Pipeline
18 , Control.Pipeline
@@ -43,13 +37,12 @@ modules = CFFI
43 , Data.Heap
37 , Data.Heap
44 , Data.IOArray
38 , Data.IOArray
45 , Data.List.Zipper
39 , Data.List.Zipper
46− , Data.List.Reverse
40+ , Data.List.Extra
47
41
48 , Data.Matrix
42 , Data.Matrix
49 , Data.Matrix.Algebraic
43 , Data.Matrix.Algebraic
50 , Data.Matrix.Numeric
44 , Data.Matrix.Numeric
51
45
52− , Data.Nat
53 , Data.Nat.Parity
46 , Data.Nat.Parity
54 , Data.Nat.DivMod
47 , Data.Nat.DivMod
55 , Data.Nat.DivMod.IteratedSubtraction
48 , Data.Nat.DivMod.IteratedSubtraction
@@ -71,7 +64,6 @@ modules = CFFI
71
64
72 , Interfaces.Correlative
65 , Interfaces.Correlative
73 , Interfaces.Verified
66 , Interfaces.Verified
74− , Interfaces.Proposition
75
67
76 , Language.JSON
68 , Language.JSON
77 , Language.JSON.Data
69 , Language.JSON.Data
libs/effects/Effect/File.idr+4−4
@@ -73,8 +73,8 @@ data FileHandle : (m : Mode) -> Type where
73-- ---------------------------------------------- [ Resource Type Construction ]
73-- ---------------------------------------------- [ Resource Type Construction ]
74
74
75||| Calculates the type for the resource being computed over. `Unit`
75||| Calculates the type for the resource being computed over. `Unit`
76−||| to describe pre-and-post file handle acquisition, and `FileHandle
76+||| to describe pre-and-post file handle acquisistion, and `FileHandle
77−||| m` when a file handle has been acquired.
77+||| m` when a file handle has been aqcuired.
78|||
78|||
79||| @m The mode the file handle was generated under.
79||| @m The mode the file handle was generated under.
80||| @ty The functions return type.
80||| @ty The functions return type.
@@ -315,7 +315,7 @@ R = FileHandle Read
315W : Type
315W : Type
316W = FileHandle WriteTruncate
316W = FileHandle WriteTruncate
317
317
318−||| A file can only be appended to.
318+||| A file can only be appeneded to.
319A : Type
319A : Type
320A = FileHandle Append
320A = FileHandle Append
321
321
@@ -324,7 +324,7 @@ RW : Type
324RW = FileHandle ReadWrite
324RW = FileHandle ReadWrite
325
325
326||| A file opened for reading and writing and has been truncated to
326||| A file opened for reading and writing and has been truncated to
327−||| zero if it previously existed.
327+||| zero if it previsiouly existed.
328RWPlus : Type
328RWPlus : Type
329RWPlus = FileHandle ReadWriteTruncate
329RWPlus = FileHandle ReadWriteTruncate
330
330
libs/effects/Effect/Logging/Category.idr+2−2
@@ -130,7 +130,7 @@ initLogger l cs = call $ InitLogger l cs
130|||
130|||
131||| @l The logging level.
131||| @l The logging level.
132||| @cs The logging categories.
132||| @cs The logging categories.
133−||| @m The message to be logged.
133+||| @m THe message to be logged.
134log : (Show a, Eq a) => (l : LogLevel n)
134log : (Show a, Eq a) => (l : LogLevel n)
135 -> (cs : List a)
135 -> (cs : List a)
136 -> (m : String)
136 -> (m : String)
@@ -141,7 +141,7 @@ log l cs msg = call $ Log l cs msg
141|||
141|||
142||| @l The logging level.
142||| @l The logging level.
143||| @cs The logging categories.
143||| @cs The logging categories.
144−||| @m The message to be logged.
144+||| @m THe message to be logged.
145logN : (Show a, Eq a) => (l : Nat)
145logN : (Show a, Eq a) => (l : Nat)
146 -> {auto prf : LTE l 70}
146 -> {auto prf : LTE l 70}
147 -> (cs : List a)
147 -> (cs : List a)
libs/effects/Effect/Perf.idr+1−1
@@ -193,7 +193,7 @@ collectPMetrics b = call $ TurnOn b
193collectPMetricsAndShow : Eff () [PERF]
193collectPMetricsAndShow : Eff () [PERF]
194collectPMetricsAndShow = call $ TurnOn True
194collectPMetricsAndShow = call $ TurnOn True
195
195
196−||| Return gathered metrics
196+||| Return gatheres metrics
197getPerfMetrics : Eff PMetrics [PERF]
197getPerfMetrics : Eff PMetrics [PERF]
198getPerfMetrics = call $ GetMetrics
198getPerfMetrics = call $ GetMetrics
199
199
libs/prelude/Builtins.idr−1
@@ -206,7 +206,6 @@ export data CData : Type
206%extern prim__stderr : Ptr
206%extern prim__stderr : Ptr
207
207
208%extern prim__null : Ptr
208%extern prim__null : Ptr
209−%extern prim__managedNull : ManagedPtr
210%extern prim__eqPtr : Ptr -> Ptr -> Int
209%extern prim__eqPtr : Ptr -> Ptr -> Int
211%extern prim__eqManagedPtr : ManagedPtr -> ManagedPtr -> Int
210%extern prim__eqManagedPtr : ManagedPtr -> ManagedPtr -> Int
212%extern prim__registerPtr : Ptr -> Int -> ManagedPtr
211%extern prim__registerPtr : Ptr -> Int -> ManagedPtr
libs/prelude/Decidable/Equality.idr+7−10
@@ -157,10 +157,7 @@ implementation DecEq a => DecEq (List a) where
157
157
158
158
159-- For the primitives, we have to cheat because we don't have access to their
159-- For the primitives, we have to cheat because we don't have access to their
160−-- internal implementations. We use believe_me for the inequality proofs
160+-- internal implementations.
161−-- because we don't them to reduce (and they should never be needed anyway...)
162−-- A postulate would be better, but erasure analysis may think they're needed
163−-- for computation in a higher order setting.
164
161
165--------------------------------------------------------------------------------
162--------------------------------------------------------------------------------
166-- Int
163-- Int
@@ -173,7 +170,7 @@ implementation DecEq Int where
173 where primitiveEq : x = y
170 where primitiveEq : x = y
174 primitiveEq = really_believe_me (Refl {x})
171 primitiveEq = really_believe_me (Refl {x})
175 primitiveNotEq : x = y -> Void
172 primitiveNotEq : x = y -> Void
176− primitiveNotEq prf = believe_me {b = Void} ()
173+ primitiveNotEq = really_believe_me (id {a = x = y})
177
174
178--------------------------------------------------------------------------------
175--------------------------------------------------------------------------------
179-- Char
176-- Char
@@ -186,7 +183,7 @@ implementation DecEq Char where
186 where primitiveEq : x = y
183 where primitiveEq : x = y
187 primitiveEq = really_believe_me (Refl {x})
184 primitiveEq = really_believe_me (Refl {x})
188 primitiveNotEq : x = y -> Void
185 primitiveNotEq : x = y -> Void
189− primitiveNotEq prf = believe_me {b = Void} ()
186+ primitiveNotEq = really_believe_me (id {a = x = y})
190
187
191--------------------------------------------------------------------------------
188--------------------------------------------------------------------------------
192-- Integer
189-- Integer
@@ -199,7 +196,7 @@ implementation DecEq Integer where
199 where primitiveEq : x = y
196 where primitiveEq : x = y
200 primitiveEq = really_believe_me (Refl {x})
197 primitiveEq = really_believe_me (Refl {x})
201 primitiveNotEq : x = y -> Void
198 primitiveNotEq : x = y -> Void
202− primitiveNotEq prf = believe_me {b = Void} ()
199+ primitiveNotEq = really_believe_me (id {a = x = y})
203
200
204--------------------------------------------------------------------------------
201--------------------------------------------------------------------------------
205-- String
202-- String
@@ -212,7 +209,7 @@ implementation DecEq String where
212 where primitiveEq : x = y
209 where primitiveEq : x = y
213 primitiveEq = really_believe_me (Refl {x})
210 primitiveEq = really_believe_me (Refl {x})
214 primitiveNotEq : x = y -> Void
211 primitiveNotEq : x = y -> Void
215− primitiveNotEq prf = believe_me {b = Void} ()
212+ primitiveNotEq = really_believe_me (id {a = x = y})
216
213
217--------------------------------------------------------------------------------
214--------------------------------------------------------------------------------
218-- Ptr
215-- Ptr
@@ -225,7 +222,7 @@ implementation DecEq Ptr where
225 where primitiveEq : x = y
222 where primitiveEq : x = y
226 primitiveEq = really_believe_me (Refl {x})
223 primitiveEq = really_believe_me (Refl {x})
227 primitiveNotEq : x = y -> Void
224 primitiveNotEq : x = y -> Void
228− primitiveNotEq prf = believe_me {b = Void} ()
225+ primitiveNotEq = really_believe_me (id {a = x = y})
229
226
230--------------------------------------------------------------------------------
227--------------------------------------------------------------------------------
231-- ManagedPtr
228-- ManagedPtr
@@ -238,4 +235,4 @@ implementation DecEq ManagedPtr where
238 where primitiveEq : x = y
235 where primitiveEq : x = y
239 primitiveEq = really_believe_me (Refl {x})
236 primitiveEq = really_believe_me (Refl {x})
240 primitiveNotEq : x = y -> Void
237 primitiveNotEq : x = y -> Void
241− primitiveNotEq prf = believe_me {b = Void} ()
238+ primitiveNotEq = really_believe_me (id {a = x = y})
libs/prelude/IO.idr+1−1
@@ -80,7 +80,7 @@ foreign_prim f fname (FFun arg sc) env
80||| Idris compiler backend in use. For the default C backend, see the
80||| Idris compiler backend in use. For the default C backend, see the
81||| documentation for `FFI_C`.
81||| documentation for `FFI_C`.
82|||
82|||
83−||| For more details, please consult [the Idris documentation](https://idris.readthedocs.io/en/latest/reference/ffi.html).
83+||| For more details, please consult [the Idris documentation](http://docs.idris-lang.org/en/latest/reference/ffi.html).
84|||
84|||
85||| @ f an FFI descriptor, which is specific to the compiler backend.
85||| @ f an FFI descriptor, which is specific to the compiler backend.
86||| @ fname the name of the foreign function
86||| @ fname the name of the foreign function
libs/prelude/Prelude/Algebra.idr+2
@@ -18,6 +18,7 @@ infixl 6 <+>
18interface Semigroup ty where
18interface Semigroup ty where
19 (<+>) : ty -> ty -> ty
19 (<+>) : ty -> ty -> ty
20
20
21+
21||| Sets equipped with a single binary operation that is associative, along with
22||| Sets equipped with a single binary operation that is associative, along with
22||| a neutral element for that binary operation. Must satisfy the following
23||| a neutral element for that binary operation. Must satisfy the following
23||| laws:
24||| laws:
@@ -29,3 +30,4 @@ interface Semigroup ty where
29||| forall a, neutral <+> a == a
30||| forall a, neutral <+> a == a
30interface Semigroup ty => Monoid ty where
31interface Semigroup ty => Monoid ty where
31 neutral : ty
32 neutral : ty
33+
libs/prelude/Prelude/Bool.idr+1−1
@@ -12,7 +12,7 @@ data Bool = False | True
12||| The underlying implementation of the if ... then ... else ... syntax
12||| The underlying implementation of the if ... then ... else ... syntax
13||| @ b the condition on the if
13||| @ b the condition on the if
14||| @ t the value if b is true
14||| @ t the value if b is true
15−||| @ e the value if b is false
15+||| @ e the falue if b is false
16ifThenElse : (b : Bool) -> (t : Lazy a) -> (e : Lazy a) -> a
16ifThenElse : (b : Bool) -> (t : Lazy a) -> (e : Lazy a) -> a
17ifThenElse True t e = t
17ifThenElse True t e = t
18ifThenElse False t e = e
18ifThenElse False t e = e
libs/prelude/Prelude/Either.idr−4
@@ -87,10 +87,6 @@ maybeToEither : (def : Lazy e) -> Maybe a -> Either e a
87maybeToEither def (Just j) = Right j
87maybeToEither def (Just j) = Right j
88maybeToEither def Nothing = Left def
88maybeToEither def Nothing = Left def
89
89
90−||| Convert an Either to a Maybe from Right injection
91−eitherToMaybe : Either e a -> Maybe a
92−eitherToMaybe (Left _) = Nothing
93−eitherToMaybe (Right x) = Just x
94
90
95--------------------------------------------------------------------------------
91--------------------------------------------------------------------------------
96-- Implementations
92-- Implementations
libs/prelude/Prelude/File.idr+33−47
@@ -3,7 +3,6 @@ module Prelude.File
3import Builtins
3import Builtins
4import Prelude.List
4import Prelude.List
5import Prelude.Maybe
5import Prelude.Maybe
6−import Prelude.Functor
7import Prelude.Monad
6import Prelude.Monad
8import Prelude.Chars
7import Prelude.Chars
9import Prelude.Strings
8import Prelude.Strings
@@ -14,7 +13,6 @@ import Prelude.Basics
14import Prelude.Interfaces
13import Prelude.Interfaces
15import Prelude.Either
14import Prelude.Either
16import Prelude.Show
15import Prelude.Show
17−
18import IO
16import IO
19
17
20%access public export
18%access public export
@@ -81,7 +79,7 @@ do_ferror h = foreign FFI_C "fileError" (Ptr -> IO Int) h
81export
79export
82ferror : File -> IO Bool
80ferror : File -> IO Bool
83ferror (FHandle h) = do err <- do_ferror h
81ferror (FHandle h) = do err <- do_ferror h
84− pure (err /= 0)
82+ pure (not (err == 0))
85
83
86||| Call the RTS's file opening function
84||| Call the RTS's file opening function
87private
85private
@@ -96,24 +94,26 @@ export
96fopen : (f : String) -> (m : String) -> IO (Either FileError File)
94fopen : (f : String) -> (m : String) -> IO (Either FileError File)
97fopen f m = do h <- do_fopen f m
95fopen f m = do h <- do_fopen f m
98 if !(nullPtr h)
96 if !(nullPtr h)
99− then Left <$> getFileError
97+ then do err <- getFileError
98+ pure (Left err)
100 else pure (Right (FHandle h))
99 else pure (Right (FHandle h))
101
100
102||| Check whether a file handle is actually a null pointer
101||| Check whether a file handle is actually a null pointer
103export
102export
104validFile : File -> IO Bool
103validFile : File -> IO Bool
105−validFile (FHandle h) = not <$> nullPtr h
104+validFile (FHandle h) = do x <- nullPtr h
105+ pure (not x)
106
106
107||| Modes for opening files
107||| Modes for opening files
108data Mode = Read | WriteTruncate | Append | ReadWrite | ReadWriteTruncate | ReadAppend
108data Mode = Read | WriteTruncate | Append | ReadWrite | ReadWriteTruncate | ReadAppend
109
109
110modeStr : Mode -> String
110modeStr : Mode -> String
111−modeStr Read = "rb"
111+modeStr Read = "r"
112−modeStr WriteTruncate = "wb"
112+modeStr WriteTruncate = "w"
113−modeStr Append = "ab"
113+modeStr Append = "a"
114−modeStr ReadWrite = "rb+"
114+modeStr ReadWrite = "r+"
115−modeStr ReadWriteTruncate = "wb+"
115+modeStr ReadWriteTruncate = "w+"
116−modeStr ReadAppend = "ab+"
116+modeStr ReadAppend = "a+"
117
117
118||| Open a file
118||| Open a file
119||| @ f the filename
119||| @ f the filename
@@ -150,8 +150,7 @@ do_getFileAccessTime h =
150private
150private
151do_getFileModifiedTime : Ptr -> IO Integer
151do_getFileModifiedTime : Ptr -> IO Integer
152do_getFileModifiedTime h =
152do_getFileModifiedTime h =
153− do vm <- getMyVM
154− MkRaw i <- foreign FFI_C "fileModifiedTime" (Ptr -> Ptr -> IO (Raw Integer)) vm h
153+ do MkRaw i <- foreign FFI_C "fileModifiedTime" (Ptr -> IO (Raw Integer)) h
155 pure i
154 pure i
156
155
157private
156private
@@ -169,15 +168,17 @@ fileSize : File -> IO (Either FileError Int)
169fileSize (FHandle h)
168fileSize (FHandle h)
170 = do s <- do_getFileSize h
169 = do s <- do_getFileSize h
171 if (s < 0)
170 if (s < 0)
172− then Left <$> getFileError
171+ then do err <- getFileError
172+ pure (Left err)
173 else pure (Right s)
173 else pure (Right s)
174
174
175export
175export
176fileModifiedTime : File -> IO (Either FileError Integer)
176fileModifiedTime : File -> IO (Either FileError Integer)
177fileModifiedTime (FHandle h)
177fileModifiedTime (FHandle h)
178 = do s <- do_getFileModifiedTime h
178 = do s <- do_getFileModifiedTime h
179− if (s == -1)
179+ if (s < 0)
180− then Left <$> getFileError
180+ then do err <- getFileError
181+ pure (Left err)
181 else pure (Right s)
182 else pure (Right s)
182
183
183export
184export
@@ -185,7 +186,8 @@ fileAccessTime : File -> IO (Either FileError Integer)
185fileAccessTime (FHandle h)
186fileAccessTime (FHandle h)
186 = do s <- do_getFileAccessTime h
187 = do s <- do_getFileAccessTime h
187 if (s < 0)
188 if (s < 0)
188− then Left <$> getFileError
189+ then do err <- getFileError
190+ pure (Left err)
189 else pure (Right s)
191 else pure (Right s)
190
192
191export
193export
@@ -193,9 +195,11 @@ fileStatusTime : File -> IO (Either FileError Integer)
193fileStatusTime (FHandle h)
195fileStatusTime (FHandle h)
194 = do s <- do_getFileStatusTime h
196 = do s <- do_getFileStatusTime h
195 if (s < 0)
197 if (s < 0)
196− then Left <$> getFileError
198+ then do err <- getFileError
199+ pure (Left err)
197 else pure (Right s)
200 else pure (Right s)
198
201
202+
199private
203private
200do_fread : Ptr -> IO' l String
204do_fread : Ptr -> IO' l String
201do_fread h = prim_fread h
205do_fread h = prim_fread h
@@ -259,7 +263,8 @@ do_fwrite h s = do res <- prim_fwrite h s
259 then do errno <- getErrno
263 then do errno <- getErrno
260 if errno == 0
264 if errno == 0
261 then pure (Left FileWriteError)
265 then pure (Left FileWriteError)
262− else Left <$> getFileError
266+ else do err <- getFileError
267+ pure (Left err)
263 else pure (Right ())
268 else pure (Right ())
264
269
265||| Write a line to a file
270||| Write a line to a file
@@ -281,18 +286,7 @@ do_feof h = foreign FFI_C "fileEOF" (Ptr -> IO Int) h
281export
286export
282fEOF : File -> IO Bool
287fEOF : File -> IO Bool
283fEOF (FHandle h) = do eof <- do_feof h
288fEOF (FHandle h) = do eof <- do_feof h
284− pure (eof /= 0)
289+ pure (not (eof == 0))
285−
286−private
287−do_fremove : String -> IO Int
288−do_fremove s = foreign FFI_C "fileRemove" (String -> IO Int) s
289−
290−||| Remove a file
291−||| @s the file name
292−export
293−fRemove : (s : String) -> IO Bool
294−fRemove s = do res <- do_fremove s
295− pure (res == 0)
296
290
297export
291export
298fpoll : File -> IO Bool
292fpoll : File -> IO Bool
@@ -311,8 +305,7 @@ readFile : (filepath : String) -> IO (Either FileError String)
311readFile fn = do Right h <- openFile fn Read
305readFile fn = do Right h <- openFile fn Read
312 | Left err => pure (Left err)
306 | Left err => pure (Left err)
313 Right max <- fileSize h
307 Right max <- fileSize h
314− | Left err => do closeFile h
315− pure (Left err)
308+ | Left err => pure (Left err)
316 sb <- newStringBuffer (max + 1)
309 sb <- newStringBuffer (max + 1)
317 c <- readFile' h max sb
310 c <- readFile' h max sb
318 closeFile h
311 closeFile h
@@ -335,11 +328,8 @@ export
335writeFile : (filepath : String) -> (contents : String) ->
328writeFile : (filepath : String) -> (contents : String) ->
336 IO (Either FileError ())
329 IO (Either FileError ())
337writeFile fn contents = do
330writeFile fn contents = do
338− Right h <- openFile fn WriteTruncate
331+ Right h <- openFile fn WriteTruncate | Left err => pure (Left err)
339− | Left err => pure (Left err)
340− Right () <- fPutStr h contents
332+ Right () <- fPutStr h contents | Left err => pure (Left err)
341− | Left err => do closeFile h
342− pure (Left err)
343 closeFile h
333 closeFile h
344 pure (Right ())
334 pure (Right ())
345
335
@@ -349,7 +339,8 @@ dirOpen : (d : String) -> IO (Either FileError Directory)
349dirOpen d
339dirOpen d
350 = do dptr <- foreign FFI_C "idris_dirOpen" (String -> IO Ptr) d
340 = do dptr <- foreign FFI_C "idris_dirOpen" (String -> IO Ptr) d
351 if !(nullPtr dptr)
341 if !(nullPtr dptr)
352− then Left <$> getFileError
342+ then do err <- getFileError
343+ pure (Left err)
353 else pure (Right (DHandle dptr))
344 else pure (Right (DHandle dptr))
354
345
355export
346export
@@ -360,7 +351,7 @@ export
360dirError : Directory -> IO Bool
351dirError : Directory -> IO Bool
361dirError (DHandle d)
352dirError (DHandle d)
362 = do err <- foreign FFI_C "idris_dirError" (Ptr -> IO Int) d
353 = do err <- foreign FFI_C "idris_dirError" (Ptr -> IO Int) d
363− pure (err /= 0)
354+ pure (not (err == 0))
364
355
365export
356export
366dirEntry : Directory -> IO (Either FileError String)
357dirEntry : Directory -> IO (Either FileError String)
@@ -376,16 +367,11 @@ createDir d
376 = do ok <- foreign FFI_C "idris_mkdir" (String -> IO Int) d
367 = do ok <- foreign FFI_C "idris_mkdir" (String -> IO Int) d
377 if (ok == 0)
368 if (ok == 0)
378 then pure (Right ())
369 then pure (Right ())
379− else Left <$> getFileError
370+ else do err <- getFileError
371+ pure (Left err)
380
372
381export
373export
382changeDir : String -> IO Bool
374changeDir : String -> IO Bool
383changeDir dir
375changeDir dir
384 = do ok <- foreign FFI_C "idris_chdir" (String -> IO Int) dir
376 = do ok <- foreign FFI_C "idris_chdir" (String -> IO Int) dir
385 pure (ok == 0)
377 pure (ok == 0)
386−
387−export
388−currentDir : IO String
389−currentDir = do
390− MkRaw s <- foreign FFI_C "idris_currentDir" (IO (Raw String))
391− pure s
libs/prelude/Prelude/List.idr+10−54
@@ -436,12 +436,12 @@ intercalate sep xss = concat $ intersperse sep xss
436|||
436|||
437||| transpose [[], [1, 2]] = [[1], [2]]
437||| transpose [[], [1, 2]] = [[1], [2]]
438||| transpose (transpose [[], [1, 2]]) = [[1, 2]]
438||| transpose (transpose [[], [1, 2]]) = [[1, 2]]
439+|||
440+||| TODO: Solution which satisfies the totality checker?
439transpose : List (List a) -> List (List a)
441transpose : List (List a) -> List (List a)
440transpose [] = []
442transpose [] = []
441−transpose (heads :: tails) = spreadHeads heads (transpose tails) where
443+transpose ([] :: xss) = transpose xss
442− spreadHeads [] tails = tails
444+transpose ((x::xs) :: xss) = assert_total $ (x :: (mapMaybe head' xss)) :: (transpose (xs :: (map (drop 1) xss)))
443− spreadHeads (head :: heads) [] = [head] :: spreadHeads heads []
444− spreadHeads (head :: heads) (tail :: tails) = (head :: tail) :: spreadHeads heads tails
445
445
446--------------------------------------------------------------------------------
446--------------------------------------------------------------------------------
447-- Membership tests
447-- Membership tests
@@ -675,18 +675,13 @@ split p xs =
675 (chunk, []) => [chunk]
675 (chunk, []) => [chunk]
676 (chunk, (c :: rest)) => chunk :: split p (assert_smaller xs rest)
676 (chunk, (c :: rest)) => chunk :: split p (assert_smaller xs rest)
677
677
678−||| A tuple where the first element is a `List` of the `n` first elements and
678+||| A tuple where the first element is a List of the n first elements and
679−||| the second element is a `List` of the remaining elements of the original.
679+||| the second element is a List of the remaining elements of the list
680−||| It is equivalent to `(take n xs, drop n xs)` (`splitAtTakeDrop`),
680+||| It is equivalent to (take n xs, drop n xs)
681−||| but is more efficient.
682−|||
683||| @ n the index to split at
681||| @ n the index to split at
684−||| @ xs the `List` to split in two
682+||| @ xs the list to split in two
685splitAt : (n : Nat) -> (xs : List a) -> (List a, List a)
683splitAt : (n : Nat) -> (xs : List a) -> (List a, List a)
686−splitAt Z xs = ([], xs)
684+splitAt n xs = (take n xs, drop n xs)
687−splitAt (S k) [] = ([], [])
688−splitAt (S k) (x :: xs) with (splitAt k xs)
689− | (tk, dr) = (x :: tk, dr)
690
685
691||| The partition function takes a predicate a list and returns the pair of
686||| The partition function takes a predicate a list and returns the pair of
692||| lists of elements which do and do not satisfy the predicate, respectively;
687||| lists of elements which do and do not satisfy the predicate, respectively;
@@ -861,40 +856,10 @@ catMaybes (x::xs) =
861-- Properties
856-- Properties
862--------------------------------------------------------------------------------
857--------------------------------------------------------------------------------
863
858
864−Uninhabited ([] = _ :: _) where
865− uninhabited Refl impossible
866−
867−Uninhabited (_ :: _ = []) where
868− uninhabited Refl impossible
869−
870||| (::) is injective
859||| (::) is injective
871−consInjective : {x : a} -> {xs : List a} -> {y : b} -> {ys : List b} ->
872− (x :: xs) = (y :: ys) -> (x = y, xs = ys)
860+consInjective : (x :: xs) = (y :: ys) -> (x = y, xs = ys)
873consInjective Refl = (Refl, Refl)
861consInjective Refl = (Refl, Refl)
874
862
875−||| Two lists are equal, if their heads are equal and their tails are equal.
876−consCong2 : {x : a} -> {xs : List a} -> {y : b} -> {ys : List b} ->
877− x = y -> xs = ys -> x :: xs = y :: ys
878−consCong2 Refl Refl = Refl
879−
880−||| Appending pairwise equal lists gives equal lists
881−appendCong2 : {x1 : List a} -> {x2 : List a} ->
882− {y1 : List b} -> {y2 : List b} ->
883− x1 = y1 -> x2 = y2 -> x1 ++ x2 = y1 ++ y2
884−appendCong2 {x1=[]} {y1=(_ :: _)} Refl _ impossible
885−appendCong2 {x1=(_ :: _)} {y1=[]} Refl _ impossible
886−appendCong2 {x1=[]} {y1=[]} _ eq2 = eq2
887−appendCong2 {x1=(_ :: _)} {y1=(_ :: _)} eq1 eq2 =
888− consCong2
889− (fst $ consInjective eq1)
890− (appendCong2 (snd $ consInjective eq1) eq2)
891−
892−||| List.map is distributive over appending.
893−mapAppendDistributive : (f : a -> b) -> (x : List a) -> (y : List a) ->
894− map f (x ++ y) = map f x ++ map f y
895−mapAppendDistributive _ [] _ = Refl
896−mapAppendDistributive f (_ :: xs) y = cong $ mapAppendDistributive f xs y
897−
898||| The empty list is a right identity for append.
863||| The empty list is a right identity for append.
899appendNilRightNeutral : (l : List a) ->
864appendNilRightNeutral : (l : List a) ->
900 l ++ [] = l
865 l ++ [] = l
@@ -966,12 +931,3 @@ foldlAsFoldr f z t = foldr (flip (.) . flip f) id t z
966foldlMatchesFoldr : (f : b -> a -> b) -> (q : b) -> (xs : List a) -> foldl f q xs = foldlAsFoldr f q xs
931foldlMatchesFoldr : (f : b -> a -> b) -> (q : b) -> (xs : List a) -> foldl f q xs = foldlAsFoldr f q xs
967foldlMatchesFoldr f q [] = Refl
932foldlMatchesFoldr f q [] = Refl
968foldlMatchesFoldr f q (x :: xs) = foldlMatchesFoldr f (f q x) xs
933foldlMatchesFoldr f q (x :: xs) = foldlMatchesFoldr f (f q x) xs
969−
970−splitAtTakeDrop : (n : Nat) -> (xs : List a) -> splitAt n xs = (take n xs, drop n xs)
971−splitAtTakeDrop Z xs = Refl
972−splitAtTakeDrop (S k) [] = Refl
973−splitAtTakeDrop (S k) (x :: xs) with (splitAt k xs) proof p
974− | (tk, dr) = let prf = trans p (splitAtTakeDrop k xs)
975− in aux (cong {f=(x ::) . fst} prf) (cong {f=snd} prf)
976− where aux : {a, b : Type} -> {w, x : a} -> {y, z : b} -> w = x -> y = z -> (w, y) = (x, z)
977− aux Refl Refl = Refl
libs/prelude/Prelude/Nat.idr+61−32
@@ -512,18 +512,19 @@ plusLeftCancel (S left) right right' p =
512
512
513total plusRightCancel : (left : Nat) -> (left' : Nat) -> (right : Nat) ->
513total plusRightCancel : (left : Nat) -> (left' : Nat) -> (right : Nat) ->
514 (p : left + right = left' + right) -> left = left'
514 (p : left + right = left' + right) -> left = left'
515−plusRightCancel left left' right p =
515+plusRightCancel left left' Z p = rewrite sym (plusZeroRightNeutral left) in
516− plusLeftCancel right left left' $
516+ rewrite sym (plusZeroRightNeutral left') in
517− rewrite plusCommutative right left in
517+ p
518− rewrite plusCommutative right left' in
518+plusRightCancel left left' (S right) p =
519− p
519+ plusRightCancel left left' right
520+ (succInjective _ _ (rewrite plusSuccRightSucc left right in
521+ rewrite plusSuccRightSucc left' right in p))
520
522
521total plusLeftLeftRightZero : (left : Nat) -> (right : Nat) ->
523total plusLeftLeftRightZero : (left : Nat) -> (right : Nat) ->
522 (p : left + right = left) -> right = Z
524 (p : left + right = left) -> right = Z
523−plusLeftLeftRightZero left right p =
525+plusLeftLeftRightZero Z right p = p
524− plusLeftCancel left right Z $
526+plusLeftLeftRightZero (S left) right p =
525− rewrite plusZeroRightNeutral left in
527+ plusLeftLeftRightZero left right (succInjective _ _ p)
526− p
527
528
528-- Mult
529-- Mult
529total multZeroLeftZero : (right : Nat) -> Z * right = Z
530total multZeroLeftZero : (right : Nat) -> Z * right = Z
@@ -557,21 +558,27 @@ multCommutative (S left) right =
557 rewrite multRightSuccPlus right left in
558 rewrite multRightSuccPlus right left in
558 Refl
559 Refl
559
560
560−total multDistributesOverPlusLeft : (left : Nat) -> (centre : Nat) -> (right : Nat) ->
561− (left + centre) * right = (left * right) + (centre * right)
562−multDistributesOverPlusLeft Z centre right = Refl
563−multDistributesOverPlusLeft (S k) centre right =
564− rewrite multDistributesOverPlusLeft k centre right in
565− rewrite plusAssociative right (k * right) (centre * right) in
566− Refl
567−
568total multDistributesOverPlusRight : (left : Nat) -> (centre : Nat) -> (right : Nat) ->
561total multDistributesOverPlusRight : (left : Nat) -> (centre : Nat) -> (right : Nat) ->
569 left * (centre + right) = (left * centre) + (left * right)
562 left * (centre + right) = (left * centre) + (left * right)
570−multDistributesOverPlusRight left centre right =
563+multDistributesOverPlusRight Z centre right = Refl
571− rewrite multCommutative left (centre + right) in
564+multDistributesOverPlusRight (S left) centre right =
572− rewrite multCommutative left centre in
565+ let inductiveHypothesis = multDistributesOverPlusRight left centre right in
573− rewrite multCommutative left right in
566+ rewrite inductiveHypothesis in
567+ rewrite plusAssociative (plus centre (mult left centre)) right (mult left right) in
568+ rewrite sym (plusAssociative centre (mult left centre) right) in
569+ rewrite plusCommutative (mult left centre) right in
570+ rewrite plusAssociative centre right (mult left centre) in
571+ rewrite plusAssociative (plus centre right) (mult left centre) (mult left right) in
572+ Refl
573+
574+total multDistributesOverPlusLeft : (left : Nat) -> (centre : Nat) -> (right : Nat) ->
575+ (left + centre) * right = (left * right) + (centre * right)
574− multDistributesOverPlusLeft centre right left
576+multDistributesOverPlusLeft Z centre right = Refl
577+multDistributesOverPlusLeft (S left) centre right =
578+ let inductiveHypothesis = multDistributesOverPlusLeft left centre right in
579+ rewrite inductiveHypothesis in
580+ rewrite plusAssociative right (mult left right) (mult centre right) in
581+ Refl
575
582
576total multAssociative : (left : Nat) -> (centre : Nat) -> (right : Nat) ->
583total multAssociative : (left : Nat) -> (centre : Nat) -> (right : Nat) ->
577 left * (centre * right) = (left * centre) * right
584 left * (centre * right) = (left * centre) * right
@@ -583,10 +590,18 @@ multAssociative (S left) centre right =
583 Refl
590 Refl
584
591
585total multOneLeftNeutral : (right : Nat) -> 1 * right = right
592total multOneLeftNeutral : (right : Nat) -> 1 * right = right
586−multOneLeftNeutral right = plusZeroRightNeutral right
593+multOneLeftNeutral Z = Refl
594+multOneLeftNeutral (S right) =
595+ let inductiveHypothesis = multOneLeftNeutral right in
596+ rewrite inductiveHypothesis in
597+ Refl
587
598
588total multOneRightNeutral : (left : Nat) -> left * 1 = left
599total multOneRightNeutral : (left : Nat) -> left * 1 = left
589−multOneRightNeutral left = rewrite multCommutative left 1 in multOneLeftNeutral left
600+multOneRightNeutral Z = Refl
601+multOneRightNeutral (S left) =
602+ let inductiveHypothesis = multOneRightNeutral left in
603+ rewrite inductiveHypothesis in
604+ Refl
590
605
591-- Minus
606-- Minus
592total minusSuccSucc : (left : Nat) -> (right : Nat) ->
607total minusSuccSucc : (left : Nat) -> (right : Nat) ->
@@ -674,7 +689,10 @@ total powerZeroOne : (base : Nat) -> power base 0 = S Z
674powerZeroOne base = Refl
689powerZeroOne base = Refl
675
690
676total powerOneNeutral : (base : Nat) -> power base 1 = base
691total powerOneNeutral : (base : Nat) -> power base 1 = base
677−powerOneNeutral base = rewrite multCommutative base 1 in multOneLeftNeutral base
692+powerOneNeutral Z = Refl
693+powerOneNeutral (S base) =
694+ let inductiveHypothesis = powerOneNeutral base in
695+ rewrite inductiveHypothesis in Refl
678
696
679total powerOneSuccOne : (exp : Nat) -> power 1 exp = S Z
697total powerOneSuccOne : (exp : Nat) -> power 1 exp = S Z
680powerOneSuccOne Z = Refl
698powerOneSuccOne Z = Refl
@@ -683,7 +701,8 @@ powerOneSuccOne (S exp) =
683 rewrite inductiveHypothesis in Refl
701 rewrite inductiveHypothesis in Refl
684
702
685total powerSuccSuccMult : (base : Nat) -> power base 2 = mult base base
703total powerSuccSuccMult : (base : Nat) -> power base 2 = mult base base
704+powerSuccSuccMult Z = Refl
686−powerSuccSuccMult base = rewrite multOneRightNeutral base in Refl
705+powerSuccSuccMult (S base) = rewrite multOneRightNeutral base in Refl
687
706
688total powerPowerMultPower : (base : Nat) -> (exp : Nat) -> (exp' : Nat) ->
707total powerPowerMultPower : (base : Nat) -> (exp : Nat) -> (exp' : Nat) ->
689 power (power base exp) exp' = power base (exp * exp')
708 power (power base exp) exp' = power base (exp * exp')
@@ -777,24 +796,34 @@ minimumIdempotent Z = Refl
777minimumIdempotent (S k) = cong (minimumIdempotent k)
796minimumIdempotent (S k) = cong (minimumIdempotent k)
778
797
779total minimumZeroZeroRight : (right : Nat) -> minimum 0 right = Z
798total minimumZeroZeroRight : (right : Nat) -> minimum 0 right = Z
780−minimumZeroZeroRight right = Refl
799+minimumZeroZeroRight Z = Refl
800+minimumZeroZeroRight (S right) = minimumZeroZeroRight right
781
801
782total minimumZeroZeroLeft : (left : Nat) -> minimum left 0 = Z
802total minimumZeroZeroLeft : (left : Nat) -> minimum left 0 = Z
783−minimumZeroZeroLeft left = rewrite minimumCommutative left 0 in Refl
803+minimumZeroZeroLeft Z = Refl
804+minimumZeroZeroLeft (S left) = Refl
784
805
785total minimumSuccSucc : (left : Nat) -> (right : Nat) ->
806total minimumSuccSucc : (left : Nat) -> (right : Nat) ->
786 minimum (S left) (S right) = S (minimum left right)
807 minimum (S left) (S right) = S (minimum left right)
787−minimumSuccSucc left right = Refl
808+minimumSuccSucc Z Z = Refl
809+minimumSuccSucc (S left) Z = Refl
810+minimumSuccSucc Z (S right) = Refl
811+minimumSuccSucc (S left) (S right) = Refl
788
812
789total maximumZeroNRight : (right : Nat) -> maximum Z right = right
813total maximumZeroNRight : (right : Nat) -> maximum Z right = right
790−maximumZeroNRight right = Refl
814+maximumZeroNRight Z = Refl
815+maximumZeroNRight (S right) = Refl
791
816
792total maximumZeroNLeft : (left : Nat) -> maximum left Z = left
817total maximumZeroNLeft : (left : Nat) -> maximum left Z = left
793−maximumZeroNLeft left = rewrite maximumCommutative left Z in Refl
818+maximumZeroNLeft Z = Refl
819+maximumZeroNLeft (S left) = Refl
794
820
795total maximumSuccSucc : (left : Nat) -> (right : Nat) ->
821total maximumSuccSucc : (left : Nat) -> (right : Nat) ->
796 S (maximum left right) = maximum (S left) (S right)
822 S (maximum left right) = maximum (S left) (S right)
797−maximumSuccSucc left right = Refl
823+maximumSuccSucc Z Z = Refl
824+maximumSuccSucc (S left) Z = Refl
825+maximumSuccSucc Z (S right) = Refl
826+maximumSuccSucc (S left) (S right) = Refl
798
827
799total sucMaxL : (l : Nat) -> maximum (S l) l = (S l)
828total sucMaxL : (l : Nat) -> maximum (S l) l = (S l)
800sucMaxL Z = Refl
829sucMaxL Z = Refl
libs/prelude/Prelude/Strings.idr−8
@@ -146,9 +146,6 @@ reverse = prim__strRev
146null : Ptr
146null : Ptr
147null = prim__null
147null = prim__null
148
148
149−managedNull : ManagedPtr
150−managedNull = prim__managedNull
151−
152-- Some more complex string operations
149-- Some more complex string operations
153
150
154data StrM : String -> Type where
151data StrM : String -> Type where
@@ -401,11 +398,6 @@ nullPtr : Ptr -> IO Bool
401nullPtr p = do ok <- foreign FFI_C "isNull" (Ptr -> IO Int) p
398nullPtr p = do ok <- foreign FFI_C "isNull" (Ptr -> IO Int) p
402 pure (ok /= 0)
399 pure (ok /= 0)
403
400
404−partial
405−nullManagedPtr : ManagedPtr -> IO Bool
406−nullManagedPtr p = do ok <- foreign FFI_C "isNull" (ManagedPtr -> IO Int) p
407− pure (ok /= 0)
408−
409||| Check if a supposed string was actually a null pointer
401||| Check if a supposed string was actually a null pointer
410partial
402partial
411nullStr : String -> IO Bool
403nullStr : String -> IO Bool
libs/prelude/Prelude/WellFounded.idr−5

This diff is too big to show here.

man/idris.1+2−6

This diff is too big to show here.

rts/Makefile+11−7

This diff is too big to show here.

rts/idris_bitstring.c+10−2

This diff is too big to show here.

rts/idris_buffer.c+3−7

This diff is too big to show here.

rts/idris_buffer.h+1−1

This diff is too big to show here.

rts/idris_gc.c+9−15

This diff is too big to show here.

rts/idris_gmp.c+10−10

This diff is too big to show here.

rts/idris_heap.c−2

This diff is too big to show here.

rts/idris_main.c+1−1

This diff is too big to show here.

rts/idris_rts.c+59−61

This diff is too big to show here.

rts/idris_rts.h+33−22

This diff is too big to show here.

rts/idris_stdfgn.c+5−46

This diff is too big to show here.

rts/idris_stdfgn.h+1−8

This diff is too big to show here.

rts/idris_utf8.c+1

This diff is too big to show here.

rts/seL4/CMakeLists.txtdeleted−43

This diff is too big to show here.

rts/seL4/Kbuildnew file+2

This diff is too big to show here.

rts/seL4/Kconfignew file+9

This diff is too big to show here.

rts/seL4/Makefilenew file+33

This diff is too big to show here.

rts/seL4/README.mddeleted−5

This diff is too big to show here.

rts/seL4/idris_main.c+3−2

This diff is too big to show here.

rts/windows/win_utils.c−16

This diff is too big to show here.

rts/windows/win_utils.hdeleted−9

This diff is too big to show here.

src/IRTS/Bytecode.hs+2−3

This diff is too big to show here.

src/IRTS/CodegenC.hs+80−97

This diff is too big to show here.

src/IRTS/Compiler.hs+15−132

This diff is too big to show here.

src/IRTS/DumpBC.hs−1

This diff is too big to show here.

src/IRTS/JavaScript/AST.hs+1−1

This diff is too big to show here.

src/IRTS/JavaScript/Codegen.hs+4−7

This diff is too big to show here.

src/IRTS/JavaScript/PrimOp.hs+4−4

This diff is too big to show here.

src/IRTS/Lang.hs−25

This diff is too big to show here.

src/IRTS/LangOpts.hs+27−56

This diff is too big to show here.

src/IRTS/Portable.hs−1

This diff is too big to show here.

src/IRTS/System.hs+1−1

This diff is too big to show here.

src/Idris/AbsSyntax.hs+1−2

This diff is too big to show here.

src/Idris/AbsSyntaxTree.hs+8−24

This diff is too big to show here.

src/Idris/Chaser.hs+22−48

This diff is too big to show here.

src/Idris/CmdOptions.hs+3−15

This diff is too big to show here.

src/Idris/Core/CaseTree.hs+5−5

This diff is too big to show here.

src/Idris/Core/Evaluate.hs−7

This diff is too big to show here.

src/Idris/Core/Execute.hs+1−13

This diff is too big to show here.

src/Idris/Core/TT.hs+3−9

This diff is too big to show here.

src/Idris/Directives.hs+5−7

This diff is too big to show here.

src/Idris/Docs.hs+6−11

This diff is too big to show here.

src/Idris/Elab/Clause.hs+8−8

This diff is too big to show here.

src/Idris/Elab/Data.hs+3−4

This diff is too big to show here.

src/Idris/Elab/Interface.hs+5−6

This diff is too big to show here.

src/Idris/Elab/Record.hs+4−5

This diff is too big to show here.

src/Idris/Elab/Term.hs+5−5

This diff is too big to show here.

src/Idris/Elab/Type.hs+2−2

This diff is too big to show here.

src/Idris/Elab/Value.hs−1

This diff is too big to show here.

src/Idris/ElabDecls.hs+1−3

This diff is too big to show here.

src/Idris/Erasure.hs−3

This diff is too big to show here.

src/Idris/IBC.hs+6−86

This diff is too big to show here.

src/Idris/IdrisDoc.hs+8−7

This diff is too big to show here.

src/Idris/Imports.hs+1−7

This diff is too big to show here.

src/Idris/Main.hs+2−1

This diff is too big to show here.

src/Idris/ModeCommon.hs+1−1

This diff is too big to show here.

src/Idris/Options.hs+1−1

This diff is too big to show here.

src/Idris/Output.hs+15−18

This diff is too big to show here.

src/Idris/Package/Parser.hs+7−11

This diff is too big to show here.

src/Idris/Parser.hs+159−194

This diff is too big to show here.

src/Idris/Parser/Expr.hs+2−2

This diff is too big to show here.

src/Idris/Parser/Helpers.hs+10−17

This diff is too big to show here.

src/Idris/Parser/Ops.hs+3−11

This diff is too big to show here.

src/Idris/Parser/Stack.hs+13−38

This diff is too big to show here.

src/Idris/Primitives.hs+1−5

This diff is too big to show here.

src/Idris/REPL.hs+7−11

This diff is too big to show here.

src/Idris/REPL/Parser.hs+6−5

This diff is too big to show here.

src/Idris/Reflection.hs+1−1

This diff is too big to show here.

src/Util/Net.hs+12−9

This diff is too big to show here.

src/Util/System.hs−4

This diff is too big to show here.

stack-11.22.yamldeleted−21

This diff is too big to show here.

stack-12.26.yamldeleted−20

This diff is too big to show here.

stack-15.3.yamldeleted−17

This diff is too big to show here.

stack-15.4.yamldeleted−17

This diff is too big to show here.

stack-shell.nix+2−4

This diff is too big to show here.

stack.yamlmode 120000 → 100644+19−1

This diff is too big to show here.

test/README.md+5−5

This diff is too big to show here.

test/TestData.hs+1−5

This diff is too big to show here.

test/TestRun.hs+16−22

This diff is too big to show here.

test/base001/expected.out → test/base001/expectedrenamed

The content is the same.

test/base001/run.sh → test/base001/runrenamed+1−1

This diff is too big to show here.

test/basic001/expected.out → test/basic001/expectedrenamed

The content is the same.

test/basic001/run.sh → test/basic001/runrenamed

Only the mode changed.

test/basic002/expected.out → test/basic002/expectedrenamed

The content is the same.

test/basic002/run.sh → test/basic002/runrenamed

Only the mode changed.

test/basic003/expected.out → test/basic003/expectedrenamed

The content is the same.

test/basic003/run.sh → test/basic003/runrenamed

Only the mode changed.

test/basic004/expected.out → test/basic004/expectedrenamed

The content is the same.

test/basic004/run.sh → test/basic004/runrenamed

Only the mode changed.

test/basic005/expected.out → test/basic005/expectedrenamed

The content is the same.

test/basic005/run.sh → test/basic005/runrenamed

Only the mode changed.

test/basic006/expected.out → test/basic006/expectedrenamed

The content is the same.

test/basic006/run.sh → test/basic006/runrenamed

Only the mode changed.

test/basic007/expected.out → test/basic007/expectedrenamed

The content is the same.

test/basic007/run.sh → test/basic007/runrenamed

Only the mode changed.

test/basic008/expected.out → test/basic008/expectedrenamed

The content is the same.

test/basic008/run.sh → test/basic008/runrenamed

Only the mode changed.

test/basic009/expected.out → test/basic009/expectedrenamed

The content is the same.

test/basic009/run.sh → test/basic009/runrenamed

Only the mode changed.

test/basic010/expected.out → test/basic010/expectedrenamed

The content is the same.

test/basic010/run.sh → test/basic010/runrenamed

Only the mode changed.

test/basic011/expected.out → test/basic011/expectedrenamed

The content is the same.

test/basic011/run.sh → test/basic011/runrenamed

Only the mode changed.

test/basic012/expected.out → test/basic012/expectedrenamed

The content is the same.

test/basic012/run.sh → test/basic012/runrenamed

Only the mode changed.

test/basic013/expected.out → test/basic013/expectedrenamed

The content is the same.

test/basic013/run.sh → test/basic013/runrenamed

Only the mode changed.

test/basic014/expected.out → test/basic014/expectedrenamed

The content is the same.

test/basic014/run.sh → test/basic014/runrenamed

Only the mode changed.

test/basic015/expected.out → test/basic015/expectedrenamed

The content is the same.

test/basic015/run.sh → test/basic015/runrenamed

Only the mode changed.

test/basic016/expected.out → test/basic016/expectedrenamed

The content is the same.

test/basic016/run.sh → test/basic016/runrenamed

Only the mode changed.

test/basic017/expected.out → test/basic017/expectedrenamed

The content is the same.

test/basic017/run.sh → test/basic017/runrenamed

Only the mode changed.

test/basic018/expected.out → test/basic018/expectedrenamed

The content is the same.

test/basic018/run.sh → test/basic018/runrenamed

Only the mode changed.

test/basic019/expected.out → test/basic019/expectedrenamed

The content is the same.

test/basic019/run.sh → test/basic019/runrenamed

Only the mode changed.

test/basic020/expected.out → test/basic020/expectedrenamed

The content is the same.

test/basic020/run.sh → test/basic020/runrenamed

Only the mode changed.

test/basic021/expected.out → test/basic021/expectedrenamed

The content is the same.

test/basic021/run.sh → test/basic021/runrenamed

Only the mode changed.

test/basic022/expected.out → test/basic022/expectedrenamed

The content is the same.

test/basic022/run.sh → test/basic022/runrenamed

Only the mode changed.

test/basic023/expected.out → test/basic023/expectedrenamed

The content is the same.

test/basic023/run.sh → test/basic023/runrenamed

Only the mode changed.

test/basic024/expected.out → test/basic024/expectedrenamed

The content is the same.

test/basic024/input.in → test/basic024/inputrenamed

The content is the same.

test/basic024/run.sh → test/basic024/runrenamed+1−1

This diff is too big to show here.

test/basic025/expected.out → test/basic025/expectedrenamed

The content is the same.

test/basic025/input.in → test/basic025/inputrenamed

The content is the same.

test/basic025/run.sh → test/basic025/runrenamed+2−2

This diff is too big to show here.

test/basic026/expected.out → test/basic026/expectedrenamed

The content is the same.

test/basic026/run.sh → test/basic026/runrenamed

The content is the same.

test/bignum001/expected.out → test/bignum001/expectedrenamed

The content is the same.

test/bignum001/run.sh → test/bignum001/runrenamed

Only the mode changed.

test/bignum002/expected.out → test/bignum002/expectedrenamed

The content is the same.

test/bignum002/run.sh → test/bignum002/runrenamed

Only the mode changed.

test/bignum003/expected.out → test/bignum003/expectedrenamed

The content is the same.

test/bignum003/run.sh → test/bignum003/runrenamed

Only the mode changed.

test/bounded001/expected.out → test/bounded001/expectedrenamed

The content is the same.

test/bounded001/run.sh → test/bounded001/runrenamed

Only the mode changed.

test/buffer001/expected.out → test/buffer001/expectedrenamed

The content is the same.

test/buffer001/run.sh → test/buffer001/runrenamed

Only the mode changed.

test/buffer002/expected.out → test/buffer002/expectedrenamed

The content is the same.

test/buffer002/run.sh → test/buffer002/runrenamed

Only the mode changed.

test/contrib001/expected.out → test/contrib001/expectedrenamed

The content is the same.

test/contrib001/run.sh → test/contrib001/runrenamed

Only the mode changed.

test/corecords001/expected.out → test/corecords001/expectedrenamed

The content is the same.

test/corecords001/run.sh → test/corecords001/runrenamed

Only the mode changed.

test/corecords002/expected.out → test/corecords002/expectedrenamed

The content is the same.

test/corecords002/run.sh → test/corecords002/runrenamed

Only the mode changed.

test/delab001/expected.out → test/delab001/expectedrenamed

The content is the same.

test/delab001/input.in → test/delab001/inputrenamed

The content is the same.

test/delab001/run.sh → test/delab001/runrenamed+1−1

This diff is too big to show here.

test/directives001/expected.out → test/directives001/expectedrenamed

The content is the same.

test/directives001/run.sh → test/directives001/runrenamed

Only the mode changed.

test/directives002/expected.out → test/directives002/expectedrenamed

The content is the same.

test/directives002/run.sh → test/directives002/runrenamed

The content is the same.

test/directives003/expected.out → test/directives003/expectedrenamed

The content is the same.

test/directives003/run.sh → test/directives003/runrenamed

Only the mode changed.

test/disambig002/disambig002.idr+5

This diff is too big to show here.

test/disambig002/expected.out → test/disambig002/expectedrenamed

The content is the same.

test/disambig002/run.sh → test/disambig002/runrenamed

Only the mode changed.

test/docs001/expected.out → test/docs001/expectedrenamed+1−1

This diff is too big to show here.

test/docs001/input.in → test/docs001/inputrenamed

The content is the same.

test/docs001/run.sh → test/docs001/runrenamed+1−1

This diff is too big to show here.

test/docs002/expectednew file+12

This diff is too big to show here.

test/docs002/expected.outdeleted−12

This diff is too big to show here.

test/docs002/input.in → test/docs002/inputrenamed

The content is the same.

test/docs002/run.sh → test/docs002/runrenamed+1−1

This diff is too big to show here.

test/docs003/expected.out → test/docs003/expectedrenamed+1−3

This diff is too big to show here.

test/docs003/input.in → test/docs003/inputrenamed

The content is the same.

test/docs003/run.sh → test/docs003/runrenamed+1−1

This diff is too big to show here.

test/docs004/expected.out → test/docs004/expectedrenamed+3−3

This diff is too big to show here.

test/docs004/input.in → test/docs004/inputrenamed

The content is the same.

test/docs004/run.sh → test/docs004/runrenamed+1−1

This diff is too big to show here.

test/docs005/expected.out → test/docs005/expectedrenamed+1−3

This diff is too big to show here.

test/docs005/input.in → test/docs005/inputrenamed

The content is the same.

test/docs005/run.sh → test/docs005/runrenamed+1−1

This diff is too big to show here.

test/docs006/expected.out → test/docs006/expectedrenamed+1−1

This diff is too big to show here.

test/docs006/input.in → test/docs006/inputrenamed

The content is the same.

test/docs006/run.sh → test/docs006/runrenamed+1−1

This diff is too big to show here.

test/dsl001/expected.out → test/dsl001/expectedrenamed

The content is the same.

test/dsl001/input.in → test/dsl001/inputrenamed

The content is the same.

test/dsl001/run.sh → test/dsl001/runrenamed+1−1

This diff is too big to show here.

test/dsl002/expected.out → test/dsl002/expectedrenamed

The content is the same.

test/dsl002/run.sh → test/dsl002/runrenamed

Only the mode changed.

test/dsl002/test.in → test/dsl002/testrenamed

The content is the same.

test/dsl002/test014.idr+1−1

This diff is too big to show here.

test/dsl003/expected.out → test/dsl003/expectedrenamed

The content is the same.

test/dsl003/run.sh → test/dsl003/runrenamed

Only the mode changed.

test/dsl004/expected.out → test/dsl004/expectedrenamed

The content is the same.

test/dsl004/run.sh → test/dsl004/runrenamed

Only the mode changed.

test/effects001/expected.out → test/effects001/expectedrenamed

The content is the same.

test/effects001/run.sh → test/effects001/runrenamed

Only the mode changed.

test/effects001/test021.idr+1−1

This diff is too big to show here.

test/effects001/testFile.in → test/effects001/testFilerenamed

The content is the same.

test/effects002/expected.out → test/effects002/expectedrenamed

The content is the same.

test/effects002/run.sh → test/effects002/runrenamed

Only the mode changed.

test/effects003/expected.out → test/effects003/expectedrenamed

The content is the same.

test/effects003/input.in → test/effects003/inputrenamed

The content is the same.

test/effects003/run.sh → test/effects003/runrenamed+1−1

This diff is too big to show here.

test/effects004/expected.out → test/effects004/expectedrenamed

The content is the same.

test/effects004/input.in → test/effects004/inputrenamed

The content is the same.

test/effects004/run.sh → test/effects004/runrenamed+1−1

This diff is too big to show here.

test/effects005/expected.out → test/effects005/expectedrenamed

The content is the same.

test/effects005/run.sh → test/effects005/runrenamed

Only the mode changed.

test/error001/expected.out → test/error001/expectedrenamed

The content is the same.

test/error001/run.sh → test/error001/runrenamed

Only the mode changed.

test/error002/expected.out → test/error002/expectedrenamed

The content is the same.

test/error002/run.sh → test/error002/runrenamed

Only the mode changed.

test/error003/expected.out → test/error003/expectedrenamed

The content is the same.

test/error003/run.sh → test/error003/runrenamed

Only the mode changed.

test/error004/expected.out → test/error004/expectedrenamed

The content is the same.

test/error004/run.sh → test/error004/runrenamed

Only the mode changed.

test/error005/expected.out → test/error005/expectedrenamed

The content is the same.

test/error005/run.sh → test/error005/runrenamed

Only the mode changed.

test/error006/WithPatsNoWith.idr−11

This diff is too big to show here.

test/error006/expectednew file+7

This diff is too big to show here.

test/error006/expected.outdeleted−21

This diff is too big to show here.

test/error006/run.sh → test/error006/runrenamed

Only the mode changed.

test/error007/expected.out → test/error007/expectedrenamed

The content is the same.

test/error007/run.sh → test/error007/runrenamed

Only the mode changed.

test/error008/expected.out → test/error008/expectedrenamed

The content is the same.

test/error008/run.sh → test/error008/runrenamed

Only the mode changed.

test/error009/expected.out → test/error009/expectedrenamed

The content is the same.

test/error009/run.sh → test/error009/runrenamed

Only the mode changed.

test/ffi001/expected.out → test/ffi001/expectedrenamed

The content is the same.

test/ffi001/run.sh → test/ffi001/runrenamed

Only the mode changed.

test/ffi002/expected.out → test/ffi002/expectedrenamed

The content is the same.

test/ffi002/run.sh → test/ffi002/runrenamed

Only the mode changed.

test/ffi003/expected.out → test/ffi003/expectedrenamed

The content is the same.

test/ffi003/input.in → test/ffi003/inputrenamed

The content is the same.

test/ffi003/run.sh → test/ffi003/runrenamed+1−1

This diff is too big to show here.

test/ffi004/expected.out → test/ffi004/expectedrenamed

The content is the same.

test/ffi004/run.sh → test/ffi004/runrenamed

Only the mode changed.

test/ffi005/expected.out → test/ffi005/expectedrenamed

The content is the same.

test/ffi005/run.sh → test/ffi005/runrenamed

Only the mode changed.

test/ffi006/expected.out → test/ffi006/expectedrenamed

The content is the same.

test/ffi006/run.sh → test/ffi006/runrenamed

Only the mode changed.

test/ffi007/expected.out → test/ffi007/expectedrenamed

The content is the same.

test/ffi007/run.sh → test/ffi007/runrenamed

The content is the same.

test/ffi008/expected.out → test/ffi008/expectedrenamed

The content is the same.

test/ffi008/run.sh → test/ffi008/runrenamed

The content is the same.

test/ffi009/expected.out → test/ffi009/expectedrenamed

The content is the same.

test/ffi009/run.sh → test/ffi009/runrenamed

Only the mode changed.

test/ffi010/expected.out → test/ffi010/expectedrenamed

The content is the same.

test/ffi010/run.sh → test/ffi010/runrenamed

Only the mode changed.

test/ffi011/expected.out → test/ffi011/expectedrenamed

The content is the same.

test/ffi011/ffi011.js → test/ffi011/ffi011renamed

The content is the same.

test/ffi011/run.sh → test/ffi011/runrenamed+1−1

This diff is too big to show here.

test/ffi012/expected.outdeleted−1

This diff is too big to show here.

test/ffi012/ffi012.idrdeleted−14

This diff is too big to show here.

test/ffi012/ffi012.jsdeleted−3

This diff is too big to show here.

test/ffi012/run.shdeleted−4

This diff is too big to show here.

test/ffi013/expected.outdeleted−4

This diff is too big to show here.

test/ffi013/ffi013.idrdeleted−5

This diff is too big to show here.

test/ffi013/run.shdeleted−17

This diff is too big to show here.

test/folding001/expected.out → test/folding001/expectedrenamed

The content is the same.

test/folding001/run.sh → test/folding001/runrenamed

Only the mode changed.

test/idrisdoc001/expected.out → test/idrisdoc001/expectedrenamed

The content is the same.

test/idrisdoc001/run.sh → test/idrisdoc001/runrenamed

Only the mode changed.

test/idrisdoc002/expected.out → test/idrisdoc002/expectedrenamed

The content is the same.

test/idrisdoc002/run.sh → test/idrisdoc002/runrenamed

Only the mode changed.

test/idrisdoc003/expected.out → test/idrisdoc003/expectedrenamed

The content is the same.

test/idrisdoc003/run.sh → test/idrisdoc003/runrenamed

Only the mode changed.

test/idrisdoc004/expected.out → test/idrisdoc004/expectedrenamed

The content is the same.

test/idrisdoc004/run.sh → test/idrisdoc004/runrenamed

Only the mode changed.

test/idrisdoc005/expected.out → test/idrisdoc005/expectedrenamed

The content is the same.

test/idrisdoc005/run.sh → test/idrisdoc005/runrenamed

Only the mode changed.

test/idrisdoc006/expected.out → test/idrisdoc006/expectedrenamed

The content is the same.

test/idrisdoc006/run.sh → test/idrisdoc006/runrenamed

Only the mode changed.

test/idrisdoc007/expected.out → test/idrisdoc007/expectedrenamed

The content is the same.

test/idrisdoc007/run.sh → test/idrisdoc007/runrenamed

Only the mode changed.

test/idrisdoc008/expected.out → test/idrisdoc008/expectedrenamed

The content is the same.

test/idrisdoc008/run.sh → test/idrisdoc008/runrenamed

Only the mode changed.

test/idrisdoc009/expected.out → test/idrisdoc009/expectedrenamed−2

This diff is too big to show here.

test/idrisdoc009/input.in → test/idrisdoc009/inputrenamed

The content is the same.

test/idrisdoc009/run.sh → test/idrisdoc009/runrenamed+1−1

This diff is too big to show here.

test/interactive001/expected.out → test/interactive001/expectedrenamed

The content is the same.

test/interactive001/input.in → test/interactive001/inputrenamed

The content is the same.

test/interactive001/run.sh → test/interactive001/runrenamed+1−1

This diff is too big to show here.

test/interactive002/expected.out → test/interactive002/expectedrenamed

The content is the same.

test/interactive002/input.in → test/interactive002/inputrenamed

The content is the same.

test/interactive002/run.sh → test/interactive002/runrenamed+1−1

This diff is too big to show here.

test/interactive003/expected.out → test/interactive003/expectedrenamed

The content is the same.

test/interactive003/input.in → test/interactive003/inputrenamed

The content is the same.

test/interactive003/run.sh → test/interactive003/runrenamed+1−1

This diff is too big to show here.

test/interactive004/expected.out → test/interactive004/expectedrenamed

The content is the same.

test/interactive004/input.in → test/interactive004/inputrenamed

The content is the same.

test/interactive004/run.sh → test/interactive004/runrenamed+1−1

This diff is too big to show here.

test/interactive005/expected.out → test/interactive005/expectedrenamed+3−3

This diff is too big to show here.

test/interactive005/input.in → test/interactive005/inputrenamed

The content is the same.

test/interactive005/run.sh → test/interactive005/runrenamed+1−1

This diff is too big to show here.

test/interactive006/expected.out → test/interactive006/expectedrenamed

The content is the same.

test/interactive006/input.in → test/interactive006/inputrenamed

The content is the same.

test/interactive006/run.sh → test/interactive006/runrenamed+1−1

This diff is too big to show here.

test/interactive007/expected.out → test/interactive007/expectedrenamed

The content is the same.

test/interactive007/input.in → test/interactive007/inputrenamed

The content is the same.

test/interactive007/run.sh → test/interactive007/runrenamed+1−1

This diff is too big to show here.

test/interactive008/expected.out → test/interactive008/expectedrenamed

The content is the same.

test/interactive008/input.in → test/interactive008/inputrenamed

The content is the same.

test/interactive008/runnew file+2

This diff is too big to show here.

test/interactive008/run.shdeleted−2

This diff is too big to show here.

test/interactive009/expected.out → test/interactive009/expectedrenamed

The content is the same.

test/interactive009/input.in → test/interactive009/inputrenamed

The content is the same.

test/interactive009/run.sh → test/interactive009/runrenamed+1−1

This diff is too big to show here.

test/interactive010/expected.out → test/interactive010/expectedrenamed

The content is the same.

test/interactive010/input.in → test/interactive010/inputrenamed

The content is the same.

test/interactive010/run.sh → test/interactive010/runrenamed+1−1

This diff is too big to show here.

test/interactive011/expected.out → test/interactive011/expectedrenamed

The content is the same.

test/interactive011/input.in → test/interactive011/inputrenamed

The content is the same.

test/interactive011/run.sh → test/interactive011/runrenamed+1−1

This diff is too big to show here.

test/interactive012/expected.out → test/interactive012/expectedrenamed

The content is the same.

test/interactive012/input.in → test/interactive012/inputrenamed

The content is the same.

test/interactive012/run.sh → test/interactive012/runrenamed+1−1

This diff is too big to show here.

test/interactive013/expected.out → test/interactive013/expectedrenamed

The content is the same.

test/interactive013/input.in → test/interactive013/inputrenamed

The content is the same.

test/interactive013/run.sh → test/interactive013/runrenamed+1−1

This diff is too big to show here.

test/interactive014/expected.out → test/interactive014/expectedrenamed

The content is the same.

test/interactive014/input.in → test/interactive014/inputrenamed

The content is the same.

test/interactive014/run.sh → test/interactive014/runrenamed+1−1

This diff is too big to show here.

test/interactive015/expected.out → test/interactive015/expectedrenamed

The content is the same.

test/interactive015/input.in → test/interactive015/inputrenamed

The content is the same.

test/interactive015/run.sh → test/interactive015/runrenamed+1−1

This diff is too big to show here.

test/interactive016/expected.out → test/interactive016/expectedrenamed

The content is the same.

test/interactive016/input.in → test/interactive016/inputrenamed

The content is the same.

test/interactive016/run.sh → test/interactive016/runrenamed+1−1

This diff is too big to show here.

test/interactive017/expected.out → test/interactive017/expectedrenamed

The content is the same.

test/interactive017/run.sh → test/interactive017/runrenamed

Only the mode changed.

test/interactive018/expected.out → test/interactive018/expectedrenamed

The content is the same.

test/interactive018/input.in → test/interactive018/inputrenamed

The content is the same.

test/interactive018/runnew file+3

This diff is too big to show here.

test/interactive018/run.shdeleted−3

This diff is too big to show here.

test/interfaces001/expected.out → test/interfaces001/expectedrenamed+2−3

This diff is too big to show here.

test/interfaces001/input.in → test/interfaces001/inputrenamed

The content is the same.

test/interfaces001/run.sh → test/interfaces001/runrenamed+1−1

This diff is too big to show here.

test/interfaces002/expected.out → test/interfaces002/expectedrenamed

The content is the same.

test/interfaces002/run.sh → test/interfaces002/runrenamed

Only the mode changed.

test/interfaces003/expected.out → test/interfaces003/expectedrenamed

The content is the same.

test/interfaces003/run.sh → test/interfaces003/runrenamed

Only the mode changed.

test/interfaces004/expected.out → test/interfaces004/expectedrenamed

The content is the same.

test/interfaces004/run.sh → test/interfaces004/runrenamed

Only the mode changed.

test/interfaces005/expected.out → test/interfaces005/expectedrenamed

The content is the same.

test/interfaces005/run.sh → test/interfaces005/runrenamed

Only the mode changed.

test/interfaces006/expected.out → test/interfaces006/expectedrenamed

The content is the same.

test/interfaces006/run.sh → test/interfaces006/runrenamed

Only the mode changed.

test/interfaces007/expected.out → test/interfaces007/expectedrenamed

The content is the same.

test/interfaces007/run.sh → test/interfaces007/runrenamed

Only the mode changed.

test/interfaces008/expected.out → test/interfaces008/expectedrenamed

The content is the same.

test/interfaces008/run.sh → test/interfaces008/runrenamed

Only the mode changed.

test/interfaces009/expected.out → test/interfaces009/expectedrenamed

The content is the same.

test/interfaces009/run.sh → test/interfaces009/runrenamed

Only the mode changed.

test/interfaces010/interfaces010.idrdeleted−12

This diff is too big to show here.

test/interfaces010/run.shdeleted−3

This diff is too big to show here.

test/interpret001/expected.out → test/interpret001/expectedrenamed

The content is the same.

test/interpret001/input.in → test/interpret001/inputrenamed

The content is the same.

test/interpret001/run.sh → test/interpret001/runrenamed+1−1

This diff is too big to show here.

test/interpret002/expected.out → test/interpret002/expectedrenamed

The content is the same.

test/interpret002/input.in → test/interpret002/inputrenamed

The content is the same.

test/interpret002/run.sh → test/interpret002/runrenamed+1−1

This diff is too big to show here.

test/interpret003/expected.out → test/interpret003/expectedrenamed

The content is the same.

test/interpret003/input.in → test/interpret003/inputrenamed

The content is the same.

test/interpret003/run.sh → test/interpret003/runrenamed+1−1

This diff is too big to show here.

test/io001/expected.out → test/io001/expectedrenamed

The content is the same.

test/io001/run.sh → test/io001/runrenamed

Only the mode changed.

test/io002/expected.out → test/io002/expectedrenamed

The content is the same.

test/io002/run.sh → test/io002/runrenamed

Only the mode changed.

test/io003/expected.out → test/io003/expectedrenamed

The content is the same.

test/io003/run.sh → test/io003/runrenamed

Only the mode changed.

test/layout001/expected.out → test/layout001/expectedrenamed

The content is the same.

test/layout001/run.sh → test/layout001/runrenamed

Only the mode changed.

test/literate001/expected.out → test/literate001/expectedrenamed

The content is the same.

test/literate001/run.sh → test/literate001/runrenamed

Only the mode changed.

test/interfaces010/expected.out → test/meta001/expectedrenamed

The content is the same.

test/meta001/run.sh → test/meta001/runrenamed

Only the mode changed.

test/meta002/expected.out → test/meta002/expectedrenamed

The content is the same.

test/meta002/run.sh → test/meta002/runrenamed

Only the mode changed.

test/meta003/expected.out → test/meta003/expectedrenamed

The content is the same.

test/meta003/run.sh → test/meta003/runrenamed

Only the mode changed.

test/meta004/expected.out → test/meta004/expectedrenamed

The content is the same.

test/meta004/run.sh → test/meta004/runrenamed

Only the mode changed.

test/pkg001/expected.out → test/pkg001/expectedrenamed

The content is the same.

test/pkg001/run.sh → test/pkg001/runrenamed

Only the mode changed.

test/pkg001/test-pkg.ipkg+3−3

This diff is too big to show here.

test/meta001/expected.out → test/pkg002/expectedrenamed

The content is the same.

test/pkg002/run.sh → test/pkg002/runrenamed

Only the mode changed.

test/pkg002/expected.out → test/pkg003/expectedrenamed

The content is the same.

test/pkg003/run.sh → test/pkg003/runrenamed

Only the mode changed.

test/pkg004/expected.out → test/pkg004/expectedrenamed

The content is the same.

test/pkg004/run.sh → test/pkg004/runrenamed

Only the mode changed.

test/pkg005/expected.out → test/pkg005/expectedrenamed

The content is the same.

test/pkg005/run.sh → test/pkg005/runrenamed

Only the mode changed.

test/pkg006/expected.out → test/pkg006/expectedrenamed

The content is the same.

test/pkg006/run.sh → test/pkg006/runrenamed

Only the mode changed.

test/pkg007/expected.out → test/pkg007/expectedrenamed

The content is the same.

test/pkg007/input.in → test/pkg007/inputrenamed

The content is the same.

test/pkg007/run.sh → test/pkg007/runrenamed+1−1

This diff is too big to show here.

test/pkg008/expected.out → test/pkg008/expectedrenamed+2

This diff is too big to show here.

test/pkg008/maths.ipkg−1

This diff is too big to show here.

test/pkg008/run.sh → test/pkg008/runrenamed

Only the mode changed.

test/pkg009/expected.out → test/pkg009/expectedrenamed

The content is the same.

test/pkg009/run.sh → test/pkg009/runrenamed

Only the mode changed.

test/pkg010/expectednew file+28

This diff is too big to show here.

test/pkg010/expected.outdeleted−29

This diff is too big to show here.

test/pkg010/run.sh → test/pkg010/runrenamed

Only the mode changed.

test/prelude001/expected.out → test/prelude001/expectedrenamed

The content is the same.

test/prelude001/run.sh → test/prelude001/runrenamed

Only the mode changed.

test/primitives001/expected.out → test/primitives001/expectedrenamed

The content is the same.

test/primitives001/input.in → test/primitives001/inputrenamed

The content is the same.

test/primitives001/run.sh → test/primitives001/runrenamed+1−1

This diff is too big to show here.

test/primitives002/expected.out → test/primitives002/expectedrenamed

The content is the same.

test/primitives002/run.sh → test/primitives002/runrenamed

Only the mode changed.

test/primitives003/expected.out → test/primitives003/expectedrenamed

The content is the same.

test/primitives003/run.sh → test/primitives003/runrenamed

Only the mode changed.

test/primitives004-disabled/expected.out → test/primitives004-disabled/expectedrenamed

The content is the same.

test/primitives004-disabled/run.sh → test/primitives004-disabled/runrenamed

Only the mode changed.

test/primitives005/expected.out → test/primitives005/expectedrenamed

The content is the same.

test/primitives005/run.sh → test/primitives005/runrenamed

The content is the same.

test/primitives006/expected.out → test/primitives006/expectedrenamed

The content is the same.

test/primitives006/run.sh → test/primitives006/runrenamed

Only the mode changed.

test/proof001/expected.out → test/proof001/expectedrenamed

The content is the same.

test/proof001/run.sh → test/proof001/runrenamed

Only the mode changed.

test/proof002/expected.out → test/proof002/expectedrenamed

The content is the same.

test/proof002/run.sh → test/proof002/runrenamed

Only the mode changed.

test/proof003/expected.out → test/proof003/expectedrenamed

The content is the same.

test/proof003/run.sh → test/proof003/runrenamed

Only the mode changed.

test/pkg003/expected.out → test/proof004/expectedrenamed

The content is the same.

test/proof004/run.sh → test/proof004/runrenamed

Only the mode changed.

test/proof004/expected.out → test/proof005/expectedrenamed

The content is the same.

test/proof005/run.sh → test/proof005/runrenamed

Only the mode changed.

test/proof005/expected.out → test/proof006/expectedrenamed

The content is the same.

test/proof006/run.sh → test/proof006/runrenamed

Only the mode changed.

test/proof007/expected.out → test/proof007/expectedrenamed

The content is the same.

test/proof007/run.sh → test/proof007/runrenamed

Only the mode changed.

test/proof008/expected.out → test/proof008/expectedrenamed

The content is the same.

test/proof008/run.sh → test/proof008/runrenamed

Only the mode changed.

test/proof009/expected.out → test/proof009/expectedrenamed

The content is the same.

test/proof009/input.in → test/proof009/inputrenamed

The content is the same.

test/proof009/run.sh → test/proof009/runrenamed+1−1

This diff is too big to show here.

test/proof010/expected.out → test/proof010/expectedrenamed

The content is the same.

test/proof010/run.sh → test/proof010/runrenamed

Only the mode changed.

test/proof011/expected.out → test/proof011/expectedrenamed

The content is the same.

test/proof011/run.sh → test/proof011/runrenamed

Only the mode changed.

test/proof006/expected.out → test/proofsearch001/expectedrenamed

The content is the same.

test/proofsearch001/run.sh → test/proofsearch001/runrenamed

Only the mode changed.

test/proofsearch001/expected.out → test/proofsearch002/expectedrenamed

The content is the same.

test/proofsearch002/run.sh → test/proofsearch002/runrenamed

Only the mode changed.

test/proofsearch002/expected.out → test/proofsearch003/expectedrenamed

The content is the same.

test/proofsearch003/run.sh → test/proofsearch003/runrenamed

Only the mode changed.

test/proofsearch003/expected.out → test/pruviloj001/expectedrenamed

The content is the same.

test/pruviloj001/run.sh → test/pruviloj001/runrenamed

Only the mode changed.

test/quasiquote001/expected.out → test/quasiquote001/expectedrenamed

The content is the same.

test/quasiquote001/run.sh → test/quasiquote001/runrenamed

Only the mode changed.

test/quasiquote002/expected.out → test/quasiquote002/expectedrenamed

The content is the same.

test/quasiquote002/run.sh → test/quasiquote002/runrenamed

Only the mode changed.

test/quasiquote003/expected.out → test/quasiquote003/expectedrenamed

The content is the same.

test/quasiquote003/run.sh → test/quasiquote003/runrenamed

Only the mode changed.

test/quasiquote004/expected.out → test/quasiquote004/expectedrenamed

The content is the same.

test/quasiquote004/run.sh → test/quasiquote004/runrenamed

Only the mode changed.

test/pruviloj001/expected.out → test/quasiquote005/expectedrenamed

The content is the same.

test/quasiquote005/run.sh → test/quasiquote005/runrenamed

Only the mode changed.

test/quasiquote006/expected.out → test/quasiquote006/expectedrenamed

The content is the same.

test/quasiquote006/run.sh → test/quasiquote006/runrenamed

Only the mode changed.

test/records001/expected.out → test/records001/expectedrenamed

The content is the same.

test/records001/run.sh → test/records001/runrenamed

Only the mode changed.

test/records002/expected.out → test/records002/expectedrenamed

The content is the same.

test/records002/run.sh → test/records002/runrenamed

Only the mode changed.

test/records003/expected.out → test/records003/expectedrenamed

The content is the same.

test/records003/run.sh → test/records003/runrenamed

Only the mode changed.

test/records004/expected.out → test/records004/expectedrenamed

The content is the same.

test/records004/run.sh → test/records004/runrenamed

Only the mode changed.

test/records005/expected.out → test/records005/expectedrenamed

The content is the same.

test/records005/run.sh → test/records005/runrenamed

Only the mode changed.

test/reg001/expected.out → test/reg001/expectedrenamed

The content is the same.

test/reg001/run.sh → test/reg001/runrenamed

Only the mode changed.

test/reg002/expected.out → test/reg002/expectedrenamed

The content is the same.

test/reg002/run.sh → test/reg002/runrenamed

Only the mode changed.

test/reg004/expected.out → test/reg004/expectedrenamed

The content is the same.

test/reg004/run.sh → test/reg004/runrenamed

Only the mode changed.

test/reg005/expected.out → test/reg005/expectedrenamed

The content is the same.

test/reg005/run.sh → test/reg005/runrenamed

Only the mode changed.

test/reg007/expected.out → test/reg007/expectedrenamed

The content is the same.

test/reg007/run.sh → test/reg007/runrenamed

Only the mode changed.

test/reg013/expected.out → test/reg013/expectedrenamed

The content is the same.

test/reg013/run.sh → test/reg013/runrenamed

Only the mode changed.

test/reg016/expected.out → test/reg016/expectedrenamed

The content is the same.

test/reg016/run.sh → test/reg016/runrenamed

Only the mode changed.

test/reg017/expected.out → test/reg017/expectedrenamed

The content is the same.

test/reg017/run.sh → test/reg017/runrenamed

Only the mode changed.

test/reg020/expected.out → test/reg020/expectedrenamed

The content is the same.

test/reg020/run.sh → test/reg020/runrenamed

Only the mode changed.

test/reg024/expected.out → test/reg024/expectedrenamed

The content is the same.

test/reg024/run.sh → test/reg024/runrenamed

Only the mode changed.

test/reg025/expected.out → test/reg025/expectedrenamed

The content is the same.

test/reg025/run.sh → test/reg025/runrenamed

Only the mode changed.

test/reg027/expected.out → test/reg027/expectedrenamed

The content is the same.

test/reg027/run.sh → test/reg027/runrenamed

Only the mode changed.

test/reg029/expected.out → test/reg029/expectedrenamed

The content is the same.

test/reg029/run.sh → test/reg029/runrenamed

Only the mode changed.

test/reg031/expected.out → test/reg031/expectedrenamed

The content is the same.

test/reg031/run.sh → test/reg031/runrenamed

Only the mode changed.

test/reg032/expected.out → test/reg032/expectedrenamed

The content is the same.

test/reg032/run.sh → test/reg032/runrenamed

Only the mode changed.

test/reg039/expected.out → test/reg039/expectedrenamed

The content is the same.

test/reg039/run.sh → test/reg039/runrenamed

Only the mode changed.

test/reg040/expected.out → test/reg040/expectedrenamed

The content is the same.

test/reg040/run.sh → test/reg040/runrenamed

Only the mode changed.

test/reg041/expected.out → test/reg041/expectedrenamed

The content is the same.

test/reg041/run.sh → test/reg041/runrenamed

Only the mode changed.

test/reg042/expected.out → test/reg042/expectedrenamed

The content is the same.

test/reg042/run.sh → test/reg042/runrenamed

Only the mode changed.

test/reg045/expected.out → test/reg045/expectedrenamed

The content is the same.

test/reg045/run.sh → test/reg045/runrenamed

Only the mode changed.

test/quasiquote005/expected.out → test/reg048/expectedrenamed

The content is the same.

test/reg048/run.sh → test/reg048/runrenamed

Only the mode changed.

test/reg048/expected.out → test/reg051-disabled/expectedrenamed

The content is the same.

test/reg051-disabled/run.sh → test/reg051-disabled/runrenamed

Only the mode changed.

test/reg052/expected.out → test/reg052/expectedrenamed

The content is the same.

test/reg052/run.sh → test/reg052/runrenamed

Only the mode changed.

test/reg067/expected.out → test/reg067/expectedrenamed

The content is the same.

test/reg067/run.sh → test/reg067/runrenamed

Only the mode changed.

test/reg075/expected.out → test/reg075/expectedrenamed

The content is the same.

test/reg075/input.in → test/reg075/inputrenamed

The content is the same.

test/reg075/runnew file+3

This diff is too big to show here.

test/reg075/run.shdeleted−3

This diff is too big to show here.

test/reg076/expected.out → test/reg076/expectedrenamed

The content is the same.

test/reg051-disabled/expected.out → test/reg076/inputrenamed

The content is the same.

test/reg076/run.sh → test/reg076/runrenamed

Only the mode changed.

test/reg076/input.in → test/reg077/expectedrenamed

The content is the same.

test/reg077/run.sh → test/reg077/runrenamed

Only the mode changed.

test/reg077/expected.out → test/regression001/expectedrenamed

The content is the same.

test/regression001/reg007.idrdeleted−69

This diff is too big to show here.

test/regression001/run.sh → test/regression001/runrenamed+1−1

This diff is too big to show here.

test/regression002/Negation.idrdeleted−2

This diff is too big to show here.

test/regression002/expected.out → test/regression002/expectedrenamed+1−1

This diff is too big to show here.

test/regression002/run.sh → test/regression002/runrenamed−1

This diff is too big to show here.

test/regression003/expected.out → test/regression003/expectedrenamed

The content is the same.

test/regression003/run.sh → test/regression003/runrenamed

Only the mode changed.

test/sourceLocation001/expected.out → test/sourceLocation001/expectedrenamed

The content is the same.

test/sourceLocation001/run.sh → test/sourceLocation001/runrenamed

Only the mode changed.

test/st001/expected.out → test/st001/expectedrenamed

The content is the same.

test/st001/run.sh → test/st001/runrenamed

Only the mode changed.

test/st001/test001.idr+1−1

This diff is too big to show here.

test/st001/testFile.in → test/st001/testFilerenamed

The content is the same.

test/st002/expected.out → test/st002/expectedrenamed

The content is the same.

test/st002/run.sh → test/st002/runrenamed

Only the mode changed.

test/st002/test002.idr+1−1

This diff is too big to show here.

test/st002/testFile.in → test/st002/testFilerenamed

The content is the same.

test/st003/expected.out → test/st003/expectedrenamed

The content is the same.

test/st003/run.sh → test/st003/runrenamed

Only the mode changed.

test/st003/test003.idr+1−1

This diff is too big to show here.

test/st003/testFile.in → test/st003/testFilerenamed

The content is the same.

test/st004/expected.out → test/st004/expectedrenamed

The content is the same.

test/st004/run.sh → test/st004/runrenamed

Only the mode changed.

test/st005/expected.out → test/st005/expectedrenamed

The content is the same.

test/st005/run.sh → test/st005/runrenamed

Only the mode changed.

test/st006/expected.out → test/st006/expectedrenamed

The content is the same.

test/st006/run.sh → test/st006/runrenamed

Only the mode changed.

test/st007/expected.out → test/st007/expectedrenamed

The content is the same.

test/st007/run.sh → test/st007/runrenamed

Only the mode changed.

test/sugar001/expected.out → test/sugar001/expectedrenamed

The content is the same.

test/sugar001/run.sh → test/sugar001/runrenamed

Only the mode changed.

test/sugar002/expected.out → test/sugar002/expectedrenamed

The content is the same.

test/sugar002/run.sh → test/sugar002/runrenamed

Only the mode changed.

test/sugar003/expected.out → test/sugar003/expectedrenamed

The content is the same.

test/sugar003/run.sh → test/sugar003/runrenamed

Only the mode changed.

test/sugar004/expected.out → test/sugar004/expectedrenamed

The content is the same.

test/sugar004/run.sh → test/sugar004/runrenamed

Only the mode changed.

test/sugar005/expected.out → test/sugar005/expectedrenamed

The content is the same.

test/sugar005/run.sh → test/sugar005/runrenamed

Only the mode changed.

test/syntax001/expected.out → test/syntax001/expectedrenamed

The content is the same.

test/syntax001/run.sh → test/syntax001/runrenamed

Only the mode changed.

test/syntax002/expected.out → test/syntax002/expectedrenamed

The content is the same.

test/syntax002/run.sh → test/syntax002/runrenamed

Only the mode changed.

test/regression001/expected.out → test/tactics001/expectedrenamed

The content is the same.

test/tactics001/run.sh → test/tactics001/runrenamed

Only the mode changed.

test/totality001/expected.out → test/totality001/expectedrenamed

The content is the same.

test/totality001/run.sh → test/totality001/runrenamed

Only the mode changed.

test/totality002/expected.out → test/totality002/expectedrenamed

The content is the same.

test/totality002/run.sh → test/totality002/runrenamed

Only the mode changed.

test/totality003/expected.out → test/totality003/expectedrenamed

The content is the same.

test/totality003/run.sh → test/totality003/runrenamed

Only the mode changed.

test/totality004/expected.out → test/totality004/expectedrenamed

The content is the same.

test/totality004/run.sh → test/totality004/runrenamed

Only the mode changed.

test/totality005/expected.out → test/totality005/expectedrenamed

The content is the same.

test/totality005/run.sh → test/totality005/runrenamed

Only the mode changed.

test/totality006/expected.out → test/totality006/expectedrenamed

The content is the same.

test/totality006/run.sh → test/totality006/runrenamed

Only the mode changed.

test/totality007/expected.out → test/totality007/expectedrenamed

The content is the same.

test/totality007/run.sh → test/totality007/runrenamed

Only the mode changed.

test/totality008/expected.out → test/totality008/expectedrenamed

The content is the same.

test/totality008/run.sh → test/totality008/runrenamed

Only the mode changed.

test/totality009/expected.out → test/totality009/expectedrenamed

The content is the same.

test/totality009/run.sh → test/totality009/runrenamed

Only the mode changed.

test/totality010/expected.out → test/totality010/expectedrenamed

The content is the same.

test/totality010/run.sh → test/totality010/runrenamed

Only the mode changed.

test/totality011/expected.out → test/totality011/expectedrenamed

The content is the same.

test/totality011/run.sh → test/totality011/runrenamed

Only the mode changed.

test/totality012/expected.out → test/totality012/expectedrenamed

The content is the same.

test/totality012/run.sh → test/totality012/runrenamed

Only the mode changed.

test/totality013/expected.out → test/totality013/expectedrenamed

The content is the same.

test/totality013/run.sh → test/totality013/runrenamed

Only the mode changed.

test/totality014/expected.out → test/totality014/expectedrenamed

The content is the same.

test/totality014/run.sh → test/totality014/runrenamed

Only the mode changed.

test/totality015/expected.out → test/totality015/expectedrenamed

The content is the same.

test/totality015/run.sh → test/totality015/runrenamed

Only the mode changed.

test/totality016/expected.out → test/totality016/expectedrenamed

The content is the same.

test/totality016/run.sh → test/totality016/runrenamed

Only the mode changed.

test/totality017/expected.out → test/totality017/expectedrenamed

The content is the same.

test/totality017/run.sh → test/totality017/runrenamed

Only the mode changed.

test/totality018/expected.out → test/totality018/expectedrenamed

The content is the same.

test/totality018/run.sh → test/totality018/runrenamed

Only the mode changed.

test/totality019/expected.out → test/totality019/expectedrenamed

The content is the same.

test/totality019/run.sh → test/totality019/runrenamed

Only the mode changed.

test/totality020/expected.out → test/totality020/expectedrenamed

The content is the same.

test/totality020/run.sh → test/totality020/runrenamed

Only the mode changed.

test/totality021/expected.out → test/totality021/expectedrenamed

The content is the same.

test/totality021/run.sh → test/totality021/runrenamed

Only the mode changed.

test/totality022/expected.out → test/totality022/expectedrenamed

The content is the same.

test/totality022/run.sh → test/totality022/runrenamed

Only the mode changed.

test/totality023/expected.out → test/totality023/expectedrenamed

The content is the same.

test/totality023/run.sh → test/totality023/runrenamed

Only the mode changed.

test/totality024/expected.out → test/totality024/expectedrenamed

The content is the same.

test/totality024/run.sh → test/totality024/runrenamed

Only the mode changed.

test/totality025/expected.out → test/totality025/expectedrenamed

The content is the same.

test/totality025/run.sh → test/totality025/runrenamed

Only the mode changed.

test/totality026/expected.out → test/totality026/expectedrenamed

The content is the same.

test/totality026/run.sh → test/totality026/runrenamed

Only the mode changed.

test/tactics001/expected.out → test/tutorial001/expectedrenamed

The content is the same.

test/tutorial001/run.sh → test/tutorial001/runrenamed

Only the mode changed.

test/tutorial002/expected.out → test/tutorial002/expectedrenamed

The content is the same.

test/tutorial002/run.sh → test/tutorial002/runrenamed

Only the mode changed.

test/tutorial001/expected.out → test/tutorial003/expectedrenamed

The content is the same.

test/tutorial003/run.sh → test/tutorial003/runrenamed

Only the mode changed.

test/tutorial004/expected.out → test/tutorial004/expectedrenamed

The content is the same.

test/tutorial004/run.sh → test/tutorial004/runrenamed

Only the mode changed.

test/tutorial003/expected.out → test/tutorial005/expectedrenamed

The content is the same.

test/tutorial005/expected.outdeleted

No changes to the content.

test/tutorial005/run.sh → test/tutorial005/runrenamed

Only the mode changed.

test/tutorial006/expected.out → test/tutorial006/expectedrenamed

The content is the same.

test/tutorial006/run.sh → test/tutorial006/runrenamed

Only the mode changed.

test/tutorial007/expected.out → test/tutorial007/expectedrenamed

The content is the same.

test/tutorial007/run.sh → test/tutorial007/runrenamed

Only the mode changed.

test/unique001/expected.out → test/unique001/expectedrenamed

The content is the same.

test/unique001/run.sh → test/unique001/runrenamed

Only the mode changed.

test/unique004/expected.out → test/unique004/expectedrenamed

The content is the same.

test/unique004/run.sh → test/unique004/runrenamed

Only the mode changed.

test/universes001/expected.out → test/universes001/expectedrenamed

The content is the same.

test/universes001/run.sh → test/universes001/runrenamed

Only the mode changed.

test/universes002/expected.out → test/universes002/expectedrenamed

The content is the same.

test/universes002/run.sh → test/universes002/runrenamed

Only the mode changed.

test/views001/expected.out → test/views001/expectedrenamed

The content is the same.

test/views001/run.sh → test/views001/runrenamed

Only the mode changed.

test/views002/expected.out → test/views002/expectedrenamed

The content is the same.

test/views002/run.sh → test/views002/runrenamed

Only the mode changed.

test/views003/expected.out → test/views003/expectedrenamed

The content is the same.

test/views003/run.sh → test/views003/runrenamed

Only the mode changed.