We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If i have forall in record then you can't insert
module Main where import Prelude import Control.Monad.Eff (Eff) import Data.Record (insert) import Data.Symbol (SProxy(..)) import Type.Row (class RowLacks) type ConfigR r = (baz :: forall a. Array a | r) type Config r = Record (ConfigR r) add :: forall r . RowLacks "fiz" (ConfigR r) => Config r -> Config ( fiz :: String | r) add c = insert (SProxy :: SProxy "fiz") "foo" c
error is:
No type class instance was found for Prim.Union ( baz :: forall a. Array a | r4 ) ( fiz :: Entry ) ( fiz :: t5 | t6 )
Any explanation of why it happens?
I guess if you have forall in record compiler can't calculate Union for it
The text was updated successfully, but these errors were encountered:
You have to propagate the Union constraint, I believe. This is part of why it would be nice to have a real Prim.Row.Lacks constraint.
Prim.Row.Lacks
Sorry, something went wrong.
@natefaubion
add :: forall r . RowLacks "fiz" (ConfigR r) => Union (ConfigR r) ( fiz :: String) (fiz :: String | r) => Config r -> Config (fiz :: String | r) add c = insert (SProxy :: SProxy "fiz") "foo" c
added this Union instance but still get same error
Union
No branches or pull requests
If i have forall in record then you can't insert
error is:
Any explanation of why it happens?
I guess if you have forall in record compiler can't calculate Union for it
The text was updated successfully, but these errors were encountered: