Commit Graph

55 Commits

Author SHA1 Message Date
Jason Felice
d4bd8e6353 Clean up unused imports (#4065) 2017-09-16 19:28:47 +02:00
Niklas Larsson
4a1c2a1b5f Refactoring: Move options out of AbsSyntax 2017-07-20 22:14:37 +02:00
Ahmad Salim Al-Sibahi
9e69858ea6 Fixed unstylized things in Idris and stylize.sh script 2017-01-16 13:48:10 +01:00
Jan de Muijnck-Hughes
7f0a137c7a Improved User facing progress reporting.
Idris' output has been updated to more accurately reflect its
progress through the compiler i.e. Type Checking; Totality Checking;
IBC Generation; Compiling; and Code Generation. To control the
loudness of the reporting three verbosity levels are introduced:
`--V0`, `--V1`, and `--V2`. The old aliases of `-V` and `--verbose`
have been retained.
2016-12-13 09:31:45 +00:00
James Alexander Feldman-Crough
f6cd83665a Always run all tests, and exit 1 if any fail 2016-11-24 17:14:29 +00:00
Echo Nolan
e6ceb5c724 Alphabetize and indent imports and LANGUAGE pragmas
I ran stylish-haskell over everything. The import grouping was
inconsistent so I just picked something: Idris.* and IRTS.*, then Util,
then autogenerated files, then modules from other packages.
2016-09-30 21:37:52 -07:00
Jan de Muijnck-Hughes
de5a79c2e4 Allow Idris to install IdrisDoc into a central location.
+ Default location is `<getDataDir>/docs`.
+ Flag `--info` has been updated to show doc location.
+ New flag `--installdoc <ipkg>` provided to install documentation
+ New flag `--docdir` provided to show documentation installation location.
+ New environment variable `IDRIS_DOC_PATH` to allow alternate means of customisation.
+ Installation for Idris' std libraries has been augmented to install library documentation as well.
2016-09-28 19:29:27 +01:00
Niklas Larsson
513bb17811 Merge pull request #3432 from steshaw/intero-tweak-in-main
Silence intero about non-exhaustive patterns in main/Main.hs
2016-09-18 22:59:00 +02:00
Steven Shaw
edea8daae2 Use ifail instead of headNote. 2016-09-19 03:02:01 +10:00
Steven Shaw
bf9a3a480d Tweak to silence intero about non-exhaustive patterns.
- At this point, the list is always non-empty.
2016-09-15 16:37:49 +10:00
Steven Shaw
a02fcf4904 Fix misleading comment about IDE Mode server.
The IDE Mode server and REPL server are different things.
2016-09-15 12:57:24 +10:00
Steven Shaw
44315139f7 Refactor main/Main.hs.
- Add some clarity.
- Remove duplication.
2016-09-08 04:29:19 +10:00
Echo Nolan
be27074a42 Allow specifying "--port none" to not start the interpreter server 2016-09-01 23:08:13 -07:00
Jan de Muijnck-Hughes
2842bacaed Tidying of idrisMain (fixes #1454).
Introduction of a new module `Idris.Main` that contains the code
required to launch and run an interactive Idris session---compilation,
REPL et cetera. It has been spun out of `Idris.REPL`; common code has
been spun out from both into `Idris.ModeCommon`.

With `Idris.Main` comes a new entry point for Idris and presents
developers with a more unified API for running Idris programs. A side
affect of this approach is that the imports for codegens must be
changed to import `Idris.Main` and not `Idris.REPL`.
2016-08-30 15:07:16 +01:00
Jan de Muijnck-Hughes
79730240d2 Some internal structural Changes.
In anticipation of moving `idrisMain` out of `Idris.REPL` some
internal changes to Idris are made:

+ Move accessor methods for `Opt` to `AbsSyntax`.
+ Isolate and bring `Commond` under `Idris.REPL` module.
+ Fix some imports arising from changes.
+ Fix import and exports of `CmdOptions`.
2016-08-11 15:17:00 +01:00
Jan de Muijnck-Hughes
cb210b16fa Addition of a command line flag --info.
New command line flag `--info` that displays information about the installation.
2016-08-08 09:23:54 +01:00
Jan de Muijnck-Hughes
e9faa69ad9 Moved show commands from main to Idris.Info.Show 2016-08-07 21:03:42 +01:00
Jan de Muijnck-Hughes
c866814290 Moved info show functions to library.
Added module to show Idris information. It doesn't belong in the main module.
2016-08-07 21:03:42 +01:00
Jan de Muijnck-Hughes
757b76f560 Added new items to Idris.Info
Addition of logging categories and installed packages to new Info module.
2016-08-07 21:03:42 +01:00
Jan de Muijnck-Hughes
c96148c4a9 Collate 'info' about idris setup.
Collates system and version information about idris into a single module `Idris.Info`.
2016-08-07 13:53:10 +01:00
Jan de Muijnck-Hughes
cc1d6976d3 Improvements to iPKG code.
This commit rehomes the code for package building and installation
under the Idris namespace, allowing for projects that use the code to
use a more meaningful import statement.

This commit also factors out the ipkg data type from the parser.
2016-08-01 14:40:12 +01:00
Leif Warner
3ce13cbf43 Cleanup main warnings (#3123)
* Cleanup all -Wall warnings on Main

(mostly unused imports)

* Collapse two BSD ifdefs into one.
2016-04-20 09:36:06 +02:00
Jan de Muijnck-Hughes
3eacf1cf29 Make command line options accessible to package parser. 2016-03-27 11:47:15 +01:00
Heather
e1659e38e6 Main.hs: drop unused imports, minor readability improvements 2016-02-26 12:04:28 +04:00
Jan de Muijnck-Hughes
fd9003b762 Added flag to display available logging categories.
This commit also removes magic constants used for processing the
logging categories from user input.
2015-12-19 23:04:34 +00:00
Niklas Larsson
b9b19e578f Implement bundled toolchain feature 2015-04-02 17:21:08 +02:00
Heather
6ae2e26b7d disable windows specific UTF8 encoding 2015-02-25 00:29:05 +04:00
Niklas Larsson
5300c539c4 Fix :exec on Windows
GCC on Windows will add .exe to the executable name. rawSystem needs
the exact name.

Add isWindows and put in the places that need special handling.

Conflicts:
	main/Main.hs
2015-02-22 23:15:01 +01:00
Niklas Larsson
1b4b01c239 Set encoding to UTF8 on Windows
For some inexplicable reason Haskell hardcodes latin1 as the encoding on
Windows. This stops the output when an unicode character is reached. It's better
 all over to set the encoding to UTF8, if the user has a UTF8 terminal like
mintty it looks good. If the user has a terminal with latin1, there will
be some bad chars but they will see the entire text otherwise.
2015-02-22 15:31:37 +01:00
Ben Sherman
2f0ec2efaa Use pre-existing function to list installed packages at command line 2015-01-02 19:29:23 -05:00
Norbert Melzer
3f81406c2b import slipped through 2015-01-02 22:59:23 +01:00
Norbert Melzer
7cef7ea1b8 print every subdir of libdir as a package
This is a quick and dirty solution for #1071.

I wish I were able to implement output of metadata, but since there is
no metadata saved (currently) alongside of a package, there is nothing
to display.

Displaying metadata in the output of this subcommand would mean that
there have to happen further improvements in the package-system of
idris.

Please see my proposal in #1126.
2015-01-02 22:00:58 +01:00
bmsherman
684a578fce Completely replace ErrorT with ExceptT 2014-12-17 23:21:15 -05:00
Melvar Chen
27d6b04fcd Call gcc using rawSystem 2014-11-05 20:17:29 +01:00
Edwin Brady
b8bcd3da1d Exit after running --client 2014-09-30 23:21:14 +01:00
Sebastian de Bellefon
4fd6bc6bdf Allow REPL to run on another port (flag --port) 2014-09-27 13:54:26 +02:00
Michael Maloney
971d88d592 Annotate several top-level functions 2014-09-01 17:26:42 -05:00
Edwin Brady
c6574b43c6 Added idris-c executable
Eventually, this should be the only way to invoke code generators (by
invoking "idris-foo Main.ibc" for the code generator for backend foo.

For the moment, this serves as an example 'main' for any new code
generators, and *all* new code generators should be implemented this
way.
2014-08-07 15:06:17 +01:00
David Raymond Christiansen
e2a34a8691 Add --testpkg option + tests section in IPKG files
Add a new section to IPKG files called "tests". This section should be a
comma-separated list of fully qualified names of IO actions, the
sequence of which in some way test an Idris package.

When invoked as idris --testpkg IPKG, Idris will generate a module in a
temporary directory that imports every module from the package IPKG and
whose main function simply executes each specified test.

The intention is to keep test specifications as low-level as possible,
allowing user libraries to define a better mechanism on top of this.
2014-06-04 11:06:25 +02:00
klrr
9be5866a80 started working on new cmd arg parser
continued the work on getting the parser to work

works now, still work to do though

done with the parser, removed reduntant code, added metavars

maybe fixes build error...

changed test that used --exec without arg, and added warnreach which i forgot

removed out-commented code, added last metavar
2014-05-14 18:39:47 +02:00
Philip Rasmussen
07a002fe47 Inserted a newline which seamed to be missing.
Idris reported the help descriptions of '--eval' and '--exec' on the same line.
This file change simply reinserts a newline to fix the display issue.
2014-05-01 18:02:39 +02:00
Brian McKenna
415585383c --link and --include give flags, not directories 2014-04-21 10:13:08 -06:00
David Raymond Christiansen
5bd169539b Add -e EXPR to evaluate expressions w/out REPL
The command line option follows the convention from Perl. This causes
Idris to evaluate the provided expressions, pretty-printing them without
line breaks. Then, test results need not depend on terminal widths any
longer. If multiple -e options are provided, then the expressions are
evaluated in order.
2014-04-21 07:42:54 +01:00
Philip Rasmussen
dd44389bb0 Merged with master 2014-04-11 20:22:56 +02:00
Matus Tejiscak
4957a33d9a Make --nowarnreach the default (for now). 2014-04-11 09:10:26 +01:00
Matus Tejiscak
bfd99005dc Add --nowarnreach. 2014-04-11 09:10:25 +01:00
Philip Rasmussen
d4abcb8914 Added IdrisDoc hooks from the command line. 2014-03-27 15:17:45 +01:00
Philip Rasmussen
77eca9c3a1 Changed IdrisDoc interface, updated command descriptions. 2014-03-26 11:36:41 +01:00
Ricky Elrod
5c119dac79 Fix typo in usage message 2014-02-23 06:35:57 -05:00
David Raymond Christiansen
8b20137a06 Document -X at command line
Now we can close #593.
2014-02-18 14:06:54 +01:00