summaryrefslogtreecommitdiff
path: root/testsuite/tests/perf/should_run/T5835.hs
blob: 25787cb1371cf761c6cf225bf6bd0eb16e0543fd (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE GADTs #-}
module Main where

data T t a where
  T :: (Foldable t, Eq a) => t a -> T t a

{-# NOINLINE go #-}
go :: T [] a -> Int -> Int
go (T _) i = foldr (+) 0 [1..i]

main = print (go (T [1::Int]) 20000)