module Language.Fiddle.Internal.UnitInterface where import Data.Text import Data.Word import Language.Fiddle.Internal.Scopes (Scope) import Language.Fiddle.Types (SourceSpan) data Annotated a = Annotated { sourceSpan :: SourceSpan, docComment :: Text, internal :: a } deriving (Eq, Ord, Show) -- | Contains a datastructure which represents a FiddleUnit. -- -- These datastructures contain the exported symobls of a fiddle unit and it's -- direct dependencies. data UnitInterface where UnitInterface :: { rootScope :: Scope String (Annotated ExportedValue), dependencies :: [FilePath] } -> UnitInterface deriving (Eq, Ord, Show) data ExportedValue where ExportedBitsType :: {exportBitsTypeSize :: Word32} -> ExportedValue ExportedObjType :: {exportObjTypeSize :: Word32} -> ExportedValue deriving (Show, Eq, Ord)