diff options
author | idontgetoutmuch <dominic@steinitz.org> | 2018-04-01 07:59:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-01 07:59:30 -0700 |
commit | 63ceed4a69563c08e54269a4a9d3e5d27cb7c489 (patch) | |
tree | 56090b07d5d8118c7beca31d1e26b2006a317009 /packages/base/src/Internal | |
parent | c8c6a3e414bb08e3f818f58c121ddc99396b4f1e (diff) | |
parent | 9c1f355e4dfc1ae745b4b22471a103a3754a6278 (diff) |
Merge pull request #256 from thielema/complexof
base:Internal.Numeric.ComplexOf: turn from type function to type synonym Now it is obvious for GHC that (ComplexOf a) is always a Complex type.
Diffstat (limited to 'packages/base/src/Internal')
-rw-r--r-- | packages/base/src/Internal/Numeric.hs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/packages/base/src/Internal/Numeric.hs b/packages/base/src/Internal/Numeric.hs index 216f142..fd0a217 100644 --- a/packages/base/src/Internal/Numeric.hs +++ b/packages/base/src/Internal/Numeric.hs | |||
@@ -790,13 +790,7 @@ type instance RealOf (Complex Float) = Float | |||
790 | type instance RealOf I = I | 790 | type instance RealOf I = I |
791 | type instance RealOf Z = Z | 791 | type instance RealOf Z = Z |
792 | 792 | ||
793 | type family ComplexOf x | 793 | type ComplexOf x = Complex (RealOf x) |
794 | |||
795 | type instance ComplexOf Double = Complex Double | ||
796 | type instance ComplexOf (Complex Double) = Complex Double | ||
797 | |||
798 | type instance ComplexOf Float = Complex Float | ||
799 | type instance ComplexOf (Complex Float) = Complex Float | ||
800 | 794 | ||
801 | type family SingleOf x | 795 | type family SingleOf x |
802 | 796 | ||