summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/prog002/simpl009.hs
blob: bac2bafbdb3c7dfbd870ebead322853ff932601e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

-- This one killed GHC 5.02 with a funResultTy panic
-- The reason was that the simplifier was doing a 
-- case-of-case where the result had a polymorphic type.
-- This in turn showed up because of a newtype (now 
-- transparent) with a forall inside it.
--
-- It's quite hard to tickle this one, hence the two-module setup.

module FormParse where
  
import Control.Monad
import Simpl009Help

identifier :: Parser Char Char
identifier =
  do c <- lookAhead
     guard (c == 'a')
     return c