Prelude/Char.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
module Prelude.Char (
  Chardatatype `Prelude.Char.Char`
   kind `*`
   executable,
  mkCharconstant `Prelude.Char.mkChar`
   constant
   type `BuiltInChar -> Char`
   executable,
  chrconstant `Prelude.Char.chr`
   constant
   type `Natural -> Char`
   executable,
  ordconstant `Prelude.Char.ord`
   constant
   type `Char -> Natural`
   executable
) where

{-# NoImplicitPrelude #-}

import Prelude.Eq
import Prelude.Bool
import Prelude.Ord
import Prelude.Num
import Prelude.Maybe
import Prelude.Literal
import Prelude.Default
import Prelude.BasicClasses

-- Characters are represented by their unicode-value
datatype Chardatatype `Prelude.Char.Char`
   kind `*`
   executable := Char Naturaldatatype `Prelude.Num.Natural`
   kind `*`
   executable

derive Chardatatype `Prelude.Char.Char`
   kind `*`
   executable instances (Eqtype-class `Prelude.Eq.Eq`
   arguments: ('a :: *)
   super-class constraints:
     - Prelude.Eq.EqP 'a
   has default derive templates
generated code: instance Eq Char where define (==) (Char x1) (Char y1) := (x1 == y1) end-instance
, EqPtype-class `Prelude.Eq.EqP` arguments: ('a :: *) has default derive templates derive-template labels - eq (only deriving) - full
generated code: instance EqP Char where define non-exec (===) x y := bool2prop (x == y) end-instance
, Ordtype-class `Prelude.Ord.Ord` arguments: ('a :: *) super-class constraints: - Prelude.Eq.Eq 'a has default derive templates
generated code: instance Ord Char where define compare (Char x1) (Char y1) := compare x1 y1 end-instance
)
instance Defaulttype-class `Prelude.Default.Default` arguments: ('a :: *) has default derive templates Chardatatype `Prelude.Char.Char` kind `*` executable where define defaultconstant `Prelude.Default.default` constant of type-class instance `Default Char` type `Char` executable := '-'type `Char` {-# inline defaultconstant `Prelude.Default.default` constant of type-class instance `Default Char` type `Char` executable #-} end-instance declare chrconstant `Prelude.Char.chr` constant type `Natural -> Char` executable :: Naturaldatatype `Prelude.Num.Natural` kind `*` executable -> Chardatatype `Prelude.Char.Char` kind `*` executable define chrconstant `Prelude.Char.chr` constant type `Natural -> Char` executable := Charconstant `Prelude.Char.Char` constructor of datatype `Char` type `Natural -> Char` executable declare ordconstant `Prelude.Char.ord` constant type `Char -> Natural` executable :: Chardatatype `Prelude.Char.Char` kind `*` executable -> Naturaldatatype `Prelude.Num.Natural` kind `*` executable define ordconstant `Prelude.Char.ord` constant type `Char -> Natural` executable (Charconstant `Prelude.Char.Char` constructor of datatype `Char` type `Natural -> Char` executable cvariable `c` type `Natural`) := cvariable `c` type `Natural` declare mkCharconstant `Prelude.Char.mkChar` constant type `BuiltInChar -> Char` executable :: BuiltInChartype `Prelude.Literal.BuiltInChar` kind `*` executable -> Chardatatype `Prelude.Char.Char` kind `*` executable instance LiteralChartype-class `Prelude.Literal.LiteralChar` arguments: ('a :: *) super-class constraints: - Prelude.Eq.Eq 'a statically-resolved Chardatatype `Prelude.Char.Char` kind `*` executable where define mkLiteralCharconstant `Prelude.Literal.mkLiteralChar` constant of type-class instance `LiteralChar Char` type `BuiltInChar -> Char` executable := mkCharconstant `Prelude.Char.mkChar` constant type `BuiltInChar -> Char` executable {-# inline mkLiteralCharconstant `Prelude.Literal.mkLiteralChar` constant of type-class instance `LiteralChar Char` type `BuiltInChar -> Char` executable #-} end-instance instance Enumtype-class `Prelude.BasicClasses.Enum` arguments: ('a :: *) super-class constraints: - Prelude.Ord.Ord 'a has default derive templates derive-template labels - simpleEnum Chardatatype `Prelude.Char.Char` kind `*` executable where define succconstant `Prelude.BasicClasses.succ` constant of type-class instance `Enum Char` type `Char -> Char` executable (Charconstant `Prelude.Char.Char` constructor of datatype `Char` type `Natural -> Char` executable cvariable `c` type `Natural`) := Charconstant `Prelude.Char.Char` constructor of datatype `Char` type `Natural -> Char` executable (succconstant `Prelude.BasicClasses.succ` constant of type-class `Enum` type `'a -> 'a` type in context `Natural -> Natural` executable statically resolved type-class instance cvariable `c` type `Natural`) define predconstant `Prelude.BasicClasses.pred` constant of type-class instance `Enum Char` type `Char -> Char` executable (Charconstant `Prelude.Char.Char` constructor of datatype `Char` type `Natural -> Char` executable cvariable `c` type `Natural`) := Charconstant `Prelude.Char.Char` constructor of datatype `Char` type `Natural -> Char` executable (predconstant `Prelude.BasicClasses.pred` constant of type-class `Enum` type `'a -> 'a` type in context `Natural -> Natural` executable statically resolved type-class instance cvariable `c` type `Natural`) define fromEnumconstant `Prelude.BasicClasses.fromEnum` constant of type-class instance `Enum Char` type `Char -> Natural` executable (Charconstant `Prelude.Char.Char` constructor of datatype `Char` type `Natural -> Char` executable cvariable `c` type `Natural`) := cvariable `c` type `Natural` define toEnumconstant `Prelude.BasicClasses.toEnum` constant of type-class instance `Enum Char` type `Natural -> Maybe Char` executable cvariable `c` type `Natural` := Justconstant `Prelude.Maybe.Just` constructor of datatype `Maybe` type `'a -> Maybe 'a` type in context `Char -> Maybe Char` executable (Charconstant `Prelude.Char.Char` constructor of datatype `Char` type `Natural -> Char` executable cvariable `c` type `Natural`) end-instance end-moduleend of module Prelude.Char