summaryrefslogtreecommitdiff
path: root/testsuite/tests/ado/ado007.hs
blob: 3017222311a26020d6ad17fece07ea75d4286569 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE RebindableSyntax #-}
module Test where

import Control.Applicative
import Control.Monad
import Prelude

-- Caused a -dcore-lint failure with an earlier version of
-- ApplicativeDo due to the polymorphic let binding.
test :: IO [Char]
test = do
  x <- return 'a'
  y <- return 'b'
  let f | y == 'c' = id | otherwise = id
  return (map f [])