summaryrefslogtreecommitdiff
path: root/source/Syntax
diff options
context:
space:
mode:
authorSimon-Kor <52245124+Simon-Kor@users.noreply.github.com>2024-08-26 20:14:18 +0200
committerSimon-Kor <52245124+Simon-Kor@users.noreply.github.com>2024-08-26 20:14:18 +0200
commit76ea8e11d943b123d28dfbe2f354838f80fb8dba (patch)
treeb9f8439ca3bc9d689182d4db0eb4c8f674a8c919 /source/Syntax
parenta253d06a0755c41dd321fc2e235c3332de63a8c7 (diff)
Implemented the checking for local functions.
Diffstat (limited to 'source/Syntax')
-rw-r--r--source/Syntax/Abstract.hs2
-rw-r--r--source/Syntax/Adapt.hs2
-rw-r--r--source/Syntax/Concrete.hs2
-rw-r--r--source/Syntax/Internal.hs2
4 files changed, 4 insertions, 4 deletions
diff --git a/source/Syntax/Abstract.hs b/source/Syntax/Abstract.hs
index 6457d42..6372c87 100644
--- a/source/Syntax/Abstract.hs
+++ b/source/Syntax/Abstract.hs
@@ -373,7 +373,7 @@ data Proof
- | DefineFunctionMathy VarSymbol VarSymbol VarSymbol VarSymbol VarSymbol (NonEmpty [(Expr, Formula)]) Proof
+ | DefineFunctionMathy VarSymbol VarSymbol VarSymbol VarSymbol VarSymbol (NonEmpty (Expr, Formula)) Proof
-- ^ Local function definition, but in this case we give the domain and target an the rules for $xs$ in some sub domains.
--
deriving (Show, Eq, Ord)
diff --git a/source/Syntax/Adapt.hs b/source/Syntax/Adapt.hs
index 96fd76d..3cff497 100644
--- a/source/Syntax/Adapt.hs
+++ b/source/Syntax/Adapt.hs
@@ -35,7 +35,7 @@ scanChunk ltoks =
Located{startPos = pos, unLocated = (BeginEnv "inductive")} :_ ->
matchOrErr inductive "inductive definition" pos
Located{startPos = pos, unLocated = (BeginEnv "signature")} :_ ->
- matchOrErr signature "signature" pos
+ matchOrErr signatureIntro "signature" pos
_ -> []
adaptChunks :: [[Located Token]] -> Lexicon -> Lexicon
diff --git a/source/Syntax/Concrete.hs b/source/Syntax/Concrete.hs
index f414ea6..69280c1 100644
--- a/source/Syntax/Concrete.hs
+++ b/source/Syntax/Concrete.hs
@@ -373,7 +373,7 @@ grammar lexicon@Lexicon{..} = mdo
-- 3 & \text{else}
-- \end{cases}
- functionDefineCase <- rule $ (:[]) <$> ((,) <$> expr <*> (_ampersand *> formula))
+ functionDefineCase <- rule $ (,) <$> expr <*> (_ampersand *> formula)
defineFunctionMathy <- rule $ DefineFunctionMathy
<$> (_define *> beginMath *> varSymbol) -- Define $ f
<*> (_colon *> varSymbol) -- : 'var' \to 'var'
diff --git a/source/Syntax/Internal.hs b/source/Syntax/Internal.hs
index 872ae06..0e3361d 100644
--- a/source/Syntax/Internal.hs
+++ b/source/Syntax/Internal.hs
@@ -436,7 +436,7 @@ data Proof
| Define VarSymbol Term Proof
| DefineFunction VarSymbol VarSymbol Term Term Proof
- | DefineFunctionMathy VarSymbol VarSymbol VarSymbol VarSymbol [(Term, Formula)] Proof
+ | DefineFunctionMathy VarSymbol VarSymbol VarSymbol VarSymbol (NonEmpty (Term, Formula)) Proof
deriving instance Show Proof
deriving instance Eq Proof