-
Notifications
You must be signed in to change notification settings - Fork 145
Frequently Asked Questions
If it cannot be done with Java, then it cannot be done with Frege either. Otherwise, the answer is "most likely". Remember, writing Frege code is just a more convenient way to write Java code.
JDK7 is the official development platform, it is choosen because it has the fork/join packages which are used for parallelization.
However, apart from that, no Java 7 features are used. Hence, it is possible to compile and run frege programs that do not need paralellism with Java 6.
Here are the steps to follow, based on the "Re-Compiling the Compiler" section of the Getting Started page:
After clonig the frege repository, do the following adaptions:
-
In the
Makefile
, we letJAVAC
point to a java6 compiler and comment out the lines referringForkJoin.fr
,ForkJoin.class
-
In the
JAVA
macro, the property-Dfrege.javac
must also point to the java6 compiler. -
In
frege/runtime/CompilerSupport.java
, we need to remove references to theFiles
class and re-implement theslurp
method. The following one-liner could help:return new Scanner(new File(filename), encoding).useDelimiter("\\Z").next();
-
In
frege/runtime/Runtime.java
, comment out thefork
method and in therunMain
method, the use of fork/join needs to be removed and hence checking the 'parallel' option is unnecessary (can be removed). -
In
frege/StandardLibrary.fr
, theimport Lib.ForkJoin
needs to be removed.
Note that, in order to run the downloaded frege compiler, you still need at least JRE 7.
Home
News
Community
- Online Communities
- Frege Ecosystem
- Frege Day 2015
- Protocol
- Simon Peyton-Jones Transcript
- Talks
- Articles
- Books
- Courses
Documentation
- Getting Started
- Online REPL
- FAQ
- Language and API Reference
- Libraries
- Language Interoperability
- Calling Frege From Java (old)
- Calling Java From Frege
- Calling Frege From Java (new)
- Compiler Manpage
- Source Code Doc
- Contributing
- System Properties
- License
- IDE Support
- Eclipse
- Intellij
- VS Code and Language Server
- Haskell
- Differences
- GHC Options vs Frege
- Learn You A Haskell Adaptations
- Official Doc
Downloads