diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T22519.hs | 21 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T22519.hs b/testsuite/tests/typecheck/should_compile/T22519.hs new file mode 100644 index 0000000000..86ab824a1a --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T22519.hs @@ -0,0 +1,21 @@ +{-# LANGUAGE Haskell2010 #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} +module Bug where + +import Data.Coerce (coerce) +import Data.Kind (Type) +import GHC.TypeNats (Nat, type (<=)) + +f :: (1 <= w) + => IO (SymBV' sym w) + -> IO (SymBV sym w) +f = coerce + +---- + +data BaseType = BaseBVType Nat +type family SymExpr (sym :: Type) :: BaseType -> Type +type SymBV sym n = SymExpr sym (BaseBVType n) +newtype SymBV' sym w = MkSymBV' (SymBV sym w) diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index fc5ce4936b..416345e526 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -457,6 +457,7 @@ test('T10335', normal, compile, ['']) test('Improvement', normal, compile, ['']) test('T10009', normal, compile, ['']) test('T10390', normal, compile, ['']) +test('T22519', normal, compile, ['']) test('T8555', normal, compile, ['']) test('T8799', normal, compile, ['']) test('T10432', normal, compile, ['']) |