@tsubaki has joined the channel
ghci> x1 = 1 :: Wei ghci> x2 = 5 :: Wei ghci> x3 = 10 :: Ether ghci> x1 + 1 2 ghci> x1 + x2 6 ghci> x3 + 1 11 ghci> x1 + x3 <interactive>:17:6: error: • Couldn't match type ‘XEther’ with ‘XWei’ Expected type: Wei Actual type: Ether • In the second argument of ‘(+)’, namely ‘x3’ In the expression: x1 + x3 In an equation for ‘it’: it = x1 + x3
show . read = id read . show = id
In the case of fixed precision types, we have chosen these mappings for expediency; in future work, we plan to switch these definitions so that we can reason about underflow and overflow.