Skip to content

Commit fd02509

Browse files
committed
Rename modules and packages to match repository
1 parent b7de2ae commit fd02509

File tree

134 files changed

+9798
-336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+9798
-336
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ idris2docs_venv
3232

3333
/custom.mk
3434

35+
*.class
36+
*.jar
37+
*-pom.xml
38+
target
39+
output
40+
build
41+
classes/**
42+
*-classes/**
43+
3544
# NixOS
3645
/result
3746

@@ -46,6 +55,9 @@ idris2docs_venv
4655
.\#*
4756
# VS Code
4857
.vscode/*
58+
#Intellij
59+
.idea
60+
*.iml
4961

5062
# macOS
5163
.DS_Store

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
Idris 2
2-
=======
1+
Idris 2 for JVM
2+
============
3+
[![Build Status](https://github.com/mmhelloworld/idris-jvm/actions/workflows/install.yml/badge.svg)](https://github.com/mmhelloworld/idris-jvm/actions/workflows/install.yml)
34

45
[Idris 2](https://idris-lang.org/) is a purely functional programming language
56
with first class types. This repository provides Idris 2 compiler targeting JVM bytecode so that Idris 2 compiler and Idris 2 programs can run on the JVM.

idris-jvm-assembler/idris-jvm-assembler.iml

Lines changed: 0 additions & 24 deletions
This file was deleted.

idris-jvm-assembler/pom.xml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<groupId>io.github.mmhelloworld</groupId>
7+
<artifactId>idris-jvm</artifactId>
8+
<version>0.3.0-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>idris-jvm-assembler</artifactId>
13+
<name>Idris 2 JVM Assembler</name>
14+
15+
<dependencies>
16+
<dependency>
17+
<groupId>io.github.mmhelloworld</groupId>
18+
<artifactId>idris-jvm-runtime</artifactId>
19+
<version>${project.version}</version>
20+
</dependency>
21+
22+
<dependency>
23+
<groupId>org.ow2.asm</groupId>
24+
<artifactId>asm</artifactId>
25+
</dependency>
26+
27+
<dependency>
28+
<groupId>org.assertj</groupId>
29+
<artifactId>assertj-core</artifactId>
30+
<scope>test</scope>
31+
</dependency>
32+
33+
<dependency>
34+
<groupId>org.junit.jupiter</groupId>
35+
<artifactId>junit-jupiter-api</artifactId>
36+
<scope>test</scope>
37+
</dependency>
38+
39+
<dependency>
40+
<groupId>org.junit.jupiter</groupId>
41+
<artifactId>junit-jupiter-engine</artifactId>
42+
<scope>test</scope>
43+
</dependency>
44+
<dependency>
45+
<groupId>org.junit.jupiter</groupId>
46+
<artifactId>junit-jupiter-params</artifactId>
47+
<scope>test</scope>
48+
</dependency>
49+
</dependencies>
50+
</project>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package io.github.mmhelloworld.idrisjvm.assembler;
2+
3+
import java.util.List;
4+
5+
public class Annotation {
6+
private final String name;
7+
private final List<AnnotationProperty> properties;
8+
9+
public Annotation(final String name,
10+
final List<AnnotationProperty> properties) {
11+
this.name = name;
12+
this.properties = properties;
13+
}
14+
15+
public String getName() {
16+
return name;
17+
}
18+
19+
public List<AnnotationProperty> getProperties() {
20+
return properties;
21+
}
22+
}
23+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package io.github.mmhelloworld.idrisjvm.assembler;
2+
3+
public class AnnotationProperty {
4+
private final String name;
5+
private final AnnotationValue value;
6+
7+
public AnnotationProperty(final String name,
8+
final AnnotationValue value) {
9+
this.name = name;
10+
this.value = value;
11+
}
12+
13+
public AnnotationValue getValue() {
14+
return value;
15+
}
16+
17+
public String getName() {
18+
return name;
19+
}
20+
}
Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
package io.github.mmhelloworld.idrisjvm.assembler;
2+
3+
import java.util.List;
4+
5+
public abstract class AnnotationValue {
6+
private final AnnotationValueType type;
7+
8+
private AnnotationValue(final AnnotationValueType type) {
9+
this.type = type;
10+
}
11+
12+
public AnnotationValueType getType() {
13+
return type;
14+
}
15+
16+
public enum AnnotationValueType {
17+
AnnBoolean,
18+
AnnByte,
19+
AnnChar,
20+
AnnShort,
21+
AnnInt,
22+
AnnLong,
23+
AnnFloat,
24+
AnnDouble,
25+
AnnString,
26+
AnnEnum,
27+
AnnClass,
28+
AnnArray,
29+
AnnAnnotation
30+
}
31+
32+
public static class AnnString extends AnnotationValue {
33+
private final String value;
34+
35+
public AnnString(final String value) {
36+
super(AnnotationValueType.AnnString);
37+
this.value = value;
38+
}
39+
40+
public String getValue() {
41+
return value;
42+
}
43+
}
44+
45+
public static class AnnEnum extends AnnotationValue {
46+
private final String enumTy;
47+
private final String value;
48+
49+
public AnnEnum(String enumTy, final String value) {
50+
super(AnnotationValueType.AnnEnum);
51+
this.enumTy = enumTy;
52+
this.value = value;
53+
}
54+
55+
public String getValue() {
56+
return value;
57+
}
58+
59+
public String getEnumTy() {
60+
return enumTy;
61+
}
62+
}
63+
64+
public static class AnnInt extends AnnotationValue {
65+
private final int value;
66+
67+
public AnnInt(final int value) {
68+
super(AnnotationValueType.AnnInt);
69+
this.value = value;
70+
}
71+
72+
public int getValue() {
73+
return value;
74+
}
75+
}
76+
77+
public static class AnnByte extends AnnotationValue {
78+
private final byte value;
79+
80+
public AnnByte(final byte value) {
81+
super(AnnotationValueType.AnnByte);
82+
this.value = value;
83+
}
84+
85+
public byte getValue() {
86+
return value;
87+
}
88+
}
89+
90+
public static class AnnChar extends AnnotationValue {
91+
private final char value;
92+
93+
public AnnChar(final char value) {
94+
super(AnnotationValueType.AnnChar);
95+
this.value = value;
96+
}
97+
98+
public char getValue() {
99+
return value;
100+
}
101+
}
102+
103+
public static class AnnBoolean extends AnnotationValue {
104+
private final boolean value;
105+
106+
public AnnBoolean(final boolean value) {
107+
super(AnnotationValueType.AnnBoolean);
108+
this.value = value;
109+
}
110+
111+
public boolean getValue() {
112+
return value;
113+
}
114+
}
115+
116+
public static class AnnShort extends AnnotationValue {
117+
private final short value;
118+
119+
public AnnShort(final short value) {
120+
super(AnnotationValueType.AnnShort);
121+
this.value = value;
122+
}
123+
124+
public short getValue() {
125+
return value;
126+
}
127+
}
128+
129+
public static class AnnLong extends AnnotationValue {
130+
private final long value;
131+
132+
public AnnLong(final long value) {
133+
super(AnnotationValueType.AnnLong);
134+
this.value = value;
135+
}
136+
137+
public long getValue() {
138+
return value;
139+
}
140+
}
141+
142+
public static class AnnFloat extends AnnotationValue {
143+
private final double value;
144+
145+
public AnnFloat(final double value) {
146+
super(AnnotationValueType.AnnFloat);
147+
this.value = value;
148+
}
149+
150+
public double getValue() {
151+
return value;
152+
}
153+
}
154+
155+
public static class AnnDouble extends AnnotationValue {
156+
private final double value;
157+
158+
public AnnDouble(final double value) {
159+
super(AnnotationValueType.AnnDouble);
160+
this.value = value;
161+
}
162+
163+
public double getValue() {
164+
return value;
165+
}
166+
}
167+
168+
public static class AnnArray extends AnnotationValue {
169+
private final List<AnnotationValue> values;
170+
171+
public AnnArray(final List<AnnotationValue> values) {
172+
super(AnnotationValueType.AnnArray);
173+
this.values = values;
174+
}
175+
176+
public List<AnnotationValue> getValues() {
177+
return values;
178+
}
179+
}
180+
181+
public static class AnnClass extends AnnotationValue {
182+
private final String value;
183+
184+
public AnnClass(final String value) {
185+
super(AnnotationValueType.AnnClass);
186+
this.value = value;
187+
}
188+
189+
public String getValue() {
190+
return value;
191+
}
192+
}
193+
194+
public static class AnnAnnotation extends AnnotationValue {
195+
private final Annotation value;
196+
197+
public AnnAnnotation(final Annotation value) {
198+
super(AnnotationValueType.AnnAnnotation);
199+
this.value = value;
200+
}
201+
202+
public Annotation getValue() {
203+
return value;
204+
}
205+
}
206+
}

0 commit comments

Comments
 (0)