f a (Seg c d) = if a then c else d f1 (Pos a b) = f True $ Seg(a,b)
Standard input is empty
[1 of 1] Compiling Main ( prog.hs, prog.o )
prog.hs:2:14:
The constructor of a newtype must have exactly one field
but `Pos' has two
In the definition of data constructor `Pos'
In the newtype declaration for `Pos'
Standard output is empty