{-# 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.Data.Integer 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.String
import qualified MAlonzo.Code.Data.Integer.Base
import qualified MAlonzo.Code.Data.Nat.Show
import qualified MAlonzo.Code.Data.Sign.Base
import qualified MAlonzo.Code.Data.String.Base

-- Data.Integer.show
d_show_4 :: Integer -> MAlonzo.Code.Agda.Builtin.String.T_String_6
d_show_4 :: Integer -> Text
d_show_4 Integer
v0
  = (Text -> Text -> Text) -> Any -> Text -> Text
forall a b. a -> b
coe
      Text -> Text -> Text
MAlonzo.Code.Data.String.Base.d__'43''43'__20
      ((T_Sign_6 -> Text) -> Any -> Any
forall a b. a -> b
coe
         T_Sign_6 -> Text
du_showSign_12
         ((Integer -> T_Sign_6) -> Any -> Any
forall a b. a -> b
coe Integer -> T_Sign_6
MAlonzo.Code.Data.Integer.Base.d_sign_24 (Integer -> Any
forall a b. a -> b
coe Integer
v0)))
      (Integer -> Text
MAlonzo.Code.Data.Nat.Show.d_show_56
         ((Integer -> Integer) -> Any -> Integer
forall a b. a -> b
coe Integer -> Integer
MAlonzo.Code.Data.Integer.Base.d_'8739'_'8739'_18 (Integer -> Any
forall a b. a -> b
coe Integer
v0)))
-- Data.Integer._.showSign
d_showSign_12 ::
  Integer ->
  MAlonzo.Code.Data.Sign.Base.T_Sign_6 ->
  MAlonzo.Code.Agda.Builtin.String.T_String_6
d_showSign_12 :: Integer -> T_Sign_6 -> Text
d_showSign_12 ~Integer
v0 T_Sign_6
v1 = T_Sign_6 -> Text
du_showSign_12 T_Sign_6
v1
du_showSign_12 ::
  MAlonzo.Code.Data.Sign.Base.T_Sign_6 ->
  MAlonzo.Code.Agda.Builtin.String.T_String_6
du_showSign_12 :: T_Sign_6 -> Text
du_showSign_12 T_Sign_6
v0
  = case T_Sign_6 -> T_Sign_6
forall a b. a -> b
coe T_Sign_6
v0 of
      T_Sign_6
MAlonzo.Code.Data.Sign.Base.C_'45'_8 -> Text -> Text
forall a b. a -> b
coe (Text
"-" :: Data.Text.Text)
      T_Sign_6
MAlonzo.Code.Data.Sign.Base.C_'43'_10 -> Text -> Text
forall a b. a -> b
coe (Text
"" :: Data.Text.Text)
      T_Sign_6
_ -> Text
forall a. a
MAlonzo.RTE.mazUnreachableError