Safe Haskell | None |
---|

Idiom brackets. Vixey's idea.

- i :: QuasiQuoter

# Documentation

Turns function application into *, and puts a pure on the beginning.

- i| subtract [1,2,3
- [10,20,30] |] -> pure subtract * [1,2,3] * [10,20,30] -> [99,199,299,98,198,298,97,197,297]

Does not apply to nested applications:

getZipList [i| subtract (ZipList [1,2,3]) (ZipList [100,200,300]) |] -> getZipList (pure subtract * ZipList [1,2,3] * ZipList [100,200,300]) -> [99,198,297]

Will treat [i| x `op`

y |] as [i| op x y |] as long as neither x nor y
are an infix expression. The precise behaviour when x or y are infix
applications depends on what haskell-src-meta does, which depends on what
TH supports, so may depend on your GHC version.