forked from idris-lang/Idris2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
752c169
commit 2a20a23
Showing
127 changed files
with
11,767 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<groupId>io.github.mmhelloworld.idris2</groupId> | ||
<artifactId>idris2</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>compiler</artifactId> | ||
<name>Idris 2 JVM Compiler</name> | ||
|
||
<properties> | ||
<maven.compiler.source>8</maven.compiler.source> | ||
<maven.compiler.target>8</maven.compiler.target> | ||
<skipIdrisCompile>false</skipIdrisCompile> | ||
<skipIdrisInstallLibrary>false</skipIdrisInstallLibrary> | ||
<skipIdrisClean>false</skipIdrisClean> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>idris-compile</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<skip>${skipIdrisCompile}</skip> | ||
<executable>make</executable> | ||
<workingDirectory>${project.parent.basedir}</workingDirectory> | ||
<arguments> | ||
<argument>all</argument> | ||
<argument>IDRIS2_BOOT=idris2boot</argument> | ||
</arguments> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>idris-install-libs</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<skip>${skipIdrisInstallLibrary}</skip> | ||
<executable>make</executable> | ||
<workingDirectory>${project.parent.basedir}</workingDirectory> | ||
<arguments> | ||
<argument>install</argument> | ||
<argument>IDRIS2_BOOT=idris2boot</argument> | ||
</arguments> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>idris-clean</id> | ||
<phase>clean</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<skip>${skipIdrisClean}</skip> | ||
<executable>make</executable> | ||
<workingDirectory>${project.parent.basedir}</workingDirectory> | ||
<arguments> | ||
<argument>clean</argument> | ||
</arguments> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-idris2-classes</id> | ||
<phase>process-classes</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<target> | ||
<copy file="../build/exec/idris2_app/idris2.jar" | ||
tofile="${project.build.directory}/compiler-${project.version}.jar"/> | ||
</target> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<groupId>io.github.mmhelloworld.idris2</groupId> | ||
<artifactId>idris2</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>jvm-assembler</artifactId> | ||
<name>Idris 2 JVM Assembler</name> | ||
|
||
<properties> | ||
<idris.tests/> | ||
<skipTests>false</skipTests> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-idris2-libs</id> | ||
<phase>process-classes</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory> | ||
${project.build.directory}/idris2/.idris2/idris2-${idris2.major.version}.${idris2.minor.version}.${idris2.patch.version} | ||
</outputDirectory> | ||
<overwrite>true</overwrite> | ||
<resources> | ||
<resource> | ||
<directory> | ||
${project.parent.basedir}/compiler/target/.idris2/idris2-${idris2.major.version}.${idris2.minor.version}.${idris2.patch.version} | ||
</directory> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>appassembler-maven-plugin</artifactId> | ||
<configuration> | ||
<extraJvmArguments>-Xss8m -Xms2g -Xmx3g</extraJvmArguments> | ||
<repositoryName>lib</repositoryName> | ||
<repositoryLayout>flat</repositoryLayout> | ||
<assembleDirectory>${project.build.directory}/idris2</assembleDirectory> | ||
<programs> | ||
<program> | ||
<mainClass>idris2.Main</mainClass> | ||
<id>idris2</id> | ||
</program> | ||
</programs> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>assemble</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<configuration> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<descriptors> | ||
<descriptor>src/assembly/bin.xml</descriptor> | ||
</descriptors> | ||
<finalName>idris2</finalName> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>idris-test</id> | ||
<phase>integration-test</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<skip>${skipTests}</skip> | ||
<executable>make</executable> | ||
<workingDirectory>${project.parent.basedir}</workingDirectory> | ||
<arguments> | ||
<argument>test</argument> | ||
<argument>${idris.tests}</argument> | ||
</arguments> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.github.mmhelloworld.idris2</groupId> | ||
<artifactId>compiler</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.github.mmhelloworld.idris2</groupId> | ||
<artifactId>runtime</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.ow2.asm</groupId> | ||
<artifactId>asm</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-params</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> | ||
<id>bin</id> | ||
<formats> | ||
<format>zip</format> | ||
</formats> | ||
<fileSets> | ||
<fileSet> | ||
<directory>${project.build.directory}/idris2</directory> | ||
<outputDirectory>/</outputDirectory> | ||
</fileSet> | ||
</fileSets> | ||
</assembly> |
23 changes: 23 additions & 0 deletions
23
jvm-assembler/src/main/java/io/github/mmhelloworld/idris2/jvmassembler/Annotation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package io.github.mmhelloworld.idris2.jvmassembler; | ||
|
||
import java.util.List; | ||
|
||
public class Annotation { | ||
private final String name; | ||
private final List<AnnotationProperty> properties; | ||
|
||
public Annotation(final String name, | ||
final List<AnnotationProperty> properties) { | ||
this.name = name; | ||
this.properties = properties; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public List<AnnotationProperty> getProperties() { | ||
return properties; | ||
} | ||
} | ||
|
20 changes: 20 additions & 0 deletions
20
...ssembler/src/main/java/io/github/mmhelloworld/idris2/jvmassembler/AnnotationProperty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.github.mmhelloworld.idris2.jvmassembler; | ||
|
||
public class AnnotationProperty { | ||
private final String name; | ||
private final AnnotationValue value; | ||
|
||
public AnnotationProperty(final String name, | ||
final AnnotationValue value) { | ||
this.name = name; | ||
this.value = value; | ||
} | ||
|
||
public AnnotationValue getValue() { | ||
return value; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
} |
Oops, something went wrong.