summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/stranal/should_compile/T1988.hs
blob: da99806ce14f57b869dd5f570b7cadb61981ad95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{-# OPTIONS_GHC -O2 #-}

-- Trac #1988: this one killed GHC 6.8.2
-- 		at least with -O2

module ShouldCompile where

newtype CFTree = CFTree (String, [CFTree])

prCFTree :: CFTree -> String
prCFTree (CFTree (_,trees)) = concatMap ps trees
    where ps t@(CFTree (_,[])) = prCFTree t