struct variable type checking, refactoring to avoid circular dependencies

This commit is contained in:
vegowotenks 2025-01-02 10:54:15 +01:00
parent 9f2fad1507
commit 1c1e25a881
15 changed files with 224 additions and 140 deletions

View file

@ -1,15 +0,0 @@
module Data.String.Ubc.Parse.Scope
( Scope(..)
, expectScopeStruct
)
where
import Data.String.Ubc.Parse.FileScope (FileScope)
import Data.String.Ubc.Parse.StructScope (StructScope)
data Scope =
ScopeFile FileScope
| ScopeStruct StructScope
expectScopeStruct (ScopeStruct s) = s
expectScopeStruct _ = error "Internal Error: Top Scope is not Scope Struct"