File: Strict.hs

package info (click to toggle)
haskell-foundation 0.0.30-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 932 kB
  • sloc: haskell: 9,124; ansic: 570; makefile: 7
file content (37 lines) | stat: -rw-r--r-- 843 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
-- |
-- Module      : Foundation.Strict
-- License     : BSD-style
-- Maintainer  : Foundation
-- Stability   : stable
-- Portability : portable
--
-- Enforce strictness when executing lambda
--

module Foundation.Strict
    ( strict1
    , strict2
    , strict3
    , strict4
    , strict5
    , strict6
    ) where

strict1 :: (a -> b) -> a -> b
strict1 f !a = f a

strict2 :: (a -> b -> c) -> a -> b -> c
strict2 f !a !b = f a b

strict3 :: (a -> b -> c -> d) -> a -> b -> c -> d
strict3 f !a !b !c = f a b c

strict4 :: (a -> b -> c -> d -> e) -> a -> b -> c -> d -> e
strict4 f !a !b !c !d = f a b c d

strict5 :: (a -> b -> c -> d -> e -> f) -> a -> b -> c -> d -> e -> f
strict5 f !a !b !c !d !e = f a b c d e

strict6 :: (a -> b -> c -> d -> e -> f -> g) -> a -> b -> c -> d -> e -> f -> g
strict6 f !a !b !c !d !e !g = f a b c d e g