
#14796: Pretty-printer bug -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.5 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- From Ryan's [https://ryanglscott.github.io/2018/02/11/how-to-derive- generic-for-some-gadts/ How to derive Generic for (some) GADTs using QuantifiedConstraints]: {{{#!hs data ECC ctx f a where ECC :: ctx => f a -> ECC ctx f a }}} When instantiating types using `-XTypeApplications` something weird happens {{{ $ ~/code/qc-ghc/inplace/bin/ghc-stage2 --interactive -ignore-dot-ghci GHCi, version 8.5.20180128: http://www.haskell.org/ghc/ :? for help Prelude> :set -XGADTs -XConstraintKinds -XTypeApplications Prelude> data ECC ctx f a where ECC :: ctx => f a -> ECC ctx f a Prelude> :t ECC @[] @() @() ECC @[] @() @() :: [()] -> ECC () :: Constraint [] () }}} Doesn't seem to happen in other cases: {{{ Prelude> :t ECC @[] @() @((), ()) ECC @[] @() @((), ()) :: [()] -> ECC (() :: Constraint, () :: Constraint) [] () Prelude> :t ECC @[] @() @(Eq Int) ECC @[] @() @(Eq Int) :: [()] -> ECC (Eq Int) [] () }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14796 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler