diff options
author | Dr. ERDI Gergo <gergo@erdi.hu> | 2014-11-07 22:49:52 +0800 |
---|---|---|
committer | Dr. ERDI Gergo <gergo@erdi.hu> | 2014-11-13 23:38:39 +0800 |
commit | faeb0a687ea291cb2d497a7042af4829f55e223d (patch) | |
tree | a2cfc6f982f1d0983dff7a2cda4d7a26cf65f723 | |
parent | 5fe872d3bc2d03976fb89b5659e14d2179210ee1 (diff) | |
download | haskell-faeb0a687ea291cb2d497a7042af4829f55e223d.tar.gz |
nlHsTyApps: for applying a function both on type- and term-level arguments
-rw-r--r-- | compiler/hsSyn/HsUtils.lhs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/hsSyn/HsUtils.lhs b/compiler/hsSyn/HsUtils.lhs index 12e2388684..df2406fcd3 100644 --- a/compiler/hsSyn/HsUtils.lhs +++ b/compiler/hsSyn/HsUtils.lhs @@ -28,7 +28,7 @@ module HsUtils( mkHsOpApp, mkHsDo, mkHsComp, mkHsWrapPat, mkHsWrapPatCo, mkLHsPar, mkHsCmdCast, - nlHsTyApp, nlHsVar, nlHsLit, nlHsApp, nlHsApps, nlHsIntLit, nlHsVarApps, + nlHsTyApp, nlHsTyApps, nlHsVar, nlHsLit, nlHsApp, nlHsApps, nlHsIntLit, nlHsVarApps, nlHsDo, nlHsOpApp, nlHsLam, nlHsPar, nlHsIf, nlHsCase, nlList, mkLHsTupleExpr, mkLHsVarTuple, missingTupArg, toHsType, toHsKind, @@ -177,6 +177,9 @@ mkSimpleHsAlt pat expr nlHsTyApp :: name -> [Type] -> LHsExpr name nlHsTyApp fun_id tys = noLoc (HsWrap (mkWpTyApps tys) (HsVar fun_id)) +nlHsTyApps :: name -> [Type] -> [LHsExpr name] -> LHsExpr name +nlHsTyApps fun_id tys xs = foldl nlHsApp (nlHsTyApp fun_id tys) xs + --------- Adding parens --------- mkLHsPar :: LHsExpr name -> LHsExpr name -- Wrap in parens if hsExprNeedsParens says it needs them |