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
|
module Prelude.Default (
Defaulttype-class `Prelude.Default.Default`
arguments: ('a :: *)
has default derive templates(..)class-constant `default`
class-constant `undefined`
,
unreachableconstant `Prelude.Default.unreachable`
constant
type `Default 'a => 'a`
executable
) where
{-# NoImplicitPrelude #-}
class Default 'atype-variable `'a`
kind `*` where
declare defaultconstant `Prelude.Default.default`
constant of type-class `Default`
type `'a`
executable :: 'atype-variable `'a`
kind `*`
define defaultconstant `Prelude.Default.default`
default instance of type-class constant
type `'a`
executable := ???type `'a`
{-# inline defaultconstant `Prelude.Default.default`
default instance of type-class constant
type `'a`
executable #-}
declare undefinedconstant `Prelude.Default.undefined`
constant of type-class `Default`
type `'a`
executable :: 'atype-variable `'a`
kind `*`
define undefinedconstant `Prelude.Default.undefined`
default instance of type-class constant
type `'a -> 'a`
executable := defaultconstant `Prelude.Default.default`
constant of type-class `Default`
type `'a`
executable
same type-class instance
{-# inline undefinedconstant `Prelude.Default.undefined`
default instance of type-class constant
type `'a -> 'a`
executable #-}
end-class
declare unreachableconstant `Prelude.Default.unreachable`
constant
type `Default 'a => 'a`
executable :: Defaulttype-class `Prelude.Default.Default`
arguments: ('a :: *)
has default derive templates 'atype-variable `'a`
kind `*` => 'atype-variable `'a`
kind `*`
define unreachableconstant `Prelude.Default.unreachable`
constant
type `Default 'a => 'a`
executable := defaultconstant `Prelude.Default.default`
constant of type-class `Default`
type `'a`
executable
type-class instance from argument
{-# inline unreachableconstant `Prelude.Default.unreachable`
constant
type `Default 'a => 'a`
executable #-}
template DeriveInstanceDefaultBody (_ :: ClassID, ty :: TypeID, _ :: [String]) := '''
define default := ???
\{-# INLINE default #-\}
'''
register-derive-template Defaulttype-class `Prelude.Default.Default`
arguments: ('a :: *)
has default derive templates DeriveInstanceDefaultBodytemplate `Prelude.Default.DeriveInstanceDefaultBody`
argument-types: (ClassID, TypeID, [String])
return-type: -
end-moduleend of module Prelude.Default
|