scratch pad is now core

This commit is contained in:
Mark Canlas 2022-12-04 18:36:11 -05:00
parent 7e9ff1f02c
commit 037c292c64
25 changed files with 29 additions and 29 deletions

View File

@ -3,13 +3,13 @@ lazy val firepower =
.in(file("."))
.withCats
.withTesting
.aggregate(nescant, scratchpad, demo)
.aggregate(nescant, core, demo)
lazy val nescant =
project.withCats.withTesting
lazy val scratchpad =
project
lazy val core =
module("core")
.withCats
.withTesting

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
import cats.Semigroup
import cats.syntax.all._

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
object CodeGenerator extends App:
val allLetters =

View File

@ -1,3 +1,3 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
trait Companion[A]:
def canon: A

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
object Encoded:
trait Byte[A]:

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
trait GrantsWriteLeases[A]:
def withWriteLease[B](f: WriteLease[A] => B)(using A: Companion[A]): B =

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
object Load:
def constA[B: Encoded.Byte](x: B): Asm1[Reg.A] =

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
trait Loadable[A]:
def show(x: A): String

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
// https://mads.atari8.info/mads_eng.html#_mv
object Move:

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
sealed trait MutationStatus

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
trait ReadLease[A]

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
trait Reg[A]:
def hello: Boolean

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
// on the 6502, every register of this kind can store and load; so that capability was not parceled out into traits
// (unlike read/write leases)

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
import cats._
import cats.syntax.all._

View File

@ -1,3 +1,3 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
trait StatefulRegister[A: Reg, F <: MutationStatus]

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
object Store:
def fromA[A](dest: WriteLease.ByteAddress[A]): Asm2[Reg.A, A] =

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
trait WriteLease[A]:
def canon: A

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
sealed trait Address:
def n: Int

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
sealed trait Asm1[A]:
def xs: List[String]

View File

@ -1,6 +1,6 @@
package com.htmlism
package com.htmlism.firepower
package object scratchpad:
package object core:
object Reg:
type A =
Register.A

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
package object syntax:
implicit class WriteRegisterOps[Addr](reg: WriteByteAddress[Addr]):

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
import weaver.*
object ComplicatedResourceSuite extends FunSuite:

View File

@ -1,9 +1,9 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.matchers.should._
import com.htmlism.scratchpad.syntax._
import com.htmlism.firepower.core.syntax._
object ExampleRegister extends ZeroPageAddress(0x01, "example") with WriteOnlyByteAddress[ExampleRegister]

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
import weaver._

View File

@ -1,4 +1,4 @@
package com.htmlism.scratchpad
package com.htmlism.firepower.core
import weaver.*