on master help sign in
Merge branch 'master' of github.com:idris-lang/Idris-dev
commitd82d928535169100be3c1d294ee7aedd014b229f authorEdwin Brady <ecb10@st-andrews.ac.uk> dateWed 11 Dec 2013, 10:43 (13 years ago) parentd66da215bee123
3 files changed+132−2
CONTRIBUTING.md+112 contribs/idrislang.sty+19−1 libs/prelude/Prelude.idr+1−1
CONTRIBUTING.mdnew file+112
@@ -0,0 +1,112 @@
1+# Contributing to Idris-Dev
2+
3+The Idris Community welcomes pull requests, bug reporting, and bug squashing!
4+However, we cannot do it all ourself, and want to make it as easy as possible to contribute changes to get things working.
5+Here are a few guidelines that we would like contributors to follow so that we can have a chance of keeping on top of things.
6+
7+## Getting Started
8+
9+1. Make sure you are familiar with [Git](http://git-scm.com/book).
10+1. Make sure you have a [GitHub account](https://github.com/signup/free).
11+1. Make sure you are familiar with: [Idris](http://eb.host.cs.st-andrews.ac.uk/writings/idris-tutorial.pdf).
12+1. Make sure you can install `Idris`:
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)
15+ * [Debian](https://github.com/idris-lang/Idris-dev/wiki/Idris-on-Debian)
16+ * [Windows](https://github.com/idris-lang/Idris-dev/wiki/Idris-on-Windows)
17+
18+# Issue Reporting
19+
20+Before you report an issue, or wish to add cool functionality please try and check to see if there are existing [issues](https://github.com/idris-lang/Idris-dev/issues) and [pull requests](https://github.com/idris-lang/Idris-dev/pulls).
21+We do not want you wasting your time, duplicating somebody's work!
22+
23+## Making Changes
24+
25+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/).
26+The steps are straightforward.
27+
28+For those new to the project:
29+
30+1. Fork the `idris-dev` repo e.g.
31+
32+ $ git clone git@github.com/<your github user name>/Idris-dev.git
33+ $ git remote add upstream git@github.com:idris-lang/Idris-dev.git
34+
35+For those already contributing to the project:
36+
37+1. Ensure your existing clone is up-to-date with current HEAD e.g.
38+
39+ $ git fetch upstream
40+ $ git merge upstream/master
41+
42+The remaining steps are the same:
43+
44+1. Create, and checkout onto, a topic branch on which to base you work.
45+ * This is typically the master branch.
46+ * For your own sanity, please avoid working on the `master` branch.
47+
48+ $ git branch fix/master/my_contrib master
49+ $ git checkout fix/master/my_contrib
50+
51+1. Make commits of logical units.
52+1. Check for unnecessary whitespace with
53+
54+ $ git diff --check
55+
56+1. Make sure your commit messages are along the lines of:
57+
58+ Short (50 chars or less) summary of changes
59+
60+ More detailed explanatory text, if necessary. Wrap it to about 72
61+ characters or so. In some contexts, the first line is treated as the
62+ subject of an email and the rest of the text as the body. The blank
63+ line separating the summary from the body is critical (unless you omit
64+ the body entirely); tools like rebase can get confused if you run the
65+ two together.
66+
67+ Further paragraphs come after blank lines.
68+
69+ - Bullet points are okay, too
70+
71+ - Typically a hyphen or asterisk is used for the bullet, preceded by a
72+ single space, with blank lines in between, but conventions vary here
73+
74+1. Make sure you have added any necessary tests for your changes.
75+1. Run all the tests to assure nothing else was accidentally broken.
76+
77+ $ make test
78+
79+1. Push your changes to a topic branch in your fork of the repository.
80+
81+ $ git push origin fix/master/my_contrib
82+
83+1. Go to GitHub and submit a pull request to `idris-dev`
84+
85+From there you will have to wait on one of the `idris-dev` committers to respond to the request.
86+This response might be an accept or some changes/improvements/alternatives will be suggest.
87+We do not guarantee that all requests will be accepted.
88+
89+## Increases chances of acceptance.
90+
91+To help increase the chance of your pull request being accepted:
92+
93+1. Run the tests.
94+1. Update the documentation, the surrounding one, examples elsewhere, guides, whatever is affected by your contribution
95+1. Use appropriate code formatting for both `Idris` and `Haskell`.
96+
97+## Additional Resources
98+
99+* [Idris Wiki](https://github.com/idris-lang/Idris-dev/wiki);
100+* [Zen Of Idris](https://github.com/idris-lang/Idris-dev/wiki/The-Zen-of-Idris);
101+* Idris FAQs: [Official](http://www.idris-lang.org/documentation/faq/); [Unofficial](https://github.com/idris-lang/Idris-dev/wiki/Unofficial-FAQ);
102+* [Idris Manual](https://github.com/idris-lang/Idris-dev/wiki/Manual);
103+* [Idris Tutorial](http://eb.host.cs.st-andrews.ac.uk/writings/idris-tutorial.pdf);
104+* [Idris News](http://www.idris-lang.org/news/);
105+* [other Idris docs](http://www.idris-lang.org/documentation/).
106+* [Using Pull Requests](https://help.github.com/articles/using-pull-requests)
107+* [General GitHub Documentation](https://help.github.com/).
108+
109+
110+Adapted from the most excellent contributing files from the [Puppet project](https://github.com/puppetlabs/puppet) and [Factroy Girl Rails](https://github.com/thoughtbot/factory_girl_rails/blob/master/CONTRIBUTING.md)
111+
112+
contribs/idrislang.sty+19−1
@@ -8,6 +8,8 @@
88%% + Defines a `numbers' and `default' listings style.
99%% + Defines a `code' environment for typesetting idris.
1010%% + \begin{code}[...] ... \end{code}
11+%% + Defines an input command for externally defined idris files.
12+%% + \inputIdrisListing[...]{file.idr}
1113%% + Defines commands typesetting the name Idris.
1214%% + \Idris{}
1315%% + \idris{}
@@ -46,6 +48,8 @@
4648\lstdefinelanguage{idris}{%
4749 sensitive,%
4850%% ----------------------------------------------------------- [ Default Style ]
51+ xleftmargin=\parindent,
52+ tabsize=2,
4953 basicstyle=\ttfamily,
5054 flexiblecolumns=false,
5155 commentstyle=\footnotesize\sffamily,
@@ -163,7 +167,8 @@
163167
164168\lstdefinestyle{default}{%
165169 xleftmargin=\parindent,
166− tabsize=2
170+ tabsize=2,
171+ basicstyle=\ttfamily
167172}
168173\lstdefinestyle{numbers}{%
169174 xleftmargin=\parindent,
@@ -186,5 +191,18 @@
186191 \lstset{style=default, #1}}
187192 }
188193 {}
194+%% ---------------------------------------------------------- [ Input Listings ]
195+%% Command to add externally defined Idris code to the document.
196+\newcommand{\inputIdrisListing}[2][]{%
197+\begingroup
198+ \ifthenelse{\boolean{literate}}{%
199+ \lstset{language=literateidris}}{%
200+ \lstset{language=idris}}
201+ \ifthenelse{\boolean{numbers}}{%
202+ \lstset{style=numbers}}{%
203+ \lstset{style=default}}
204+ \lstinputlisting[#1]{#2}
205+\endgroup
206+}
189207\endinput
190208%% --------------------------------------------------------------------- [ EOF ]
libs/prelude/Prelude.idr+1−1
@@ -410,7 +410,7 @@ syntax "[" [start] "," [next] ".." [end] "]"
410410 = enumFromThenTo start (next - start) end
411411
412412syntax "[" [start] "..]"
413− = enumFrom start 1
413+ = enumFrom start
414414syntax "[" [start] "," [next] "..]"
415415 = enumFromThen start (next - start)
416416