Here we start in the terminal with ghci (interactive Haskell interperter / ghc) First we create P a nice prime number, and 3 a prime root and two input secrets (8bit) Then start doing the Diffie-Hellman key exchange
Because the lazy evaluation in Haskell defining a variable p is only calculated when needed. And as shown when defining keyA everything is OK. but when called the calculations take too long and are terminated..
Prelude> let p = 2^56 - 46
Prelude> let v = 3