module Language.Fiddle.Ast.Internal.Kinds where import Data.Kind (Type) import Language.Fiddle.Ast.Internal.Stage -- The Kind types should have for SyntaxTrees. -- -- A synatx tree kind should take as parameters, an applicative functor for the -- first argument. This applicative functor allows errors and warnings to be -- contained to their deferred regions during compilation, so more errors may be -- reported an once. -- -- The second argument is the annotation type. Every syntax tree element has an -- annotation. When initially parsing, this annotation is a list of comments -- that came before the element and the source position of the element. -- -- SynTree types are not dependent on the compilation stage. They're the same -- regardless of the compilation stage. type SynTree = (Type -> Type) -> Type -> Type -- A syntax tree which is dependent on the stage in compilation. As compilations -- progress through stages, types in the syntax tree may change as things become -- more and more machine readable. type StagedSynTree = Stage -> SynTree