summaryrefslogtreecommitdiff
path: root/testsuite/tests/ado/T16628.hs
blob: 8508c19e7f967718eacc52808316a9c97127297f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- Bug.hs
{-# LANGUAGE ApplicativeDo #-}
module Main where

import Data.Functor.Identity

f :: Identity () -> Identity [Int] -> Identity Int
f i0 i1 = do
    _ <- i0
    [x] <- i1
    pure (x + 42)

main :: IO ()
main = print $ f (Identity ()) (Identity [])