summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Interactive2.hs
AgeCommit message (Collapse)Author
2025-08-08also add the 9.6 compatibility fixes to PGF2Inari Listenmaa
2021-07-07More cabal file cleanup. Remove some more tabs from Haskell source.John J. Camilleri
2021-07-06Add import from command line invocation to command historyJohn J. Camilleri
Closes #64
2019-09-20more dead codekrangelov
2019-09-20removed more dead codekrangelov
2015-10-02GF.Interactive2: extension FlexibleContexts is needed for GHC 7.10 compatibilityhallgren
2015-08-21add a type signature in GF.Interactive2 to make ghc-7.6.3 happykrasimir
2015-08-18GF shell: restore the eh command to working order and document ithallgren
Also, when the command line parser fails, append the problematic command line to the error message "command not parsed".
2015-08-17GF shell: add the start options to GFEnv, turn "reload" into an ordinary commandhallgren
2015-08-13GF Shell: "ph | wf -file=foo.gfs" now works as advertisedhallgren
The print_history command was among the commands implemented in an ad-hoc way instead of being handled by the command line interpreter, which means it could not be used in a pipe, as in the example in the help info. The refactoring in the previous patch made this old bug easy to fix. Also fixed a bug in the "empty" command, introduced when moving the PGF from CommandEnv to GFEnv. TODO: fix the undocumented eh command. A comment in the help info for print_history, and some commented out old code, suggest that eh means "execute_history", but at present it does nothing...
2015-08-13GF Shell: refactoring for improved modularity and reusability:hallgren
+ Generalize the CommandInfo type by parameterizing it on the monad instead of just the environment. + Generalize the commands defined in GF.Command.{Commands,Commands2,CommonCommands,SourceCommands,HelpCommand} to work in any monad that supports the needed operations. + Liberate GF.Command.Interpreter from the IO monad. Also, move the current PGF from CommandEnv to GFEnv in GF.Interactive, making the command interpreter even more generic. + Use a state monad to maintain the state of the interpreter in GF.{Interactive,Interactive2}.
2015-08-12GF Shell: turn set_encoding into a common commandhallgren
Implemented in GF.Command.CommonCommands instead of GF.Interactive & GF.Interactive2.
2015-08-12GF.Interactive2: cleanuphallgren
2015-08-12Move welcome message from GF.Interactive & GF.Interactive2 to ↵hallgren
GF.Command.Messages ...to avoid the duplication.
2015-08-11GF shell: make environment types abstract, comment out some dead codehallgren
2015-08-10gf -cshell: preliminary support for the C run-time system in the GF shellhallgren
Some C run-time functionality is now available in the GF shell, by starting GF with 'gf -cshell' or 'gf -crun'. Only limited functionality is available when running the shell in these modes: - You can only import .pgf files, not source files. - The -retain flag can not be used and the commands that require it to work are not available. - Only 18 of the 40 commands available in the usual shell have been implemented. The 'linearize' and 'parse' commands are the only ones that call the C run-time system, and they support only a limited set of options and flags. Use the 'help' commmands for details. - A new command 'generate_all', that calls PGF2.generateAll, has been added. Unfortuntaly, using it causes 'segmentation fault'. This is implemented by adding two new modules: GF.Command.Commands2 and GF.Interactive2. They are copied and modified versions of GF.Command.Commands and GF.Interactive, respectively. Code for unimplemented commands and other code that has not been adapted to the C run-time system has been left in place, but commented out, pending further work.