Prelude/Function.ad

Outline

Content

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
module Prelude.Function (
  Dottype-class `Prelude.Function.Dot`
   arguments: ('a :: *) ('b :: *) ('c :: *)
   functional deps: 'a 'b -> 'c(..)class-constant `(.)`
,
  flipconstant `Prelude.Function.flip`
   constant
   type `('a -> 'b -> 'c) -> 'b -> 'a -> 'c`
   executable,
  constantconstant `Prelude.Function.constant`
   constant
   type `'a -> 'b -> 'a`
   executable,
  idconstant `Prelude.Function.id`
   constant
   type `'a -> 'a`
   executable,
  ($)constant `Prelude.Function.($)`
   constant
   type `('a -> 'b) -> 'a -> 'b`
   executable
) where

{-# NoImplicitPrelude #-}

class Dot 'atype-variable `'a`
   kind `*` 'btype-variable `'b`
   kind `*` 'ctype-variable `'c`
   kind `*` | 'a 'b -> 'c where
  declare (.)constant `Prelude.Function.(.)`
   constant of type-class `Dot`
   type `'a -> 'b -> 'c`
   executable :: 'atype-variable `'a`
   kind `*` -> 'btype-variable `'b`
   kind `*` -> 'ctype-variable `'c`
   kind `*`
end-class

instance Dottype-class `Prelude.Function.Dot`
   arguments: ('a :: *) ('b :: *) ('c :: *)
   functional deps: 'a 'b -> 'c ('btype-variable `'b`
   kind `*` -> 'ctype-variable `'c`
   kind `*`) ('atype-variable `'a`
   kind `*` -> 'b2type-variable `'b2`
   kind `*`) ('atype-variable `'a`
   kind `*` -> 'ctype-variable `'c`
   kind `*`) | 'b2type-variable `'b2`
   kind `*` -> 'btype-variable `'b`
   kind `*` where
  define (.)constant `Prelude.Function.(.)`
   constant of type-class instance `Dot ('b -> 'c) ('a -> 'b2) ('a -> 'c) | 'b2  ->  'b`
   type `('b -> 'c) -> ('a -> 'b) -> 'a -> 'c`
   executable f1variable `f1`
   type `'b -> 'c` f2variable `f2`
   type `'a -> 'b` xvariable `x`
   type `'a` := f1variable `f1`
   type `'b -> 'c` (f2variable `f2`
   type `'a -> 'b` xvariable `x`
   type `'a`)
  {-# inline (.)constant `Prelude.Function.(.)`
   constant of type-class instance `Dot ('b -> 'c) ('a -> 'b2) ('a -> 'c) | 'b2  ->  'b`
   type `('b -> 'c) -> ('a -> 'b) -> 'a -> 'c`
   executable #-}
end-instance

declare idconstant `Prelude.Function.id`
   constant
   type `'a -> 'a`
   executable :: 'atype-variable `'a`
   kind `*` -> 'atype-variable `'a`
   kind `*`
define idconstant `Prelude.Function.id`
   constant
   type `'a -> 'a`
   executable xvariable `x`
   type `'a` := xvariable `x`
   type `'a`
{-# inline idconstant `Prelude.Function.id`
   constant
   type `'a -> 'a`
   executable #-}

declare constantconstant `Prelude.Function.constant`
   constant
   type `'a -> 'b -> 'a`
   executable :: 'atype-variable `'a`
   kind `*` -> 'btype-variable `'b`
   kind `*` -> 'atype-variable `'a`
   kind `*`
define constantconstant `Prelude.Function.constant`
   constant
   type `'a -> 'b -> 'a`
   executable xvariable `x`
   type `'a` := fntype `'b -> 'a` _ -> xvariable `x`
   type `'a`
{-# inline constantconstant `Prelude.Function.constant`
   constant
   type `'a -> 'b -> 'a`
   executable #-}

declare flipconstant `Prelude.Function.flip`
   constant
   type `('a -> 'b -> 'c) -> 'b -> 'a -> 'c`
   executable :: ('atype-variable `'a`
   kind `*` -> 'btype-variable `'b`
   kind `*` -> 'ctype-variable `'c`
   kind `*`) -> ('btype-variable `'b`
   kind `*` -> 'atype-variable `'a`
   kind `*` -> 'ctype-variable `'c`
   kind `*`)
define flipconstant `Prelude.Function.flip`
   constant
   type `('a -> 'b -> 'c) -> 'b -> 'a -> 'c`
   executable fvariable `f`
   type `'a -> 'b -> 'c` bvariable `b`
   type `'b` avariable `a`
   type `'a` := fvariable `f`
   type `'a -> 'b -> 'c` avariable `a`
   type `'a` bvariable `b`
   type `'b`

declare ($)constant `Prelude.Function.($)`
   constant
   type `('a -> 'b) -> 'a -> 'b`
   executable :: ('atype-variable `'a`
   kind `*` -> 'btype-variable `'b`
   kind `*`) -> 'atype-variable `'a`
   kind `*` -> 'btype-variable `'b`
   kind `*`
define ($)constant `Prelude.Function.($)`
   constant
   type `('a -> 'b) -> 'a -> 'b`
   executable fvariable `f`
   type `'a -> 'b` xvariable `x`
   type `'a` :=  fvariable `f`
   type `'a -> 'b` xvariable `x`
   type `'a`
{-# inline ($)constant `Prelude.Function.($)`
   constant
   type `('a -> 'b) -> 'a -> 'b`
   executable #-}

end-moduleend of module Prelude.Function