No title

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
data Side = L | R

data StateHist = S | T Side Int Int StateHist

Show StateHist where
 show S = ""
 show T L x y sh = "L "
 show T R x y sh = "R "

--does not compile, error message:
- + Errors (1)
 `-- builtin line 0 col -1:
     When checking left hand side of Prelude.Show.Main.StateHist implementation of Prelude.Show.Show, method show:
     Type mismatch between
             String (Type of Main.StateHist implementation of Prelude.Show.Show, method show x)
     and
             _ ->
             _ (Is Main.StateHist implementation of Prelude.Show.Show, method show x applied to too many arguments?)