getAge :: (Lacks a "age", Short (NumCols a)) => R I (a .& "age" .= Int) -> Int
getAge = (`dot` #age)
getName :: (Lacks a "name", Short (NumCols a)) => R I (a .& "name" .= Text) -> Text
getName = (`dot` #name)
info :: _
info x = (getAge x, getName x)
The error:
src/Main.hs:47:9: error:
• Found type wildcard ‘_’
standing for ‘R I
(($coxswainTau0 .& ("name" .= Text)) .& ("age" .= Int))
-> (Int, Text)’
Where: ‘$coxswainTau0’ is an ambiguous type variable
To use the inferred type, enable PartialTypeSignatures
• In the type signature: info :: _
|
47 | info :: _
| ^
src/Main.hs:48:1: error:
No instance for (Lacks $coxswainTau0 "age")
arising from a use of ‘getAge’
|
48 | info x = (getAge x, getName x)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The error: