• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

msakai / toysolver / 520

25 Nov 2024 04:17PM UTC coverage: 68.129% (-1.6%) from 69.746%
520

push

github

web-flow
Merge 1c430fa95 into 38bf6d362

0 of 328 new or added lines in 11 files covered. (0.0%)

70 existing lines in 12 files now uncovered.

9812 of 14402 relevant lines covered (68.13%)

0.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/ToySolver/Internal/JSON.hs
1
{-# OPTIONS_GHC -Wall #-}
2
{-# LANGUAGE OverloadedStrings #-}
3
module ToySolver.Internal.JSON where
4

5
import Control.Monad
6
import qualified Data.Aeson as J
7
import qualified Data.Aeson.Types as J
8
import Data.Aeson ((.=), (.:))
9

10
withTypedObject :: String -> (J.Object -> J.Parser a) -> J.Value -> J.Parser a
NEW
11
withTypedObject name k = J.withObject name $ \obj -> do
×
NEW
12
  t <- obj .: "type"
×
NEW
13
  unless (t == name) $ fail ("expected type " ++ show name ++ ", but found type " ++ show t)
×
NEW
14
  k obj
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc