If your type only has one variant* you can do it like this:
type A = A Int Int
getFirst : A -> Int
getFirst (A x _) =
x
* More precisely, if your pattern is exhaustive.
If your type only has one variant* you can do it like this:
type A = A Int Int
getFirst : A -> Int
getFirst (A x _) =
x
* More precisely, if your pattern is exhaustive.