A lot of small changes, added better error messages for bugs mainly

This commit is contained in:
sebastianselander 2023-05-11 18:37:03 +02:00
parent 5e1c81beb7
commit 6260dc2c41
10 changed files with 37 additions and 39 deletions

View file

@ -345,7 +345,6 @@ morphPattern p expectedType = case p of
return $ Just ((M.PEnum newIdent, expectedType), Set.empty)
L.PInj ident pts -> do let newIdent = newName expectedType ident
ts' <- mapM (getMonoFromPoly . snd) pts
trace ("Constructor: " ++ show ident ++ "expected: " ++ show expectedType ++ "\nTS': " ++ show ts' ++ "\n\n\n") pure ()
morphCons (convertConsTypeToDataType expectedType (reverse ts')) ident newIdent
let pts' = zip (map fst pts) ts'
psSets <- mapM (uncurry morphPattern) pts'