From 5d8bc38e4bb9e33cb1c0be5fc3fedf0258b9531b Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 14 Sep 2017 11:11:00 -0400 Subject: [PATCH] Reformat Mapping across multiple lines. --- src/RWS.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/RWS.hs b/src/RWS.hs index 99748773a..f6d1ce1d8 100644 --- a/src/RWS.hs +++ b/src/RWS.hs @@ -223,7 +223,14 @@ genFeaturizedTermsAndDiffs sesDiffs = let Mapping _ _ a b c d = foldl' combine ( That term -> Mapping counterA (succ counterB) as (featurize counterB term : bs) mappedDiffs (RWS.Term (featurize counterB term) : allDiffs) These a b -> Mapping (succ counterA) (succ counterB) as bs ((These counterA counterB, These a b) : mappedDiffs) (Index counterA : allDiffs) -data Mapping syntax fields = Mapping {-# UNPACK #-} !Int {-# UNPACK #-} !Int ![UnmappedTerm syntax (Record fields)] ![UnmappedTerm syntax (Record fields)] ![MappedDiff syntax (Record fields) (Record fields)] ![TermOrIndexOrNone (UnmappedTerm syntax (Record fields))] +data Mapping syntax fields + = Mapping + {-# UNPACK #-} !Int + {-# UNPACK #-} !Int + ![UnmappedTerm syntax (Record fields)] + ![UnmappedTerm syntax (Record fields)] + ![MappedDiff syntax (Record fields) (Record fields)] + ![TermOrIndexOrNone (UnmappedTerm syntax (Record fields))] featurize :: (HasField fields FeatureVector, Functor syntax) => Int -> Term syntax (Record fields) -> UnmappedTerm syntax (Record fields) featurize index term = UnmappedTerm index (getField (extract term)) (eraseFeatureVector term)