mirror of
				https://github.com/koalaman/shellcheck.git
				synced 2025-11-04 09:26:10 +08:00 
			
		
		
		
	Add missing Semigroup import for older GHC
This commit is contained in:
		@@ -21,6 +21,9 @@
 | 
				
			|||||||
-- Generic basic utility functions
 | 
					-- Generic basic utility functions
 | 
				
			||||||
module ShellCheck.Prelude where
 | 
					module ShellCheck.Prelude where
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import Data.Semigroup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Get element 0 or a default. Like `head` but safe.
 | 
					-- Get element 0 or a default. Like `head` but safe.
 | 
				
			||||||
headOrDefault _ (a:_) = a
 | 
					headOrDefault _ (a:_) = a
 | 
				
			||||||
headOrDefault def _   = def
 | 
					headOrDefault def _   = def
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user