Skip to content

Commit

Permalink
Remove redundant variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sodic committed Oct 7, 2024
1 parent 8c8cb4f commit d0ba9e5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions waspc/src/Wasp/Analyzer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,10 @@ analyze prismaSchemaAst =

getEntityDecls :: Psl.Schema.Schema -> Either [AnalyzeError] [Decl]
getEntityDecls schema =
wrapAnalyzerError TypeError (typeCheck stdTypes ast)
wrapAnalyzerError TypeError (typeCheck stdTypes astWithEntitiesOnly)
>>= (wrapAnalyzerError EvaluationError . evaluate stdTypes)
where
entityStatements = parseEntityStatements schema
ast = Parser.AST entityStatements
astWithEntitiesOnly = Parser.AST $ parseEntityStatements schema

wrapAnalyzerError :: (e -> AnalyzeError) -> Either e a -> Either [AnalyzeError] a
wrapAnalyzerError makeError = left ((: []) . makeError)

0 comments on commit d0ba9e5

Please sign in to comment.