{-# 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.Sum 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.Maybe
import qualified MAlonzo.Code.Agda.Builtin.Unit
import qualified MAlonzo.Code.Agda.Primitive
import qualified MAlonzo.Code.Data.Sum.Base
import qualified MAlonzo.Code.Level
d_isInj'8321'_16 ::
MAlonzo.Code.Agda.Primitive.T_Level_14 ->
MAlonzo.Code.Agda.Primitive.T_Level_14 ->
() ->
() -> MAlonzo.Code.Data.Sum.Base.T__'8846'__30 -> Maybe AgdaAny
d_isInj'8321'_16 ~v0 ~v1 ~v2 ~v3 v4 = du_isInj'8321'_16 v4
du_isInj'8321'_16 ::
MAlonzo.Code.Data.Sum.Base.T__'8846'__30 -> Maybe AgdaAny
du_isInj'8321'_16 v0
= case coe v0 of
MAlonzo.Code.Data.Sum.Base.C_inj'8321'_38 v1
-> coe MAlonzo.Code.Agda.Builtin.Maybe.C_just_16 (coe v1)
MAlonzo.Code.Data.Sum.Base.C_inj'8322'_42 v1
-> coe MAlonzo.Code.Agda.Builtin.Maybe.C_nothing_18
_ -> MAlonzo.RTE.mazUnreachableError
d_isInj'8322'_22 ::
MAlonzo.Code.Agda.Primitive.T_Level_14 ->
MAlonzo.Code.Agda.Primitive.T_Level_14 ->
() ->
() -> MAlonzo.Code.Data.Sum.Base.T__'8846'__30 -> Maybe AgdaAny
d_isInj'8322'_22 ~v0 ~v1 ~v2 ~v3 v4 = du_isInj'8322'_22 v4
du_isInj'8322'_22 ::
MAlonzo.Code.Data.Sum.Base.T__'8846'__30 -> Maybe AgdaAny
du_isInj'8322'_22 v0
= case coe v0 of
MAlonzo.Code.Data.Sum.Base.C_inj'8321'_38 v1
-> coe MAlonzo.Code.Agda.Builtin.Maybe.C_nothing_18
MAlonzo.Code.Data.Sum.Base.C_inj'8322'_42 v1
-> coe MAlonzo.Code.Agda.Builtin.Maybe.C_just_16 (coe v1)
_ -> MAlonzo.RTE.mazUnreachableError
d_From'45'inj'8321'_28 ::
MAlonzo.Code.Agda.Primitive.T_Level_14 ->
MAlonzo.Code.Agda.Primitive.T_Level_14 ->
() -> () -> MAlonzo.Code.Data.Sum.Base.T__'8846'__30 -> ()
d_From'45'inj'8321'_28 = erased
d_from'45'inj'8321'_32 ::
MAlonzo.Code.Data.Sum.Base.T__'8846'__30 -> AgdaAny
d_from'45'inj'8321'_32 v0
= case coe v0 of
MAlonzo.Code.Data.Sum.Base.C_inj'8321'_38 v1 -> coe v1
MAlonzo.Code.Data.Sum.Base.C_inj'8322'_42 v1
-> coe
MAlonzo.Code.Level.C_lift_20
(coe MAlonzo.Code.Agda.Builtin.Unit.C_tt_8)
_ -> MAlonzo.RTE.mazUnreachableError
d_From'45'inj'8322'_36 ::
MAlonzo.Code.Agda.Primitive.T_Level_14 ->
MAlonzo.Code.Agda.Primitive.T_Level_14 ->
() -> () -> MAlonzo.Code.Data.Sum.Base.T__'8846'__30 -> ()
d_From'45'inj'8322'_36 = erased
d_from'45'inj'8322'_40 ::
MAlonzo.Code.Data.Sum.Base.T__'8846'__30 -> AgdaAny
d_from'45'inj'8322'_40 v0
= case coe v0 of
MAlonzo.Code.Data.Sum.Base.C_inj'8321'_38 v1
-> coe
MAlonzo.Code.Level.C_lift_20
(coe MAlonzo.Code.Agda.Builtin.Unit.C_tt_8)
MAlonzo.Code.Data.Sum.Base.C_inj'8322'_42 v1 -> coe v1
_ -> MAlonzo.RTE.mazUnreachableError