@@ -168,7 +168,7 @@ mkFromSpineFunction mn (DataDeclaration _ _ _ args) = lamCase "$x" <$> (addCatch
168168 return $ CaseAlternative [ prodBinder [ StringBinder (runProperName ctorName), ArrayBinder (map VarBinder idents)]]
169169 . Right
170170 $ liftApplicative (mkJust $ Constructor (Qualified (Just mn) ctorName))
171- (zipWith fromSpineFun (map (Var . ( Qualified Nothing ) ) idents) tys)
171+ (zipWith fromSpineFun (map (Var . Qualified Nothing ) idents) tys)
172172
173173 addCatch :: [CaseAlternative ] -> [CaseAlternative ]
174174 addCatch = (++ [catchAll])
@@ -191,7 +191,7 @@ mkFromSpineFunction mn (DataDeclaration _ _ _ args) = lamCase "$x" <$> (addCatch
191191 $ liftApplicative (mkRecFun rs) (map (\ (x, y) -> fromSpineFun (Accessor " recValue" (mkVar x)) y) rs)
192192
193193 mkRecFun :: [(String , Type )] -> Expr
194- mkRecFun xs = mkJust $ foldr ( \ s e -> lam s e) recLiteral (map fst xs)
194+ mkRecFun xs = mkJust $ foldr lam recLiteral (map fst xs)
195195 where recLiteral = ObjectLiteral $ map (\ (s,_) -> (s,mkVar s)) xs
196196mkFromSpineFunction mn (PositionedDeclaration _ _ d) = mkFromSpineFunction mn d
197197mkFromSpineFunction _ _ = internalError " mkFromSpineFunction: expected DataDeclaration"
@@ -218,13 +218,13 @@ mkVarMn :: Maybe ModuleName -> String -> Expr
218218mkVarMn mn s = Var (Qualified mn (Ident s))
219219
220220mkVar :: String -> Expr
221- mkVar s = mkVarMn Nothing s
221+ mkVar = mkVarMn Nothing
222222
223223mkPrelVar :: String -> Expr
224- mkPrelVar s = mkVarMn (Just (ModuleName [ProperName C. prelude])) s
224+ mkPrelVar = mkVarMn (Just (ModuleName [ProperName C. prelude]))
225225
226226mkGenVar :: String -> Expr
227- mkGenVar s = mkVarMn (Just (ModuleName [ProperName " Data" , ProperName C. generic])) s
227+ mkGenVar = mkVarMn (Just (ModuleName [ProperName " Data" , ProperName C. generic]))
228228
229229decomposeRec :: Type -> [(String , Type )]
230230decomposeRec = sortBy (comparing fst ) . go
0 commit comments