Initial commit

This commit is contained in:
La Ancapo 2026-01-25 02:27:22 +01:00
commit c101616e62
309 changed files with 53937 additions and 0 deletions

View file

@ -0,0 +1,20 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Basement.Alg.Class
( Indexable, index
, RandomAccess, read, write
) where
import Basement.Types.OffsetSize
class Indexable container ty where
index :: container -> (Offset ty) -> ty
class RandomAccess container prim ty where
read :: container -> (Offset ty) -> prim ty
write :: container -> (Offset ty) -> ty -> prim ()