Remove unused appends
This commit is contained in:
		
							parent
							
								
									f8e80ae2bc
								
							
						
					
					
						commit
						ff4023bca4
					
				| @ -24,9 +24,7 @@ module DependencyGenerator | |||||||
|   , unzipSndDepGenM |   , unzipSndDepGenM | ||||||
|   , unzipDepGenM |   , unzipDepGenM | ||||||
| 
 | 
 | ||||||
|   , appendStrings |  | ||||||
|   , concatStrings |   , concatStrings | ||||||
|   , appendTexts |  | ||||||
|   , concatTexts |   , concatTexts | ||||||
|   , joinPaths |   , joinPaths | ||||||
|   , fileComponents |   , fileComponents | ||||||
| @ -197,15 +195,9 @@ unzipDepGenM t = do | |||||||
|   b <- unzipSndDepGenM t' |   b <- unzipSndDepGenM t' | ||||||
|   pure (a, b) |   pure (a, b) | ||||||
| 
 | 
 | ||||||
| appendStrings :: (TokenableTo String a, TokenableTo String b) => a -> b -> DepGenM (Token String) |  | ||||||
| appendStrings a b = runFunction AppendStrings =<< TupleToken <$> toToken a <*> toToken b |  | ||||||
| 
 |  | ||||||
| concatStrings :: TokenableTo [String] a => a -> DepGenM (Token String) | concatStrings :: TokenableTo [String] a => a -> DepGenM (Token String) | ||||||
| concatStrings a = runFunction ConcatStrings =<< toToken a | concatStrings a = runFunction ConcatStrings =<< toToken a | ||||||
| 
 | 
 | ||||||
| appendTexts :: (TokenableTo Text a, TokenableTo Text b) => a -> b -> DepGenM (Token Text) |  | ||||||
| appendTexts a b = runFunction AppendTexts =<< toTupleToken a b |  | ||||||
| 
 |  | ||||||
| concatTexts :: TokenableTo [Text] a => a -> DepGenM (Token Text) | concatTexts :: TokenableTo [Text] a => a -> DepGenM (Token Text) | ||||||
| concatTexts a = runFunction ConcatTexts =<< toToken a | concatTexts a = runFunction ConcatTexts =<< toToken a | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -30,15 +30,9 @@ unStringWrapper = \case | |||||||
| 
 | 
 | ||||||
| evalFunction :: Function -> Value -> Value | evalFunction :: Function -> Value -> Value | ||||||
| evalFunction f x = case (f, x) of | evalFunction f x = case (f, x) of | ||||||
|   (AppendStrings, Tuple (String (StringWrapper s0), String (StringWrapper s1))) -> |  | ||||||
|     makeString (s0 ++ s1) |  | ||||||
| 
 |  | ||||||
|   (ConcatStrings, List vs) -> |   (ConcatStrings, List vs) -> | ||||||
|     makeString $ concatMap unStringWrapper vs |     makeString $ concatMap unStringWrapper vs | ||||||
| 
 | 
 | ||||||
|   (AppendTexts, Tuple (Text t0, Text t1)) -> |  | ||||||
|     Text $ T.append t0 t1 |  | ||||||
| 
 |  | ||||||
|   (ConcatTexts, List vs) -> |   (ConcatTexts, List vs) -> | ||||||
|     Text $ T.concat $ map fromValue vs |     Text $ T.concat $ map fromValue vs | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -4,9 +4,7 @@ module Types.Function | |||||||
| 
 | 
 | ||||||
| import Language.Haskell.TH.Syntax (Lift) | import Language.Haskell.TH.Syntax (Lift) | ||||||
| 
 | 
 | ||||||
| data Function = AppendStrings | data Function = ConcatStrings | ||||||
|               | ConcatStrings |  | ||||||
|               | AppendTexts |  | ||||||
|               | ConcatTexts |               | ConcatTexts | ||||||
|               | JoinPaths |               | JoinPaths | ||||||
|               | FileComponents |               | FileComponents | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user