summaryrefslogtreecommitdiff
path: root/testsuite/tests/linear/should_fail/LinearRole.hs
blob: 403935f4ceddab8e6c89d89928e793c2611f3dee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{-# LANGUAGE LinearTypes, GADTs, DataKinds #-}

module LinearRole where -- #18799

import GHC.Types (Multiplicity(..))
import Data.Coerce

data T m a where
  MkT :: a %m -> T m a

f :: T 'One a -> T 'Many a
f x = coerce x