nick8325 / nick8325/quickcheck
Can we rework Function to get more instances?
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 790
- Forks
- 130
- Avg merge
- 16h 41m
- Merged PRs (30d)
- 2
Description
Currently,
class Function a where
function :: (a -> b) -> (a :-> b)
Unfortunately, I don't see any way to write anything like
instance ... => Function (Fun a b)
Maybe I'm wrong, but that's how it appears. This is sad, because we can't generate arbitrary higher-order functions. I'm wondering if it's possible to rearrange things to make this possible. The first idea is that perhaps we should remove the codomain from consideration and really focus hard on the domain. What does a type have to look like to be a Function instance? Well, basically, it has to look like one of these:
- A type whose values can be listed
- An algebraic combination of
Functioninstances - A type that is isomorphic to an existing
Functioninstance
I suspect it may be possible to express :-> with such a representation, but I'm not sure.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
No files or tests are named. Start with the Function class and the Fun a b and :-e representations referenced in the issue, then inspect how function generation currently handles domains and codomains. Done means a settled design and supporting coverage for higher-order function generation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100