summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T14765.hs
blob: b124252bb4a81cc81e157a6029400b036cd2e303 (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE MagicHash, PolyKinds, ExplicitForAll #-}

module T14765 where

import GHC.Exts

fold :: forall rep a (r :: TYPE rep).
          (r -> a -> Proxy# r -> r) -> (Proxy# r -> r) -> [a] -> r
fold f k [] = k proxy#
fold f k (x : xs) = fold f (f (k proxy#) x) xs