summaryrefslogtreecommitdiff
path: root/testsuite/tests/stranal/should_compile/T1988.hs
blob: a27fdd8da5a892dccff4b05344145bfd3a60a5c2 (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