Prelude/Monad.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
module Prelude.Monad (
  Monadtype-class `Prelude.Monad.Monad`
   arguments: ('M :: * -> *)
   reserved var-names: 'a, 'b
   statically-resolved(..)class-constant `(>>)`
class-constant `(>>=)`
class-constant `return`
,
  bindconstant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   executable, (=<<)constant `Prelude.Monad.(=<<)`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> 'M 'a -> 'M 'b`
   executable,
  pureconstant `Prelude.Monad.return`
   statically resolved constant of type-class `Monad`
   type `'a -> 'M 'a`
   executable,
  sequenceconstant `Prelude.Monad.sequence`
   constant
   type `!Monad 'M => [('M 'a)] -> 'M ['a]`
   executable,
  sequence_constant `Prelude.Monad.sequence_`
   constant
   type `!Monad 'M => [('M 'a)] -> 'M ()`
   executable,
  mapMconstant `Prelude.Monad.mapM`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> ['a] -> 'M ['b]`
   executable,
  mapM_constant `Prelude.Monad.mapM_`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> ['a] -> 'M ()`
   executable,
  guardconstant `Prelude.Monad.guard`
   constant
   type `(!Monad 'M, !Monoid ('M ())) => Bool -> 'M ()`
   executable,
  MonadFailtype-class `Prelude.Monad.MonadFail`
   arguments: ('M :: * -> *)
   super-class constraints:
     - !Prelude.Monad.Monad 'M
   reserved var-names: 'a
   statically-resolved(..)class-constant `fail`

) where

{-# NoImplicitPrelude #-}

import Prelude.Function
import Prelude.Bool
import Prelude.Eq
import Prelude.Unit ()
import Prelude.String
import Prelude.BasicClasses
import           Prelude.List hiding (foldlconstant `Prelude.List.foldl`
   constant
   type `('a -> 'b -> 'a) -> 'a -> ['b] -> 'a`
   executable, foldrconstant `Prelude.List.foldr`
   constant
   type `('a -> 'b -> 'b) -> 'b -> ['a] -> 'b`
   executable, elemconstant `Prelude.List.elem`
   constant
   type `Eq 'a => 'a -> ['a] -> Bool`
   executable, lengthconstant `Prelude.List.length`
   constant
   type `['a] -> Prelude.Num.Natural`
   executable, nullconstant `Prelude.List.null`
   constant
   type `['a] -> Bool`
   executable)
import qualified Prelude.List as List
import qualified Prelude.Maybe as Maybe
import           Prelude.Maybe hiding (mapconstant `Prelude.Maybe.map`
   constant
   type `('a -> 'b) -> Maybe 'a -> Maybe 'b`
   executable, bindconstant `Prelude.Maybe.bind`
   constant
   type `Maybe 'a -> ('a -> Maybe 'b) -> Maybe 'b`
   executable)


{-# static resolve Monadtype-class `Prelude.Monad.Monad`
   arguments: ('M :: * -> *)
   reserved var-names: 'a, 'b
   statically-resolved #-}
class Monad ('Mtype-variable `'M`
   kind `* -> *` :: * -> *) where
  declare (>>=)constant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   executable  :: 'Mtype-variable `'M`
   kind `* -> *` 'atype-variable `'a`
   kind `*` -> ('atype-variable `'a`
   kind `*` -> 'Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`) -> 'Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`
  declare (>>)constant `Prelude.Monad.(>>)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> 'M 'b -> 'M 'b`
   executable   :: 'Mtype-variable `'M`
   kind `* -> *` 'atype-variable `'a`
   kind `*` -> 'Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*` -> 'Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`
  declare returnconstant `Prelude.Monad.return`
   statically resolved constant of type-class `Monad`
   type `'a -> 'M 'a`
   executable :: 'atype-variable `'a`
   kind `*` -> 'Mtype-variable `'M`
   kind `* -> *` 'atype-variable `'a`
   kind `*`

  define (>>)constant `Prelude.Monad.(>>)`
   default instance of type-class constant
   type `('M 'a -> ('a -> 'M 'b) -> 'M 'b) -> 'M 'a -> 'M 'b -> 'M 'b`
   executable mvariable `m`
   type `'M 'a` kvariable `k`
   type `'M 'b` := mvariable `m`
   type `'M 'a` >>=constant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   executable
   same type-class instance (constantconstant `Prelude.Function.constant`
   constant
   type `'a -> 'b -> 'a`
   type in context `'M 'b -> 'a -> 'M 'b`
   executable kvariable `k`
   type `'M 'b`)
  {-# inline (>>)constant `Prelude.Monad.(>>)`
   default instance of type-class constant
   type `('M 'a -> ('a -> 'M 'b) -> 'M 'b) -> 'M 'a -> 'M 'b -> 'M 'b`
   executable #-}

  property EqPtype-class `Prelude.Eq.EqP`
   arguments: ('a :: *)
   has default derive templates
   derive-template labels
     - eq (only deriving)
     - full ('Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`) => monad_left_identityconstant `Prelude.Monad.monad_left_identity`
   type-class property
   type `EqP ('M 'b) => ('a -> 'M 'b) -> 'a -> Prop`
   non-executable (fvariable `f`
   type `'a -> 'M 'b` :: 'atype-variable `'a`
   kind `*` -> 'Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`) avariable `a`
   type `'a` := ((returnconstant `Prelude.Monad.return`
   statically resolved constant of type-class `Monad`
   type `'a -> 'M 'a`
   executable
   same type-class instance avariable `a`
   type `'a`) >>=constant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   executable
   same type-class instance fvariable `f`
   type `'a -> 'M 'b`) ===constant `Prelude.Eq.(===)`
   constant of type-class `EqP`
   type `'a -> 'a -> Prop`
   type in context `'M 'b -> 'M 'b -> Prop`
   non-executable
   type-class instance from argument (fvariable `f`
   type `'a -> 'M 'b` avariable `a`
   type `'a`)
  property EqPtype-class `Prelude.Eq.EqP`
   arguments: ('a :: *)
   has default derive templates
   derive-template labels
     - eq (only deriving)
     - full ('Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`) => monad_right_identityconstant `Prelude.Monad.monad_right_identity`
   type-class property
   type `EqP ('M 'b) => 'M 'b -> Prop`
   non-executable (avariable `a`
   type `'M 'b` :: 'Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`) := (avariable `a`
   type `'M 'b` >>=constant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   type in context `'M 'b -> ('b -> 'M 'b) -> 'M 'b`
   executable
   same type-class instance returnconstant `Prelude.Monad.return`
   statically resolved constant of type-class `Monad`
   type `'a -> 'M 'a`
   type in context `'b -> 'M 'b`
   executable
   same type-class instance) ===constant `Prelude.Eq.(===)`
   constant of type-class `EqP`
   type `'a -> 'a -> Prop`
   type in context `'M 'b -> 'M 'b -> Prop`
   non-executable
   type-class instance from argument avariable `a`
   type `'M 'b`
  property EqPtype-class `Prelude.Eq.EqP`
   arguments: ('a :: *)
   has default derive templates
   derive-template labels
     - eq (only deriving)
     - full ('Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`) => monad_assocconstant `Prelude.Monad.monad_assoc`
   type-class property
   type `EqP ('M 'b) => 'M 'a -> ('a -> 'M 'c) -> ('c -> 'M 'b) -> Prop`
   non-executable (mvariable `m`
   type `'M 'a` :: 'Mtype-variable `'M`
   kind `* -> *` 'atype-variable `'a`
   kind `*`) (fvariable `f`
   type `'a -> 'M 'c` :: 'atype-variable `'a`
   kind `*` -> 'Mtype-variable `'M`
   kind `* -> *` 'ctype-variable `'c`
   kind `*`) (gvariable `g`
   type `'c -> 'M 'b` :: 'ctype-variable `'c`
   kind `*` -> 'Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`) := ((mvariable `m`
   type `'M 'a` >>=constant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   type in context `'M 'a -> ('a -> 'M 'c) -> 'M 'c`
   executable
   same type-class instance fvariable `f`
   type `'a -> 'M 'c`) >>=constant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   type in context `'M 'c -> ('c -> 'M 'b) -> 'M 'b`
   executable
   same type-class instance gvariable `g`
   type `'c -> 'M 'b`) ===constant `Prelude.Eq.(===)`
   constant of type-class `EqP`
   type `'a -> 'a -> Prop`
   type in context `'M 'b -> 'M 'b -> Prop`
   non-executable
   type-class instance from argument (mvariable `m`
   type `'M 'a` >>=constant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   executable
   same type-class instance (fntype `'a -> 'M 'b` xvariable `x`
   type `'a` -> fvariable `f`
   type `'a -> 'M 'c` xvariable `x`
   type `'a` >>=constant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   type in context `'M 'c -> ('c -> 'M 'b) -> 'M 'b`
   executable
   same type-class instance gvariable `g`
   type `'c -> 'M 'b`))
end-class

alias bind := (>>=)constant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   executable
alias pure := returnconstant `Prelude.Monad.return`
   statically resolved constant of type-class `Monad`
   type `'a -> 'M 'a`
   executable

declare (=<<)constant `Prelude.Monad.(=<<)`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> 'M 'a -> 'M 'b`
   executable :: !Monadtype-class `Prelude.Monad.Monad`
   arguments: ('M :: * -> *)
   reserved var-names: 'a, 'b
   statically-resolved 'Mtype-variable `'M`
   kind `* -> *` => ('atype-variable `'a`
   kind `*` -> 'Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`) -> 'Mtype-variable `'M`
   kind `* -> *` 'atype-variable `'a`
   kind `*` -> 'Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`
define (=<<)constant `Prelude.Monad.(=<<)`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> 'M 'a -> 'M 'b`
   executable fvariable `f`
   type `'a -> 'M 'b` mvariable `m`
   type `'M 'a` := mvariable `m`
   type `'M 'a` >>=constant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   executable
   type-class instance from argument fvariable `f`
   type `'a -> 'M 'b`
{-# inline (=<<)constant `Prelude.Monad.(=<<)`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> 'M 'a -> 'M 'b`
   executable #-}

declare guardconstant `Prelude.Monad.guard`
   constant
   type `(!Monad 'M, !Monoid ('M ())) => Bool -> 'M ()`
   executable :: (!Monoidtype-class `Prelude.BasicClasses.Monoid`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.BasicClasses.Semigroup 'a ('Mtype-variable `'M`
   kind `* -> *` ()), !Monadtype-class `Prelude.Monad.Monad`
   arguments: ('M :: * -> *)
   reserved var-names: 'a, 'b
   statically-resolved 'Mtype-variable `'M`
   kind `* -> *`) => Booldatatype `Prelude.Bool.Bool`
   kind `*`
   executable -> 'Mtype-variable `'M`
   kind `* -> *` ()
define guardconstant `Prelude.Monad.guard`
   constant
   type `(!Monad 'M, !Monoid ('M ())) => Bool -> 'M ()`
   executable Trueconstant `Prelude.Bool.True`
   constructor of datatype `Bool`
   type `Bool`
   executable := returnconstant `Prelude.Monad.return`
   statically resolved constant of type-class `Monad`
   type `'a -> 'M 'a`
   type in context `() -> 'M ()`
   executable
   type-class instance from argument ()
     | guardconstant `Prelude.Monad.guard`
   constant
   type `(!Monad 'M, !Monoid ('M ())) => Bool -> 'M ()`
   executable Falseconstant `Prelude.Bool.False`
   constructor of datatype `Bool`
   type `Bool`
   executable := memptyconstant `Prelude.BasicClasses.mempty`
   constant of type-class `Monoid`
   type `'a`
   type in context `'M ()`
   executable
   type-class instance from argument
{-# inline guardconstant `Prelude.Monad.guard`
   constant
   type `(!Monad 'M, !Monoid ('M ())) => Bool -> 'M ()`
   executable #-}

declare sequence'constant `Prelude.Monad.sequence'`
   constant
   type `(['a] -> 'mas) -> ('ma -> ('a -> 'mas) -> 'mas) -> ('mas -> (['a] -> 'mas) -> 'mas) -> ['ma] -> 'mas`
   executable :: (['atype-variable `'a`
   kind `*`] -> 'mastype-variable `'mas`
   kind `*`)
  -> ('matype-variable `'ma`
   kind `*` -> ('atype-variable `'a`
   kind `*` -> 'mastype-variable `'mas`
   kind `*`) -> 'mastype-variable `'mas`
   kind `*`)
  -> ('mastype-variable `'mas`
   kind `*` -> (['atype-variable `'a`
   kind `*`] -> 'mastype-variable `'mas`
   kind `*`) -> 'mastype-variable `'mas`
   kind `*`)
  -> ['matype-variable `'ma`
   kind `*`]
  -> 'mastype-variable `'mas`
   kind `*`
define sequence'constant `Prelude.Monad.sequence'`
   constant
   type `(['a] -> 'mas) -> ('ma -> ('a -> 'mas) -> 'mas) -> ('mas -> (['a] -> 'mas) -> 'mas) -> ['ma] -> 'mas`
   executable retvariable `ret`
   type `['a] -> 'mas` bind1variable `bind1`
   type `'ma -> ('a -> 'mas) -> 'mas` bindlvariable `bindl`
   type `'mas -> (['a] -> 'mas) -> 'mas` :=
  List.foldrconstant `Prelude.List.foldr`
   constant
   type `('a -> 'b -> 'b) -> 'b -> ['a] -> 'b`
   type in context `('ma -> 'mas -> 'mas) -> 'mas -> ['ma] -> 'mas`
   executable (fntype `'ma -> 'mas -> 'mas` pvariable `p`
   type `'ma` qvariable `q`
   type `'mas` ->
    bind1variable `bind1`
   type `'ma -> ('a -> 'mas) -> 'mas` pvariable `p`
   type `'ma` (fntype `'a -> 'mas` xvariable `x`
   type `'a` -> bindlvariable `bindl`
   type `'mas -> (['a] -> 'mas) -> 'mas` qvariable `q`
   type `'mas` (fntype `['a] -> 'mas` xsvariable `xs`
   type `['a]` -> retvariable `ret`
   type `['a] -> 'mas` (xvariable `x`
   type `'a`:constant `Prelude.List.(:)`
   constructor of datatype `List`
   type `'a -> ['a] -> ['a]`
   executablexsvariable `xs`
   type `['a]`)))
  ) (retvariable `ret`
   type `['a] -> 'mas` [])


declare sequenceconstant `Prelude.Monad.sequence`
   constant
   type `!Monad 'M => [('M 'a)] -> 'M ['a]`
   executable :: !Monadtype-class `Prelude.Monad.Monad`
   arguments: ('M :: * -> *)
   reserved var-names: 'a, 'b
   statically-resolved 'Mtype-variable `'M`
   kind `* -> *` => ['Mtype-variable `'M`
   kind `* -> *` 'atype-variable `'a`
   kind `*`] -> 'Mtype-variable `'M`
   kind `* -> *` ['atype-variable `'a`
   kind `*`]
define sequenceconstant `Prelude.Monad.sequence`
   constant
   type `!Monad 'M => [('M 'a)] -> 'M ['a]`
   executable := sequence'constant `Prelude.Monad.sequence'`
   constant
   type `(['a] -> 'mas) -> ('ma -> ('a -> 'mas) -> 'mas) -> ('mas -> (['a] -> 'mas) -> 'mas) -> ['ma] -> 'mas`
   type in context `(['a] -> 'M ['a]) -> ('M 'a -> ('a -> 'M ['a]) -> 'M ['a]) -> ('M ['a] -> (['a] -> 'M ['a]) -> 'M ['a]) -> [('M 'a)] -> 'M ['a]`
   executable returnconstant `Prelude.Monad.return`
   statically resolved constant of type-class `Monad`
   type `'a -> 'M 'a`
   type in context `['a] -> 'M ['a]`
   executable
   type-class instance from argument bindconstant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   type in context `'M 'a -> ('a -> 'M ['a]) -> 'M ['a]`
   executable
   type-class instance from argument bindconstant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   type in context `'M ['a] -> (['a] -> 'M ['a]) -> 'M ['a]`
   executable
   type-class instance from argument
{-# inline sequenceconstant `Prelude.Monad.sequence`
   constant
   type `!Monad 'M => [('M 'a)] -> 'M ['a]`
   executable #-}

declare sequence_constant `Prelude.Monad.sequence_`
   constant
   type `!Monad 'M => [('M 'a)] -> 'M ()`
   executable :: !Monadtype-class `Prelude.Monad.Monad`
   arguments: ('M :: * -> *)
   reserved var-names: 'a, 'b
   statically-resolved 'Mtype-variable `'M`
   kind `* -> *` => ['Mtype-variable `'M`
   kind `* -> *` 'atype-variable `'a`
   kind `*`] -> 'Mtype-variable `'M`
   kind `* -> *` ()
define sequence_constant `Prelude.Monad.sequence_`
   constant
   type `!Monad 'M => [('M 'a)] -> 'M ()`
   executable lvariable `l`
   type `[('M 'a)]` := sequenceconstant `Prelude.Monad.sequence`
   constant
   type `!Monad 'M => [('M 'a)] -> 'M ['a]`
   type in context `[('M 'a)] -> 'M ['a]`
   executable lvariable `l`
   type `[('M 'a)]` >>constant `Prelude.Monad.(>>)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> 'M 'b -> 'M 'b`
   type in context `'M ['a] -> 'M () -> 'M ()`
   executable
   type-class instance from argument returnconstant `Prelude.Monad.return`
   statically resolved constant of type-class `Monad`
   type `'a -> 'M 'a`
   type in context `() -> 'M ()`
   executable
   type-class instance from argument ()
{-# inline sequence_constant `Prelude.Monad.sequence_`
   constant
   type `!Monad 'M => [('M 'a)] -> 'M ()`
   executable #-}

declare mapM'constant `Prelude.Monad.mapM'`
   constant
   type `(['b] -> 'mbs) -> ('mb -> ('b -> 'mbs) -> 'mbs) -> ('mbs -> (['b] -> 'mbs) -> 'mbs) -> ('a -> 'mb) -> ['a] -> 'mbs`
   executable :: (['btype-variable `'b`
   kind `*`] -> 'mbstype-variable `'mbs`
   kind `*`) -> ('mbtype-variable `'mb`
   kind `*` -> ('btype-variable `'b`
   kind `*` -> 'mbstype-variable `'mbs`
   kind `*`) -> 'mbstype-variable `'mbs`
   kind `*`) -> ('mbstype-variable `'mbs`
   kind `*` -> (['btype-variable `'b`
   kind `*`] -> 'mbstype-variable `'mbs`
   kind `*`) -> 'mbstype-variable `'mbs`
   kind `*`) -> ('atype-variable `'a`
   kind `*` -> 'mbtype-variable `'mb`
   kind `*`) -> ['atype-variable `'a`
   kind `*`] -> 'mbstype-variable `'mbs`
   kind `*`
define mapM'constant `Prelude.Monad.mapM'`
   constant
   type `(['b] -> 'mbs) -> ('mb -> ('b -> 'mbs) -> 'mbs) -> ('mbs -> (['b] -> 'mbs) -> 'mbs) -> ('a -> 'mb) -> ['a] -> 'mbs`
   executable retvariable `ret`
   type `['b] -> 'mbs` b1variable `b1`
   type `'mb -> ('b -> 'mbs) -> 'mbs` blvariable `bl`
   type `'mbs -> (['b] -> 'mbs) -> 'mbs` fvariable `f`
   type `'a -> 'mb` xsvariable `xs`
   type `['a]` := sequence'constant `Prelude.Monad.sequence'`
   constant
   type `(['a] -> 'mas) -> ('ma -> ('a -> 'mas) -> 'mas) -> ('mas -> (['a] -> 'mas) -> 'mas) -> ['ma] -> 'mas`
   type in context `(['b] -> 'mbs) -> ('mb -> ('b -> 'mbs) -> 'mbs) -> ('mbs -> (['b] -> 'mbs) -> 'mbs) -> ['mb] -> 'mbs`
   executable retvariable `ret`
   type `['b] -> 'mbs` b1variable `b1`
   type `'mb -> ('b -> 'mbs) -> 'mbs` blvariable `bl`
   type `'mbs -> (['b] -> 'mbs) -> 'mbs` (mapconstant `Prelude.List.map`
   constant
   type `('a -> 'b) -> ['a] -> ['b]`
   type in context `('a -> 'mb) -> ['a] -> ['mb]`
   executable fvariable `f`
   type `'a -> 'mb` xsvariable `xs`
   type `['a]`)

declare mapMconstant `Prelude.Monad.mapM`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> ['a] -> 'M ['b]`
   executable :: !Monadtype-class `Prelude.Monad.Monad`
   arguments: ('M :: * -> *)
   reserved var-names: 'a, 'b
   statically-resolved 'Mtype-variable `'M`
   kind `* -> *` => ('atype-variable `'a`
   kind `*` -> 'Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`) -> ['atype-variable `'a`
   kind `*`] -> 'Mtype-variable `'M`
   kind `* -> *` ['btype-variable `'b`
   kind `*`]
define mapMconstant `Prelude.Monad.mapM`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> ['a] -> 'M ['b]`
   executable := mapM'constant `Prelude.Monad.mapM'`
   constant
   type `(['b] -> 'mbs) -> ('mb -> ('b -> 'mbs) -> 'mbs) -> ('mbs -> (['b] -> 'mbs) -> 'mbs) -> ('a -> 'mb) -> ['a] -> 'mbs`
   type in context `(['b] -> 'M ['b]) -> ('M 'b -> ('b -> 'M ['b]) -> 'M ['b]) -> ('M ['b] -> (['b] -> 'M ['b]) -> 'M ['b]) -> ('a -> 'M 'b) -> ['a] -> 'M ['b]`
   executable returnconstant `Prelude.Monad.return`
   statically resolved constant of type-class `Monad`
   type `'a -> 'M 'a`
   type in context `['b] -> 'M ['b]`
   executable
   type-class instance from argument bindconstant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   type in context `'M 'b -> ('b -> 'M ['b]) -> 'M ['b]`
   executable
   type-class instance from argument bindconstant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   type in context `'M ['b] -> (['b] -> 'M ['b]) -> 'M ['b]`
   executable
   type-class instance from argument
{-# inline mapMconstant `Prelude.Monad.mapM`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> ['a] -> 'M ['b]`
   executable #-}

declare mapM_constant `Prelude.Monad.mapM_`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> ['a] -> 'M ()`
   executable :: !Monadtype-class `Prelude.Monad.Monad`
   arguments: ('M :: * -> *)
   reserved var-names: 'a, 'b
   statically-resolved 'Mtype-variable `'M`
   kind `* -> *` => ('atype-variable `'a`
   kind `*` -> 'Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`) -> ['atype-variable `'a`
   kind `*`] -> 'Mtype-variable `'M`
   kind `* -> *` ()
define mapM_constant `Prelude.Monad.mapM_`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> ['a] -> 'M ()`
   executable fvariable `f`
   type `'a -> 'M 'b` xsvariable `xs`
   type `['a]` := (mapMconstant `Prelude.Monad.mapM`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> ['a] -> 'M ['b]`
   type in context `('a -> 'M 'b) -> ['a] -> 'M ['b]`
   executable fvariable `f`
   type `'a -> 'M 'b` xsvariable `xs`
   type `['a]`) >>constant `Prelude.Monad.(>>)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> 'M 'b -> 'M 'b`
   type in context `'M ['b] -> 'M () -> 'M ()`
   executable
   type-class instance from argument returnconstant `Prelude.Monad.return`
   statically resolved constant of type-class `Monad`
   type `'a -> 'M 'a`
   type in context `() -> 'M ()`
   executable
   type-class instance from argument ()
{-# inline mapM_constant `Prelude.Monad.mapM_`
   constant
   type `!Monad 'M => ('a -> 'M 'b) -> ['a] -> 'M ()`
   executable #-}


instance Monadtype-class `Prelude.Monad.Monad`
   arguments: ('M :: * -> *)
   reserved var-names: 'a, 'b
   statically-resolved Listdatatype `Prelude.List.List`
   kind `* -> *`
   executable where
  define returnconstant `Prelude.Monad.return`
   constant of type-class instance `Monad List`
   type `'a -> ['a]`
   executable xvariable `x`
   type `'a` := [xvariable `x`
   type `'a`]
  {-# inline returnconstant `Prelude.Monad.return`
   constant of type-class instance `Monad List`
   type `'a -> ['a]`
   executable #-}

  define (>>=)constant `Prelude.Monad.(>>=)`
   constant of type-class instance `Monad List`
   type `['a] -> ('a -> ['b]) -> ['b]`
   executable xsvariable `xs`
   type `['a]` fvariable `f`
   type `'a -> ['b]` := concatMapconstant `Prelude.List.concatMap`
   constant
   type `('a -> ['b]) -> ['a] -> ['b]`
   executable fvariable `f`
   type `'a -> ['b]` xsvariable `xs`
   type `['a]`
  {-# inline (>>=)constant `Prelude.Monad.(>>=)`
   constant of type-class instance `Monad List`
   type `['a] -> ('a -> ['b]) -> ['b]`
   executable #-}
end-instance

instance Monadtype-class `Prelude.Monad.Monad`
   arguments: ('M :: * -> *)
   reserved var-names: 'a, 'b
   statically-resolved Maybedatatype `Prelude.Maybe.Maybe`
   kind `* -> *`
   executable where
  define returnconstant `Prelude.Monad.return`
   constant of type-class instance `Monad Maybe`
   type `'a -> Maybe 'a`
   executable := Justconstant `Prelude.Maybe.Just`
   constructor of datatype `Maybe`
   type `'a -> Maybe 'a`
   executable
  {-# inline returnconstant `Prelude.Monad.return`
   constant of type-class instance `Monad Maybe`
   type `'a -> Maybe 'a`
   executable #-}

  define (>>=)constant `Prelude.Monad.(>>=)`
   constant of type-class instance `Monad Maybe`
   type `Maybe 'a -> ('a -> Maybe 'b) -> Maybe 'b`
   executable := Maybe.bindconstant `Prelude.Maybe.bind`
   constant
   type `Maybe 'a -> ('a -> Maybe 'b) -> Maybe 'b`
   executable
  {-# inline (>>=)constant `Prelude.Monad.(>>=)`
   constant of type-class instance `Monad Maybe`
   type `Maybe 'a -> ('a -> Maybe 'b) -> Maybe 'b`
   executable #-}
end-instance



{-# static resolve MonadFailtype-class `Prelude.Monad.MonadFail`
   arguments: ('M :: * -> *)
   super-class constraints:
     - !Prelude.Monad.Monad 'M
   reserved var-names: 'a
   statically-resolved #-}
class !Monadtype-class `Prelude.Monad.Monad`
   arguments: ('M :: * -> *)
   reserved var-names: 'a, 'b
   statically-resolved 'Mtype-variable `'M`
   kind `* -> *` => MonadFail ('Mtype-variable `'M`
   kind `* -> *` :: * -> *) where
  declare failconstant `Prelude.Monad.fail`
   statically resolved constant of type-class `MonadFail`
   type `String -> 'M 'a`
   executable :: Stringabbreviation-type `Prelude.String.String`
   kind `*`
   type `String` abbreviates type `[Prelude.Char.Char]`
   executable -> 'Mtype-variable `'M`
   kind `* -> *` 'atype-variable `'a`
   kind `*`

  property EqPtype-class `Prelude.Eq.EqP`
   arguments: ('a :: *)
   has default derive templates
   derive-template labels
     - eq (only deriving)
     - full ('Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`) => monad_failconstant `Prelude.Monad.monad_fail`
   type-class property
   type `EqP ('M 'b) => ('a -> 'M 'b) -> String -> Prop`
   non-executable (fvariable `f`
   type `'a -> 'M 'b` :: 'atype-variable `'a`
   kind `*` -> 'Mtype-variable `'M`
   kind `* -> *` 'btype-variable `'b`
   kind `*`) svariable `s`
   type `String` := ((failconstant `Prelude.Monad.fail`
   statically resolved constant of type-class `MonadFail`
   type `String -> 'M 'a`
   executable
   same type-class instance svariable `s`
   type `String`) >>=constant `Prelude.Monad.(>>=)`
   statically resolved constant of type-class `Monad`
   type `'M 'a -> ('a -> 'M 'b) -> 'M 'b`
   executable
   type-class instance from context fvariable `f`
   type `'a -> 'M 'b`) ===constant `Prelude.Eq.(===)`
   constant of type-class `EqP`
   type `'a -> 'a -> Prop`
   type in context `'M 'b -> 'M 'b -> Prop`
   non-executable
   type-class instance from argument failconstant `Prelude.Monad.fail`
   statically resolved constant of type-class `MonadFail`
   type `String -> 'M 'a`
   type in context `String -> 'M 'b`
   executable
   same type-class instance svariable `s`
   type `String`
end-class

instance MonadFailtype-class `Prelude.Monad.MonadFail`
   arguments: ('M :: * -> *)
   super-class constraints:
     - !Prelude.Monad.Monad 'M
   reserved var-names: 'a
   statically-resolved Maybedatatype `Prelude.Maybe.Maybe`
   kind `* -> *`
   executable where
  define failconstant `Prelude.Monad.fail`
   constant of type-class instance `MonadFail Maybe`
   type `String -> Maybe 'a`
   executable := constantconstant `Prelude.Function.constant`
   constant
   type `'a -> 'b -> 'a`
   type in context `Maybe 'a -> String -> Maybe 'a`
   executable Nothingconstant `Prelude.Maybe.Nothing`
   constructor of datatype `Maybe`
   type `Maybe 'a`
   executable
  {-# inline failconstant `Prelude.Monad.fail`
   constant of type-class instance `MonadFail Maybe`
   type `String -> Maybe 'a`
   executable #-}
end-instance

end-moduleend of module Prelude.Monad