Commit 286c8797 authored by Finn Teegen's avatar Finn Teegen

Restore old behaviour for typed FlatCurry generation (now really)

parent b94deb19
...@@ -329,8 +329,8 @@ matchInterface ifn i = do ...@@ -329,8 +329,8 @@ matchInterface ifn i = do
writeFlat :: Options -> CompilerEnv -> CS.Module Type -> IL.Module -> CYIO () writeFlat :: Options -> CompilerEnv -> CS.Module Type -> IL.Module -> CYIO ()
writeFlat opts env mdl il = do writeFlat opts env mdl il = do
(_, tfc) <- dumpWith opts show (FC.ppProg . genFlatCurry) DumpTypedFlatCurry (env, tfcyProg) (_, tfc) <- dumpWith opts show (FC.ppProg . genFlatCurry) DumpTypedFlatCurry (env, tfcyProg)
when tfcyTarget $ liftIO $ FC.writeFlatCurry (useSubDir tfcyName) tfc when tfcyTarget $ liftIO $ FC.writeFlatCurry (useSubDir tfcyName) tafcyProg
when tafcyTarget $ liftIO $ FC.writeFlatCurry (useSubDir tafcyName) tafcyProg when tafcyTarget $ liftIO $ FC.writeFlatCurry (useSubDir tafcyName) tfc
when fcyTarget $ do when fcyTarget $ do
(_, fc) <- dumpWith opts show FC.ppProg DumpFlatCurry (env, fcyProg) (_, fc) <- dumpWith opts show FC.ppProg DumpFlatCurry (env, fcyProg)
liftIO $ FC.writeFlatCurry (useSubDir fcyName) fc liftIO $ FC.writeFlatCurry (useSubDir fcyName) fc
...@@ -338,10 +338,10 @@ writeFlat opts env mdl il = do ...@@ -338,10 +338,10 @@ writeFlat opts env mdl il = do
where where
tfcyName = typedFlatName (filePath env) tfcyName = typedFlatName (filePath env)
tfcyProg = genTypedFlatCurry env mdl il tfcyProg = genTypedFlatCurry env mdl il
tfcyTarget = TypeAnnotatedFlatCurry `elem` optTargetTypes opts tfcyTarget = TypedFlatCurry `elem` optTargetTypes opts
tafcyName = typeAnnFlatName (filePath env) tafcyName = typeAnnFlatName (filePath env)
tafcyProg = genTypeAnnotatedFlatCurry env mdl il tafcyProg = genTypeAnnotatedFlatCurry env mdl il
tafcyTarget = TypedFlatCurry `elem` optTargetTypes opts tafcyTarget = TypeAnnotatedFlatCurry `elem` optTargetTypes opts
fcyName = flatName (filePath env) fcyName = flatName (filePath env)
fcyProg = genFlatCurry tfcyProg fcyProg = genFlatCurry tfcyProg
fcyTarget = FlatCurry `elem` optTargetTypes opts fcyTarget = FlatCurry `elem` optTargetTypes opts
......
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