File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -34,25 +34,24 @@ type PropCodec a =
3434object  ∷  ∀  a . PropCodec  a  ->  CJ.Codec  a 
3535object codec = Codec .codec' dec enc
3636  where 
37-      dec j = do 
38-        obj <-  Codec .decode CJ .jobject j
39-        rec /\ { claimedProps } <-  runStateT (Codec .decode codec obj) { claimedProps: Set .empty }
37+   dec j = do 
38+     obj <-  Codec .decode CJ .jobject j
39+     rec /\ { claimedProps } <-  runStateT (Codec .decode codec obj) { claimedProps: Set .empty }
4040
41-       let  unclaimedProps = Set .difference (Set .fromFoldable (JO .keys obj)) claimedProps
42-       when (not Set .isEmpty unclaimedProps) $
43-         throwError $ CJ.DecodeError .error JP.Tip  $
44-           " Unknown field(s): "   <> joinWith " , "   (Set .toUnfoldable unclaimedProps)
41+     let  unclaimedProps = Set .difference (Set .fromFoldable (JO .keys obj)) claimedProps
42+     when (not Set .isEmpty unclaimedProps) do 
43+       throwError $ CJ.DecodeError .error JP.Tip  $ " Unknown field(s): "   <> joinWith " , "   (Set .toUnfoldable unclaimedProps)
4544
46-        pure rec
45+     pure rec
4746
48-      enc a = Codec .encode CJ .jobject $ JO .fromFoldable $ Codec .encode codec a
47+   enc a = Codec .encode CJ .jobject $ JO .fromFoldable $ Codec .encode codec a
4948
5049record  ∷  PropCodec  { } 
5150record = Codec.Codec  (const (pure {})) pure
5251
5352recordProp
5453  ::  ∀  @p  a  r  r' 
55-   . IsSymbol  p 
54+     . IsSymbol  p 
5655  =>  Row.Cons  p  a  r  r' 
5756  =>  CJ.Codec  a 
5857  ->  PropCodec  (Record  r )
@@ -78,7 +77,7 @@ recordProp codecA codecR = Codec.codec dec enc
7877
7978recordPropOptional
8079  ::  ∀  @p  a  r  r' 
81-   . IsSymbol  p 
80+     . IsSymbol  p 
8281  =>  Row.Cons  p  (Maybe  a ) r  r' 
8382  =>  CJ.Codec  a 
8483  ->  PropCodec  (Record  r )
Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ bundleConfigCodec = CJ.named "BundleConfig" $ CRC.object
183183  $ CRC .record
184184
185185data  BundlePlatform  = BundleNode  |  BundleBrowser 
186+ 
186187derive instance  Eq  BundlePlatform 
187188
188189instance  Show  BundlePlatform  where 
@@ -202,6 +203,7 @@ bundlePlatformCodec = CJ.Sum.enumSum show (parsePlatform)
202203--  | This is the equivalent of "WithMain" in the old Spago.
203204--  App bundles with a main fn, while Module does not include a main.
204205data  BundleType  = BundleApp  |  BundleModule 
206+ 
205207derive instance  Eq  BundleType 
206208
207209instance  Show  BundleType  where 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments