diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-03-30 17:14:11 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-03-31 08:04:04 +0100 |
commit | bdd90426a7f88d57bedf15411fa00f62aeb22172 (patch) | |
tree | 378a99bb29281b420a836cb13cfb78e65268cf57 /compiler/hsSyn/Convert.hs | |
parent | 2e5e8223e2fd0fe7f6082a15627dfd54e3560b06 (diff) | |
download | haskell-bdd90426a7f88d57bedf15411fa00f62aeb22172.tar.gz |
Refactor in TcMatches
* Move the several calls of tauifyMultipleMatches into tcMatches,
so that it can be called only once, and the invariants are
clearer
* I discovered in doing this that HsLamCase had a redundant and
tiresome argument, so I removed it. That in turn allowed some
modest but nice code simplification
Diffstat (limited to 'compiler/hsSyn/Convert.hs')
-rw-r--r-- | compiler/hsSyn/Convert.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/hsSyn/Convert.hs b/compiler/hsSyn/Convert.hs index 90e3886c84..47bbfb99bf 100644 --- a/compiler/hsSyn/Convert.hs +++ b/compiler/hsSyn/Convert.hs @@ -721,8 +721,7 @@ cvtl e = wrapL (cvt e) cvt (LamE ps e) = do { ps' <- cvtPats ps; e' <- cvtl e ; return $ HsLam (mkMatchGroup FromSource [mkSimpleMatch ps' e']) } cvt (LamCaseE ms) = do { ms' <- mapM cvtMatch ms - ; return $ HsLamCase placeHolderType - (mkMatchGroup FromSource ms') + ; return $ HsLamCase (mkMatchGroup FromSource ms') } cvt (TupE [e]) = do { e' <- cvtl e; return $ HsPar e' } -- Note [Dropping constructors] |