diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2024-10-03 01:58:23 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2024-10-03 01:58:23 -0600 |
| commit | fa32199f5ffc6405bd405e055051e11e85c80668 (patch) | |
| tree | 87effa6909f7cc6f05782f818c01d0a983a620fb /src/Language/Fiddle/Ast/Internal/SyntaxTree.hs | |
| parent | 719c8f8ed3d1e6337f27d3b9d5a033a4b63726b8 (diff) | |
| download | fiddle-fa32199f5ffc6405bd405e055051e11e85c80668.tar.gz fiddle-fa32199f5ffc6405bd405e055051e11e85c80668.tar.bz2 fiddle-fa32199f5ffc6405bd405e055051e11e85c80668.zip | |
Another monolithic change. Not good git ettiquite.
Import statements are fully implemented including compiling to an
interface file for faster compilations.
Diffstat (limited to 'src/Language/Fiddle/Ast/Internal/SyntaxTree.hs')
| -rw-r--r-- | src/Language/Fiddle/Ast/Internal/SyntaxTree.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Language/Fiddle/Ast/Internal/SyntaxTree.hs b/src/Language/Fiddle/Ast/Internal/SyntaxTree.hs index 706a178..8eb8c8e 100644 --- a/src/Language/Fiddle/Ast/Internal/SyntaxTree.hs +++ b/src/Language/Fiddle/Ast/Internal/SyntaxTree.hs @@ -10,6 +10,7 @@ module Language.Fiddle.Ast.Internal.SyntaxTree ( -- Type Families NumberType, ImportInterface, + FiddleUnitInterface, -- Witness Types Witness (..), WitnessType, @@ -41,6 +42,7 @@ module Language.Fiddle.Ast.Internal.SyntaxTree EnumBody (..), EnumConstantDecl (..), PackageBody (..), + TreeType (..), -- Helper Functions mapDirected, mapDirectedM, @@ -71,6 +73,8 @@ import Language.Fiddle.Ast.Internal.Kinds import Language.Fiddle.Ast.Internal.Stage import Language.Fiddle.Internal.UnitInterface (UnitInterface) +type TreeType t stage = t stage (StageFunctor stage) (StageAnnotation stage) + type family FiddleUnitInterface (s :: Stage) :: Type where FiddleUnitInterface s = If (s < Checked) () UnitInterface @@ -233,11 +237,11 @@ undirected (Directed _ tfa _) = tfa -- | The root of the parse tree, containing a list of top-level declarations. data FiddleUnit (stage :: Stage) (f :: Type -> Type) a where FiddleUnit :: - { -- | List of declarations. - fiddleDecls :: [Directed FiddleDecl stage f a], - -- | The interface for this FiddleUnit. Early on, this is just () because + { -- | The interface for this FiddleUnit. Early on, this is just () because -- not enough information is provided to determine the interface.. fiddleUnitInterface :: FiddleUnitInterface stage, + -- | List of declarations. + fiddleDecls :: [Directed FiddleDecl stage f a], -- | Annotation for the 'FiddleUnit'. fiddleUnitAnnot :: a } -> |