Add flags to TopEntry, detect duplicate constructors, fix issue with missing constructors in CompileExp.

This commit is contained in:
2025-04-05 14:31:00 -07:00
parent 2a042c0092
commit 549cca19e3
17 changed files with 177 additions and 117 deletions

View File

@@ -328,17 +328,29 @@ instance Show Def where
-- entry in the top level context
data EFlag = Hint | Inline
instance Show EFlag where
show Hint = "hint"
show Inline = "inline"
instance Eq EFlag where
Hint == Hint = True
Inline == Inline = True
_ == _ = False
record TopEntry where
constructor MkEntry
fc : FC
name : QName
type : Tm
def : Def
eflags : List EFlag
-- FIXME snoc
instance Show TopEntry where
show (MkEntry fc name type def) = "\{show name} : \{show type} := \{show def}"
show (MkEntry fc name type def flags) = "\{show name} : \{show type} := \{show def} \{show flags}"
record ModContext where
constructor MkModCtx