mlabs-haskell / mlabs-haskell/purescript-aeson

Help with help

Open
#19 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nix
Stars
6
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Hi,

There is no doc or test with generics.

data SumOfConst
  = SumOfConstA
  | SumOfConstB
derive instance eqActivationFun :: Eq SumOfConst
derive instance genericActivationFun :: Generic SumOfConst _
instance showActivationFun :: Show SumOfConst where
  show u = genericShow u

instance EncodeAeson SumOfConst where
  encodeAeson x = gEncodeAeson x (Proxy :: Proxy _)

gEncodeAeson returns Object a. I could get a via Foreign.Object.values but it returns an array which could be empty. So to avoid partial function some empty Aeson should be returned if array is empty. It doesn't look like correct way of using the library.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the generic example in the issue, the EncodeAeson instance, gEncodeAeson, and Foreign.Object.values. Clarify the intended generic encoding path and whether the library needs documentation, a test, or both; done means the expected behavior for an empty result is documented or covered by a test.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.