feat(xanthous): BangPattern all fields in Raws
This is generally just good practice for foundational data-types like these Change-Id: I88c5b6b73dad6665cf25837b8d6a9e0ea66f2b0b Reviewed-on: https://cl.tvl.fyi/c/depot/+/3204 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									efbb135cfc
								
							
						
					
					
						commit
						5b0649d2a8
					
				
					 1 changed files with 10 additions and 10 deletions
				
			
		| 
						 | 
					@ -70,8 +70,8 @@ hostile = friendly . involuted not
 | 
				
			||||||
--------------------------------------------------------------------------------
 | 
					--------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
data EdibleItem = EdibleItem
 | 
					data EdibleItem = EdibleItem
 | 
				
			||||||
  { _hitpointsHealed :: Int
 | 
					  { _hitpointsHealed :: !Int
 | 
				
			||||||
  , _eatMessage :: Maybe Message
 | 
					  , _eatMessage      :: !(Maybe Message)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  deriving stock (Show, Eq, Ord, Generic)
 | 
					  deriving stock (Show, Eq, Ord, Generic)
 | 
				
			||||||
  deriving anyclass (NFData, CoArbitrary, Function)
 | 
					  deriving anyclass (NFData, CoArbitrary, Function)
 | 
				
			||||||
| 
						 | 
					@ -96,12 +96,12 @@ makeFieldsNoPrefix ''WieldableItem
 | 
				
			||||||
--------------------------------------------------------------------------------
 | 
					--------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
data ItemType = ItemType
 | 
					data ItemType = ItemType
 | 
				
			||||||
  { _name            :: Text
 | 
					  { _name            :: !Text
 | 
				
			||||||
  , _description     :: Text
 | 
					  , _description     :: !Text
 | 
				
			||||||
  , _longDescription :: Text
 | 
					  , _longDescription :: !Text
 | 
				
			||||||
  , _char            :: EntityChar
 | 
					  , _char            :: !EntityChar
 | 
				
			||||||
  , _edible          :: Maybe EdibleItem
 | 
					  , _edible          :: !(Maybe EdibleItem)
 | 
				
			||||||
  , _wieldable       :: Maybe WieldableItem
 | 
					  , _wieldable       :: !(Maybe WieldableItem)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  deriving stock (Show, Eq, Ord, Generic)
 | 
					  deriving stock (Show, Eq, Ord, Generic)
 | 
				
			||||||
  deriving anyclass (NFData, CoArbitrary, Function)
 | 
					  deriving anyclass (NFData, CoArbitrary, Function)
 | 
				
			||||||
| 
						 | 
					@ -122,8 +122,8 @@ isWieldable = has $ wieldable . _Just
 | 
				
			||||||
--------------------------------------------------------------------------------
 | 
					--------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
data EntityRaw
 | 
					data EntityRaw
 | 
				
			||||||
  = Creature CreatureType
 | 
					  = Creature !CreatureType
 | 
				
			||||||
  | Item ItemType
 | 
					  | Item !ItemType
 | 
				
			||||||
  deriving stock (Show, Eq, Generic)
 | 
					  deriving stock (Show, Eq, Generic)
 | 
				
			||||||
  deriving anyclass (NFData)
 | 
					  deriving anyclass (NFData)
 | 
				
			||||||
  deriving Arbitrary via GenericArbitrary EntityRaw
 | 
					  deriving Arbitrary via GenericArbitrary EntityRaw
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue