Prelude/Literal.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
module Prelude.Literal (
  BuiltInChartype `Prelude.Literal.BuiltInChar`
   kind `*`
   executable,
  BuiltInNumtype `Prelude.Literal.BuiltInNum`
   kind `*`
   executable,
  BuiltInDecimaltype `Prelude.Literal.BuiltInDecimal`
   kind `*`
   executable,
  BuiltInStringtype `Prelude.Literal.BuiltInString`
   kind `*`
   executable,
  LiteralNumtype-class `Prelude.Literal.LiteralNum`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.Eq 'a
   statically-resolved(..)class-constant `mkLiteralNum`
,
  LiteralDecimaltype-class `Prelude.Literal.LiteralDecimal`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Literal.LiteralNum 'a
   statically-resolved(..)class-constant `mkLiteralDecimal`
,
  LiteralChartype-class `Prelude.Literal.LiteralChar`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.Eq 'a
   statically-resolved(..)class-constant `mkLiteralChar`
,
  LiteralStringtype-class `Prelude.Literal.LiteralString`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.Eq 'a
   statically-resolved(..)class-constant `mkLiteralString`

) where

{-# NoImplicitPrelude #-}

import Prelude.Bool
import Prelude.Eq

-- | internal, build-in number represenation
{-# allow-similar-names "builtInNumEq", "builtInNumEqP", "BuiltInNumRep" #-}
type BuiltInNumtype `Prelude.Literal.BuiltInNum`
   kind `*`
   executable
type BuiltInNumReptype `Prelude.Literal.BuiltInNumRep`
   kind `*`
   executable

declare builtInNumEqconstant `Prelude.Literal.builtInNumEq`
   constant
   type `BuiltInNum -> BuiltInNum -> Bool`
   executable :: BuiltInNumtype `Prelude.Literal.BuiltInNum`
   kind `*`
   executable -> BuiltInNumtype `Prelude.Literal.BuiltInNum`
   kind `*`
   executable -> Booldatatype `Prelude.Bool.Bool`
   kind `*`
   executable
declare non-exec builtInNumEqPconstant `Prelude.Literal.builtInNumEqP`
   constant
   type `BuiltInNum -> BuiltInNum -> Prop`
   non-executable :: BuiltInNumtype `Prelude.Literal.BuiltInNum`
   kind `*`
   executable -> BuiltInNumtype `Prelude.Literal.BuiltInNum`
   kind `*`
   executable -> Proptype `Prelude.Bool.Prop`
   kind `*`
   non-executable

instance EqPtype-class `Prelude.Eq.EqP`
   arguments: ('a :: *)
   has default derive templates
   derive-template labels
     - eq (only deriving)
     - full BuiltInNumtype `Prelude.Literal.BuiltInNum`
   kind `*`
   executable where
  define non-exec (===)constant `Prelude.Eq.(===)`
   constant of type-class instance `EqP BuiltInNum`
   type `BuiltInNum -> BuiltInNum -> Prop`
   non-executable := builtInNumEqPconstant `Prelude.Literal.builtInNumEqP`
   constant
   type `BuiltInNum -> BuiltInNum -> Prop`
   non-executable
  {-# inline (===)constant `Prelude.Eq.(===)`
   constant of type-class instance `EqP BuiltInNum`
   type `BuiltInNum -> BuiltInNum -> Prop`
   non-executable #-}
end-instance

instance Eqtype-class `Prelude.Eq.Eq`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.EqP 'a
   has default derive templates BuiltInNumtype `Prelude.Literal.BuiltInNum`
   kind `*`
   executable where
  define (==)constant `Prelude.Eq.(==)`
   constant of type-class instance `Eq BuiltInNum`
   type `BuiltInNum -> BuiltInNum -> Bool`
   executable := builtInNumEqconstant `Prelude.Literal.builtInNumEq`
   constant
   type `BuiltInNum -> BuiltInNum -> Bool`
   executable
  {-# inline (==)constant `Prelude.Eq.(==)`
   constant of type-class instance `Eq BuiltInNum`
   type `BuiltInNum -> BuiltInNum -> Bool`
   executable #-}
end-instance

-- | type class for making number literals
class Eqtype-class `Prelude.Eq.Eq`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.EqP 'a
   has default derive templates 'atype-variable `'a`
   kind `*` => LiteralNum 'atype-variable `'a`
   kind `*` where
  declare mkLiteralNumconstant `Prelude.Literal.mkLiteralNum`
   statically resolved constant of type-class `LiteralNum`
   type `(BuiltInNumRep, BuiltInNum) -> 'a`
   executable :: (BuiltInNumReptype `Prelude.Literal.BuiltInNumRep`
   kind `*`
   executable, BuiltInNumtype `Prelude.Literal.BuiltInNum`
   kind `*`
   executable) -> 'atype-variable `'a`
   kind `*`
end-class
{-# static resolve LiteralNumtype-class `Prelude.Literal.LiteralNum`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.Eq 'a
   statically-resolved #-}

instance LiteralNumtype-class `Prelude.Literal.LiteralNum`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.Eq 'a
   statically-resolved BuiltInNumtype `Prelude.Literal.BuiltInNum`
   kind `*`
   executable where
  define mkLiteralNumconstant `Prelude.Literal.mkLiteralNum`
   constant of type-class instance `LiteralNum BuiltInNum`
   type `(BuiltInNumRep, BuiltInNum) -> BuiltInNum`
   executable (_, bivariable `bi`
   type `BuiltInNum`) := bivariable `bi`
   type `BuiltInNum`
  {-# inline mkLiteralNumconstant `Prelude.Literal.mkLiteralNum`
   constant of type-class instance `LiteralNum BuiltInNum`
   type `(BuiltInNumRep, BuiltInNum) -> BuiltInNum`
   executable #-}
end-instance


-- | internal, build-in number represenation
{-# allow-similar-names "builtInNumEq", "builtInNumEqP", "BuiltInNumRep" #-}
type BuiltInChartype `Prelude.Literal.BuiltInChar`
   kind `*`
   executable

declare builtInCharEqconstant `Prelude.Literal.builtInCharEq`
   constant
   type `BuiltInChar -> BuiltInChar -> Bool`
   executable :: BuiltInChartype `Prelude.Literal.BuiltInChar`
   kind `*`
   executable -> BuiltInChartype `Prelude.Literal.BuiltInChar`
   kind `*`
   executable -> Booldatatype `Prelude.Bool.Bool`
   kind `*`
   executable
declare non-exec builtInCharEqPconstant `Prelude.Literal.builtInCharEqP`
   constant
   type `BuiltInChar -> BuiltInChar -> Prop`
   non-executable :: BuiltInChartype `Prelude.Literal.BuiltInChar`
   kind `*`
   executable -> BuiltInChartype `Prelude.Literal.BuiltInChar`
   kind `*`
   executable -> Proptype `Prelude.Bool.Prop`
   kind `*`
   non-executable

-- | type class for making number literals
class Eqtype-class `Prelude.Eq.Eq`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.EqP 'a
   has default derive templates 'atype-variable `'a`
   kind `*` => LiteralChar 'atype-variable `'a`
   kind `*` where
  declare mkLiteralCharconstant `Prelude.Literal.mkLiteralChar`
   statically resolved constant of type-class `LiteralChar`
   type `BuiltInChar -> 'a`
   executable :: BuiltInChartype `Prelude.Literal.BuiltInChar`
   kind `*`
   executable -> 'atype-variable `'a`
   kind `*`
end-class
{-# static resolve LiteralChartype-class `Prelude.Literal.LiteralChar`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.Eq 'a
   statically-resolved #-}

instance EqPtype-class `Prelude.Eq.EqP`
   arguments: ('a :: *)
   has default derive templates
   derive-template labels
     - eq (only deriving)
     - full BuiltInChartype `Prelude.Literal.BuiltInChar`
   kind `*`
   executable where
  define non-exec (===)constant `Prelude.Eq.(===)`
   constant of type-class instance `EqP BuiltInChar`
   type `BuiltInChar -> BuiltInChar -> Prop`
   non-executable := builtInCharEqPconstant `Prelude.Literal.builtInCharEqP`
   constant
   type `BuiltInChar -> BuiltInChar -> Prop`
   non-executable
  {-# inline (===)constant `Prelude.Eq.(===)`
   constant of type-class instance `EqP BuiltInChar`
   type `BuiltInChar -> BuiltInChar -> Prop`
   non-executable #-}
end-instance

instance Eqtype-class `Prelude.Eq.Eq`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.EqP 'a
   has default derive templates BuiltInChartype `Prelude.Literal.BuiltInChar`
   kind `*`
   executable where
  define (==)constant `Prelude.Eq.(==)`
   constant of type-class instance `Eq BuiltInChar`
   type `BuiltInChar -> BuiltInChar -> Bool`
   executable := builtInCharEqconstant `Prelude.Literal.builtInCharEq`
   constant
   type `BuiltInChar -> BuiltInChar -> Bool`
   executable
  {-# inline (==)constant `Prelude.Eq.(==)`
   constant of type-class instance `Eq BuiltInChar`
   type `BuiltInChar -> BuiltInChar -> Bool`
   executable #-}
end-instance

instance LiteralChartype-class `Prelude.Literal.LiteralChar`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.Eq 'a
   statically-resolved BuiltInChartype `Prelude.Literal.BuiltInChar`
   kind `*`
   executable where
  define mkLiteralCharconstant `Prelude.Literal.mkLiteralChar`
   constant of type-class instance `LiteralChar BuiltInChar`
   type `BuiltInChar -> BuiltInChar`
   executable cvariable `c`
   type `BuiltInChar` := cvariable `c`
   type `BuiltInChar`
  {-# inline mkLiteralCharconstant `Prelude.Literal.mkLiteralChar`
   constant of type-class instance `LiteralChar BuiltInChar`
   type `BuiltInChar -> BuiltInChar`
   executable #-}
end-instance


-- | internal, build-in number represenation
type BuiltInStringtype `Prelude.Literal.BuiltInString`
   kind `*`
   executable

declare builtInStringEqconstant `Prelude.Literal.builtInStringEq`
   constant
   type `BuiltInString -> BuiltInString -> Bool`
   executable :: BuiltInStringtype `Prelude.Literal.BuiltInString`
   kind `*`
   executable -> BuiltInStringtype `Prelude.Literal.BuiltInString`
   kind `*`
   executable -> Booldatatype `Prelude.Bool.Bool`
   kind `*`
   executable
declare non-exec builtInStringEqPconstant `Prelude.Literal.builtInStringEqP`
   constant
   type `BuiltInString -> BuiltInString -> Prop`
   non-executable :: BuiltInStringtype `Prelude.Literal.BuiltInString`
   kind `*`
   executable -> BuiltInStringtype `Prelude.Literal.BuiltInString`
   kind `*`
   executable -> Proptype `Prelude.Bool.Prop`
   kind `*`
   non-executable

instance EqPtype-class `Prelude.Eq.EqP`
   arguments: ('a :: *)
   has default derive templates
   derive-template labels
     - eq (only deriving)
     - full BuiltInStringtype `Prelude.Literal.BuiltInString`
   kind `*`
   executable where
  define non-exec (===)constant `Prelude.Eq.(===)`
   constant of type-class instance `EqP BuiltInString`
   type `BuiltInString -> BuiltInString -> Prop`
   non-executable := builtInStringEqPconstant `Prelude.Literal.builtInStringEqP`
   constant
   type `BuiltInString -> BuiltInString -> Prop`
   non-executable
  {-# inline (===)constant `Prelude.Eq.(===)`
   constant of type-class instance `EqP BuiltInString`
   type `BuiltInString -> BuiltInString -> Prop`
   non-executable #-}
end-instance

instance Eqtype-class `Prelude.Eq.Eq`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.EqP 'a
   has default derive templates BuiltInStringtype `Prelude.Literal.BuiltInString`
   kind `*`
   executable where
  define (==)constant `Prelude.Eq.(==)`
   constant of type-class instance `Eq BuiltInString`
   type `BuiltInString -> BuiltInString -> Bool`
   executable := builtInStringEqconstant `Prelude.Literal.builtInStringEq`
   constant
   type `BuiltInString -> BuiltInString -> Bool`
   executable
  {-# inline (==)constant `Prelude.Eq.(==)`
   constant of type-class instance `Eq BuiltInString`
   type `BuiltInString -> BuiltInString -> Bool`
   executable #-}
end-instance

-- | type class for making number literals
class Eqtype-class `Prelude.Eq.Eq`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.EqP 'a
   has default derive templates 'atype-variable `'a`
   kind `*` => LiteralString 'atype-variable `'a`
   kind `*` where
  declare mkLiteralStringconstant `Prelude.Literal.mkLiteralString`
   statically resolved constant of type-class `LiteralString`
   type `BuiltInString -> 'a`
   executable :: BuiltInStringtype `Prelude.Literal.BuiltInString`
   kind `*`
   executable -> 'atype-variable `'a`
   kind `*`
end-class
{-# static resolve LiteralStringtype-class `Prelude.Literal.LiteralString`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.Eq 'a
   statically-resolved #-}

instance LiteralStringtype-class `Prelude.Literal.LiteralString`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.Eq 'a
   statically-resolved BuiltInStringtype `Prelude.Literal.BuiltInString`
   kind `*`
   executable where
  define mkLiteralStringconstant `Prelude.Literal.mkLiteralString`
   constant of type-class instance `LiteralString BuiltInString`
   type `BuiltInString -> BuiltInString`
   executable svariable `s`
   type `BuiltInString` := svariable `s`
   type `BuiltInString`
  {-# inline mkLiteralStringconstant `Prelude.Literal.mkLiteralString`
   constant of type-class instance `LiteralString BuiltInString`
   type `BuiltInString -> BuiltInString`
   executable #-}
end-instance

-- | internal, build-in number represenation
type BuiltInDecimaltype `Prelude.Literal.BuiltInDecimal`
   kind `*`
   executable

declare builtInDecimalEqconstant `Prelude.Literal.builtInDecimalEq`
   constant
   type `BuiltInDecimal -> BuiltInDecimal -> Bool`
   executable :: BuiltInDecimaltype `Prelude.Literal.BuiltInDecimal`
   kind `*`
   executable -> BuiltInDecimaltype `Prelude.Literal.BuiltInDecimal`
   kind `*`
   executable -> Booldatatype `Prelude.Bool.Bool`
   kind `*`
   executable
declare non-exec builtInDecimalEqPconstant `Prelude.Literal.builtInDecimalEqP`
   constant
   type `BuiltInDecimal -> BuiltInDecimal -> Prop`
   non-executable :: BuiltInDecimaltype `Prelude.Literal.BuiltInDecimal`
   kind `*`
   executable -> BuiltInDecimaltype `Prelude.Literal.BuiltInDecimal`
   kind `*`
   executable -> Proptype `Prelude.Bool.Prop`
   kind `*`
   non-executable

declare builtInNumToDecimalconstant `Prelude.Literal.builtInNumToDecimal`
   constant
   type `BuiltInNum -> BuiltInDecimal`
   executable :: BuiltInNumtype `Prelude.Literal.BuiltInNum`
   kind `*`
   executable -> BuiltInDecimaltype `Prelude.Literal.BuiltInDecimal`
   kind `*`
   executable

instance EqPtype-class `Prelude.Eq.EqP`
   arguments: ('a :: *)
   has default derive templates
   derive-template labels
     - eq (only deriving)
     - full BuiltInDecimaltype `Prelude.Literal.BuiltInDecimal`
   kind `*`
   executable where
  define non-exec (===)constant `Prelude.Eq.(===)`
   constant of type-class instance `EqP BuiltInDecimal`
   type `BuiltInDecimal -> BuiltInDecimal -> Prop`
   non-executable := builtInDecimalEqPconstant `Prelude.Literal.builtInDecimalEqP`
   constant
   type `BuiltInDecimal -> BuiltInDecimal -> Prop`
   non-executable
  {-# inline (===)constant `Prelude.Eq.(===)`
   constant of type-class instance `EqP BuiltInDecimal`
   type `BuiltInDecimal -> BuiltInDecimal -> Prop`
   non-executable #-}
end-instance

instance Eqtype-class `Prelude.Eq.Eq`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.EqP 'a
   has default derive templates BuiltInDecimaltype `Prelude.Literal.BuiltInDecimal`
   kind `*`
   executable where
  define (==)constant `Prelude.Eq.(==)`
   constant of type-class instance `Eq BuiltInDecimal`
   type `BuiltInDecimal -> BuiltInDecimal -> Bool`
   executable := builtInDecimalEqconstant `Prelude.Literal.builtInDecimalEq`
   constant
   type `BuiltInDecimal -> BuiltInDecimal -> Bool`
   executable
  {-# inline (==)constant `Prelude.Eq.(==)`
   constant of type-class instance `Eq BuiltInDecimal`
   type `BuiltInDecimal -> BuiltInDecimal -> Bool`
   executable #-}
end-instance

-- | type class for making decimal literals
class LiteralNumtype-class `Prelude.Literal.LiteralNum`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.Eq 'a
   statically-resolved 'atype-variable `'a`
   kind `*` => LiteralDecimal 'atype-variable `'a`
   kind `*` where
  declare mkLiteralDecimalconstant `Prelude.Literal.mkLiteralDecimal`
   statically resolved constant of type-class `LiteralDecimal`
   type `BuiltInDecimal -> 'a`
   executable :: BuiltInDecimaltype `Prelude.Literal.BuiltInDecimal`
   kind `*`
   executable -> 'atype-variable `'a`
   kind `*`
end-class
{-# static resolve LiteralDecimaltype-class `Prelude.Literal.LiteralDecimal`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Literal.LiteralNum 'a
   statically-resolved #-}

instance LiteralNumtype-class `Prelude.Literal.LiteralNum`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.Eq 'a
   statically-resolved BuiltInDecimaltype `Prelude.Literal.BuiltInDecimal`
   kind `*`
   executable where
  define mkLiteralNumconstant `Prelude.Literal.mkLiteralNum`
   constant of type-class instance `LiteralNum BuiltInDecimal`
   type `(BuiltInNumRep, BuiltInNum) -> BuiltInDecimal`
   executable (_, ivariable `i`
   type `BuiltInNum`) := builtInNumToDecimalconstant `Prelude.Literal.builtInNumToDecimal`
   constant
   type `BuiltInNum -> BuiltInDecimal`
   executable ivariable `i`
   type `BuiltInNum`
  {-# inline mkLiteralNumconstant `Prelude.Literal.mkLiteralNum`
   constant of type-class instance `LiteralNum BuiltInDecimal`
   type `(BuiltInNumRep, BuiltInNum) -> BuiltInDecimal`
   executable #-}
end-instance

instance LiteralDecimaltype-class `Prelude.Literal.LiteralDecimal`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Literal.LiteralNum 'a
   statically-resolved BuiltInDecimaltype `Prelude.Literal.BuiltInDecimal`
   kind `*`
   executable where
  define mkLiteralDecimalconstant `Prelude.Literal.mkLiteralDecimal`
   constant of type-class instance `LiteralDecimal BuiltInDecimal`
   type `BuiltInDecimal -> BuiltInDecimal`
   executable dvariable `d`
   type `BuiltInDecimal` := dvariable `d`
   type `BuiltInDecimal`
  {-# inline mkLiteralDecimalconstant `Prelude.Literal.mkLiteralDecimal`
   constant of type-class instance `LiteralDecimal BuiltInDecimal`
   type `BuiltInDecimal -> BuiltInDecimal`
   executable #-}
end-instance


end-moduleend of module Prelude.Literal