summaryrefslogtreecommitdiff
path: root/testsuite/tests/stranal/sigs/T8569.hs
blob: 17f7595110a0f65c4990d5bd5dfd032eca8573aa (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE GADTs #-}

module T8569 where

data Rep t where
  Rint :: Rep Int
  Rdata :: Rep i -> (t -> i) -> Rep t

addUp :: Rep a -> a -> Int
addUp Rint n  = n
addUp (Rdata i f) x = addUp i (f x)