-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error messages mention unification (?) variables like $coxswainTau0
#11
Comments
Oh dear, I absolutely hadn't thought about type wildcards at all. Thank you
very much for the example. The variable name is off-putting, but not
necessarily problematic. The ambiguity warning on the other hand is
concerning. I'll see what I can do, about both.
(And special thanks for being my first bug reporter!)
…On Sat, Oct 21, 2017, 00:01 Soham Chowdhury ***@***.***> wrote:
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)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABDg09eHz04pUByioQTFcSsWI1VxpVh2ks5suZbKgaJpZM4QBde_>
.
|
You're welcome! I'm trying to use your code to implement an extensible-effects library of some sort; let's see if I find any other bugs. |
That's wonderful! I was very much hoping it would be useful for that.
…On Sun, Oct 22, 2017, 00:04 Soham Chowdhury ***@***.***> wrote:
You're welcome! I'm trying to use your code to implement an
extensible-effects library of some sort; let's see if I find any other bugs.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABDg06X1IarHi5bAKQVIcfGL__jm4dvKks5suukTgaJpZM4QBde_>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The error:
The text was updated successfully, but these errors were encountered: