diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-04-05 11:48:39 -0400 |
---|---|---|
committer | Alec Theriault <alec.theriault@gmail.com> | 2020-04-05 09:04:43 -0700 |
commit | 87fbc11227347da805a3d2158d462514438ca742 (patch) | |
tree | 37c3ce949b4d8fdf6834304e362ce0b5f10199fc /html-test/src/Bug1050.hs | |
parent | 5d034ee2ed72839a8472dba59f83b1b348691cc5 (diff) |
Fix #1050 by filtering out invisible AppTy arguments
This makes the `synifyType` case for `AppTy` more intelligent by
taking into consideration the visibilities of each `AppTy` argument
and filtering out any invisible arguments, as they aren't intended
to be displayed in the source code. (See #1050 for an example of what
can happen if you fail to filter these out.)
Along the way, I noticed that a special `synifyType` case for
`AppTy t1 (CoercionTy {})` could be consolidated with the case below
it, so I took the opportunity to tidy this up.
Diffstat (limited to 'html-test/src/Bug1050.hs')
-rw-r--r-- | html-test/src/Bug1050.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/html-test/src/Bug1050.hs b/html-test/src/Bug1050.hs new file mode 100644 index 00000000..ea293e6e --- /dev/null +++ b/html-test/src/Bug1050.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE RankNTypes #-} +module Bug1050 where + +import Data.Kind + +newtype T :: (forall k. k -> Type) -> (forall k. k -> Type) where + MkT :: forall (f :: forall k. k -> Type) k (a :: k). f a -> T f a + +mkT = MkT |