Commit f6ff984b authored by twanvl's avatar twanvl
Browse files

Monadify deSugar/Desugar: use do, return, applicative, standard monad functions

parent 591c5019
...@@ -41,7 +41,6 @@ import Maybes ...@@ -41,7 +41,6 @@ import Maybes
import FastString import FastString
import Pretty ( Doc ) import Pretty ( Doc )
import Coverage import Coverage
import IOEnv
import Data.IORef import Data.IORef
\end{code} \end{code}
...@@ -95,7 +94,7 @@ deSugar hsc_env ...@@ -95,7 +94,7 @@ deSugar hsc_env
{ core_prs <- dsTopLHsBinds auto_scc binds_cvr { core_prs <- dsTopLHsBinds auto_scc binds_cvr
; (ds_fords, foreign_prs) <- dsForeigns fords ; (ds_fords, foreign_prs) <- dsForeigns fords
; let all_prs = foreign_prs ++ core_prs ; let all_prs = foreign_prs ++ core_prs
; ds_rules <- mappM dsRule rules ; ds_rules <- mapM dsRule rules
; return (all_prs, catMaybes ds_rules, ds_fords, ds_hpc_info, modBreaks) ; return (all_prs, catMaybes ds_rules, ds_fords, ds_hpc_info, modBreaks)
} }
; case mb_res of { ; case mb_res of {
......
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