Sum Type

Product Type

Product Type

-- product type, 9 possible values (3 * 3)dataChoices=ChoicesChoiceChoice-- as a tuple with a type alias-- NOT THE SAME AS ABOVE! :)typeChoices= (Choice, Choice)

Product Type (Record)

%% record syntax-record(choices,fst_choice::choice(),snd_choice::choice()).%% getters need to be implemented manually-specfst_choice(#choices{})->choice().fst_choice(#choices{fst_choices=X})->X.-specsnd_choice(#choices{})->choice().snd_choice(#choices{snd_choices=X})->X.

:t shows type information

:i shows typeclass info

h>:i NumclassNum a where (+) :: a -> a -> a
(*) :: a -> a -> a
(-) :: a -> a -> a
negate :: a -> a
abs :: a -> a
signum :: a -> a
fromInteger ::Integer-> a
-- Defined in `GHC.Num'instanceNumInteger-- Defined in `GHC.Num'instanceNumInt-- Defined in `GHC.Num'instanceNumFloat-- Defined in `GHC.Float'instanceNumDouble-- Defined in `GHC.Float'