Safe Haskell | None |
---|---|
Language | Haskell2010 |
TypeMachine.TM.Syntax
Synopsis
- (<:>) :: LiftableTMFunction (a -> b) => (a -> b) -> TM a -> b
- (<::>) :: LiftableTMFunction (Type -> a) => (Type -> a) -> Name -> a
- (<.>) :: (a -> b) -> a -> b
Documentation
(<:>) :: LiftableTMFunction (a -> b) => (a -> b) -> TM a -> b Source #
(<.>) :: (a -> b) -> a -> b Source #
Apply a a
value to a TM
computation that expects an a
.
It is just an application operator. It exists so that applications of TM
functions is visually homogeneous
Not using it when a
is the first parameter can enhance readability.
Examples:
omit
<.>
["id"]<:>
toType
''User -- Is equivalent toomit
["id"]<:>
toType
''User
If the parameters to this function were flipped, using <.>
can be handy:
flip
omit
<:>
toType
''User<.>
["id"] -- Instead of having to use parenthesis (flip
omit
<:>
toType
''User) ["id"] -- Or the application operator:flip
omit
<:>
toType
''User $ ["id"]