Skip to content

Commit

Permalink
Simplify Misc.collectArguments
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez committed Nov 14, 2023
1 parent 32499d7 commit d269790
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions liquidhaskell-boot/src/Language/Haskell/Liquid/GHC/Misc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,10 @@ namedPanic x msg = panic (Just (getSrcSpan x)) msg
--------------------------------------------------------------------------------

collectArguments :: Int -> CoreExpr -> [Var]
collectArguments n e = if length xs > n then take n xs else xs
collectArguments n e = take n (vs' ++ vs)
where
(vs', e') = collectValBinders' $ snd $ collectTyBinders e
vs = fst $ collectBinders $ ignoreLetBinds e'
xs = vs' ++ vs

{-
collectTyBinders :: CoreExpr -> ([Var], CoreExpr)
Expand Down

0 comments on commit d269790

Please sign in to comment.