[GHC] #15633: Type-checker plugins aren't loaded in 8.6.1

#15633: Type-checker plugins aren't loaded in 8.6.1 -------------------------------------+------------------------------------- Reporter: phadej | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1-beta1 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: -------------------------------------+------------------------------------- Type-Checker plugins seem to work in GHCi-8.4.3 https://gist.github.com/phadej/f2040eba327a88d3652cda021403f97f However with GHC-8.6.1 The Glorious Glasgow Haskell Compilation System, version 8.6.0.20180907 76a233143f1ec940f342ce3ce3afaf306923b392 (which seems to be the last commit in 8.6 branch atm) the plugins aren't loaded. {{{ % ghci-8.6.1 -fplugin=ThereIsNoPlugin GHCi, version 8.6.0.20180907: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/ogre/.ghci λ> }}} starts a session without a warning. 8.4.3 however fails: {{{ % ghci-8.4.3 -fplugin=ThereIsNoPlugin GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help <command line>: Could not find module ‘ThereIsNoPlugin’ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15633 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15633: Type-checker plugins aren't loaded in GHCi 8.6.1 -------------------------------------+------------------------------------- Reporter: phadej | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1-beta1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15633#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15633: Type-checker plugins aren't loaded in GHCi 8.6.1 -------------------------------------+------------------------------------- Reporter: phadej | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1-beta1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by darchon): To elaborate further Loading: {{{ {-# LANGUAGE DataKinds, TypeOperators #-} module Test where import Data.Proxy import GHC.TypeLits p1 :: Proxy a -> Proxy b -> Proxy (a + b) -> Proxy (b + a) p1 _ _ = id }}} without the normalisation plugin gives: {{{ $ ghci Test.hs GHCi, version 8.6.0.20180907: http://www.haskell.org/ghc/ :? for help Loaded package environment from /home/christiaan/devel/clash-compiler /clash-prelude/.ghc.environment.x86_64-linux-8.6.0.20180907 [1 of 1] Compiling Test ( Test.hs, interpreted ) Test.hs:8:10: error: • Couldn't match type ‘a + b’ with ‘b + a’ Expected type: Proxy (a + b) -> Proxy (b + a) Actual type: Proxy (b + a) -> Proxy (b + a) NB: ‘+’ is a non-injective type family • In the expression: id In an equation for ‘p1’: p1 _ _ = id • Relevant bindings include p1 :: Proxy a -> Proxy b -> Proxy (a + b) -> Proxy (b + a) (bound at Test.hs:8:1) | 8 | p1 _ _ = id | ^^ Failed, no modules loaded. }}} and of course with the normalisation plugin gives: {{{ $ ghci -fplugin=GHC.TypeLits.Normalise Test.hs GHCi, version 8.6.0.20180907: http://www.haskell.org/ghc/ :? for help Loaded package environment from /home/christiaan/devel/clash-compiler /clash-prelude/.ghc.environment.x86_64-linux-8.6.0.20180907 [1 of 1] Compiling Test ( Test.hs, interpreted ) Ok, one module loaded. *Test> }}} However, the following session in GHCi doesn't seem to work: {{{ $ ghci -fplugin=GHC.TypeLits.Normalise -XDataKinds -XTypeOperators GHCi, version 8.6.0.20180907: http://www.haskell.org/ghc/ :? for help Loaded package environment from /home/christiaan/devel/clash-compiler /clash-prelude/.ghc.environment.x86_64-linux-8.6.0.20180907 Prelude> import Data.Proxy Prelude Data.Proxy> import GHC.TypeLits Prelude Data.Proxy GHC.TypeLits> :{ Prelude Data.Proxy GHC.TypeLits| p1 :: Proxy a -> Proxy b -> Proxy (a + b) -> Proxy (b + a) Prelude Data.Proxy GHC.TypeLits| p1 _ _ = id Prelude Data.Proxy GHC.TypeLits| :} <interactive>:5:10: error: • Couldn't match type ‘a + b’ with ‘b + a’ Expected type: Proxy (a + b) -> Proxy (b + a) Actual type: Proxy (b + a) -> Proxy (b + a) NB: ‘+’ is a non-injective type family • In the expression: id In an equation for ‘p1’: p1 _ _ = id • Relevant bindings include p1 :: Proxy a -> Proxy b -> Proxy (a + b) -> Proxy (b + a) (bound at <interactive>:5:1) Prelude Data.Proxy GHC.TypeLits> }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15633#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15633: Type-checker plugins aren't loaded in GHCi 8.6.1 -------------------------------------+------------------------------------- Reporter: phadej | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1-beta1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by darchon): Possibly, the GHCi session is missing a call to `initializePlugins` https://github.com/ghc/ghc/blob/52065e95c6df89d0048c6e3f35d6cc26ce8246f9/com... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15633#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15633: Type-checker plugins aren't loaded in GHCi 8.6.1 -------------------------------------+------------------------------------- Reporter: phadej | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1-beta1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): I think that is the problem. I don't know off the top of my head where the call needs to be inserted. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15633#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15633: Type-checker plugins aren't loaded in GHCi 8.6.1 -------------------------------------+------------------------------------- Reporter: phadej | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1-beta1 Resolution: | Keywords: | TypeCheckerPlugins Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by adamgundry): * cc: adamgundry (added) * keywords: => TypeCheckerPlugins -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15633#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15633: Type-checker plugins aren't loaded in GHCi 8.6.1 -------------------------------------+------------------------------------- Reporter: phadej | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1-beta1 Resolution: | Keywords: | TypeCheckerPlugins Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5348 Wiki Page: | -------------------------------------+------------------------------------- Changes (by darchon): * status: new => patch * differential: => Phab:D5348 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15633#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15633: Type-checker plugins aren't loaded in GHCi 8.6.1 -------------------------------------+------------------------------------- Reporter: phadej | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.6.1-beta1 Resolution: | Keywords: | TypeCheckerPlugins Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5348 Wiki Page: | -------------------------------------+------------------------------------- Changes (by darchon): * milestone: 8.6.1 => 8.8.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15633#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15633: Type-checker plugins aren't loaded in GHCi 8.6.1 -------------------------------------+------------------------------------- Reporter: phadej | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.1-beta1 Resolution: | Keywords: | TypeCheckerPlugins Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5348 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.8.1 => 8.6.3 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15633#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15633: Type-checker plugins aren't loaded in GHCi 8.6.1
-------------------------------------+-------------------------------------
Reporter: phadej | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone: 8.6.3
Component: Compiler | Version: 8.6.1-beta1
Resolution: | Keywords:
| TypeCheckerPlugins
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5348
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#15633: Type-checker plugins aren't loaded in GHCi 8.6.1 -------------------------------------+------------------------------------- Reporter: phadej | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.1-beta1 Resolution: | Keywords: | TypeCheckerPlugins Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5348 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15633#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15633: Type-checker plugins aren't loaded in GHCi 8.6.1 -------------------------------------+------------------------------------- Reporter: phadej | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.1-beta1 Resolution: fixed | Keywords: | TypeCheckerPlugins Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5348 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged with e67bebbf735db498c2cbf191d1878644ca5ed5cc. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15633#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC