Skip to content
  • Herbert Valerio Riedel's avatar
    Weaken constraints on Data.Complex functions · 7b04d35a
    Herbert Valerio Riedel authored
    The RealFloat data type context was dropped from Data.Complex some time
    ago (see ea280135). However, the rest of
    the API in that module was left as-is even though many of the accessors
    in that module would work with much more general types now.
    
    This change simplifies the signatures of the functions above, which in
    the current API all unnecessarily take a RealFloat constraint that they
    don't use (and which may cause to pass around superflous type-class
    dictionaries):
    
        realPart  :: Complex a -> a
        imagPart  :: Complex a -> a
        conjugate :: Num a => Complex a -> Complex a
        mkPolar   :: Floating a => a -> a -> Complex a
        cis       :: Floating a => a -> Complex a
    
    This was originally proposed by Edward Kmett in
    
      http://www.haskell.org/pipermail/libraries/2014-March/022358.html
    
    
    
    Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
    7b04d35a
To find the state of this project's repository at the time of any of these versions, check out the tags.