Skip to content

Commit

Permalink
test: update forall
Browse files Browse the repository at this point in the history
  • Loading branch information
berberman committed Jul 4, 2021
1 parent 4f4490b commit 1a8fa2c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 23 deletions.
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
-}

0 comments on commit 1a8fa2c

Please sign in to comment.