retrie-0.1.0.0: tests/inputs/Backticks2.test
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
-u Backticks.bar
===
module Backticks where
main :: IO ()
main = do
- print $ foo `bar` [1..10]
+ print $ foo + sum [1..10]
- print $ (foo `bar`) [1..10]
+ print $ (\ xs -> foo + sum xs) [1..10]
- print $ (`bar` [1..10]) foo
+ print $ (\ x -> x + sum [1..10]) foo
foo :: Int
foo = baz `div` quux 10
bar :: Int -> [Int] -> Int
bar x xs = x + sum xs
baz :: Int
baz = 100
quux :: Int -> Int
quux x = x - 1