summaryrefslogtreecommitdiff
path: root/testsuite/tests/stranal/should_compile/T19180.hs
blob: d0211ac4e3c8f9e52189f6d71091a023afe19612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PolyKinds #-}
module T14270 (mkTrApp) where

import Data.Kind (Type)

data TypeRep a = TypeRep

mkTrApp :: TypeRep a -> TypeRep a
mkTrApp (x :: TypeRep x)
  | Just _ <- isTYPE (typeRepKind x)
  = undefined
mkTrApp x = TypeRep

typeRepKind :: TypeRep (a :: k) -> TypeRep k
typeRepKind = if sum [0..100] == 10 then undefined else const TypeRep

isTYPE :: TypeRep (a :: Type) -> Maybe a
isTYPE _ = if sum [0..100] == 10 then Nothing else undefined
{-# NOINLINE isTYPE #-}