blob: 1ac6348c29066fe7cb7d2078f3433dde2d4a443b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{-# LANGUAGE LambdaCase #-}
module TcLambdaCase where
import Data.Bits ((.|.))
f1 :: (a -> a) -> (a -> a)
f1 = \case x -> x
f2 :: Num a => a -> a
f2 = \case x -> x + x
f3 :: Int -> (Int, Int)
f3 = (\case y -> (y + y, y * y)) . (.|. 12)
f4 = \case _ -> undefined
|