Frege / frege

Frege is a Haskell for the JVM. It brings purely functional programing to the Java platform.
https://github.com/Frege/frege/wiki/_pages
Other
3.64k stars 145 forks source link

Confusing error when build directory doesn't exist #186

Closed codygman closed 8 years ago

codygman commented 9 years ago
cody@cody-G46VW:~/frege/examples$ ls
SimpleIO.fr
cody@cody-G46VW:~/frege/examples$ java -Xss1m -jar /home/cody/frege/frege.jar -d build SimpleIO.fr 
build is not a directory.
    flags:
       -d directory    target directory for *.java and *.class files
       -fp classpath   where to find imported frege packages
       -enc charset    charset for source code files, standard is UTF-8
       -enc DEFAULT    platform default charset for source code files
       -nocp           exclude java classpath from -fp
       -hints          print more detailed error messages and warnings
       -inline         inline functions where possible
       -comments       generate commented code
       -explain i[-j]  print some debugging output from type checker
                       regarding line(s) i (to j). May help to understand
                       inexplicable type errors better.
       -nowarn         don't print warnings (not recommended)
       -v              verbose mode on
       -make           build outdated or missing imports
       -sp srcpath     look for source files in srcpath, default is .
       -j              do not run the java compiler
       -ascii          do not use →, ⇒, ∀ and ∷ when presenting types
       -greek          make greek type variables
       -fraktur        make 𝖋𝖗𝖆𝖐𝖙𝖚𝖗 type variables
       -latin          make latin type variables

A classpath is a list of jar files, zip-Files or directories separated by :
A srcpath is a list of directories separated by :
To get parser debugging output, set YYDEBUG environment variable to 1
runtime 0.183 wallclock seconds.

Maybe consider not outputting help in the case of a missing directory? I didn't even notice "build is not a directory".

Ingo60 commented 9 years ago

Yes, good idea.

Ingo60 commented 8 years ago

This works now thus:

ingo@freguntu:~/Frege/frege$ java -cp build frege.compiler.Main  -d /tmps tests/comp/Issue160.fr
/tmps is not a directory.