blob: 5a164b4787c2dc49a2cfd963d21f18808976cd27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
{-# LANGUAGE ApplicativeDo, DerivingStrategies, GeneralizedNewtypeDeriving #-}
module Main where
import Data.Functor.Identity
newtype F a = F (Identity a)
deriving newtype (Functor, Applicative, Show)
x :: F (Int, Int)
x = do
a <- pure 0
let b = 1
pure (a, b)
y :: F (Int, Int, Int)
y = do
a <- pure 0
let b = 1
let c = b + 1
pure (a, b, c)
main :: IO ()
main = do
print x
print y
|