repa 2.1.1.2 → 2.1.1.3
raw patch · 2 files changed
+9/−12 lines, 2 files
Files
- Data/Array/Repa/Stencil/Template.hs +8/−11
- repa.cabal +1/−1
Data/Array/Repa/Stencil/Template.hs view
@@ -74,25 +74,22 @@ -> Q Exp makeStencil2' sizeX sizeY coeffs- = do let makeStencil' = mkName "makeStencil2"- let dot' = mkName ":."- let just' = mkName "Just"- ix' <- newName "ix"+ = do ix' <- newName "ix" z' <- [p| Z |] coeffs' <- newName "coeffs" let fnCoeffs = LamE [VarP ix']- $ CaseE (VarE ix')- $ [ Match (InfixP (InfixP z' dot' (LitP (IntegerL oy))) dot' (LitP (IntegerL ox)))- (NormalB $ ConE just' `AppE` LitE (IntegerL v))+ $ CaseE (VarE (mkName "ix"))+ $ [ Match (InfixP (InfixP z' (mkName ":.") (LitP (IntegerL oy))) (mkName ":.") (LitP (IntegerL ox)))+ (NormalB $ ConE (mkName "Just") `AppE` LitE (IntegerL v)) [] | (oy, ox, v) <- coeffs ] ++ [Match WildP (NormalB $ ConE (mkName "Nothing")) []] return- $ AppE (VarE makeStencil' `AppE` (LitE (IntegerL sizeX)) `AppE` (LitE (IntegerL sizeY)))- $ LetE [ PragmaD (InlineP coeffs' (InlineSpec True False Nothing))- , ValD (VarP coeffs') (NormalB fnCoeffs) [] ]- (VarE coeffs')+ $ AppE (VarE (mkName "makeStencil2") `AppE` (LitE (IntegerL sizeX)) `AppE` (LitE (IntegerL sizeY)))+ $ LetE [ PragmaD (InlineP (mkName "coeffs") (InlineSpec True False Nothing))+ , ValD (VarP coeffs') (NormalB fnCoeffs) [] ]+ (VarE (mkName "coeffs"))
repa.cabal view
@@ -1,5 +1,5 @@ Name: repa-Version: 2.1.1.2+Version: 2.1.1.3 License: BSD3 License-file: LICENSE Author: The DPH Team