DS
Size: a a a
DS
AA
a # p -> b
is not yet implemented. You can use GHC.Exts.FUN p a b
instead. However, be aware of the next point.x :: a # p
, \(x :: a # p) -> ...
.case
, let
and where
statements consume their right-hand side, or scrutiny, Many
times. That is, the following will not type check:g :: A #-> (A, B)This can be worked around by defining extra functions which are specified to be linear, such as:
h :: A #-> B #-> C
f :: A #-> C
f x =
case g x of
(y, z) -> h y z
g :: A #-> (A, B)- There is no support for linear pattern synonyms.
h :: A #-> B #-> C
f :: A #-> C
f x = f' (g x)
where
f' :: (A, B) #-> C
f' (y, z) = h y z
@
-patterns and view patterns are not linear.WK
WK
AV
к
_:
YP
к
YP
_:
AV
к
MK
MK
MK
MK
MK