insert and forall in record
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- backend
Research direction
The issue gives a PureScript example using Data.Record.insert, Type.Row.RowLacks, and a polymorphic row containing forall a. Array a; it does not name implementation or test files. Start by reading the insert type and the row-union constraints involved, then check whether the compiler can resolve this example. Done means explaining the failure and identifying whether the limitation belongs to this library or the compiler.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- PureScript
- Stars
- 68
- Forks
- 33
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from purescript/purescript-record
-
Thoughts on replacing Proxy with VTA?Possibly taken @pete-murphy claimed this 1043 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
purescript/purescript-record#85 · 3 comments · 2 reactions ·
-
Add `mergeFlipped`Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
purescript/purescript-record#84 · 5 comments · 1 reaction ·
-
type: documentation
Difficulty 5/5 Over a week Newbie friendliness 25/100
purescript/purescript-record#49 · 7 comments ·
-
pick functionOpenpurs-0.15 type: breaking change
Difficulty 4/5 3-5 days Newbie friendliness 20/100
purescript/purescript-record#5 · 6 comments ·
All issues in purescript/purescript-record
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
milind-soni/OpenMausBot#5829 ·
Maintainers usually reply within 1 day