update glue platform files to new syntax

This commit is contained in:
Luke Boswell 2024-05-05 16:46:34 +02:00
parent bbb54b4cc9
commit ddccf8ff59
No known key found for this signature in database
GPG Key ID: F6DB3C9DB47377B0
5 changed files with 13 additions and 16 deletions

View File

@ -1,5 +1,3 @@
interface File
exposes [File]
imports []
module [File]
File : { name : Str, content : Str }

View File

@ -1,6 +1,6 @@
interface Shape
exposes [Shape, RocNum, RocTagUnion, RocStructFields, RocFn, RocSingleTagPayload]
imports [TypeId.{ TypeId }]
module [Shape, RocNum, RocTagUnion, RocStructFields, RocFn, RocSingleTagPayload]
import TypeId exposing [TypeId]
Shape : [
RocStr,

View File

@ -1,6 +1,4 @@
interface Target
exposes [Target, Architecture, OperatingSystem]
imports []
module [Target, Architecture, OperatingSystem]
Target : {
architecture : Architecture,

View File

@ -1,6 +1,4 @@
interface TypeId
exposes [TypeId, typeIDfromU64, typeIDtoU64]
imports []
module [TypeId, typeIDfromU64, typeIDtoU64]
TypeId := U64 implements [Eq, Hash, Inspect, Encoding]

View File

@ -1,6 +1,8 @@
interface Types
exposes [Types, shape, size, alignment, target, walkShapes, entryPoints]
imports [Shape.{ Shape }, TypeId.{ TypeId, typeIDfromU64, typeIDtoU64 }, Target.{ Target }]
module [Types, shape, size, alignment, target, walkShapes, entryPoints]
import Shape exposing [Shape]
import TypeId exposing [TypeId, typeIDfromU64, typeIDtoU64]
import Target exposing [Target]
# TODO: switch AssocList uses to Dict once roc_std is updated.
Tuple1 : [T Str TypeId]
@ -23,7 +25,8 @@ Types := {
## Names and types of the entry points of the program (e.g. mainForHost)
entrypoints : List Tuple1,
target : Target,
} implements [Inspect, Encoding]
}
implements [Inspect, Encoding]
target : Types -> Target
target = \@Types types -> types.target