Skip to content

Parser for functions, lambdas, conditions and symbols #62

Parser for functions, lambdas, conditions and symbols

Parser for functions, lambdas, conditions and symbols #62

Triggered via pull request January 12, 2024 09:25
Status Failure
Total duration 5m 52s
Artifacts

Tests.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 19 warnings
check_style
HLint failed with status: 1. Warning (7), Suggestion (10)
run_tests
Process completed with exit code 2.
check_style: LobsterLang/src/Parse.hs#L50
Suggestion in Parser in module Parse: Use newtype instead of data ▫︎ Found: "data Parser a\n = Parser {runParser :: Position\n -> String -> Either String (a, String, Position)}" ▫︎ Perhaps: "newtype Parser a\n = Parser {runParser :: Position\n -> String -> Either String (a, String, Position)}" ▫︎ Note: decreases laziness
check_style: LobsterLang/src/Parse.hs#L211
Warning in parseElem in module Parse: Use const ▫︎ Found: "\\ x _ -> x" ▫︎ Perhaps: "const"
check_style: LobsterLang/src/Parse.hs#L299
Suggestion in parseListElem in module Parse: Redundant bracket ▫︎ Found: "case (parseOthers parser pos' s') of\n Left err -> Left err\n Right (res', s'', pos'') -> Right (res : res', s'', pos'')" ▫︎ Perhaps: "case parseOthers parser pos' s' of\n Left err -> Left err\n Right (res', s'', pos'') -> Right (res : res', s'', pos'')"
check_style: LobsterLang/src/Parse.hs#L307
Suggestion in parseListElem in module Parse: Redundant bracket ▫︎ Found: "case (parseOthers parser pos'' s'') of\n Left err -> Left err\n Right (res', s''', pos''') -> Right (res : res', s''', pos''')" ▫︎ Perhaps: "case parseOthers parser pos'' s'' of\n Left err -> Left err\n Right (res', s''', pos''') -> Right (res : res', s''', pos''')"
check_style: LobsterLang/src/Parse.hs#L411
Suggestion in parseDefineFn in module Parse: Redundant bracket ▫︎ Found: "(Parser parseFn) *> (Parser defineFn)" ▫︎ Perhaps: "Parser parseFn *> (Parser defineFn)"
check_style: LobsterLang/src/Parse.hs#L411
Suggestion in parseDefineFn in module Parse: Redundant bracket ▫︎ Found: "(Parser parseFn) *> (Parser defineFn)" ▫︎ Perhaps: "(Parser parseFn) *> Parser defineFn"
check_style: LobsterLang/src/Parse.hs#L450
Suggestion in parseCond in module Parse: Redundant bracket ▫︎ Found: "((AST.Cond res res' res''), s''', pos''')" ▫︎ Perhaps: "(AST.Cond res res' res'', s''', pos''')"
check_style: LobsterLang/src/Parse.hs#L454
Suggestion in parseCond in module Parse: Redundant bracket ▫︎ Found: "((Maybe AST.Ast), String, Position)" ▫︎ Perhaps: "(Maybe AST.Ast, String, Position)"
check_style: LobsterLang/src/Parse.hs#L459
Suggestion in parseCond in module Parse: Redundant bracket ▫︎ Found: "((Just res), s'', pos'')" ▫︎ Perhaps: "(Just res, s'', pos'')"
check_style: LobsterLang/src/Vm.hs#L36
Warning in module Vm: Redundant bracket ▫︎ Found: "(0)" ▫︎ Perhaps: "0"
check_compilation: LobsterLang/src/Compiler.hs#L127
Pattern match(es) are non-exhaustive
run_tests: LobsterLang/src/Compiler.hs#L127
Pattern match(es) are non-exhaustive
run_tests: LobsterLang/test/AstEvalSpec.hs#L1
The export item ‘module AstEvalSpec’ is missing an export list
run_tests: LobsterLang/test/AstOptimizerSpec.hs#L1
The export item ‘module AstOptimizerSpec’ is missing an export list
run_tests: LobsterLang/test/CompilerSpec.hs#L1
The export item ‘module CompilerSpec’ is missing an export list
run_tests: LobsterLang/test/ParseSpec.hs#L1
The export item ‘module ParseSpec’ is missing an export list
run_tests: LobsterLang/test/ParserSpec.hs#L1
The export item ‘module ParserSpec’ is missing an export list
run_tests: LobsterLang/test/ParserSpec.hs#L12
The import of ‘Parse’ is redundant
run_tests: LobsterLang/test/VmSpec.hs#L1
The export item ‘module VmSpec’ is missing an export list