[GHC] #13069: hs-boot files permit default methods in type class
GHC
ghc-devs at haskell.org
Thu Jan 5 17:21:57 UTC 2017
#13069: hs-boot files permit default methods in type class
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.1
checker) | Keywords: backpack hs-
Resolution: | boot
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC accepts | Unknown/Multiple
invalid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by ezyang):
It looks like some hs-boot files have come to rely on this behavior:
{{{
MiniAgda-0.2014.9.12/Eval.hs-boot:class Reval a where
MiniAgda-0.2014.9.12/Eval.hs-boot- reval' :: Valuation -> a -> TypeCheck
a
MiniAgda-0.2014.9.12/Eval.hs-boot- reval :: a -> TypeCheck a
MiniAgda-0.2014.9.12/Eval.hs-boot- reval = reval' emptyVal
postgresql-simple-0.5.2.1/src/Database/PostgreSQL/Simple/ToRow.hs-
boot:class ToRow a where
postgresql-simple-0.5.2.1/src/Database/PostgreSQL/Simple/ToRow.hs-boot-
toRow :: a -> [Action]
postgresql-simple-0.5.2.1/src/Database/PostgreSQL/Simple/ToRow.hs-boot-
default toRow :: (Generic a, GToRow (Rep a)) => a -> [Action]
postgresql-simple-0.5.2.1/src/Database/PostgreSQL/Simple/ToRow.hs-boot-
toRow = gtoRow . from
event-monad-0.0.3/src/Control/Monad/Event/Classes.hs-boot:class
(MonadEvent m e, MonadTime m t) => ScheduleEvent m t e | m -> t
event-monad-0.0.3/src/Control/Monad/Event/Classes.hs-boot- where
event-monad-0.0.3/src/Control/Monad/Event/Classes.hs-boot-
scheduleEventAt :: t -> e -> m EventID
event-monad-0.0.3/src/Control/Monad/Event/Classes.hs-boot- doNext
:: e -> m ()
event-monad-0.0.3/src/Control/Monad/Event/Classes.hs-boot- doNext e
= do
event-monad-0.0.3/src/Control/Monad/Event/Classes.hs-boot- now
<- getCurrentTime
event-monad-0.0.3/src/Control/Monad/Event/Classes.hs-boot-
scheduleEventAt now e
}}}
Maybe less than a dozen I could see on Hackage. So maybe we should just
update the docs.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13069#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list