Use data instead of newtype
This commit is contained in:
parent
8194d0e384
commit
66e7ac11ad
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
|||
> import Graphics.Rendering.OpenGL
|
||||
> import Graphics.UI.GLUT
|
||||
> import Data.IORef
|
||||
> newtype Complex = C (Float,Float) deriving (Show,Eq)
|
||||
> data Complex = C (Float,Float) deriving (Show,Eq)
|
||||
> instance Num Complex where
|
||||
> fromInteger n = C (fromIntegral n,0.0)
|
||||
> C (x,y) * C (z,t) = C (z*x - y*t, y*z + x*t)
|
||||
|
|
Loading…
Reference in a new issue