    {-# OPTIONS_GHC -Wunused-imports #-}

    {-# OPTIONS_GHC -fno-warn-orphans     #-}
    {-# OPTIONS_GHC -fwarn-unused-imports #-}

    module Agda.TypeChecking.Serialise.Instances.Compilers where

    import Agda.TypeChecking.Serialise.Base
    import Agda.TypeChecking.Serialise.Instances.Common

    import Agda.TypeChecking.Monad

    instance EmbPrj CompilerPragma where
      icod_ :: CompilerPragma -> S Word32
    icod_ (CompilerPragma Range
    a String
    b) =
        (SerialisedRange -> String -> CompilerPragma)
    -> Arrows
         (Domains (SerialisedRange -> String -> CompilerPragma)) (S Word32)
    forall t.
    (ICODE t (IsBase t), StrictCurrying (Domains t) (S Word32),
     All EmbPrj (Domains t)) =>
    t -> Arrows (Domains t) (S Word32)
    icodeN' (Range -> String -> CompilerPragma
    CompilerPragma (Range -> String -> CompilerPragma)
    -> (SerialisedRange -> Range)
    -> SerialisedRange
    -> String
    -> CompilerPragma
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . SerialisedRange -> Range
    underlyingRange) (Range -> SerialisedRange
    SerialisedRange Range
    a) String
    b

      value :: Word32 -> R CompilerPragma
    value = (SerialisedRange -> String -> CompilerPragma)
    -> Word32
    -> R (CoDomain (SerialisedRange -> String -> CompilerPragma))
    forall t.
    (VALU t (IsBase t), All EmbPrj (CoDomain t : Domains t)) =>
    t -> Word32 -> R (CoDomain t)
    valueN (Range -> String -> CompilerPragma
    CompilerPragma (Range -> String -> CompilerPragma)
    -> (SerialisedRange -> Range)
    -> SerialisedRange
    -> String
    -> CompilerPragma
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . SerialisedRange -> Range
    underlyingRange)

    instance EmbPrj ForeignCode where
      icod_ :: ForeignCode -> S Word32
    icod_ (ForeignCode Range
    r String
    a) =
        (SerialisedRange -> String -> ForeignCode)
    -> Arrows
         (Domains (SerialisedRange -> String -> ForeignCode)) (S Word32)
    forall t.
    (ICODE t (IsBase t), StrictCurrying (Domains t) (S Word32),
     All EmbPrj (Domains t)) =>
    t -> Arrows (Domains t) (S Word32)
    icodeN' (Range -> String -> ForeignCode
    ForeignCode (Range -> String -> ForeignCode)
    -> (SerialisedRange -> Range)
    -> SerialisedRange
    -> String
    -> ForeignCode
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . SerialisedRange -> Range
    underlyingRange) (Range -> SerialisedRange
    SerialisedRange Range
    r) String
    a

      value :: Word32 -> R ForeignCode
    value = (SerialisedRange -> String -> ForeignCode)
    -> Word32
    -> R (CoDomain (SerialisedRange -> String -> ForeignCode))
    forall t.
    (VALU t (IsBase t), All EmbPrj (CoDomain t : Domains t)) =>
    t -> Word32 -> R (CoDomain t)
    valueN (Range -> String -> ForeignCode
    ForeignCode (Range -> String -> ForeignCode)
    -> (SerialisedRange -> Range)
    -> SerialisedRange
    -> String
    -> ForeignCode
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . SerialisedRange -> Range
    underlyingRange)

    instance EmbPrj ForeignCodeStack where
      icod_ :: ForeignCodeStack -> S Word32
    icod_ = [ForeignCode] -> S Word32
    forall a. EmbPrj a => a -> S Word32
    icod_ ([ForeignCode] -> S Word32)
    -> (ForeignCodeStack -> [ForeignCode])
    -> ForeignCodeStack
    -> S Word32
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ForeignCodeStack -> [ForeignCode]
    getForeignCodeStack
      value :: Word32 -> R ForeignCodeStack
    value = ([ForeignCode] -> ForeignCodeStack)
    -> StateT St IO [ForeignCode] -> R ForeignCodeStack
    forall a b. (a -> b) -> StateT St IO a -> StateT St IO b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap [ForeignCode] -> ForeignCodeStack
    ForeignCodeStack (StateT St IO [ForeignCode] -> R ForeignCodeStack)
    -> (Word32 -> StateT St IO [ForeignCode])
    -> Word32
    -> R ForeignCodeStack
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Word32 -> StateT St IO [ForeignCode]
    forall a. EmbPrj a => Word32 -> R a
    value