Idris-dev icon indicating copy to clipboard operation
Idris-dev copied to clipboard

Improve -X command line option: docs and error messages

Open david-christiansen opened this issue 13 years ago • 3 comments

Right now, -X doesn't show up in the help. Also, mis-typing a language extension causes it to look for a file rather than give an appropriate error:

davidc@sleipnir:~/Documents/Idris-dev$ idris -XTypeProviders
     ____    __     _                                          
    /  _/___/ /____(_)____                                     
    / // __  / ___/ / ___/     Version 0.9.10
  _/ // /_/ / /  / (__  )      http://www.idris-lang.org/      
 /___/\__,_/_/  /_/____/       Type :? for help                

Idris> :q
Bye bye
davidc@sleipnir:~/Documents/Idris-dev$ idris -XTypeProvides
     ____    __     _                                          
    /  _/___/ /____(_)____                                     
    / // __  / ___/ / ___/     Version 0.9.10
  _/ // /_/ / /  / (__  )      http://www.idris-lang.org/      
 /___/\__,_/_/  /_/____/       Type :? for help                

-XTypeProvides: openFile: does not exist (No such file or directory)
*-XTypeProvides> :q
Bye bye

In the second case, Idris should refuse to launch with an error along the lines of "Unknown extension: TypeProvides"

david-christiansen avatar Nov 05 '13 20:11 david-christiansen

#768 should fix this, if my handling of the nonexistent extension case is deemed acceptable. (At least, it stops nonexistent extensions from being interpreted as files. I haven't touched the help command.)

trillioneyes avatar Jan 06 '14 00:01 trillioneyes

Has this been fixed now...

jfdm avatar Jan 24 '14 21:01 jfdm

Mostly. The help still needs updating.

david-christiansen avatar Jan 24 '14 21:01 david-christiansen