1
1
mirror of https://github.com/anoma/juvix.git synced 2024-07-07 04:36:19 +03:00

Remove unused files (#2398)

Merge after
- #2397

---------

Co-authored-by: Łukasz Czajka <62751+lukaszcz@users.noreply.github.com>
This commit is contained in:
Jonathan Cubides 2023-09-28 14:20:19 +02:00 committed by GitHub
parent 705f2fa1ba
commit 2b566e0870
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 0 additions and 1152 deletions

View File

@ -1,89 +0,0 @@
# Based on HLint configuration file from https://github.com/ndmitchell/hlint
- arguments: [--color]
# ------------------------------------------------------------------------------
# RESTRICTIONS
# ------------------------------------------------------------------------------
- extensions:
- default: false
- name:
- ApplicativeDo
- DataKinds
- DerivingStrategies
- GADTs
- ImportQualifiedPost
- LambdaCase
- NoImplicitPrelude
- OverloadedStrings
- QuantifiedConstraints
- QuasiQuotes
- RecordWildCards
- StandaloneKindSignatures
- TemplateHaskell
- TypeFamilyDependencies
- UndecidableInstances
- UnicodeSyntax
- GeneralizedNewtypeDeriving
- flags:
- default: false
- name:
- -Wall
- -Wcompat
- -Wderiving-defaults
- -Widentities
- -Wincomplete-patterns
- -Wincomplete-record-updates
- -Wincomplete-uni-patterns
- -Wmissing-deriving-strategies
- -Wredundant-constraints
- -O2 -flate-specialise -fspecialise-aggressively
- modules:
# if you import Data.Set qualified, it must be as 'Set'
- { name: [Data.Set, Data.HashSet], as: Set }
- { name: [Data.Map, Data.HashMap.Strict, Data.HashMap.Lazy], as: Map }
# - {name: Control.Arrow, within: []} # Certain modules are banned entirely
- functions:
- { name: Data.List.NonEmpty.nub, within: [] }
- { name: Data.List.NonEmpty.nubBy, within: [] }
# ------------------------------------------------------------------------------
# OTHER HINTS
# ------------------------------------------------------------------------------
# - warn: {name: Use explicit module export list}
# ------------------------------------------------------------------------------
# HINTS
# ------------------------------------------------------------------------------
- error: { lhs: idea Warning, rhs: warn }
- error: { lhs: idea Suggestion, rhs: suggest }
- error: { lhs: ideaN Warning, rhs: warnN }
- error: { lhs: ideaN Suggestion, rhs: suggestN }
- error: { lhs: occNameString (occName (unLoc x)), rhs: rdrNameStr x }
- error: { lhs: occNameString (occName x), rhs: occNameStr x }
- error:
{
lhs: noLoc (HsVar noExtField (noLoc (mkRdrUnqual (mkVarOcc x)))),
rhs: strToVar x,
}
# ------------------------------------------------------------------------------
# IGNORES
# ------------------------------------------------------------------------------
- ignore: { name: Use let, within: [Test.All] }
- ignore: { name: Use String }
- ignore: { name: Avoid restricted qualification }
- ignore: { name: Redundant multi-way if }
- ignore: { name: Redundant bracket }
- ignore: { name: Eta reduce }
- ignore: { name: Avoid restricted alias }
- ignore: { name: Use tuple-section }
- ignore: { name: Use map with tuple-section }

View File

@ -42,7 +42,6 @@ all: build
clean: clean-runtime
@${STACK} clean --full
@rm -rf .hie
@rm -rf book
.PHONY: clean-hard
clean-hard: clean
@ -158,16 +157,6 @@ check-ormolu: export ORMOLUMODE = check
check-ormolu:
@${MAKE} ormolu
HLINT?=stack exec -- hlint
HLINTFLAGS?=
HLINTQUIET :=
.PHONY : hlint
hlint :
${HLINT} ${HLINTFLAGS} app ${HLINTQUIET}
${HLINT} ${HLINTFLAGS} src ${HLINTQUIET}
${HLINT} ${HLINTFLAGS} test ${HLINTQUIET}
PRECOMMIT := $(shell command -v pre-commit 2> /dev/null)
.PHONY : install-pre-commit

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -1,60 +0,0 @@
[book]
title = "The Juvix Book"
authors = [ "Jonathan Prieto-Cubides" , "Jan Mas Rovira" , "Paul Cadman" , "Lukasz Czajka" ]
language = "en"
multilingual = false
src = "docs"
[build]
create-missing = true
[preprocessor.index]
[preprocessor.links]
[preprocessor.pagetoc]
[preprocessor.katex]
renderers = ["html"]
static-css = false
include-src = false
block-delimiter = {left = "$$", right = "$$"}
inline-delimiter = {left = "$", right = "$"}
macros = "theme/latex-macros.txt"
[output.katex]
[output.html]
default-theme = "light"
preferred-dark-theme = "Ayu"
copy-fonts = true
additional-css = ["theme/pagetoc.css", "theme/juvix.css"]
additional-js = ["theme/pagetoc.js", "theme/juvix.js", "theme/pascal.js"]
no-section-label = false
git-repository-url = "https://github.com/anoma/juvix"
git-repository-icon = "fa-github"
[output.html.fold]
enable = true # whether or not to enable section folding
level = 0 # the depth to start folding
[output.html.search]
enable = true # enables the search feature
limit-results = 15 # maximum number of search results
teaser-word-count = 30 # number of words used for a search result teaser
use-boolean-and = true # multiple search terms must all match
boost-title = 2 # ranking boost factor for matches in headers
boost-hierarchy = 1 # ranking boost factor for matches in page names
boost-paragraph = 1 # ranking boost factor for matches in text
expand = true # partial words will match longer terms
heading-split-level = 2 # link results to heading levels
copy-js = true # include Javascript code for search
[output.linkcheck]
follow-web-links = false
traverse-parent-directories = false
exclude = [ ]
user-agent = "mdbook-linkcheck-0.4.0"
cache-timeout = 43200
[output.linkcheck.http-headers]
'crates\.io' = ["Accept: text/html"]

View File

@ -1,101 +0,0 @@
Copyright (c) 2005-2021 remains with the authors.
Agda 2 was originally written by Ulf Norell,
partially based on code from Agda 1 by Catarina Coquand and Makoto Takeyama,
and from Agdalight by Ulf Norell and Andreas Abel.
Agda 2 is currently actively developed mainly by Andreas Abel,
Guillaume Allais, Liang-Ting Chen, Jesper Cockx, Matthew Daggitt, Nils
Anders Danielsson, Ulf Norell, Andrés Sicard-Ramírez, and Andrea
Vezzosi.
Further, Agda 2 has received contributions by, amongst others, Stevan
Andjelkovic, Marcin Benke, Jean-Philippe Bernardy, Guillaume Brunerie,
James Chapman, Dominique Devriese, Péter Diviánszky, Robert Estelle,
Olle Fredriksson, Adam Gundry, Daniel Gustafsson, Philipp Hausmann,
Alan Jeffrey, Wolfram Kahl, Wen Kokke, John Leo, Fredrik Lindblad,
Víctor López Juan, Ting-Gan Lua, Francesco Mazzoli, Stefan Monnier,
Guilhem Moulin, Fredrik Nordvall Forsberg, Nicolas Pouillard, Jonathan
Prieto, Christian Sattler, Makoto Takeyama, Noam Zeilberger, and Tesla
Ice Zhang. The full list of contributors is available at
https://github.com/agda/agda/graphs/contributors or from the git
repository via ``git shortlog -sne``.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
The file src/full/Agda/Utils/Maybe/Strict.hs (and the following
license text?) uses the following license:
Copyright (c) Roman Leshchinskiy 2006-2007
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the author nor the names of his contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
------------------------------------------------------------------------
The file src/data/html/highlight-hover.js (and the following licence
text?) seems to use the following licence:
Copyright 2002-2010, Simon Marlow. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,3 +0,0 @@
#+title: Readme
We have copied [[https://github.com/agda/agda][Agda]]'s input method and adapted it to Juvix.

View File

@ -1,323 +0,0 @@
<!DOCTYPE HTML>
<html lang="{{ language }}" class="sidebar-visible no-js {{ default_theme }}">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>{{ title }}</title>
{{#if is_print }}
<meta name="robots" content="noindex" />
{{/if}}
{{#if base_url}}
<base href="{{ base_url }}">
{{/if}}
<!-- Custom HTML head -->
{{> head}}
<meta name="description" content="{{ description }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
{{#if favicon_svg}}
<link rel="icon" href="{{ path_to_root }}favicon.svg">
{{/if}}
{{#if favicon_png}}
<link rel="shortcut icon" href="{{ path_to_root }}favicon.png">
{{/if}}
<link rel="stylesheet" href="{{ path_to_root }}css/variables.css">
<link rel="stylesheet" href="{{ path_to_root }}css/general.css">
<link rel="stylesheet" href="{{ path_to_root }}css/chrome.css">
{{#if print_enable}}
<link rel="stylesheet" href="{{ path_to_root }}css/print.css" media="print">
{{/if}}
<!-- Fonts -->
<link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css">
{{#if copy_fonts}}
<link rel="stylesheet" href="{{ path_to_root }}fonts/fonts.css">
{{/if}}
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="{{ path_to_root }}highlight.css">
<link rel="stylesheet" href="{{ path_to_root }}tomorrow-night.css">
<link rel="stylesheet" href="{{ path_to_root }}ayu-highlight.css">
<!-- Custom theme stylesheets -->
{{#each additional_css}}
<link rel="stylesheet" href="{{ ../path_to_root }}{{ this }}">
{{/each}}
{{#if mathjax_support}}
<!-- MathJax -->
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
{{/if}}
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script>
var path_to_root = "{{ path_to_root }}";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('no-js')
html.classList.remove('{{ default_theme }}')
html.classList.add(theme);
html.classList.add('js');
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script>
var html = document.querySelector('html');
var sidebar = null;
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
} else {
sidebar = 'hidden';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
{{#toc}}{{/toc}}
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
{{> header}}
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme theme-selected" id="ayu">Dark</button></li>
</ul>
{{#if search_enabled}}
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
{{/if}}
</div>
<h1 class="menu-title">{{ book_title }}</h1>
<div class="right-buttons">
{{#if print_enable}}
<a href="{{ path_to_root }}print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
{{/if}}
{{#if git_repository_url}}
<a href="{{git_repository_url}}" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa {{git_repository_icon}}"></i>
</a>
{{/if}}
{{#if git_repository_edit_url}}
<a href="{{git_repository_edit_url}}" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
{{/if}}
</div>
</div>
{{#if search_enabled}}
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
{{/if}}
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main><div class="sidetoc"><nav class="pagetoc"></nav></div>
{{{ content }}}
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
{{#previous}}
<a rel="prev" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
{{/previous}}
{{#next}}
<a rel="next" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
{{/next}}
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
{{#previous}}
<a rel="prev" href="{{ path_to_root }}{{link}}" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
{{/previous}}
{{#next}}
<a rel="next" href="{{ path_to_root }}{{link}}" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
{{/next}}
</nav>
</div>
{{#if live_reload_endpoint}}
<!-- Livereload script (if served using the cli tool) -->
<script>
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
const wsAddress = wsProtocol + "//" + location.host + "/" + "{{{live_reload_endpoint}}}";
const socket = new WebSocket(wsAddress);
socket.onmessage = function (event) {
if (event.data === "reload") {
socket.close();
location.reload();
}
};
window.onbeforeunload = function() {
socket.close();
}
</script>
{{/if}}
{{#if google_analytics}}
<!-- Google Analytics Tag -->
<script>
var localAddrs = ["localhost", "127.0.0.1", ""];
// make sure we don't activate google analytics if the developer is
// inspecting the book locally...
if (localAddrs.indexOf(document.location.hostname) === -1) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{google_analytics}}', 'auto');
ga('send', 'pageview');
}
</script>
{{/if}}
{{#if playground_line_numbers}}
<script>
window.playground_line_numbers = true;
</script>
{{/if}}
{{#if playground_copyable}}
<script>
window.playground_copyable = true;
</script>
{{/if}}
{{#if playground_js}}
<script src="{{ path_to_root }}ace.js"></script>
<script src="{{ path_to_root }}editor.js"></script>
<script src="{{ path_to_root }}mode-rust.js"></script>
<script src="{{ path_to_root }}theme-dawn.js"></script>
<script src="{{ path_to_root }}theme-tomorrow_night.js"></script>
{{/if}}
{{#if search_js}}
<script src="{{ path_to_root }}elasticlunr.min.js"></script>
<script src="{{ path_to_root }}mark.min.js"></script>
<script src="{{ path_to_root }}searcher.js"></script>
{{/if}}
<script src="{{ path_to_root }}clipboard.min.js"></script>
<script src="{{ path_to_root }}highlight.js"></script>
<script src="{{ path_to_root }}theme/juvix.js"></script>
<script src="{{ path_to_root }}theme/pascal.js"></script>
<script >
hljs.registerLanguage('juvix', hljsDefineJuvix);
hljs.registerLanguage('jrepl', hljsDefineJuvixRepl);
hljs.registerLanguage('pascal', hljsDefinePascal);
</script>
<script src="{{ path_to_root }}book.js"></script>
<!-- Custom JS scripts -->
{{#each additional_js}}
<script src="{{ ../path_to_root }}{{this}}"></script>
{{/each}}
{{#if is_print}}
{{#if mathjax_support}}
<script>
window.addEventListener('load', function() {
MathJax.Hub.Register.StartupHook('End', function() {
window.setTimeout(window.print, 100);
});
});
</script>
{{else}}
<script>
window.addEventListener('load', function() {
window.setTimeout(window.print, 100);
});
</script>
{{/if}}
{{/if}}
</div>
</body>
</html>

View File

@ -1,27 +0,0 @@
.hljs-meta {
color: coral;
}
.hljs-inductive {
color: #86b300;
}
.hljs-number {
color: #00a822;
}
.hljs-function {
color: #d78810;
}
.hljs-symbol {
color: #d78810;
}
.hljs-string {
color: #f07171;
}
.hljs-keyword {
color: #399ee6;
}

View File

@ -1,338 +0,0 @@
/*
The following is specifically tailored for compatibility with HighlightJS
10.1.1, which is used in MdBook. Support for the latest version of HighlightJS,
v11.7, can be found at the following repository:
https://github.com/anoma/highlightjs-juvix
*/
var module = module ? module : {}; // shim for browser use
const MATCH_NOTHING_RE = /$^/; // to force a mode to never match
const INLINE_COMMENT = {
className: "comment",
begin: /--/,
end: /$/,
};
const BLOCK_COMMENT = {
className: "comment",
begin: /\{-/,
end: /-\}/,
relevance: 1,
};
const COMMENT = {
scope: "comment",
contains: ["self"],
variants: [INLINE_COMMENT, BLOCK_COMMENT],
};
const STRINGS = {
className: "string",
variants: [hljs.QUOTE_STRING_MODE],
};
const NUMBERS = hljs.C_NUMBER_MODE;
const RESERVED_SYMBOLS = {
className: "keyword",
begin:
/(@|:=|->|→|↦|;|\||\{|\}|\\|λ|\s:\s|\_|Type|\slet\s|\sin\s|terminating|positive|axiom|builtin|open|end)/,
endsSameBegin: true,
};
const OTHER_SYMBOLS_AND_OPERATORS = [
{
className: "operator",
begin: /(\*|\|\||&&|==|>>|=?>|<=?|-\s|\+)/,
endsSameBegin: true,
},
{ className: "punctuation", begin: /(\(|\))/, endsSameBegin: true },
{ begin: /::/, endsSameBegin: true },
// an issue of this hljs version is that some keywords are not highlighted
// even though they are in the keywords list. This is a workaround
{ className: "literal", begin: /(true|false)/, endsSameBegin: true },
{ className: "built_in", begin: /(trace|IO|if|case)/, endsSameBegin: true },
];
const MODULE_NAME_RE = /[a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_]*)*/;
const IDEN_RE = /[^(\s|;|\{|\}|\(|\)|@)]+/;
//some symbols may brake the use of this
function hljsDefineJuvix(hljs) {
const JUVIX_KEYWORDS = {
keyword: "let in print terminating positive axiom builtin open end",
built_in: "trace IO if case",
literal: "true false",
};
const MODULE_BEGIN = {
className: "keyword",
begin: /module/,
end: /;/,
contains: [
BLOCK_COMMENT,
{
className: "title",
begin: MODULE_NAME_RE,
endsParent: true,
contains: [BLOCK_COMMENT],
},
],
};
const PUBLIC = {
className: "keyword",
begin: /public/,
end: /;/,
endsParent: true,
contains: [COMMENT],
};
const MODULE_END = {
className: "keyword",
begin: /end/,
end: /;/,
contains: [COMMENT],
};
const INFIX = {
className: "keyword",
begin: /((infix(l|r)?)|postfix)/,
end: MATCH_NOTHING_RE,
contains: [
COMMENT,
{
className: "number",
begin: /\d+/,
end: MATCH_NOTHING_RE,
endsParent: true,
contains: [
COMMENT,
{
className: "operator",
begin: IDEN_RE,
end: MATCH_NOTHING_RE,
endsParent: true,
contains: [
COMMENT,
{
className: "keyword",
begin: /;/,
endsSameBegin: true,
endsParent: true,
},
],
},
],
},
],
};
const IMPORT = {
className: "keyword",
begin: /(((open )?import)|(open( import)?))/,
end: MATCH_NOTHING_RE,
// endsParent: true,
contains: [
COMMENT,
{
className: "title",
begin: MODULE_NAME_RE,
end: MATCH_NOTHING_RE,
endsParent: true,
contains: [
COMMENT,
PUBLIC,
{
className: "keyword",
begin: /;/,
endsParent: true,
},
{
className: "keyword",
begin: /(hiding|using)/,
end: MATCH_NOTHING_RE,
contains: [
COMMENT,
{
className: "keyword",
begin: /\{/,
end: /\}/,
endsParent: true,
contains: [
COMMENT,
{
className: "symbol",
begin: IDEN_RE,
contains: [COMMENT, PUBLIC],
},
],
},
],
},
],
},
],
};
const INDUCTIVE = {
className: "inductive",
begin: /type/,
end: MATCH_NOTHING_RE,
keywords: "type",
contains: [
COMMENT,
{
className: "keyword",
begin: /;/,
endsParent: true,
},
{
// className: "symbol",
begin: IDEN_RE,
end: MATCH_NOTHING_RE,
endsParent: true,
contains: [
COMMENT,
RESERVED_SYMBOLS,
{
// ( A : Type )
begin: /\(/,
end: /\)/,
contains: [
COMMENT,
{
// className: "symbol",
begin: IDEN_RE,
end: MATCH_NOTHING_RE,
endsParent: true,
contains: [
COMMENT,
{
// type annotation
className: "keyword",
begin: /:/,
end: /Type/,
endsParent: true,
},
],
},
],
},
],
},
],
};
var OPTS = [
COMMENT,
RESERVED_SYMBOLS,
MODULE_BEGIN,
MODULE_END,
IMPORT,
INFIX,
INDUCTIVE,
NUMBERS,
STRINGS,
];
return {
name: "Juvix",
aliases: ["juvix"],
keywords: JUVIX_KEYWORDS,
contains: OPTS.concat({
begin: /(?=[^(\s|;|\{|\}|\(|\)|@)]+\s*:)/,
end: MATCH_NOTHING_RE,
endsSameBegin: true,
contains: [
{
className: "function",
begin: /^\s*[^(\s|;|\{|\}|\(|\)|@)]+(?=\s*:\s+.*;)/,
end: MATCH_NOTHING_RE,
contains: [
COMMENT,
{
className: "keyword",
begin: /:\s+/,
endsSameBegin: true,
endsParent: true,
},
{
className: "keyword",
begin: /;/,
endsSameBegin: true,
endsParent: true,
},
],
},
{
className: "keyword",
begin: /;/,
endsSameBegin: true,
endsParent: true,
},
]
.concat(OPTS)
.concat([OTHER_SYMBOLS_AND_OPERATORS]),
}),
};
}
function hljsDefineJuvixRepl(hljs) {
return {
name: "Juvix REPL",
aliases: ["jrepl"],
case_insensitive: false,
unicodeRegex: true,
contains: [
{
className: "meta",
begin: /^(Juvix REPL|OK)/,
end: /$/,
},
{
begin: /^(?=([a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_]*))?>)/,
end: /$/,
contains: [
{
className: "meta",
begin: /([a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_]*))?>\s+/,
endsSameBegin: true,
},
{
className: "keyword",
begin: /:[a-z]+/,
endsWithParent: true,
contains: [
{
subLanguage: "juvix",
endsWithParent: true,
},
],
},
{
subLanguage: "juvix",
endsWithParent: true,
},
],
},
{
begin: /^/,
end: /$/,
contains: [
{
subLanguage: "juvix",
endsWithParent: true,
},
],
},
],
};
}
module.exports = function (hljs) {
hljs.registerLanguage("juvix", hljsDefineJuvix);
hljs.registerLanguage("jrepl", hljsDefineJuvixRepl);
};

View File

View File

@ -1,57 +0,0 @@
@media only screen and (max-width: 1439px) {
.sidetoc {
display: none;
}
}
@media only screen and (min-width: 1440px) {
main {
position: relative;
}
.sidetoc {
margin-left: auto;
margin-right: auto;
left: calc(100% + (var(--content-max-width)) / 4 - 140px);
position: absolute;
}
.pagetoc {
position: fixed;
width: 200px;
height: calc(100vh - var(--menu-bar-height) - 0.67em * 4);
overflow: auto;
}
.pagetoc a {
border-left: 1px solid var(--sidebar-bg);
color: var(--fg) !important;
display: block;
padding-bottom: 5px;
padding-top: 5px;
padding-left: 10px;
text-align: left;
text-decoration: none;
}
.pagetoc a:hover,
.pagetoc a.active {
background: var(--sidebar-bg);
color: var(--sidebar-fg) !important;
}
.pagetoc .active {
background: var(--sidebar-bg);
color: var(--sidebar-fg);
}
.pagetoc .pagetoc-H2 {
padding-left: 20px;
}
.pagetoc .pagetoc-H3 {
padding-left: 40px;
}
.pagetoc .pagetoc-H4 {
padding-left: 60px;
}
.pagetoc .pagetoc-H5 {
display: none;
}
.pagetoc .pagetoc-H6 {
display: none;
}
}

View File

@ -1,58 +0,0 @@
// Un-active everything when you click it
Array.prototype.forEach.call(
document.getElementsByClassName("pagetoc")[0].children,
function (el) {
el.addEventHandler("click", function () {
Array.prototype.forEach.call(
document.getElementsByClassName("pagetoc")[0].children,
function (el) {
el.classList.remove("active");
},
);
el.classList.add("active");
});
},
);
var updateFunction = function () {
var id;
var elements = document.getElementsByClassName("header");
Array.prototype.forEach.call(elements, function (el) {
if (window.pageYOffset >= el.offsetTop) {
id = el;
}
});
Array.prototype.forEach.call(
document.getElementsByClassName("pagetoc")[0].children,
function (el) {
el.classList.remove("active");
},
);
if (!id) return;
Array.prototype.forEach.call(
document.getElementsByClassName("pagetoc")[0].children,
function (el) {
if (id.href.localeCompare(el.href) == 0) {
el.classList.add("active");
}
},
);
};
// Populate sidebar on load
window.addEventListener("load", function () {
var pagetoc = document.getElementsByClassName("pagetoc")[0];
var elements = document.getElementsByClassName("header");
Array.prototype.forEach.call(elements, function (el) {
var link = document.createElement("a");
link.appendChild(document.createTextNode(el.text));
link.href = el.href;
link.classList.add("pagetoc-" + el.parentElement.tagName);
pagetoc.appendChild(link);
});
updateFunction.call();
});
// Handle active elements on scroll
window.addEventListener("scroll", updateFunction);

View File

@ -1,83 +0,0 @@
// To be used with highlight.js v10.1.1
function hljsDefinePascal(e) {
var a =
"exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure absolute reintroduce operator as is abstract alias assembler bitpacked break continue cppdecl cvar enumerator experimental platform deprecated unimplemented dynamic export far16 forward generic helper implements interrupt iochecks local name nodefault noreturn nostackframe oldfpccall otherwise saveregisters softfloat specialize strict unaligned varargs ",
r = [
e.C_LINE_COMMENT_MODE,
e.COMMENT(/\{/, /\}/, { relevance: 0 }),
e.COMMENT(/\(\*/, /\*\)/, { relevance: 10 }),
],
n = {
className: "meta",
variants: [
{ begin: /\{\$/, end: /\}/ },
{ begin: /\(\*\$/, end: /\*\)/ },
],
},
t = {
className: "string",
begin: /'/,
end: /'/,
contains: [{ begin: /''/ }],
},
s = { className: "string", begin: /(#\d+)+/ },
i = {
begin: e.IDENT_RE + "\\s*=\\s*class\\s*\\(",
returnBegin: !0,
contains: [e.TITLE_MODE],
},
c = {
className: "function",
beginKeywords: "function constructor destructor procedure",
end: /[:;]/,
keywords: "function constructor|10 destructor|10 procedure|10",
contains: [
e.TITLE_MODE,
{
className: "params",
begin: /\(/,
end: /\)/,
keywords: a,
contains: [t, s, n].concat(r),
},
n,
].concat(r),
};
return {
name: "Delphi",
aliases: [
"dpr",
"dfm",
"pas",
"pascal",
"freepascal",
"lazarus",
"lpr",
"lfm",
],
case_insensitive: !0,
keywords: a,
illegal: /"|\$[G-Zg-z]|\/\*|<\/|\|/,
contains: [
t,
s,
e.NUMBER_MODE,
{
className: "number",
relevance: 0,
variants: [
{ begin: "\\$[0-9A-Fa-f]+" },
{ begin: "&[0-7]+" },
{ begin: "%[01]+" },
],
},
i,
c,
n,
].concat(r),
};
}
module.exports = function (hljs) {
hljs.registerLanguage("pascal", hljsDefinePascal);
};