{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}

{-# OPTIONS_GHC -Wno-overlapping-patterns #-}

module MAlonzo.Code.Text.Printf where

import MAlonzo.RTE (coe, erased, AgdaAny, addInt, subInt, mulInt,
                    quotInt, remInt, geqInt, ltInt, eqInt, add64, sub64, mul64, quot64,
                    rem64, lt64, eq64, word64FromNat, word64ToNat)
import qualified MAlonzo.RTE
import qualified Data.Text
import qualified MAlonzo.Code.Agda.Builtin.Float
import qualified MAlonzo.Code.Agda.Builtin.String
import qualified MAlonzo.Code.Agda.Primitive
import qualified MAlonzo.Code.Data.Integer.Show
import qualified MAlonzo.Code.Data.Nat.Show
import qualified MAlonzo.Code.Data.String.Base
import qualified MAlonzo.Code.Data.Sum.Base
import qualified MAlonzo.Code.Text.Format
import qualified MAlonzo.Code.Text.Format.Generic
import qualified MAlonzo.Code.Text.Printf.Generic

-- Text.Printf.printfSpec
d_printfSpec_4 :: MAlonzo.Code.Text.Printf.Generic.T_PrintfSpec_18
d_printfSpec_4 :: T_PrintfSpec_18
d_printfSpec_4
  = ((Any -> Any -> Any) -> (T_String_6 -> Any) -> T_PrintfSpec_18)
-> Any -> Any -> T_PrintfSpec_18
forall a b. a -> b
coe
      (Any -> Any -> Any) -> (T_String_6 -> Any) -> T_PrintfSpec_18
MAlonzo.Code.Text.Printf.Generic.C_PrintfSpec'46'constructor_113
      ((Any -> Any) -> Any
forall a b. a -> b
coe
         (\ Any
v0 ->
            case Any -> T_ArgChunk_4
forall a b. a -> b
coe Any
v0 of
              T_ArgChunk_4
MAlonzo.Code.Text.Format.C_ℕArg_6
                -> (Integer -> T_String_6) -> Any
forall a b. a -> b
coe Integer -> T_String_6
MAlonzo.Code.Data.Nat.Show.d_show_56
              T_ArgChunk_4
MAlonzo.Code.Text.Format.C_ℤArg_8
                -> (Integer -> T_String_6) -> Any
forall a b. a -> b
coe Integer -> T_String_6
MAlonzo.Code.Data.Integer.Show.d_show_6
              T_ArgChunk_4
MAlonzo.Code.Text.Format.C_FloatArg_10
                -> (Double -> T_String_6) -> Any
forall a b. a -> b
coe Double -> T_String_6
MAlonzo.Code.Agda.Builtin.Float.d_primShowFloat_46
              T_ArgChunk_4
MAlonzo.Code.Text.Format.C_CharArg_12
                -> (T_Char_6 -> T_String_6) -> Any
forall a b. a -> b
coe T_Char_6 -> T_String_6
MAlonzo.Code.Data.String.Base.d_fromChar_16
              T_ArgChunk_4
MAlonzo.Code.Text.Format.C_StringArg_14 -> (Any -> Any) -> Any
forall a b. a -> b
coe (\ Any
v1 -> Any
v1)
              T_ArgChunk_4
_ -> Any
forall a. a
MAlonzo.RTE.mazUnreachableError))
      ((Any -> Any) -> Any
forall a b. a -> b
coe (\ Any
v0 -> Any
v0))
-- Text.Printf.Printf.Error
d_Error_8 :: p -> p -> ()
d_Error_8 p
a0 p
a1 = ()
-- Text.Printf.Printf.Printf
d_Printf_10 ::
  MAlonzo.Code.Agda.Primitive.T_Level_18 ->
  MAlonzo.Code.Data.Sum.Base.T__'8846'__30 -> () -> ()
d_Printf_10 :: () -> T__'8846'__30 -> () -> ()
d_Printf_10 = () -> T__'8846'__30 -> () -> ()
forall a. a
erased
-- Text.Printf.Printf.map
d_map_12 ::
  MAlonzo.Code.Agda.Primitive.T_Level_18 ->
  () ->
  MAlonzo.Code.Agda.Primitive.T_Level_18 ->
  () ->
  MAlonzo.Code.Data.Sum.Base.T__'8846'__30 ->
  (AgdaAny -> AgdaAny) -> AgdaAny -> AgdaAny
d_map_12 :: () -> () -> () -> () -> T__'8846'__30 -> (Any -> Any) -> Any -> Any
d_map_12 ()
v0 ()
v1 ()
v2 ()
v3 T__'8846'__30
v4 Any -> Any
v5 Any
v6
  = (T__'8846'__30 -> (Any -> Any) -> Any -> Any)
-> T__'8846'__30 -> (Any -> Any) -> Any -> Any
forall a b. a -> b
coe T__'8846'__30 -> (Any -> Any) -> Any -> Any
MAlonzo.Code.Text.Printf.Generic.du_map_118 T__'8846'__30
v4 Any -> Any
v5 Any
v6
-- Text.Printf._.assemble
d_assemble_18 ::
  [MAlonzo.Code.Text.Format.Generic.T_Chunk_60] ->
  AgdaAny -> [MAlonzo.Code.Agda.Builtin.String.T_String_6]
d_assemble_18 :: [T_Chunk_60] -> Any -> [T_String_6]
d_assemble_18
  = (T_PrintfSpec_18 -> [T_Chunk_60] -> Any -> [Any])
-> Any -> [T_Chunk_60] -> Any -> [T_String_6]
forall a b. a -> b
coe
      T_PrintfSpec_18 -> [T_Chunk_60] -> Any -> [Any]
MAlonzo.Code.Text.Printf.Generic.du_assemble_198
      (T_PrintfSpec_18 -> Any
forall a b. a -> b
coe T_PrintfSpec_18
d_printfSpec_4)
-- Text.Printf._.printf
d_printf_20 ::
  MAlonzo.Code.Agda.Builtin.String.T_String_6 -> AgdaAny
d_printf_20 :: T_String_6 -> Any
d_printf_20
  = (T_FormatSpec_6 -> T_PrintfSpec_18 -> T_String_6 -> Any)
-> Any -> Any -> T_String_6 -> Any
forall a b. a -> b
coe
      T_FormatSpec_6 -> T_PrintfSpec_18 -> T_String_6 -> Any
MAlonzo.Code.Text.Printf.Generic.du_printf_226
      (T_FormatSpec_6 -> Any
forall a b. a -> b
coe T_FormatSpec_6
MAlonzo.Code.Text.Format.d_formatSpec_22) (T_PrintfSpec_18 -> Any
forall a b. a -> b
coe T_PrintfSpec_18
d_printfSpec_4)
-- Text.Printf.printf
d_printf_24 ::
  MAlonzo.Code.Agda.Builtin.String.T_String_6 -> AgdaAny
d_printf_24 :: T_String_6 -> Any
d_printf_24 T_String_6
v0
  = (T__'8846'__30 -> (Any -> Any) -> Any -> Any)
-> Any -> Any -> Any -> Any
forall a b. a -> b
coe
      T__'8846'__30 -> (Any -> Any) -> Any -> Any
MAlonzo.Code.Text.Printf.Generic.du_map_118
      ((T_FormatSpec_6 -> T_String_6 -> T__'8846'__30)
-> Any -> Any -> Any
forall a b. a -> b
coe
         T_FormatSpec_6 -> T_String_6 -> T__'8846'__30
MAlonzo.Code.Text.Format.Generic.d_lexer_88
         (T_FormatSpec_6 -> Any
forall a b. a -> b
coe T_FormatSpec_6
MAlonzo.Code.Text.Format.d_formatSpec_22) (T_String_6 -> Any
forall a b. a -> b
coe T_String_6
v0))
      (([T_String_6] -> T_String_6) -> Any
forall a b. a -> b
coe [T_String_6] -> T_String_6
MAlonzo.Code.Data.String.Base.d_concat_28)
      ((T_FormatSpec_6 -> T_PrintfSpec_18 -> T_String_6 -> Any)
-> Any -> Any -> Any -> Any
forall a b. a -> b
coe
         T_FormatSpec_6 -> T_PrintfSpec_18 -> T_String_6 -> Any
MAlonzo.Code.Text.Printf.Generic.du_printf_226
         (T_FormatSpec_6 -> Any
forall a b. a -> b
coe T_FormatSpec_6
MAlonzo.Code.Text.Format.d_formatSpec_22) (T_PrintfSpec_18 -> Any
forall a b. a -> b
coe T_PrintfSpec_18
d_printfSpec_4)
         (T_String_6 -> Any
forall a b. a -> b
coe T_String_6
v0))