ubcc/src/Data/String/Ubc/Parse/Scope.hs

15 lines
390 B
Haskell

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"