[GHC] #13258: GHC head 8.1.20170209 does not compile package 'mono-traversable'
GHC
ghc-devs at haskell.org
Fri Feb 10 15:54:08 UTC 2017
#13258: GHC head 8.1.20170209 does not compile package 'mono-traversable'
-------------------------------------+-------------------------------------
Reporter: clinton | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 8.1
Resolution: invalid | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #13249 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* status: new => closed
* resolution: => invalid
* related: => #13249
Comment:
This is expected behavior.
GHC 8.2 tightened up validity checking for default type signatures. This
catches many things which are just plain type incorrect (e.g., see
#12918). A consequence of this is that you can't write default type
signatures quite as liberally as before, but luckily, it's an extremely
easy fix:
{{{#!hs
class MonoFunctor mono where
omap :: (Element mono -> Element mono) -> mono -> mono
default omap :: (Functor f, Element (f a) ~ a, f a ~ mono)
=> (Element mono -> Element mono) -> mono -> mono
omap = fmap
{-# INLINE omap #-}
}}}
The benefit is now the connection between the default and non-default type
signatures is much clearer. That is, the default type signature is exactly
the same as the non-default one, just with more constraints.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13258#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list