Changes between Version 10 and Version 11 of Commentary/Compiler/DeriveFunctor


Ignore:
Timestamp:
Feb 13, 2016 5:17:12 AM (4 years ago)
Author:
RyanGlScott
Comment:

Fix Trac link

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/DeriveFunctor

    v10 v11  
    363363This is unsatisfying for two reasons:
    364364
    365 1. The `Traversable` instance doesn't typecheck! `Int#` is of kind `#`, but `pure` expects an argument whose type is of kind `*`. This effectively prevents `Traversable` from being derived for any datatype with an unlifted argument type ([https://ghc.haskell.org/trac/ghc/ticket/11414 Trac #11174]).
     3651. The `Traversable` instance doesn't typecheck! `Int#` is of kind `#`, but `pure` expects an argument whose type is of kind `*`. This effectively prevents `Traversable` from being derived for any datatype with an unlifted argument type ([https://ghc.haskell.org/trac/ghc/ticket/11174 Trac #11174]).
    366366
    3673672. The generated code contains superfluous expressions. By the `Monoid` laws, we can reduce `f a <> mempty` to `f a`, and by the `Applicative` laws, we can reduce `fmap WithInt (f a) <*> pure i` to `fmap (\b -> WithInt b i) (f a)`.