1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-11 08:25:46 +03:00

[abstract] fail if we have a nonempty where clause

This commit is contained in:
Jan Mas Rovira 2022-03-07 14:34:17 +01:00
parent 14573c0927
commit e9e97151ce

View File

@ -64,11 +64,17 @@ goFunctionClause :: forall r. Members '[Error Err] r => FunctionClause 'Scoped -
goFunctionClause FunctionClause {..} = do
_clausePatterns' <- mapM goPattern _clausePatterns
_clauseBody' <- goExpression _clauseBody
goWhereBlock _clauseWhere
return A.FunctionClause {
_clausePatterns = _clausePatterns',
_clauseBody = _clauseBody'
}
goWhereBlock :: forall r. Members '[Error Err] r => Maybe (WhereBlock 'Scoped) -> Sem r ()
goWhereBlock w = case w of
Just _ -> unsupported "where block"
Nothing -> return ()
goInductiveParameter :: Members '[Error Err] r => InductiveParameter 'Scoped -> Sem r A.FunctionParameter
goInductiveParameter InductiveParameter {..} = do
paramType' <- goExpression _inductiveParameterType