Commit 0fae7e7b authored by Finn Teegen's avatar Finn Teegen
Browse files

Use === instead of == in case completion for literals

parent 59eb592a
......@@ -322,9 +322,10 @@ occursInBinding v (Binding w _) = v == w
failedExpr :: Type -> Expression
failedExpr ty = Function ty (qualifyWith preludeMIdent (mkIdent "failed")) 0
--TODO: Add note about arity of 0 because of the predefined functions in the Prelude
eqExpr :: Expression -> Expression -> Expression
eqExpr e1 e2 = Apply (Apply (Function eqTy eq 2) e1) e2
where eq = qImplMethodId preludeMIdent qEqId ty $ mkIdent "=="
eqExpr e1 e2 = Apply (Apply (Function eqTy eq 0) e1) e2
where eq = qImplMethodId preludeMIdent qDataId ty $ mkIdent "==="
ty = case e2 of
Literal _ l -> case l of
Char _ -> charType
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment