diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-05-14 01:07:36 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-05-27 16:44:48 +0200 |
commit | 3bd7d5d668b316f517a66c72fcf9bc7a36cc6ba4 (patch) | |
tree | 186c133c0259d87f04b79c2017b7ee858b1b380a /testsuite/tests/ghci | |
parent | ed37027f713bb6563fd98d144a39211339fd91a5 (diff) | |
download | haskell-3bd7d5d668b316f517a66c72fcf9bc7a36cc6ba4.tar.gz |
Use a class to check validity of withDictwip/withdict
This moves handling of the magic 'withDict' function from the desugarer
to the typechecker. Details in Note [withDict].
I've extracted a part of T16646Fail to a separate file T16646Fail2,
because the new error in 'reify' hides the errors from 'f' and 'g'.
WithDict now works with casts, this fixes #21328.
Part of #19915
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r-- | testsuite/tests/ghci/scripts/T19667Ghci.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/ghci/scripts/T19667Ghci.hs b/testsuite/tests/ghci/scripts/T19667Ghci.hs index c3ffa71be8..bc8f36de93 100644 --- a/testsuite/tests/ghci/scripts/T19667Ghci.hs +++ b/testsuite/tests/ghci/scripts/T19667Ghci.hs @@ -21,7 +21,7 @@ symbolVal _ = case symbolSing :: SSymbol n of SSymbol x -> x -- See Note [NOINLINE someNatVal] in GHC.TypeNats {-# NOINLINE reifySymbol #-} reifySymbol :: forall r. String -> (forall (n :: Symbol). KnownSymbol n => Proxy n -> r) -> r -reifySymbol n k = withDict @(SSymbol Any) @(KnownSymbol Any) (SSymbol n) (k @Any) (Proxy @(Any @Symbol)) +reifySymbol n k = withDict @(KnownSymbol Any) @(SSymbol Any) (SSymbol n) (k @Any) (Proxy @(Any @Symbol)) main :: IO () main = print $ reifySymbol "Hello World" symbolVal |