aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2022-08-14 15:54:54 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-08-14 15:54:54 +0100
commit3e2ba20ccee0130afb9d84eb7d890b4bf67c77fe (patch)
tree722edbd5160893cdca43ecf29783c3feca19275f /src
parenta47207c82bcf26403ae46d618f4c5dadcdf2f739 (diff)
downloadmicro-lang-hs-3e2ba20ccee0130afb9d84eb7d890b4bf67c77fe.tar.gz
micro-lang-hs-3e2ba20ccee0130afb9d84eb7d890b4bf67c77fe.zip
Provide information about types
Diffstat (limited to 'src')
-rw-r--r--src/Compiler.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Compiler.hs b/src/Compiler.hs
index 0adc4ad..3d3f0ac 100644
--- a/src/Compiler.hs
+++ b/src/Compiler.hs
@@ -54,7 +54,7 @@ typecheckCall args params
else
if all (\(a, b) -> a == b) $ zip t params -- compare types
then return $ Nothing -- all good!
- else return $ Just "type mismatch in function call" -- TODO: type description
+ else return $ Just ("type mismatch in function call:\n unexpected " ++ A.showList t ++ "\n expecting " ++ A.showList params)
Nothing ->
-- there was an error in on argument
return $ Nothing