Commit 600daef8 authored by Kai-Oliver Prott's avatar Kai-Oliver Prott

Merge branch 'master' into SpanInfo

parents 68fbc703 286c8797
......@@ -6,6 +6,7 @@ Version 1.0.2 (under development)
* Fixed bug with wrong type of free variables in the intermediate language.
* Fixed bug with generated default implementations of nullary class methods.
* Fixed bug in desugaring of record patterns.
Version 1.0.1
=============
......
......@@ -344,8 +344,8 @@ matchInterface ifn i = do
writeFlat :: Options -> CompilerEnv -> CS.Module Type -> IL.Module -> CYIO ()
writeFlat opts env mdl il = do
(_, tfc) <- dumpWith opts show (FC.ppProg . genFlatCurry) DumpTypedFlatCurry (env, tfcyProg)
when tfcyTarget $ liftIO $ FC.writeFlatCurry (useSubDir tfcyName) tfc
when tafcyTarget $ liftIO $ FC.writeFlatCurry (useSubDir tafcyName) tafcyProg
when tfcyTarget $ liftIO $ FC.writeFlatCurry (useSubDir tfcyName) tafcyProg
when tafcyTarget $ liftIO $ FC.writeFlatCurry (useSubDir tafcyName) tfc
when fcyTarget $ do
(_, fc) <- dumpWith opts show FC.ppProg DumpFlatCurry (env, fcyProg)
liftIO $ FC.writeFlatCurry (useSubDir fcyName) fc
......
......@@ -596,8 +596,9 @@ dsPat p ds (RecordPattern _ pty c fs) = do
--TODO: Rework
let (ls, tys) = argumentTypes (unpredType pty) c vEnv
tsMap = map field2Tuple fs
anonTs = map (flip (VariablePattern NoSpanInfo) anonId . predType) tys
maybeTs = map (flip lookup tsMap) ls
anonTs <- mapM ((uncurry (VariablePattern NoSpanInfo) <$>) .
freshVar "_#recpat") tys
let maybeTs = map (flip lookup tsMap) ls
ts = zipWith fromMaybe anonTs maybeTs
dsPat p ds (ConstructorPattern NoSpanInfo pty c ts)
dsPat p ds (TuplePattern _ ts) =
......
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