- Open
`Quadratic.hs`and add a module definition to it:

module Quadratic where

- Import the standard module
`Data.Complex`to help us represent a complex solution to the quadratic equation. - Define the data type to represent the quadratic equation:

data Quadratic = Quadratic { a :: Double, b :: Double,c :: Double }deriving Show

This represents the quadratic equation of the form `a∗x2+b∗x+c=0a∗x2+b∗x+c=0`. `a`, `b`, and `c` represent the corresponding constants in the equation.

- Define the data type for representing the root:

type RootT = Complex Double

This represents that the complex data type parameterized by `Double`. `RootT` is synonymous to type `Complex Double` (similar to `typedef` in C/C++).

- A quadratic equation has two roots, ...