Revision 2992f2f7
b/src/Ganeti/THH/Types.hs | ||
---|---|---|
90 | 90 |
uncurryN n = do |
91 | 91 |
f <- newName "f" |
92 | 92 |
ps <- mapM newName (replicate n "x") |
93 |
return $ LamE (VarP f : map VarP ps) (foldl AppE (VarE f) $ map VarE ps) |
|
93 |
return $ LamE [VarP f, TupP $ map VarP ps] |
|
94 |
(foldl AppE (VarE f) $ map VarE ps) |
|
94 | 95 |
|
95 | 96 |
-- | Creates an uncurried version of a function. |
96 | 97 |
-- If the function has no arguments, it's converted into @() -> o@. |
Also available in: Unified diff