Skip to content

Eval plugin: support ghc 9.0.1 #1997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 5, 2021
Prev Previous commit
Next Next commit
test: update forall
  • Loading branch information
berberman committed Jul 4, 2021
commit 1a8fa2c277920e9a8c9030501ebcfbdc1daf7440
2 changes: 1 addition & 1 deletion plugins/hls-eval-plugin/test/testdata/T21.expected.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ fun _ _ _ = ()

-- >>> :type fun
-- fun
-- :: forall k1 (k2 :: Nat) (n :: Nat) (a :: k1).
-- :: forall {k1} {k2 :: Nat} {n :: Nat} {a :: k1}.
-- (KnownNat k2, KnownNat n, Typeable a) =>
-- Proxy k2 -> Proxy n -> Proxy a -> ()
2 changes: 1 addition & 1 deletion plugins/hls-eval-plugin/test/testdata/T23.expected.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ f :: forall k n a. (KnownNat k, KnownNat n, Typeable a)
f _ _ _ = ()

-- >>> :type f
-- f :: forall k1 (k2 :: Nat) (n :: Nat) (a :: k1).
-- f :: forall {k1} {k2 :: Nat} {n :: Nat} {a :: k1}.
-- (KnownNat k2, KnownNat n, Typeable a) =>
-- Proxy k2 -> Proxy n -> Proxy a -> ()
17 changes: 6 additions & 11 deletions plugins/hls-eval-plugin/test/testdata/TFlags.expected.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ It still works

{- -fprint-* families

>>> import Data.Proxy
>>> :set -XPolyKinds
>>> :t Proxy
Proxy :: forall k (t :: k). Proxy t
>>> :t id
id :: a -> a


>>> :set -fprint-explicit-foralls
>>> :t Proxy
Proxy :: forall {k} {t :: k}. Proxy t
>>> :t id
id :: forall {a}. a -> a

-}

{- Invalid option/flags are reported, but valid ones will be reflected
Expand All @@ -68,9 +68,4 @@ Proxy :: forall {k} {t :: k}. Proxy t
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
Some flags have not been recognized: -XAbsent, -XWrong, -fprint-nothing-at-all

Still, Rank2Types is enabled, as in GHCi:

>>> f = const 42 :: (forall x. x) -> Int
>>> f undefined
42
-}
14 changes: 4 additions & 10 deletions plugins/hls-eval-plugin/test/testdata/TFlags.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,16 @@ It still works

{- -fprint-* families

>>> import Data.Proxy
>>> :set -XPolyKinds
>>> :t Proxy
Proxy :: forall k (t :: k). Proxy t
>>> :t id


>>> :set -fprint-explicit-foralls
>>> :t Proxy
Proxy :: forall {k} {t :: k}. Proxy t
>>> :t id

-}

{- Invalid option/flags are reported, but valid ones will be reflected

>>> :set -XRank2Types -XAbsent -XDatatypeContexts -XWrong -fprint-nothing-at-all

Still, Rank2Types is enabled, as in GHCi:

>>> f = const 42 :: (forall x. x) -> Int
>>> f undefined
-}