    {-# LANGUAGE DeriveAnyClass             #-}
    {-# LANGUAGE DeriveDataTypeable         #-}
    {-# LANGUAGE DeriveGeneric              #-}
    {-# LANGUAGE DeriveLift                 #-}
    {-# LANGUAGE DeriveTraversable          #-}
    {-# LANGUAGE DerivingStrategies         #-}
    {-# LANGUAGE LambdaCase                 #-}
    {-# LANGUAGE OverloadedLists            #-}
    {-# LANGUAGE OverloadedStrings          #-}
    {-# LANGUAGE RankNTypes                 #-}
    {-# LANGUAGE RecordWildCards            #-}
    {-# LANGUAGE StandaloneDeriving         #-}
    {-# LANGUAGE UnicodeSyntax              #-}

    {-# OPTIONS_GHC -Wno-orphans #-}

    {-| This module contains the core syntax types and optics for them.

    'reservedIdentifiers', 'denote' and friends are included because they are
    involved in a dependency circle with "Dhall.Pretty.Internal".
    -}

    module Dhall.Syntax (
        -- * 'Expr'
          Const(..)
        , Var(..)
        , Binding(..)
        , makeBinding
        , CharacterSet(..)
        , Chunks(..)
        , DhallDouble(..)
        , PreferAnnotation(..)
        , Expr(..)
        , RecordField(..)
        , makeRecordField
        , FunctionBinding(..)
        , makeFunctionBinding
        , FieldSelection(..)
        , makeFieldSelection
        , WithComponent(..)

        -- ** 'Let'-blocks
        , MultiLet(..)
        , multiLet
        , wrapInLets

        -- ** Optics
        , subExpressions
        , subExpressionsWith
        , unsafeSubExpressions
        , chunkExprs
        , bindingExprs
        , recordFieldExprs
        , functionBindingExprs

        -- ** Handling 'Note's
        , denote
        , renote
        , shallowDenote

        -- * 'Import'
        , Directory(..)
        , File(..)
        , FilePrefix(..)
        , Import(..)
        , ImportHashed(..)
        , ImportMode(..)
        , ImportType(..)
        , URL(..)
        , Scheme(..)
        , pathCharacter

        -- * Reserved identifiers
        , reservedIdentifiers
        , reservedKeywords

        -- * `Data.Text.Text` manipulation
        , toDoubleQuoted
        , longestSharedWhitespacePrefix
        , linesLiteral
        , unlinesLiteral

        -- * Utilities
        , internalError
        -- `shift` should really be in `Dhall.Normalize`, but it's here to avoid a
        -- module cycle
        , shift
        ) where

    import                Control.DeepSeq            (NFData)
    import                Data.Bifunctor             (Bifunctor (..))
    import                Data.Bits                  (xor)
    import                Data.Data                  (Data)
    import                Data.Foldable
    import                Data.HashSet               (HashSet)
    import                Data.List.NonEmpty         (NonEmpty (..))
    import                Data.Sequence              (Seq)
    import                Data.String                (IsString (..))
    import                Data.Text                  (Text)
    import                Data.Traversable           ()
    import                Data.Void                  (Void)
    import                Dhall.Map                  (Map)
    import {-# SOURCE #-} Dhall.Pretty.Internal
    import                Dhall.Src                  (Src (..))
    import                GHC.Generics               (Generic)
    import                Instances.TH.Lift          ()
    import                Language.Haskell.TH.Syntax (Lift)
    import                Numeric.Natural            (Natural)
    import                Prettyprinter              (Doc, Pretty)
    import                Unsafe.Coerce              (unsafeCoerce)

    import qualified Control.Monad
    import qualified Data.Fixed         as Fixed
    import qualified Data.HashSet
    import qualified Data.List.NonEmpty as NonEmpty
    import qualified Data.Text
    import qualified Data.Time          as Time
    import qualified Dhall.Crypto
    import qualified Lens.Family        as Lens
    import qualified Network.URI        as URI
    import qualified Prettyprinter      as Pretty

    deriving instance Lift Time.Day
    deriving instance Lift Time.TimeOfDay
    deriving instance Lift Time.TimeZone
    deriving instance Lift (Fixed.Fixed a)

    -- $setup
    -- >>> import Dhall.Binary () -- For the orphan instance for `Serialise (Expr Void Import)`

    {-| Constants for a pure type system

        The axioms are:

    > ⊦ Type : Kind
    > ⊦ Kind : Sort

        ... and the valid rule pairs are:

    > ⊦ Type ↝ Type : Type  -- Functions from terms to terms (ordinary functions)
    > ⊦ Kind ↝ Type : Type  -- Functions from types to terms (type-polymorphic functions)
    > ⊦ Sort ↝ Type : Type  -- Functions from kinds to terms
    > ⊦ Kind ↝ Kind : Kind  -- Functions from types to types (type-level functions)
    > ⊦ Sort ↝ Kind : Sort  -- Functions from kinds to types (kind-polymorphic functions)
    > ⊦ Sort ↝ Sort : Sort  -- Functions from kinds to kinds (kind-level functions)

        Note that Dhall does not support functions from terms to types and therefore
        Dhall is not a dependently typed language
    -}
    data Const = Type | Kind | Sort
        deriving (Int -> Const -> ShowS
    [Const] -> ShowS
    Const -> String
    (Int -> Const -> ShowS)
    -> (Const -> String) -> ([Const] -> ShowS) -> Show Const
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Const -> ShowS
    showsPrec :: Int -> Const -> ShowS
    $cshow :: Const -> String
    show :: Const -> String
    $cshowList :: [Const] -> ShowS
    showList :: [Const] -> ShowS
    Show, Const -> Const -> Bool
    (Const -> Const -> Bool) -> (Const -> Const -> Bool) -> Eq Const
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Const -> Const -> Bool
    == :: Const -> Const -> Bool
    $c/= :: Const -> Const -> Bool
    /= :: Const -> Const -> Bool
    Eq, Eq Const
    Eq Const
    -> (Const -> Const -> Ordering)
    -> (Const -> Const -> Bool)
    -> (Const -> Const -> Bool)
    -> (Const -> Const -> Bool)
    -> (Const -> Const -> Bool)
    -> (Const -> Const -> Const)
    -> (Const -> Const -> Const)
    -> Ord Const
    Const -> Const -> Bool
    Const -> Const -> Ordering
    Const -> Const -> Const
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: Const -> Const -> Ordering
    compare :: Const -> Const -> Ordering
    $c< :: Const -> Const -> Bool
    < :: Const -> Const -> Bool
    $c<= :: Const -> Const -> Bool
    <= :: Const -> Const -> Bool
    $c> :: Const -> Const -> Bool
    > :: Const -> Const -> Bool
    $c>= :: Const -> Const -> Bool
    >= :: Const -> Const -> Bool
    $cmax :: Const -> Const -> Const
    max :: Const -> Const -> Const
    $cmin :: Const -> Const -> Const
    min :: Const -> Const -> Const
    Ord, Typeable Const
    Typeable Const
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> Const -> c Const)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c Const)
    -> (Const -> Constr)
    -> (Const -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c Const))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Const))
    -> ((forall b. Data b => b -> b) -> Const -> Const)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Const -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> Const -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Const -> m Const)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Const -> m Const)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Const -> m Const)
    -> Data Const
    Const -> Constr
    Const -> DataType
    (forall b. Data b => b -> b) -> Const -> Const
    forall a.
    Typeable a
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Const -> u
    forall u. (forall d. Data d => d -> u) -> Const -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Const -> m Const
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Const -> m Const
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Const
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Const -> c Const
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Const)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Const)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Const -> c Const
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Const -> c Const
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Const
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Const
    $ctoConstr :: Const -> Constr
    toConstr :: Const -> Constr
    $cdataTypeOf :: Const -> DataType
    dataTypeOf :: Const -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Const)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Const)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Const)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Const)
    $cgmapT :: (forall b. Data b => b -> b) -> Const -> Const
    gmapT :: (forall b. Data b => b -> b) -> Const -> Const
    $cgmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Const -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Const -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Const -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Const -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Const -> m Const
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Const -> m Const
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Const -> m Const
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Const -> m Const
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Const -> m Const
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Const -> m Const
    Data, Const
    Const -> Const -> Bounded Const
    forall a. a -> a -> Bounded a
    $cminBound :: Const
    minBound :: Const
    $cmaxBound :: Const
    maxBound :: Const
    Bounded, Int -> Const
    Const -> Int
    Const -> [Const]
    Const -> Const
    Const -> Const -> [Const]
    Const -> Const -> Const -> [Const]
    (Const -> Const)
    -> (Const -> Const)
    -> (Int -> Const)
    -> (Const -> Int)
    -> (Const -> [Const])
    -> (Const -> Const -> [Const])
    -> (Const -> Const -> [Const])
    -> (Const -> Const -> Const -> [Const])
    -> Enum Const
    forall a.
    (a -> a)
    -> (a -> a)
    -> (Int -> a)
    -> (a -> Int)
    -> (a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> a -> [a])
    -> Enum a
    $csucc :: Const -> Const
    succ :: Const -> Const
    $cpred :: Const -> Const
    pred :: Const -> Const
    $ctoEnum :: Int -> Const
    toEnum :: Int -> Const
    $cfromEnum :: Const -> Int
    fromEnum :: Const -> Int
    $cenumFrom :: Const -> [Const]
    enumFrom :: Const -> [Const]
    $cenumFromThen :: Const -> Const -> [Const]
    enumFromThen :: Const -> Const -> [Const]
    $cenumFromTo :: Const -> Const -> [Const]
    enumFromTo :: Const -> Const -> [Const]
    $cenumFromThenTo :: Const -> Const -> Const -> [Const]
    enumFromThenTo :: Const -> Const -> Const -> [Const]
    Enum, (forall x. Const -> Rep Const x)
    -> (forall x. Rep Const x -> Const) -> Generic Const
    forall x. Rep Const x -> Const
    forall x. Const -> Rep Const x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Const -> Rep Const x
    from :: forall x. Const -> Rep Const x
    $cto :: forall x. Rep Const x -> Const
    to :: forall x. Rep Const x -> Const
    Generic, (forall (m :: * -> *). Quote m => Const -> m Exp)
    -> (forall (m :: * -> *). Quote m => Const -> Code m Const)
    -> Lift Const
    forall t.
    (forall (m :: * -> *). Quote m => t -> m Exp)
    -> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
    forall (m :: * -> *). Quote m => Const -> m Exp
    forall (m :: * -> *). Quote m => Const -> Code m Const
    $clift :: forall (m :: * -> *). Quote m => Const -> m Exp
    lift :: forall (m :: * -> *). Quote m => Const -> m Exp
    $cliftTyped :: forall (m :: * -> *). Quote m => Const -> Code m Const
    liftTyped :: forall (m :: * -> *). Quote m => Const -> Code m Const
    Lift, Const -> ()
    (Const -> ()) -> NFData Const
    forall a. (a -> ()) -> NFData a
    $crnf :: Const -> ()
    rnf :: Const -> ()
    NFData)

    instance Pretty Const where
        pretty :: forall ann. Const -> Doc ann
    pretty = Doc Ann -> Doc ann
    forall ann xxx. Doc ann -> Doc xxx
    Pretty.unAnnotate (Doc Ann -> Doc ann) -> (Const -> Doc Ann) -> Const -> Doc ann
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Const -> Doc Ann
    prettyConst

    {-| Label for a bound variable

        The `Data.Text.Text` field is the variable's name (i.e. \"@x@\").

        The `Int` field disambiguates variables with the same name if there are
        multiple bound variables of the same name in scope.  Zero refers to the
        nearest bound variable and the index increases by one for each bound
        variable of the same name going outward.  The following diagram may help:

    >                               ┌──refers to──┐
    >                               │             │
    >                               v             │
    > λ(x : Type) → λ(y : Type) → λ(x : Type) → x@0
    >
    > ┌─────────────────refers to─────────────────┐
    > │                                           │
    > v                                           │
    > λ(x : Type) → λ(y : Type) → λ(x : Type) → x@1

        This `Int` behaves like a De Bruijn index in the special case where all
        variables have the same name.

        You can optionally omit the index if it is @0@:

    >                               ┌─refers to─┐
    >                               │           │
    >                               v           │
    > λ(x : Type) → λ(y : Type) → λ(x : Type) → x

        Zero indices are omitted when pretty-printing @Var@s and non-zero indices
        appear as a numeric suffix.
    -}
    data Var = V Text !Int
        deriving (Typeable Var
    Typeable Var
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> Var -> c Var)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c Var)
    -> (Var -> Constr)
    -> (Var -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c Var))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var))
    -> ((forall b. Data b => b -> b) -> Var -> Var)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Var -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> Var -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Var -> m Var)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Var -> m Var)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Var -> m Var)
    -> Data Var
    Var -> Constr
    Var -> DataType
    (forall b. Data b => b -> b) -> Var -> Var
    forall a.
    Typeable a
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Var -> u
    forall u. (forall d. Data d => d -> u) -> Var -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Var -> m Var
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Var -> m Var
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Var
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Var -> c Var
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Var)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Var -> c Var
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Var -> c Var
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Var
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Var
    $ctoConstr :: Var -> Constr
    toConstr :: Var -> Constr
    $cdataTypeOf :: Var -> DataType
    dataTypeOf :: Var -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Var)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Var)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var)
    $cgmapT :: (forall b. Data b => b -> b) -> Var -> Var
    gmapT :: (forall b. Data b => b -> b) -> Var -> Var
    $cgmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Var -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Var -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Var -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Var -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Var -> m Var
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Var -> m Var
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Var -> m Var
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Var -> m Var
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Var -> m Var
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Var -> m Var
    Data, (forall x. Var -> Rep Var x)
    -> (forall x. Rep Var x -> Var) -> Generic Var
    forall x. Rep Var x -> Var
    forall x. Var -> Rep Var x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Var -> Rep Var x
    from :: forall x. Var -> Rep Var x
    $cto :: forall x. Rep Var x -> Var
    to :: forall x. Rep Var x -> Var
    Generic, Var -> Var -> Bool
    (Var -> Var -> Bool) -> (Var -> Var -> Bool) -> Eq Var
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Var -> Var -> Bool
    == :: Var -> Var -> Bool
    $c/= :: Var -> Var -> Bool
    /= :: Var -> Var -> Bool
    Eq, Eq Var
    Eq Var
    -> (Var -> Var -> Ordering)
    -> (Var -> Var -> Bool)
    -> (Var -> Var -> Bool)
    -> (Var -> Var -> Bool)
    -> (Var -> Var -> Bool)
    -> (Var -> Var -> Var)
    -> (Var -> Var -> Var)
    -> Ord Var
    Var -> Var -> Bool
    Var -> Var -> Ordering
    Var -> Var -> Var
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: Var -> Var -> Ordering
    compare :: Var -> Var -> Ordering
    $c< :: Var -> Var -> Bool
    < :: Var -> Var -> Bool
    $c<= :: Var -> Var -> Bool
    <= :: Var -> Var -> Bool
    $c> :: Var -> Var -> Bool
    > :: Var -> Var -> Bool
    $c>= :: Var -> Var -> Bool
    >= :: Var -> Var -> Bool
    $cmax :: Var -> Var -> Var
    max :: Var -> Var -> Var
    $cmin :: Var -> Var -> Var
    min :: Var -> Var -> Var
    Ord, Int -> Var -> ShowS
    [Var] -> ShowS
    Var -> String
    (Int -> Var -> ShowS)
    -> (Var -> String) -> ([Var] -> ShowS) -> Show Var
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Var -> ShowS
    showsPrec :: Int -> Var -> ShowS
    $cshow :: Var -> String
    show :: Var -> String
    $cshowList :: [Var] -> ShowS
    showList :: [Var] -> ShowS
    Show, (forall (m :: * -> *). Quote m => Var -> m Exp)
    -> (forall (m :: * -> *). Quote m => Var -> Code m Var) -> Lift Var
    forall t.
    (forall (m :: * -> *). Quote m => t -> m Exp)
    -> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
    forall (m :: * -> *). Quote m => Var -> m Exp
    forall (m :: * -> *). Quote m => Var -> Code m Var
    $clift :: forall (m :: * -> *). Quote m => Var -> m Exp
    lift :: forall (m :: * -> *). Quote m => Var -> m Exp
    $cliftTyped :: forall (m :: * -> *). Quote m => Var -> Code m Var
    liftTyped :: forall (m :: * -> *). Quote m => Var -> Code m Var
    Lift, Var -> ()
    (Var -> ()) -> NFData Var
    forall a. (a -> ()) -> NFData a
    $crnf :: Var -> ()
    rnf :: Var -> ()
    NFData)

    instance IsString Var where
        fromString :: String -> Var
    fromString String
    str = Text -> Int -> Var
    V (String -> Text
    forall a. IsString a => String -> a
    fromString String
    str) Int
    0

    instance Pretty Var where
        pretty :: forall ann. Var -> Doc ann
    pretty = Doc Ann -> Doc ann
    forall ann xxx. Doc ann -> Doc xxx
    Pretty.unAnnotate (Doc Ann -> Doc ann) -> (Var -> Doc Ann) -> Var -> Doc ann
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Var -> Doc Ann
    prettyVar

    -- | Record the binding part of a @let@ expression.
    --
    -- For example,
    --
    -- > let {- A -} x {- B -} : {- C -} Bool = {- D -} True in x
    --
    -- … will be instantiated as follows:
    --
    -- * @bindingSrc0@ corresponds to the @A@ comment.
    -- * @variable@ is @"x"@
    -- * @bindingSrc1@ corresponds to the @B@ comment.
    -- * @annotation@ is 'Just' a pair, corresponding to the @C@ comment and @Bool@.
    -- * @bindingSrc2@ corresponds to the @D@ comment.
    -- * @value@ corresponds to @True@.
    data Binding s a = Binding
        { forall s a. Binding s a -> Maybe s
    bindingSrc0 :: Maybe s
        , forall s a. Binding s a -> Text
    variable    :: Text
        , forall s a. Binding s a -> Maybe s
    bindingSrc1 :: Maybe s
        , forall s a. Binding s a -> Maybe (Maybe s, Expr s a)
    annotation  :: Maybe (Maybe s, Expr s a)
        , forall s a. Binding s a -> Maybe s
    bindingSrc2 :: Maybe s
        , forall s a. Binding s a -> Expr s a
    value       :: Expr s a
        } deriving (Typeable (Binding s a)
    Typeable (Binding s a)
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> Binding s a -> c (Binding s a))
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (Binding s a))
    -> (Binding s a -> Constr)
    -> (Binding s a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (Binding s a)))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c (Binding s a)))
    -> ((forall b. Data b => b -> b) -> Binding s a -> Binding s a)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> Binding s a -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> Binding s a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Binding s a -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> Binding s a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a))
    -> Data (Binding s a)
    Binding s a -> Constr
    Binding s a -> DataType
    (forall b. Data b => b -> b) -> Binding s a -> Binding s a
    forall a.
    Typeable a
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Binding s a -> u
    forall u. (forall d. Data d => d -> u) -> Binding s a -> [u]
    forall {s} {a}. (Data s, Data a) => Typeable (Binding s a)
    forall s a. (Data s, Data a) => Binding s a -> Constr
    forall s a. (Data s, Data a) => Binding s a -> DataType
    forall s a.
    (Data s, Data a) =>
    (forall b. Data b => b -> b) -> Binding s a -> Binding s a
    forall s a u.
    (Data s, Data a) =>
    Int -> (forall d. Data d => d -> u) -> Binding s a -> u
    forall s a u.
    (Data s, Data a) =>
    (forall d. Data d => d -> u) -> Binding s a -> [u]
    forall s a r r'.
    (Data s, Data a) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Binding s a -> r
    forall s a r r'.
    (Data s, Data a) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Binding s a -> r
    forall s a (m :: * -> *).
    (Data s, Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a)
    forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a)
    forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Binding s a)
    forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Binding s a -> c (Binding s a)
    forall s a (t :: * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (Binding s a))
    forall s a (t :: * -> * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Binding s a))
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Binding s a -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Binding s a -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a)
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a)
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Binding s a)
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Binding s a -> c (Binding s a)
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Binding s a))
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Binding s a))
    $cgfoldl :: forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Binding s a -> c (Binding s a)
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Binding s a -> c (Binding s a)
    $cgunfold :: forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Binding s a)
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Binding s a)
    $ctoConstr :: forall s a. (Data s, Data a) => Binding s a -> Constr
    toConstr :: Binding s a -> Constr
    $cdataTypeOf :: forall s a. (Data s, Data a) => Binding s a -> DataType
    dataTypeOf :: Binding s a -> DataType
    $cdataCast1 :: forall s a (t :: * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (Binding s a))
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Binding s a))
    $cdataCast2 :: forall s a (t :: * -> * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Binding s a))
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Binding s a))
    $cgmapT :: forall s a.
    (Data s, Data a) =>
    (forall b. Data b => b -> b) -> Binding s a -> Binding s a
    gmapT :: (forall b. Data b => b -> b) -> Binding s a -> Binding s a
    $cgmapQl :: forall s a r r'.
    (Data s, Data a) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Binding s a -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Binding s a -> r
    $cgmapQr :: forall s a r r'.
    (Data s, Data a) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Binding s a -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Binding s a -> r
    $cgmapQ :: forall s a u.
    (Data s, Data a) =>
    (forall d. Data d => d -> u) -> Binding s a -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Binding s a -> [u]
    $cgmapQi :: forall s a u.
    (Data s, Data a) =>
    Int -> (forall d. Data d => d -> u) -> Binding s a -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Binding s a -> u
    $cgmapM :: forall s a (m :: * -> *).
    (Data s, Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a)
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a)
    $cgmapMp :: forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a)
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a)
    $cgmapMo :: forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a)
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a)
    Data, Binding s a -> Binding s a -> Bool
    (Binding s a -> Binding s a -> Bool)
    -> (Binding s a -> Binding s a -> Bool) -> Eq (Binding s a)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall s a. (Eq s, Eq a) => Binding s a -> Binding s a -> Bool
    $c== :: forall s a. (Eq s, Eq a) => Binding s a -> Binding s a -> Bool
    == :: Binding s a -> Binding s a -> Bool
    $c/= :: forall s a. (Eq s, Eq a) => Binding s a -> Binding s a -> Bool
    /= :: Binding s a -> Binding s a -> Bool
    Eq, (forall m. Monoid m => Binding s m -> m)
    -> (forall m a. Monoid m => (a -> m) -> Binding s a -> m)
    -> (forall m a. Monoid m => (a -> m) -> Binding s a -> m)
    -> (forall a b. (a -> b -> b) -> b -> Binding s a -> b)
    -> (forall a b. (a -> b -> b) -> b -> Binding s a -> b)
    -> (forall b a. (b -> a -> b) -> b -> Binding s a -> b)
    -> (forall b a. (b -> a -> b) -> b -> Binding s a -> b)
    -> (forall a. (a -> a -> a) -> Binding s a -> a)
    -> (forall a. (a -> a -> a) -> Binding s a -> a)
    -> (forall a. Binding s a -> [a])
    -> (forall a. Binding s a -> Bool)
    -> (forall a. Binding s a -> Int)
    -> (forall a. Eq a => a -> Binding s a -> Bool)
    -> (forall a. Ord a => Binding s a -> a)
    -> (forall a. Ord a => Binding s a -> a)
    -> (forall a. Num a => Binding s a -> a)
    -> (forall a. Num a => Binding s a -> a)
    -> Foldable (Binding s)
    forall a. Eq a => a -> Binding s a -> Bool
    forall a. Num a => Binding s a -> a
    forall a. Ord a => Binding s a -> a
    forall m. Monoid m => Binding s m -> m
    forall a. Binding s a -> Bool
    forall a. Binding s a -> Int
    forall a. Binding s a -> [a]
    forall a. (a -> a -> a) -> Binding s a -> a
    forall s a. Eq a => a -> Binding s a -> Bool
    forall s a. Num a => Binding s a -> a
    forall s a. Ord a => Binding s a -> a
    forall m a. Monoid m => (a -> m) -> Binding s a -> m
    forall s m. Monoid m => Binding s m -> m
    forall s a. Binding s a -> Bool
    forall s a. Binding s a -> Int
    forall s a. Binding s a -> [a]
    forall b a. (b -> a -> b) -> b -> Binding s a -> b
    forall a b. (a -> b -> b) -> b -> Binding s a -> b
    forall s a. (a -> a -> a) -> Binding s a -> a
    forall s m a. Monoid m => (a -> m) -> Binding s a -> m
    forall s b a. (b -> a -> b) -> b -> Binding s a -> b
    forall s a b. (a -> b -> b) -> b -> Binding s a -> b
    forall (t :: * -> *).
    (forall m. Monoid m => t m -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. t a -> [a])
    -> (forall a. t a -> Bool)
    -> (forall a. t a -> Int)
    -> (forall a. Eq a => a -> t a -> Bool)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> Foldable t
    $cfold :: forall s m. Monoid m => Binding s m -> m
    fold :: forall m. Monoid m => Binding s m -> m
    $cfoldMap :: forall s m a. Monoid m => (a -> m) -> Binding s a -> m
    foldMap :: forall m a. Monoid m => (a -> m) -> Binding s a -> m
    $cfoldMap' :: forall s m a. Monoid m => (a -> m) -> Binding s a -> m
    foldMap' :: forall m a. Monoid m => (a -> m) -> Binding s a -> m
    $cfoldr :: forall s a b. (a -> b -> b) -> b -> Binding s a -> b
    foldr :: forall a b. (a -> b -> b) -> b -> Binding s a -> b
    $cfoldr' :: forall s a b. (a -> b -> b) -> b -> Binding s a -> b
    foldr' :: forall a b. (a -> b -> b) -> b -> Binding s a -> b
    $cfoldl :: forall s b a. (b -> a -> b) -> b -> Binding s a -> b
    foldl :: forall b a. (b -> a -> b) -> b -> Binding s a -> b
    $cfoldl' :: forall s b a. (b -> a -> b) -> b -> Binding s a -> b
    foldl' :: forall b a. (b -> a -> b) -> b -> Binding s a -> b
    $cfoldr1 :: forall s a. (a -> a -> a) -> Binding s a -> a
    foldr1 :: forall a. (a -> a -> a) -> Binding s a -> a
    $cfoldl1 :: forall s a. (a -> a -> a) -> Binding s a -> a
    foldl1 :: forall a. (a -> a -> a) -> Binding s a -> a
    $ctoList :: forall s a. Binding s a -> [a]
    toList :: forall a. Binding s a -> [a]
    $cnull :: forall s a. Binding s a -> Bool
    null :: forall a. Binding s a -> Bool
    $clength :: forall s a. Binding s a -> Int
    length :: forall a. Binding s a -> Int
    $celem :: forall s a. Eq a => a -> Binding s a -> Bool
    elem :: forall a. Eq a => a -> Binding s a -> Bool
    $cmaximum :: forall s a. Ord a => Binding s a -> a
    maximum :: forall a. Ord a => Binding s a -> a
    $cminimum :: forall s a. Ord a => Binding s a -> a
    minimum :: forall a. Ord a => Binding s a -> a
    $csum :: forall s a. Num a => Binding s a -> a
    sum :: forall a. Num a => Binding s a -> a
    $cproduct :: forall s a. Num a => Binding s a -> a
    product :: forall a. Num a => Binding s a -> a
    Foldable, (forall a b. (a -> b) -> Binding s a -> Binding s b)
    -> (forall a b. a -> Binding s b -> Binding s a)
    -> Functor (Binding s)
    forall a b. a -> Binding s b -> Binding s a
    forall a b. (a -> b) -> Binding s a -> Binding s b
    forall s a b. a -> Binding s b -> Binding s a
    forall s a b. (a -> b) -> Binding s a -> Binding s b
    forall (f :: * -> *).
    (forall a b. (a -> b) -> f a -> f b)
    -> (forall a b. a -> f b -> f a) -> Functor f
    $cfmap :: forall s a b. (a -> b) -> Binding s a -> Binding s b
    fmap :: forall a b. (a -> b) -> Binding s a -> Binding s b
    $c<$ :: forall s a b. a -> Binding s b -> Binding s a
    <$ :: forall a b. a -> Binding s b -> Binding s a
    Functor, (forall x. Binding s a -> Rep (Binding s a) x)
    -> (forall x. Rep (Binding s a) x -> Binding s a)
    -> Generic (Binding s a)
    forall x. Rep (Binding s a) x -> Binding s a
    forall x. Binding s a -> Rep (Binding s a) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall s a x. Rep (Binding s a) x -> Binding s a
    forall s a x. Binding s a -> Rep (Binding s a) x
    $cfrom :: forall s a x. Binding s a -> Rep (Binding s a) x
    from :: forall x. Binding s a -> Rep (Binding s a) x
    $cto :: forall s a x. Rep (Binding s a) x -> Binding s a
    to :: forall x. Rep (Binding s a) x -> Binding s a
    Generic, (forall (m :: * -> *). Quote m => Binding s a -> m Exp)
    -> (forall (m :: * -> *).
        Quote m =>
        Binding s a -> Code m (Binding s a))
    -> Lift (Binding s a)
    forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    Binding s a -> m Exp
    forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    Binding s a -> Code m (Binding s a)
    forall t.
    (forall (m :: * -> *). Quote m => t -> m Exp)
    -> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
    forall (m :: * -> *). Quote m => Binding s a -> m Exp
    forall (m :: * -> *).
    Quote m =>
    Binding s a -> Code m (Binding s a)
    $clift :: forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    Binding s a -> m Exp
    lift :: forall (m :: * -> *). Quote m => Binding s a -> m Exp
    $cliftTyped :: forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    Binding s a -> Code m (Binding s a)
    liftTyped :: forall (m :: * -> *).
    Quote m =>
    Binding s a -> Code m (Binding s a)
    Lift, Binding s a -> ()
    (Binding s a -> ()) -> NFData (Binding s a)
    forall a. (a -> ()) -> NFData a
    forall s a. (NFData s, NFData a) => Binding s a -> ()
    $crnf :: forall s a. (NFData s, NFData a) => Binding s a -> ()
    rnf :: Binding s a -> ()
    NFData, Eq (Binding s a)
    Eq (Binding s a)
    -> (Binding s a -> Binding s a -> Ordering)
    -> (Binding s a -> Binding s a -> Bool)
    -> (Binding s a -> Binding s a -> Bool)
    -> (Binding s a -> Binding s a -> Bool)
    -> (Binding s a -> Binding s a -> Bool)
    -> (Binding s a -> Binding s a -> Binding s a)
    -> (Binding s a -> Binding s a -> Binding s a)
    -> Ord (Binding s a)
    Binding s a -> Binding s a -> Bool
    Binding s a -> Binding s a -> Ordering
    Binding s a -> Binding s a -> Binding s a
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall {s} {a}. (Ord s, Ord a) => Eq (Binding s a)
    forall s a. (Ord s, Ord a) => Binding s a -> Binding s a -> Bool
    forall s a.
    (Ord s, Ord a) =>
    Binding s a -> Binding s a -> Ordering
    forall s a.
    (Ord s, Ord a) =>
    Binding s a -> Binding s a -> Binding s a
    $ccompare :: forall s a.
    (Ord s, Ord a) =>
    Binding s a -> Binding s a -> Ordering
    compare :: Binding s a -> Binding s a -> Ordering
    $c< :: forall s a. (Ord s, Ord a) => Binding s a -> Binding s a -> Bool
    < :: Binding s a -> Binding s a -> Bool
    $c<= :: forall s a. (Ord s, Ord a) => Binding s a -> Binding s a -> Bool
    <= :: Binding s a -> Binding s a -> Bool
    $c> :: forall s a. (Ord s, Ord a) => Binding s a -> Binding s a -> Bool
    > :: Binding s a -> Binding s a -> Bool
    $c>= :: forall s a. (Ord s, Ord a) => Binding s a -> Binding s a -> Bool
    >= :: Binding s a -> Binding s a -> Bool
    $cmax :: forall s a.
    (Ord s, Ord a) =>
    Binding s a -> Binding s a -> Binding s a
    max :: Binding s a -> Binding s a -> Binding s a
    $cmin :: forall s a.
    (Ord s, Ord a) =>
    Binding s a -> Binding s a -> Binding s a
    min :: Binding s a -> Binding s a -> Binding s a
    Ord, Int -> Binding s a -> ShowS
    [Binding s a] -> ShowS
    Binding s a -> String
    (Int -> Binding s a -> ShowS)
    -> (Binding s a -> String)
    -> ([Binding s a] -> ShowS)
    -> Show (Binding s a)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall s a. (Show s, Show a) => Int -> Binding s a -> ShowS
    forall s a. (Show s, Show a) => [Binding s a] -> ShowS
    forall s a. (Show s, Show a) => Binding s a -> String
    $cshowsPrec :: forall s a. (Show s, Show a) => Int -> Binding s a -> ShowS
    showsPrec :: Int -> Binding s a -> ShowS
    $cshow :: forall s a. (Show s, Show a) => Binding s a -> String
    show :: Binding s a -> String
    $cshowList :: forall s a. (Show s, Show a) => [Binding s a] -> ShowS
    showList :: [Binding s a] -> ShowS
    Show, Functor (Binding s)
    Foldable (Binding s)
    Functor (Binding s)
    -> Foldable (Binding s)
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> Binding s a -> f (Binding s b))
    -> (forall (f :: * -> *) a.
        Applicative f =>
        Binding s (f a) -> f (Binding s a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> Binding s a -> m (Binding s b))
    -> (forall (m :: * -> *) a.
        Monad m =>
        Binding s (m a) -> m (Binding s a))
    -> Traversable (Binding s)
    forall s. Functor (Binding s)
    forall s. Foldable (Binding s)
    forall s (m :: * -> *) a.
    Monad m =>
    Binding s (m a) -> m (Binding s a)
    forall s (f :: * -> *) a.
    Applicative f =>
    Binding s (f a) -> f (Binding s a)
    forall s (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Binding s a -> m (Binding s b)
    forall s (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Binding s a -> f (Binding s b)
    forall (t :: * -> *).
    Functor t
    -> Foldable t
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> t a -> f (t b))
    -> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> t a -> m (t b))
    -> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
    -> Traversable t
    forall (m :: * -> *) a.
    Monad m =>
    Binding s (m a) -> m (Binding s a)
    forall (f :: * -> *) a.
    Applicative f =>
    Binding s (f a) -> f (Binding s a)
    forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Binding s a -> m (Binding s b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Binding s a -> f (Binding s b)
    $ctraverse :: forall s (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Binding s a -> f (Binding s b)
    traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Binding s a -> f (Binding s b)
    $csequenceA :: forall s (f :: * -> *) a.
    Applicative f =>
    Binding s (f a) -> f (Binding s a)
    sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    Binding s (f a) -> f (Binding s a)
    $cmapM :: forall s (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Binding s a -> m (Binding s b)
    mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Binding s a -> m (Binding s b)
    $csequence :: forall s (m :: * -> *) a.
    Monad m =>
    Binding s (m a) -> m (Binding s a)
    sequence :: forall (m :: * -> *) a.
    Monad m =>
    Binding s (m a) -> m (Binding s a)
    Traversable)

    instance Bifunctor Binding where
        first :: forall a b c. (a -> b) -> Binding a c -> Binding b c
    first a -> b
    k (Binding Maybe a
    src0 Text
    a Maybe a
    src1 Maybe (Maybe a, Expr a c)
    b Maybe a
    src2 Expr a c
    c) =
            Maybe b
    -> Text
    -> Maybe b
    -> Maybe (Maybe b, Expr b c)
    -> Maybe b
    -> Expr b c
    -> Binding b c
    forall s a.
    Maybe s
    -> Text
    -> Maybe s
    -> Maybe (Maybe s, Expr s a)
    -> Maybe s
    -> Expr s a
    -> Binding s a
    Binding ((a -> b) -> Maybe a -> Maybe b
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> b
    k Maybe a
    src0) Text
    a ((a -> b) -> Maybe a -> Maybe b
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> b
    k Maybe a
    src1) (((Maybe a, Expr a c) -> (Maybe b, Expr b c))
    -> Maybe (Maybe a, Expr a c) -> Maybe (Maybe b, Expr b c)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap (Maybe a, Expr a c) -> (Maybe b, Expr b c)
    forall {f :: * -> *} {p :: * -> * -> *} {c}.
    (Functor f, Bifunctor p) =>
    (f a, p a c) -> (f b, p b c)
    adapt0 Maybe (Maybe a, Expr a c)
    b) ((a -> b) -> Maybe a -> Maybe b
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> b
    k Maybe a
    src2) ((a -> b) -> Expr a c -> Expr b c
    forall a b c. (a -> b) -> Expr a c -> Expr b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k Expr a c
    c)
          where
            adapt0 :: (f a, p a c) -> (f b, p b c)
    adapt0 (f a
    src3, p a c
    d) = ((a -> b) -> f a -> f b
    forall a b. (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> b
    k f a
    src3, (a -> b) -> p a c -> p b c
    forall a b c. (a -> b) -> p a c -> p b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k p a c
    d)

        second :: forall b c a. (b -> c) -> Binding a b -> Binding a c
    second = (b -> c) -> Binding a b -> Binding a c
    forall a b. (a -> b) -> Binding a a -> Binding a b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap

    {-| Construct a 'Binding' with no source information and no type annotation.
    -}
    makeBinding :: Text -> Expr s a -> Binding s a
    makeBinding :: forall s a. Text -> Expr s a -> Binding s a
    makeBinding Text
    name = Maybe s
    -> Text
    -> Maybe s
    -> Maybe (Maybe s, Expr s a)
    -> Maybe s
    -> Expr s a
    -> Binding s a
    forall s a.
    Maybe s
    -> Text
    -> Maybe s
    -> Maybe (Maybe s, Expr s a)
    -> Maybe s
    -> Expr s a
    -> Binding s a
    Binding Maybe s
    forall a. Maybe a
    Nothing Text
    name Maybe s
    forall a. Maybe a
    Nothing Maybe (Maybe s, Expr s a)
    forall a. Maybe a
    Nothing Maybe s
    forall a. Maybe a
    Nothing

    -- | This wrapper around 'Prelude.Double' exists for its 'Eq' instance which is
    -- defined via the binary encoding of Dhall @Double@s.
    newtype DhallDouble = DhallDouble { DhallDouble -> Double
    getDhallDouble :: Double }
        deriving stock (Int -> DhallDouble -> ShowS
    [DhallDouble] -> ShowS
    DhallDouble -> String
    (Int -> DhallDouble -> ShowS)
    -> (DhallDouble -> String)
    -> ([DhallDouble] -> ShowS)
    -> Show DhallDouble
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> DhallDouble -> ShowS
    showsPrec :: Int -> DhallDouble -> ShowS
    $cshow :: DhallDouble -> String
    show :: DhallDouble -> String
    $cshowList :: [DhallDouble] -> ShowS
    showList :: [DhallDouble] -> ShowS
    Show, Typeable DhallDouble
    Typeable DhallDouble
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> DhallDouble -> c DhallDouble)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c DhallDouble)
    -> (DhallDouble -> Constr)
    -> (DhallDouble -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c DhallDouble))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c DhallDouble))
    -> ((forall b. Data b => b -> b) -> DhallDouble -> DhallDouble)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> DhallDouble -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> DhallDouble -> r)
    -> (forall u. (forall d. Data d => d -> u) -> DhallDouble -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> DhallDouble -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble)
    -> Data DhallDouble
    DhallDouble -> Constr
    DhallDouble -> DataType
    (forall b. Data b => b -> b) -> DhallDouble -> DhallDouble
    forall a.
    Typeable a
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> DhallDouble -> u
    forall u. (forall d. Data d => d -> u) -> DhallDouble -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> DhallDouble -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> DhallDouble -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DhallDouble
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> DhallDouble -> c DhallDouble
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DhallDouble)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DhallDouble)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> DhallDouble -> c DhallDouble
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> DhallDouble -> c DhallDouble
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DhallDouble
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DhallDouble
    $ctoConstr :: DhallDouble -> Constr
    toConstr :: DhallDouble -> Constr
    $cdataTypeOf :: DhallDouble -> DataType
    dataTypeOf :: DhallDouble -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DhallDouble)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DhallDouble)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DhallDouble)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DhallDouble)
    $cgmapT :: (forall b. Data b => b -> b) -> DhallDouble -> DhallDouble
    gmapT :: (forall b. Data b => b -> b) -> DhallDouble -> DhallDouble
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> DhallDouble -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> DhallDouble -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> DhallDouble -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> DhallDouble -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> DhallDouble -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> DhallDouble -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DhallDouble -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DhallDouble -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble
    Data, (forall (m :: * -> *). Quote m => DhallDouble -> m Exp)
    -> (forall (m :: * -> *).
        Quote m =>
        DhallDouble -> Code m DhallDouble)
    -> Lift DhallDouble
    forall t.
    (forall (m :: * -> *). Quote m => t -> m Exp)
    -> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
    forall (m :: * -> *). Quote m => DhallDouble -> m Exp
    forall (m :: * -> *). Quote m => DhallDouble -> Code m DhallDouble
    $clift :: forall (m :: * -> *). Quote m => DhallDouble -> m Exp
    lift :: forall (m :: * -> *). Quote m => DhallDouble -> m Exp
    $cliftTyped :: forall (m :: * -> *). Quote m => DhallDouble -> Code m DhallDouble
    liftTyped :: forall (m :: * -> *). Quote m => DhallDouble -> Code m DhallDouble
    Lift, (forall x. DhallDouble -> Rep DhallDouble x)
    -> (forall x. Rep DhallDouble x -> DhallDouble)
    -> Generic DhallDouble
    forall x. Rep DhallDouble x -> DhallDouble
    forall x. DhallDouble -> Rep DhallDouble x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. DhallDouble -> Rep DhallDouble x
    from :: forall x. DhallDouble -> Rep DhallDouble x
    $cto :: forall x. Rep DhallDouble x -> DhallDouble
    to :: forall x. Rep DhallDouble x -> DhallDouble
    Generic)
        deriving anyclass DhallDouble -> ()
    (DhallDouble -> ()) -> NFData DhallDouble
    forall a. (a -> ()) -> NFData a
    $crnf :: DhallDouble -> ()
    rnf :: DhallDouble -> ()
    NFData

    -- | This instance satisfies all the customary 'Eq' laws except substitutivity.
    --
    -- In particular:
    --
    -- >>> nan = DhallDouble (0/0)
    -- >>> nan == nan
    -- True
    --
    -- This instance is also consistent with with the binary encoding of Dhall @Double@s:
    --
    -- >>> toBytes n = Dhall.Binary.encodeExpression (DoubleLit n :: Expr Void Import)
    --
    -- prop> \a b -> (a == b) == (toBytes a == toBytes b)
    instance Eq DhallDouble where
        DhallDouble Double
    a == :: DhallDouble -> DhallDouble -> Bool
    == DhallDouble Double
    b
            | Double -> Bool
    forall a. RealFloat a => a -> Bool
    isNaN Double
    a Bool -> Bool -> Bool
    && Double -> Bool
    forall a. RealFloat a => a -> Bool
    isNaN Double
    b                      = Bool
    True
            | Double -> Bool
    forall a. RealFloat a => a -> Bool
    isNegativeZero Double
    a Bool -> Bool -> Bool
    forall a. Bits a => a -> a -> a
    `xor` Double -> Bool
    forall a. RealFloat a => a -> Bool
    isNegativeZero Double
    b = Bool
    False
            | Bool
    otherwise                               = Double
    a Double -> Double -> Bool
    forall a. Eq a => a -> a -> Bool
    == Double
    b

    -- | This instance relies on the 'Eq' instance for 'DhallDouble' but cannot
    -- satisfy the customary 'Ord' laws when @NaN@ is involved.
    instance Ord DhallDouble where
        compare :: DhallDouble -> DhallDouble -> Ordering
    compare a :: DhallDouble
    a@(DhallDouble Double
    a') b :: DhallDouble
    b@(DhallDouble Double
    b') =
            if DhallDouble
    a DhallDouble -> DhallDouble -> Bool
    forall a. Eq a => a -> a -> Bool
    == DhallDouble
    b
                then Ordering
    EQ
                else Double -> Double -> Ordering
    forall a. Ord a => a -> a -> Ordering
    compare Double
    a' Double
    b'

    -- | The body of an interpolated @Text@ literal
    data Chunks s a = Chunks [(Text, Expr s a)] Text
        deriving ((forall a b. (a -> b) -> Chunks s a -> Chunks s b)
    -> (forall a b. a -> Chunks s b -> Chunks s a)
    -> Functor (Chunks s)
    forall a b. a -> Chunks s b -> Chunks s a
    forall a b. (a -> b) -> Chunks s a -> Chunks s b
    forall s a b. a -> Chunks s b -> Chunks s a
    forall s a b. (a -> b) -> Chunks s a -> Chunks s b
    forall (f :: * -> *).
    (forall a b. (a -> b) -> f a -> f b)
    -> (forall a b. a -> f b -> f a) -> Functor f
    $cfmap :: forall s a b. (a -> b) -> Chunks s a -> Chunks s b
    fmap :: forall a b. (a -> b) -> Chunks s a -> Chunks s b
    $c<$ :: forall s a b. a -> Chunks s b -> Chunks s a
    <$ :: forall a b. a -> Chunks s b -> Chunks s a
    Functor, (forall m. Monoid m => Chunks s m -> m)
    -> (forall m a. Monoid m => (a -> m) -> Chunks s a -> m)
    -> (forall m a. Monoid m => (a -> m) -> Chunks s a -> m)
    -> (forall a b. (a -> b -> b) -> b -> Chunks s a -> b)
    -> (forall a b. (a -> b -> b) -> b -> Chunks s a -> b)
    -> (forall b a. (b -> a -> b) -> b -> Chunks s a -> b)
    -> (forall b a. (b -> a -> b) -> b -> Chunks s a -> b)
    -> (forall a. (a -> a -> a) -> Chunks s a -> a)
    -> (forall a. (a -> a -> a) -> Chunks s a -> a)
    -> (forall a. Chunks s a -> [a])
    -> (forall a. Chunks s a -> Bool)
    -> (forall a. Chunks s a -> Int)
    -> (forall a. Eq a => a -> Chunks s a -> Bool)
    -> (forall a. Ord a => Chunks s a -> a)
    -> (forall a. Ord a => Chunks s a -> a)
    -> (forall a. Num a => Chunks s a -> a)
    -> (forall a. Num a => Chunks s a -> a)
    -> Foldable (Chunks s)
    forall a. Eq a => a -> Chunks s a -> Bool
    forall a. Num a => Chunks s a -> a
    forall a. Ord a => Chunks s a -> a
    forall m. Monoid m => Chunks s m -> m
    forall a. Chunks s a -> Bool
    forall a. Chunks s a -> Int
    forall a. Chunks s a -> [a]
    forall a. (a -> a -> a) -> Chunks s a -> a
    forall s a. Eq a => a -> Chunks s a -> Bool
    forall s a. Num a => Chunks s a -> a
    forall s a. Ord a => Chunks s a -> a
    forall m a. Monoid m => (a -> m) -> Chunks s a -> m
    forall s m. Monoid m => Chunks s m -> m
    forall s a. Chunks s a -> Bool
    forall s a. Chunks s a -> Int
    forall s a. Chunks s a -> [a]
    forall b a. (b -> a -> b) -> b -> Chunks s a -> b
    forall a b. (a -> b -> b) -> b -> Chunks s a -> b
    forall s a. (a -> a -> a) -> Chunks s a -> a
    forall s m a. Monoid m => (a -> m) -> Chunks s a -> m
    forall s b a. (b -> a -> b) -> b -> Chunks s a -> b
    forall s a b. (a -> b -> b) -> b -> Chunks s a -> b
    forall (t :: * -> *).
    (forall m. Monoid m => t m -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. t a -> [a])
    -> (forall a. t a -> Bool)
    -> (forall a. t a -> Int)
    -> (forall a. Eq a => a -> t a -> Bool)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> Foldable t
    $cfold :: forall s m. Monoid m => Chunks s m -> m
    fold :: forall m. Monoid m => Chunks s m -> m
    $cfoldMap :: forall s m a. Monoid m => (a -> m) -> Chunks s a -> m
    foldMap :: forall m a. Monoid m => (a -> m) -> Chunks s a -> m
    $cfoldMap' :: forall s m a. Monoid m => (a -> m) -> Chunks s a -> m
    foldMap' :: forall m a. Monoid m => (a -> m) -> Chunks s a -> m
    $cfoldr :: forall s a b. (a -> b -> b) -> b -> Chunks s a -> b
    foldr :: forall a b. (a -> b -> b) -> b -> Chunks s a -> b
    $cfoldr' :: forall s a b. (a -> b -> b) -> b -> Chunks s a -> b
    foldr' :: forall a b. (a -> b -> b) -> b -> Chunks s a -> b
    $cfoldl :: forall s b a. (b -> a -> b) -> b -> Chunks s a -> b
    foldl :: forall b a. (b -> a -> b) -> b -> Chunks s a -> b
    $cfoldl' :: forall s b a. (b -> a -> b) -> b -> Chunks s a -> b
    foldl' :: forall b a. (b -> a -> b) -> b -> Chunks s a -> b
    $cfoldr1 :: forall s a. (a -> a -> a) -> Chunks s a -> a
    foldr1 :: forall a. (a -> a -> a) -> Chunks s a -> a
    $cfoldl1 :: forall s a. (a -> a -> a) -> Chunks s a -> a
    foldl1 :: forall a. (a -> a -> a) -> Chunks s a -> a
    $ctoList :: forall s a. Chunks s a -> [a]
    toList :: forall a. Chunks s a -> [a]
    $cnull :: forall s a. Chunks s a -> Bool
    null :: forall a. Chunks s a -> Bool
    $clength :: forall s a. Chunks s a -> Int
    length :: forall a. Chunks s a -> Int
    $celem :: forall s a. Eq a => a -> Chunks s a -> Bool
    elem :: forall a. Eq a => a -> Chunks s a -> Bool
    $cmaximum :: forall s a. Ord a => Chunks s a -> a
    maximum :: forall a. Ord a => Chunks s a -> a
    $cminimum :: forall s a. Ord a => Chunks s a -> a
    minimum :: forall a. Ord a => Chunks s a -> a
    $csum :: forall s a. Num a => Chunks s a -> a
    sum :: forall a. Num a => Chunks s a -> a
    $cproduct :: forall s a. Num a => Chunks s a -> a
    product :: forall a. Num a => Chunks s a -> a
    Foldable, (forall x. Chunks s a -> Rep (Chunks s a) x)
    -> (forall x. Rep (Chunks s a) x -> Chunks s a)
    -> Generic (Chunks s a)
    forall x. Rep (Chunks s a) x -> Chunks s a
    forall x. Chunks s a -> Rep (Chunks s a) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall s a x. Rep (Chunks s a) x -> Chunks s a
    forall s a x. Chunks s a -> Rep (Chunks s a) x
    $cfrom :: forall s a x. Chunks s a -> Rep (Chunks s a) x
    from :: forall x. Chunks s a -> Rep (Chunks s a) x
    $cto :: forall s a x. Rep (Chunks s a) x -> Chunks s a
    to :: forall x. Rep (Chunks s a) x -> Chunks s a
    Generic, Functor (Chunks s)
    Foldable (Chunks s)
    Functor (Chunks s)
    -> Foldable (Chunks s)
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> Chunks s a -> f (Chunks s b))
    -> (forall (f :: * -> *) a.
        Applicative f =>
        Chunks s (f a) -> f (Chunks s a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> Chunks s a -> m (Chunks s b))
    -> (forall (m :: * -> *) a.
        Monad m =>
        Chunks s (m a) -> m (Chunks s a))
    -> Traversable (Chunks s)
    forall s. Functor (Chunks s)
    forall s. Foldable (Chunks s)
    forall s (m :: * -> *) a.
    Monad m =>
    Chunks s (m a) -> m (Chunks s a)
    forall s (f :: * -> *) a.
    Applicative f =>
    Chunks s (f a) -> f (Chunks s a)
    forall s (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Chunks s a -> m (Chunks s b)
    forall s (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Chunks s a -> f (Chunks s b)
    forall (t :: * -> *).
    Functor t
    -> Foldable t
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> t a -> f (t b))
    -> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> t a -> m (t b))
    -> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
    -> Traversable t
    forall (m :: * -> *) a. Monad m => Chunks s (m a) -> m (Chunks s a)
    forall (f :: * -> *) a.
    Applicative f =>
    Chunks s (f a) -> f (Chunks s a)
    forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Chunks s a -> m (Chunks s b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Chunks s a -> f (Chunks s b)
    $ctraverse :: forall s (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Chunks s a -> f (Chunks s b)
    traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Chunks s a -> f (Chunks s b)
    $csequenceA :: forall s (f :: * -> *) a.
    Applicative f =>
    Chunks s (f a) -> f (Chunks s a)
    sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    Chunks s (f a) -> f (Chunks s a)
    $cmapM :: forall s (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Chunks s a -> m (Chunks s b)
    mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Chunks s a -> m (Chunks s b)
    $csequence :: forall s (m :: * -> *) a.
    Monad m =>
    Chunks s (m a) -> m (Chunks s a)
    sequence :: forall (m :: * -> *) a. Monad m => Chunks s (m a) -> m (Chunks s a)
    Traversable, Int -> Chunks s a -> ShowS
    [Chunks s a] -> ShowS
    Chunks s a -> String
    (Int -> Chunks s a -> ShowS)
    -> (Chunks s a -> String)
    -> ([Chunks s a] -> ShowS)
    -> Show (Chunks s a)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall s a. (Show s, Show a) => Int -> Chunks s a -> ShowS
    forall s a. (Show s, Show a) => [Chunks s a] -> ShowS
    forall s a. (Show s, Show a) => Chunks s a -> String
    $cshowsPrec :: forall s a. (Show s, Show a) => Int -> Chunks s a -> ShowS
    showsPrec :: Int -> Chunks s a -> ShowS
    $cshow :: forall s a. (Show s, Show a) => Chunks s a -> String
    show :: Chunks s a -> String
    $cshowList :: forall s a. (Show s, Show a) => [Chunks s a] -> ShowS
    showList :: [Chunks s a] -> ShowS
    Show, Chunks s a -> Chunks s a -> Bool
    (Chunks s a -> Chunks s a -> Bool)
    -> (Chunks s a -> Chunks s a -> Bool) -> Eq (Chunks s a)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall s a. (Eq s, Eq a) => Chunks s a -> Chunks s a -> Bool
    $c== :: forall s a. (Eq s, Eq a) => Chunks s a -> Chunks s a -> Bool
    == :: Chunks s a -> Chunks s a -> Bool
    $c/= :: forall s a. (Eq s, Eq a) => Chunks s a -> Chunks s a -> Bool
    /= :: Chunks s a -> Chunks s a -> Bool
    Eq, Eq (Chunks s a)
    Eq (Chunks s a)
    -> (Chunks s a -> Chunks s a -> Ordering)
    -> (Chunks s a -> Chunks s a -> Bool)
    -> (Chunks s a -> Chunks s a -> Bool)
    -> (Chunks s a -> Chunks s a -> Bool)
    -> (Chunks s a -> Chunks s a -> Bool)
    -> (Chunks s a -> Chunks s a -> Chunks s a)
    -> (Chunks s a -> Chunks s a -> Chunks s a)
    -> Ord (Chunks s a)
    Chunks s a -> Chunks s a -> Bool
    Chunks s a -> Chunks s a -> Ordering
    Chunks s a -> Chunks s a -> Chunks s a
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall {s} {a}. (Ord s, Ord a) => Eq (Chunks s a)
    forall s a. (Ord s, Ord a) => Chunks s a -> Chunks s a -> Bool
    forall s a. (Ord s, Ord a) => Chunks s a -> Chunks s a -> Ordering
    forall s a.
    (Ord s, Ord a) =>
    Chunks s a -> Chunks s a -> Chunks s a
    $ccompare :: forall s a. (Ord s, Ord a) => Chunks s a -> Chunks s a -> Ordering
    compare :: Chunks s a -> Chunks s a -> Ordering
    $c< :: forall s a. (Ord s, Ord a) => Chunks s a -> Chunks s a -> Bool
    < :: Chunks s a -> Chunks s a -> Bool
    $c<= :: forall s a. (Ord s, Ord a) => Chunks s a -> Chunks s a -> Bool
    <= :: Chunks s a -> Chunks s a -> Bool
    $c> :: forall s a. (Ord s, Ord a) => Chunks s a -> Chunks s a -> Bool
    > :: Chunks s a -> Chunks s a -> Bool
    $c>= :: forall s a. (Ord s, Ord a) => Chunks s a -> Chunks s a -> Bool
    >= :: Chunks s a -> Chunks s a -> Bool
    $cmax :: forall s a.
    (Ord s, Ord a) =>
    Chunks s a -> Chunks s a -> Chunks s a
    max :: Chunks s a -> Chunks s a -> Chunks s a
    $cmin :: forall s a.
    (Ord s, Ord a) =>
    Chunks s a -> Chunks s a -> Chunks s a
    min :: Chunks s a -> Chunks s a -> Chunks s a
    Ord, Typeable (Chunks s a)
    Typeable (Chunks s a)
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> Chunks s a -> c (Chunks s a))
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (Chunks s a))
    -> (Chunks s a -> Constr)
    -> (Chunks s a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (Chunks s a)))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c (Chunks s a)))
    -> ((forall b. Data b => b -> b) -> Chunks s a -> Chunks s a)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> Chunks s a -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> Chunks s a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Chunks s a -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> Chunks s a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a))
    -> Data (Chunks s a)
    Chunks s a -> Constr
    Chunks s a -> DataType
    (forall b. Data b => b -> b) -> Chunks s a -> Chunks s a
    forall a.
    Typeable a
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Chunks s a -> u
    forall u. (forall d. Data d => d -> u) -> Chunks s a -> [u]
    forall {s} {a}. (Data s, Data a) => Typeable (Chunks s a)
    forall s a. (Data s, Data a) => Chunks s a -> Constr
    forall s a. (Data s, Data a) => Chunks s a -> DataType
    forall s a.
    (Data s, Data a) =>
    (forall b. Data b => b -> b) -> Chunks s a -> Chunks s a
    forall s a u.
    (Data s, Data a) =>
    Int -> (forall d. Data d => d -> u) -> Chunks s a -> u
    forall s a u.
    (Data s, Data a) =>
    (forall d. Data d => d -> u) -> Chunks s a -> [u]
    forall s a r r'.
    (Data s, Data a) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Chunks s a -> r
    forall s a r r'.
    (Data s, Data a) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Chunks s a -> r
    forall s a (m :: * -> *).
    (Data s, Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a)
    forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a)
    forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Chunks s a)
    forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Chunks s a -> c (Chunks s a)
    forall s a (t :: * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (Chunks s a))
    forall s a (t :: * -> * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Chunks s a))
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Chunks s a -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Chunks s a -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a)
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a)
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Chunks s a)
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Chunks s a -> c (Chunks s a)
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Chunks s a))
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Chunks s a))
    $cgfoldl :: forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Chunks s a -> c (Chunks s a)
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Chunks s a -> c (Chunks s a)
    $cgunfold :: forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Chunks s a)
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Chunks s a)
    $ctoConstr :: forall s a. (Data s, Data a) => Chunks s a -> Constr
    toConstr :: Chunks s a -> Constr
    $cdataTypeOf :: forall s a. (Data s, Data a) => Chunks s a -> DataType
    dataTypeOf :: Chunks s a -> DataType
    $cdataCast1 :: forall s a (t :: * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (Chunks s a))
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Chunks s a))
    $cdataCast2 :: forall s a (t :: * -> * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Chunks s a))
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Chunks s a))
    $cgmapT :: forall s a.
    (Data s, Data a) =>
    (forall b. Data b => b -> b) -> Chunks s a -> Chunks s a
    gmapT :: (forall b. Data b => b -> b) -> Chunks s a -> Chunks s a
    $cgmapQl :: forall s a r r'.
    (Data s, Data a) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Chunks s a -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Chunks s a -> r
    $cgmapQr :: forall s a r r'.
    (Data s, Data a) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Chunks s a -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Chunks s a -> r
    $cgmapQ :: forall s a u.
    (Data s, Data a) =>
    (forall d. Data d => d -> u) -> Chunks s a -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Chunks s a -> [u]
    $cgmapQi :: forall s a u.
    (Data s, Data a) =>
    Int -> (forall d. Data d => d -> u) -> Chunks s a -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Chunks s a -> u
    $cgmapM :: forall s a (m :: * -> *).
    (Data s, Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a)
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a)
    $cgmapMp :: forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a)
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a)
    $cgmapMo :: forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a)
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a)
    Data, (forall (m :: * -> *). Quote m => Chunks s a -> m Exp)
    -> (forall (m :: * -> *).
        Quote m =>
        Chunks s a -> Code m (Chunks s a))
    -> Lift (Chunks s a)
    forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    Chunks s a -> m Exp
    forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    Chunks s a -> Code m (Chunks s a)
    forall t.
    (forall (m :: * -> *). Quote m => t -> m Exp)
    -> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
    forall (m :: * -> *). Quote m => Chunks s a -> m Exp
    forall (m :: * -> *). Quote m => Chunks s a -> Code m (Chunks s a)
    $clift :: forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    Chunks s a -> m Exp
    lift :: forall (m :: * -> *). Quote m => Chunks s a -> m Exp
    $cliftTyped :: forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    Chunks s a -> Code m (Chunks s a)
    liftTyped :: forall (m :: * -> *). Quote m => Chunks s a -> Code m (Chunks s a)
    Lift, Chunks s a -> ()
    (Chunks s a -> ()) -> NFData (Chunks s a)
    forall a. (a -> ()) -> NFData a
    forall s a. (NFData s, NFData a) => Chunks s a -> ()
    $crnf :: forall s a. (NFData s, NFData a) => Chunks s a -> ()
    rnf :: Chunks s a -> ()
    NFData)

    instance Semigroup (Chunks s a) where
        Chunks [(Text, Expr s a)]
    xysL Text
    zL <> :: Chunks s a -> Chunks s a -> Chunks s a
    <> Chunks         []    Text
    zR =
            [(Text, Expr s a)] -> Text -> Chunks s a
    forall s a. [(Text, Expr s a)] -> Text -> Chunks s a
    Chunks [(Text, Expr s a)]
    xysL (Text
    zL Text -> Text -> Text
    forall a. Semigroup a => a -> a -> a
    <> Text
    zR)
        Chunks [(Text, Expr s a)]
    xysL Text
    zL <> Chunks ((Text
    x, Expr s a
    y):[(Text, Expr s a)]
    xysR) Text
    zR =
            [(Text, Expr s a)] -> Text -> Chunks s a
    forall s a. [(Text, Expr s a)] -> Text -> Chunks s a
    Chunks ([(Text, Expr s a)]
    xysL [(Text, Expr s a)] -> [(Text, Expr s a)] -> [(Text, Expr s a)]
    forall a. [a] -> [a] -> [a]
    ++ (Text
    zL Text -> Text -> Text
    forall a. Semigroup a => a -> a -> a
    <> Text
    x, Expr s a
    y)(Text, Expr s a) -> [(Text, Expr s a)] -> [(Text, Expr s a)]
    forall a. a -> [a] -> [a]
    :[(Text, Expr s a)]
    xysR) Text
    zR

    instance Monoid (Chunks s a) where
        mempty :: Chunks s a
    mempty = [(Text, Expr s a)] -> Text -> Chunks s a
    forall s a. [(Text, Expr s a)] -> Text -> Chunks s a
    Chunks [] Text
    forall a. Monoid a => a
    mempty

    instance IsString (Chunks s a) where
        fromString :: String -> Chunks s a
    fromString String
    str = [(Text, Expr s a)] -> Text -> Chunks s a
    forall s a. [(Text, Expr s a)] -> Text -> Chunks s a
    Chunks [] (String -> Text
    forall a. IsString a => String -> a
    fromString String
    str)

    -- | Used to record the origin of a @//@ operator (i.e. from source code or a
    -- product of desugaring)
    data PreferAnnotation s a
        = PreferFromSource
        | PreferFromWith (Expr s a)
          -- ^ Stores the original @with@ expression
        | PreferFromCompletion
        deriving (Typeable (PreferAnnotation s a)
    Typeable (PreferAnnotation s a)
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g)
        -> PreferAnnotation s a
        -> c (PreferAnnotation s a))
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (PreferAnnotation s a))
    -> (PreferAnnotation s a -> Constr)
    -> (PreferAnnotation s a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (PreferAnnotation s a)))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c (PreferAnnotation s a)))
    -> ((forall b. Data b => b -> b)
        -> PreferAnnotation s a -> PreferAnnotation s a)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> PreferAnnotation s a -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> PreferAnnotation s a -> r)
    -> (forall u.
        (forall d. Data d => d -> u) -> PreferAnnotation s a -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> PreferAnnotation s a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d)
        -> PreferAnnotation s a -> m (PreferAnnotation s a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> PreferAnnotation s a -> m (PreferAnnotation s a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> PreferAnnotation s a -> m (PreferAnnotation s a))
    -> Data (PreferAnnotation s a)
    PreferAnnotation s a -> Constr
    PreferAnnotation s a -> DataType
    (forall b. Data b => b -> b)
    -> PreferAnnotation s a -> PreferAnnotation s a
    forall a.
    Typeable a
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u.
    Int -> (forall d. Data d => d -> u) -> PreferAnnotation s a -> u
    forall u.
    (forall d. Data d => d -> u) -> PreferAnnotation s a -> [u]
    forall {s} {a}. (Data s, Data a) => Typeable (PreferAnnotation s a)
    forall s a. (Data s, Data a) => PreferAnnotation s a -> Constr
    forall s a. (Data s, Data a) => PreferAnnotation s a -> DataType
    forall s a.
    (Data s, Data a) =>
    (forall b. Data b => b -> b)
    -> PreferAnnotation s a -> PreferAnnotation s a
    forall s a u.
    (Data s, Data a) =>
    Int -> (forall d. Data d => d -> u) -> PreferAnnotation s a -> u
    forall s a u.
    (Data s, Data a) =>
    (forall d. Data d => d -> u) -> PreferAnnotation s a -> [u]
    forall s a r r'.
    (Data s, Data a) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> PreferAnnotation s a -> r
    forall s a r r'.
    (Data s, Data a) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> PreferAnnotation s a -> r
    forall s a (m :: * -> *).
    (Data s, Data a, Monad m) =>
    (forall d. Data d => d -> m d)
    -> PreferAnnotation s a -> m (PreferAnnotation s a)
    forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> PreferAnnotation s a -> m (PreferAnnotation s a)
    forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (PreferAnnotation s a)
    forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> PreferAnnotation s a
    -> c (PreferAnnotation s a)
    forall s a (t :: * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (PreferAnnotation s a))
    forall s a (t :: * -> * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (PreferAnnotation s a))
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> PreferAnnotation s a -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> PreferAnnotation s a -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> PreferAnnotation s a -> m (PreferAnnotation s a)
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> PreferAnnotation s a -> m (PreferAnnotation s a)
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (PreferAnnotation s a)
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> PreferAnnotation s a
    -> c (PreferAnnotation s a)
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (PreferAnnotation s a))
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (PreferAnnotation s a))
    $cgfoldl :: forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> PreferAnnotation s a
    -> c (PreferAnnotation s a)
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> PreferAnnotation s a
    -> c (PreferAnnotation s a)
    $cgunfold :: forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (PreferAnnotation s a)
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (PreferAnnotation s a)
    $ctoConstr :: forall s a. (Data s, Data a) => PreferAnnotation s a -> Constr
    toConstr :: PreferAnnotation s a -> Constr
    $cdataTypeOf :: forall s a. (Data s, Data a) => PreferAnnotation s a -> DataType
    dataTypeOf :: PreferAnnotation s a -> DataType
    $cdataCast1 :: forall s a (t :: * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (PreferAnnotation s a))
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (PreferAnnotation s a))
    $cdataCast2 :: forall s a (t :: * -> * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (PreferAnnotation s a))
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (PreferAnnotation s a))
    $cgmapT :: forall s a.
    (Data s, Data a) =>
    (forall b. Data b => b -> b)
    -> PreferAnnotation s a -> PreferAnnotation s a
    gmapT :: (forall b. Data b => b -> b)
    -> PreferAnnotation s a -> PreferAnnotation s a
    $cgmapQl :: forall s a r r'.
    (Data s, Data a) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> PreferAnnotation s a -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> PreferAnnotation s a -> r
    $cgmapQr :: forall s a r r'.
    (Data s, Data a) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> PreferAnnotation s a -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> PreferAnnotation s a -> r
    $cgmapQ :: forall s a u.
    (Data s, Data a) =>
    (forall d. Data d => d -> u) -> PreferAnnotation s a -> [u]
    gmapQ :: forall u.
    (forall d. Data d => d -> u) -> PreferAnnotation s a -> [u]
    $cgmapQi :: forall s a u.
    (Data s, Data a) =>
    Int -> (forall d. Data d => d -> u) -> PreferAnnotation s a -> u
    gmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> PreferAnnotation s a -> u
    $cgmapM :: forall s a (m :: * -> *).
    (Data s, Data a, Monad m) =>
    (forall d. Data d => d -> m d)
    -> PreferAnnotation s a -> m (PreferAnnotation s a)
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> PreferAnnotation s a -> m (PreferAnnotation s a)
    $cgmapMp :: forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> PreferAnnotation s a -> m (PreferAnnotation s a)
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> PreferAnnotation s a -> m (PreferAnnotation s a)
    $cgmapMo :: forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> PreferAnnotation s a -> m (PreferAnnotation s a)
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> PreferAnnotation s a -> m (PreferAnnotation s a)
    Data, PreferAnnotation s a -> PreferAnnotation s a -> Bool
    (PreferAnnotation s a -> PreferAnnotation s a -> Bool)
    -> (PreferAnnotation s a -> PreferAnnotation s a -> Bool)
    -> Eq (PreferAnnotation s a)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall s a.
    (Eq s, Eq a) =>
    PreferAnnotation s a -> PreferAnnotation s a -> Bool
    $c== :: forall s a.
    (Eq s, Eq a) =>
    PreferAnnotation s a -> PreferAnnotation s a -> Bool
    == :: PreferAnnotation s a -> PreferAnnotation s a -> Bool
    $c/= :: forall s a.
    (Eq s, Eq a) =>
    PreferAnnotation s a -> PreferAnnotation s a -> Bool
    /= :: PreferAnnotation s a -> PreferAnnotation s a -> Bool
    Eq, (forall m. Monoid m => PreferAnnotation s m -> m)
    -> (forall m a. Monoid m => (a -> m) -> PreferAnnotation s a -> m)
    -> (forall m a. Monoid m => (a -> m) -> PreferAnnotation s a -> m)
    -> (forall a b. (a -> b -> b) -> b -> PreferAnnotation s a -> b)
    -> (forall a b. (a -> b -> b) -> b -> PreferAnnotation s a -> b)
    -> (forall b a. (b -> a -> b) -> b -> PreferAnnotation s a -> b)
    -> (forall b a. (b -> a -> b) -> b -> PreferAnnotation s a -> b)
    -> (forall a. (a -> a -> a) -> PreferAnnotation s a -> a)
    -> (forall a. (a -> a -> a) -> PreferAnnotation s a -> a)
    -> (forall a. PreferAnnotation s a -> [a])
    -> (forall a. PreferAnnotation s a -> Bool)
    -> (forall a. PreferAnnotation s a -> Int)
    -> (forall a. Eq a => a -> PreferAnnotation s a -> Bool)
    -> (forall a. Ord a => PreferAnnotation s a -> a)
    -> (forall a. Ord a => PreferAnnotation s a -> a)
    -> (forall a. Num a => PreferAnnotation s a -> a)
    -> (forall a. Num a => PreferAnnotation s a -> a)
    -> Foldable (PreferAnnotation s)
    forall a. Eq a => a -> PreferAnnotation s a -> Bool
    forall a. Num a => PreferAnnotation s a -> a
    forall a. Ord a => PreferAnnotation s a -> a
    forall m. Monoid m => PreferAnnotation s m -> m
    forall a. PreferAnnotation s a -> Bool
    forall a. PreferAnnotation s a -> Int
    forall a. PreferAnnotation s a -> [a]
    forall a. (a -> a -> a) -> PreferAnnotation s a -> a
    forall s a. Eq a => a -> PreferAnnotation s a -> Bool
    forall s a. Num a => PreferAnnotation s a -> a
    forall s a. Ord a => PreferAnnotation s a -> a
    forall m a. Monoid m => (a -> m) -> PreferAnnotation s a -> m
    forall s m. Monoid m => PreferAnnotation s m -> m
    forall s a. PreferAnnotation s a -> Bool
    forall s a. PreferAnnotation s a -> Int
    forall s a. PreferAnnotation s a -> [a]
    forall b a. (b -> a -> b) -> b -> PreferAnnotation s a -> b
    forall a b. (a -> b -> b) -> b -> PreferAnnotation s a -> b
    forall s a. (a -> a -> a) -> PreferAnnotation s a -> a
    forall s m a. Monoid m => (a -> m) -> PreferAnnotation s a -> m
    forall s b a. (b -> a -> b) -> b -> PreferAnnotation s a -> b
    forall s a b. (a -> b -> b) -> b -> PreferAnnotation s a -> b
    forall (t :: * -> *).
    (forall m. Monoid m => t m -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. t a -> [a])
    -> (forall a. t a -> Bool)
    -> (forall a. t a -> Int)
    -> (forall a. Eq a => a -> t a -> Bool)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> Foldable t
    $cfold :: forall s m. Monoid m => PreferAnnotation s m -> m
    fold :: forall m. Monoid m => PreferAnnotation s m -> m
    $cfoldMap :: forall s m a. Monoid m => (a -> m) -> PreferAnnotation s a -> m
    foldMap :: forall m a. Monoid m => (a -> m) -> PreferAnnotation s a -> m
    $cfoldMap' :: forall s m a. Monoid m => (a -> m) -> PreferAnnotation s a -> m
    foldMap' :: forall m a. Monoid m => (a -> m) -> PreferAnnotation s a -> m
    $cfoldr :: forall s a b. (a -> b -> b) -> b -> PreferAnnotation s a -> b
    foldr :: forall a b. (a -> b -> b) -> b -> PreferAnnotation s a -> b
    $cfoldr' :: forall s a b. (a -> b -> b) -> b -> PreferAnnotation s a -> b
    foldr' :: forall a b. (a -> b -> b) -> b -> PreferAnnotation s a -> b
    $cfoldl :: forall s b a. (b -> a -> b) -> b -> PreferAnnotation s a -> b
    foldl :: forall b a. (b -> a -> b) -> b -> PreferAnnotation s a -> b
    $cfoldl' :: forall s b a. (b -> a -> b) -> b -> PreferAnnotation s a -> b
    foldl' :: forall b a. (b -> a -> b) -> b -> PreferAnnotation s a -> b
    $cfoldr1 :: forall s a. (a -> a -> a) -> PreferAnnotation s a -> a
    foldr1 :: forall a. (a -> a -> a) -> PreferAnnotation s a -> a
    $cfoldl1 :: forall s a. (a -> a -> a) -> PreferAnnotation s a -> a
    foldl1 :: forall a. (a -> a -> a) -> PreferAnnotation s a -> a
    $ctoList :: forall s a. PreferAnnotation s a -> [a]
    toList :: forall a. PreferAnnotation s a -> [a]
    $cnull :: forall s a. PreferAnnotation s a -> Bool
    null :: forall a. PreferAnnotation s a -> Bool
    $clength :: forall s a. PreferAnnotation s a -> Int
    length :: forall a. PreferAnnotation s a -> Int
    $celem :: forall s a. Eq a => a -> PreferAnnotation s a -> Bool
    elem :: forall a. Eq a => a -> PreferAnnotation s a -> Bool
    $cmaximum :: forall s a. Ord a => PreferAnnotation s a -> a
    maximum :: forall a. Ord a => PreferAnnotation s a -> a
    $cminimum :: forall s a. Ord a => PreferAnnotation s a -> a
    minimum :: forall a. Ord a => PreferAnnotation s a -> a
    $csum :: forall s a. Num a => PreferAnnotation s a -> a
    sum :: forall a. Num a => PreferAnnotation s a -> a
    $cproduct :: forall s a. Num a => PreferAnnotation s a -> a
    product :: forall a. Num a => PreferAnnotation s a -> a
    Foldable, (forall a b.
     (a -> b) -> PreferAnnotation s a -> PreferAnnotation s b)
    -> (forall a b. a -> PreferAnnotation s b -> PreferAnnotation s a)
    -> Functor (PreferAnnotation s)
    forall a b. a -> PreferAnnotation s b -> PreferAnnotation s a
    forall a b.
    (a -> b) -> PreferAnnotation s a -> PreferAnnotation s b
    forall s a b. a -> PreferAnnotation s b -> PreferAnnotation s a
    forall s a b.
    (a -> b) -> PreferAnnotation s a -> PreferAnnotation s b
    forall (f :: * -> *).
    (forall a b. (a -> b) -> f a -> f b)
    -> (forall a b. a -> f b -> f a) -> Functor f
    $cfmap :: forall s a b.
    (a -> b) -> PreferAnnotation s a -> PreferAnnotation s b
    fmap :: forall a b.
    (a -> b) -> PreferAnnotation s a -> PreferAnnotation s b
    $c<$ :: forall s a b. a -> PreferAnnotation s b -> PreferAnnotation s a
    <$ :: forall a b. a -> PreferAnnotation s b -> PreferAnnotation s a
    Functor, (forall x. PreferAnnotation s a -> Rep (PreferAnnotation s a) x)
    -> (forall x. Rep (PreferAnnotation s a) x -> PreferAnnotation s a)
    -> Generic (PreferAnnotation s a)
    forall x. Rep (PreferAnnotation s a) x -> PreferAnnotation s a
    forall x. PreferAnnotation s a -> Rep (PreferAnnotation s a) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall s a x. Rep (PreferAnnotation s a) x -> PreferAnnotation s a
    forall s a x. PreferAnnotation s a -> Rep (PreferAnnotation s a) x
    $cfrom :: forall s a x. PreferAnnotation s a -> Rep (PreferAnnotation s a) x
    from :: forall x. PreferAnnotation s a -> Rep (PreferAnnotation s a) x
    $cto :: forall s a x. Rep (PreferAnnotation s a) x -> PreferAnnotation s a
    to :: forall x. Rep (PreferAnnotation s a) x -> PreferAnnotation s a
    Generic, (forall (m :: * -> *). Quote m => PreferAnnotation s a -> m Exp)
    -> (forall (m :: * -> *).
        Quote m =>
        PreferAnnotation s a -> Code m (PreferAnnotation s a))
    -> Lift (PreferAnnotation s a)
    forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    PreferAnnotation s a -> m Exp
    forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    PreferAnnotation s a -> Code m (PreferAnnotation s a)
    forall t.
    (forall (m :: * -> *). Quote m => t -> m Exp)
    -> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
    forall (m :: * -> *). Quote m => PreferAnnotation s a -> m Exp
    forall (m :: * -> *).
    Quote m =>
    PreferAnnotation s a -> Code m (PreferAnnotation s a)
    $clift :: forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    PreferAnnotation s a -> m Exp
    lift :: forall (m :: * -> *). Quote m => PreferAnnotation s a -> m Exp
    $cliftTyped :: forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    PreferAnnotation s a -> Code m (PreferAnnotation s a)
    liftTyped :: forall (m :: * -> *).
    Quote m =>
    PreferAnnotation s a -> Code m (PreferAnnotation s a)
    Lift, PreferAnnotation s a -> ()
    (PreferAnnotation s a -> ()) -> NFData (PreferAnnotation s a)
    forall a. (a -> ()) -> NFData a
    forall s a. (NFData s, NFData a) => PreferAnnotation s a -> ()
    $crnf :: forall s a. (NFData s, NFData a) => PreferAnnotation s a -> ()
    rnf :: PreferAnnotation s a -> ()
    NFData, Eq (PreferAnnotation s a)
    Eq (PreferAnnotation s a)
    -> (PreferAnnotation s a -> PreferAnnotation s a -> Ordering)
    -> (PreferAnnotation s a -> PreferAnnotation s a -> Bool)
    -> (PreferAnnotation s a -> PreferAnnotation s a -> Bool)
    -> (PreferAnnotation s a -> PreferAnnotation s a -> Bool)
    -> (PreferAnnotation s a -> PreferAnnotation s a -> Bool)
    -> (PreferAnnotation s a
        -> PreferAnnotation s a -> PreferAnnotation s a)
    -> (PreferAnnotation s a
        -> PreferAnnotation s a -> PreferAnnotation s a)
    -> Ord (PreferAnnotation s a)
    PreferAnnotation s a -> PreferAnnotation s a -> Bool
    PreferAnnotation s a -> PreferAnnotation s a -> Ordering
    PreferAnnotation s a
    -> PreferAnnotation s a -> PreferAnnotation s a
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall {s} {a}. (Ord s, Ord a) => Eq (PreferAnnotation s a)
    forall s a.
    (Ord s, Ord a) =>
    PreferAnnotation s a -> PreferAnnotation s a -> Bool
    forall s a.
    (Ord s, Ord a) =>
    PreferAnnotation s a -> PreferAnnotation s a -> Ordering
    forall s a.
    (Ord s, Ord a) =>
    PreferAnnotation s a
    -> PreferAnnotation s a -> PreferAnnotation s a
    $ccompare :: forall s a.
    (Ord s, Ord a) =>
    PreferAnnotation s a -> PreferAnnotation s a -> Ordering
    compare :: PreferAnnotation s a -> PreferAnnotation s a -> Ordering
    $c< :: forall s a.
    (Ord s, Ord a) =>
    PreferAnnotation s a -> PreferAnnotation s a -> Bool
    < :: PreferAnnotation s a -> PreferAnnotation s a -> Bool
    $c<= :: forall s a.
    (Ord s, Ord a) =>
    PreferAnnotation s a -> PreferAnnotation s a -> Bool
    <= :: PreferAnnotation s a -> PreferAnnotation s a -> Bool
    $c> :: forall s a.
    (Ord s, Ord a) =>
    PreferAnnotation s a -> PreferAnnotation s a -> Bool
    > :: PreferAnnotation s a -> PreferAnnotation s a -> Bool
    $c>= :: forall s a.
    (Ord s, Ord a) =>
    PreferAnnotation s a -> PreferAnnotation s a -> Bool
    >= :: PreferAnnotation s a -> PreferAnnotation s a -> Bool
    $cmax :: forall s a.
    (Ord s, Ord a) =>
    PreferAnnotation s a
    -> PreferAnnotation s a -> PreferAnnotation s a
    max :: PreferAnnotation s a
    -> PreferAnnotation s a -> PreferAnnotation s a
    $cmin :: forall s a.
    (Ord s, Ord a) =>
    PreferAnnotation s a
    -> PreferAnnotation s a -> PreferAnnotation s a
    min :: PreferAnnotation s a
    -> PreferAnnotation s a -> PreferAnnotation s a
    Ord, Int -> PreferAnnotation s a -> ShowS
    [PreferAnnotation s a] -> ShowS
    PreferAnnotation s a -> String
    (Int -> PreferAnnotation s a -> ShowS)
    -> (PreferAnnotation s a -> String)
    -> ([PreferAnnotation s a] -> ShowS)
    -> Show (PreferAnnotation s a)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall s a.
    (Show s, Show a) =>
    Int -> PreferAnnotation s a -> ShowS
    forall s a. (Show s, Show a) => [PreferAnnotation s a] -> ShowS
    forall s a. (Show s, Show a) => PreferAnnotation s a -> String
    $cshowsPrec :: forall s a.
    (Show s, Show a) =>
    Int -> PreferAnnotation s a -> ShowS
    showsPrec :: Int -> PreferAnnotation s a -> ShowS
    $cshow :: forall s a. (Show s, Show a) => PreferAnnotation s a -> String
    show :: PreferAnnotation s a -> String
    $cshowList :: forall s a. (Show s, Show a) => [PreferAnnotation s a] -> ShowS
    showList :: [PreferAnnotation s a] -> ShowS
    Show, Functor (PreferAnnotation s)
    Foldable (PreferAnnotation s)
    Functor (PreferAnnotation s)
    -> Foldable (PreferAnnotation s)
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> PreferAnnotation s a -> f (PreferAnnotation s b))
    -> (forall (f :: * -> *) a.
        Applicative f =>
        PreferAnnotation s (f a) -> f (PreferAnnotation s a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> PreferAnnotation s a -> m (PreferAnnotation s b))
    -> (forall (m :: * -> *) a.
        Monad m =>
        PreferAnnotation s (m a) -> m (PreferAnnotation s a))
    -> Traversable (PreferAnnotation s)
    forall s. Functor (PreferAnnotation s)
    forall s. Foldable (PreferAnnotation s)
    forall s (m :: * -> *) a.
    Monad m =>
    PreferAnnotation s (m a) -> m (PreferAnnotation s a)
    forall s (f :: * -> *) a.
    Applicative f =>
    PreferAnnotation s (f a) -> f (PreferAnnotation s a)
    forall s (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> PreferAnnotation s a -> m (PreferAnnotation s b)
    forall s (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> PreferAnnotation s a -> f (PreferAnnotation s b)
    forall (t :: * -> *).
    Functor t
    -> Foldable t
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> t a -> f (t b))
    -> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> t a -> m (t b))
    -> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
    -> Traversable t
    forall (m :: * -> *) a.
    Monad m =>
    PreferAnnotation s (m a) -> m (PreferAnnotation s a)
    forall (f :: * -> *) a.
    Applicative f =>
    PreferAnnotation s (f a) -> f (PreferAnnotation s a)
    forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> PreferAnnotation s a -> m (PreferAnnotation s b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> PreferAnnotation s a -> f (PreferAnnotation s b)
    $ctraverse :: forall s (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> PreferAnnotation s a -> f (PreferAnnotation s b)
    traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> PreferAnnotation s a -> f (PreferAnnotation s b)
    $csequenceA :: forall s (f :: * -> *) a.
    Applicative f =>
    PreferAnnotation s (f a) -> f (PreferAnnotation s a)
    sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    PreferAnnotation s (f a) -> f (PreferAnnotation s a)
    $cmapM :: forall s (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> PreferAnnotation s a -> m (PreferAnnotation s b)
    mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> PreferAnnotation s a -> m (PreferAnnotation s b)
    $csequence :: forall s (m :: * -> *) a.
    Monad m =>
    PreferAnnotation s (m a) -> m (PreferAnnotation s a)
    sequence :: forall (m :: * -> *) a.
    Monad m =>
    PreferAnnotation s (m a) -> m (PreferAnnotation s a)
    Traversable)

    instance Bifunctor PreferAnnotation where
        first :: forall a b c.
    (a -> b) -> PreferAnnotation a c -> PreferAnnotation b c
    first a -> b
    _  PreferAnnotation a c
    PreferFromSource      = PreferAnnotation b c
    forall s a. PreferAnnotation s a
    PreferFromSource
        first a -> b
    f (PreferFromWith Expr a c
    e    ) = Expr b c -> PreferAnnotation b c
    forall s a. Expr s a -> PreferAnnotation s a
    PreferFromWith ((a -> b) -> Expr a c -> Expr b c
    forall a b c. (a -> b) -> Expr a c -> Expr b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    f Expr a c
    e)
        first a -> b
    _  PreferAnnotation a c
    PreferFromCompletion  = PreferAnnotation b c
    forall s a. PreferAnnotation s a
    PreferFromCompletion

        second :: forall b c a.
    (b -> c) -> PreferAnnotation a b -> PreferAnnotation a c
    second = (b -> c) -> PreferAnnotation a b -> PreferAnnotation a c
    forall a b.
    (a -> b) -> PreferAnnotation a a -> PreferAnnotation a b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap

    -- | Record the field of a record-type and record-literal expression.
    -- The reason why we use the same ADT for both of them is because they store
    -- the same information.
    --
    -- For example,
    --
    -- > { {- A -} x {- B -} : {- C -} T }
    --
    -- ... or
    --
    -- > { {- A -} x {- B -} = {- C -} T }
    --
    -- will be instantiated as follows:
    --
    -- * @recordFieldSrc0@ corresponds to the @A@ comment.
    -- * @recordFieldValue@ is @"T"@
    -- * @recordFieldSrc1@ corresponds to the @B@ comment.
    -- * @recordFieldSrc2@ corresponds to the @C@ comment.
    --
    -- Although the @A@ comment isn't annotating the @"T"@ Record Field,
    -- this is the best place to keep these comments.
    --
    -- Note that @recordFieldSrc2@ is always 'Nothing' when the 'RecordField' is for
    -- a punned entry, because there is no @=@ sign. For example,
    --
    -- > { {- A -} x {- B -} }
    --
    -- will be instantiated as follows:
    --
    -- * @recordFieldSrc0@ corresponds to the @A@ comment.
    -- * @recordFieldValue@ corresponds to @(Var "x")@
    -- * @recordFieldSrc1@ corresponds to the @B@ comment.
    -- * @recordFieldSrc2@ will be 'Nothing'
    --
    -- The labels involved in a record using dot-syntax like in this example:
    --
    -- > { {- A -} a {- B -} . {- C -} b {- D -} . {- E -} c {- F -} = {- G -} e }
    --
    -- will be instantiated as follows:
    --
    -- * For both the @a@ and @b@ field, @recordfieldSrc2@ is 'Nothing'
    -- * For the @a@ field:
    --   * @recordFieldSrc0@ corresponds to the @A@ comment
    --   * @recordFieldSrc1@ corresponds to the @B@ comment
    -- * For the @b@ field:
    --   * @recordFieldSrc0@ corresponds to the @C@ comment
    --   * @recordFieldSrc1@ corresponds to the @D@ comment
    -- * For the @c@ field:
    --   * @recordFieldSrc0@ corresponds to the @E@ comment
    --   * @recordFieldSrc1@ corresponds to the @F@ comment
    --   * @recordFieldSrc2@ corresponds to the @G@ comment
    --
    -- That is, for every label except the last one the semantics of
    -- @recordFieldSrc0@ and @recordFieldSrc1@ are the same from a regular record
    -- label but @recordFieldSrc2@ is always 'Nothing'. For the last keyword, all
    -- srcs are 'Just'
    data RecordField s a = RecordField
        { forall s a. RecordField s a -> Maybe s
    recordFieldSrc0  :: Maybe s
        , forall s a. RecordField s a -> Expr s a
    recordFieldValue :: Expr s a
        , forall s a. RecordField s a -> Maybe s
    recordFieldSrc1  :: Maybe s
        , forall s a. RecordField s a -> Maybe s
    recordFieldSrc2  :: Maybe s
        } deriving (Typeable (RecordField s a)
    Typeable (RecordField s a)
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> RecordField s a -> c (RecordField s a))
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (RecordField s a))
    -> (RecordField s a -> Constr)
    -> (RecordField s a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (RecordField s a)))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c (RecordField s a)))
    -> ((forall b. Data b => b -> b)
        -> RecordField s a -> RecordField s a)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> RecordField s a -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> RecordField s a -> r)
    -> (forall u.
        (forall d. Data d => d -> u) -> RecordField s a -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> RecordField s a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d)
        -> RecordField s a -> m (RecordField s a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> RecordField s a -> m (RecordField s a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> RecordField s a -> m (RecordField s a))
    -> Data (RecordField s a)
    RecordField s a -> Constr
    RecordField s a -> DataType
    (forall b. Data b => b -> b) -> RecordField s a -> RecordField s a
    forall a.
    Typeable a
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u.
    Int -> (forall d. Data d => d -> u) -> RecordField s a -> u
    forall u. (forall d. Data d => d -> u) -> RecordField s a -> [u]
    forall {s} {a}. (Data s, Data a) => Typeable (RecordField s a)
    forall s a. (Data s, Data a) => RecordField s a -> Constr
    forall s a. (Data s, Data a) => RecordField s a -> DataType
    forall s a.
    (Data s, Data a) =>
    (forall b. Data b => b -> b) -> RecordField s a -> RecordField s a
    forall s a u.
    (Data s, Data a) =>
    Int -> (forall d. Data d => d -> u) -> RecordField s a -> u
    forall s a u.
    (Data s, Data a) =>
    (forall d. Data d => d -> u) -> RecordField s a -> [u]
    forall s a r r'.
    (Data s, Data a) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> RecordField s a -> r
    forall s a r r'.
    (Data s, Data a) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> RecordField s a -> r
    forall s a (m :: * -> *).
    (Data s, Data a, Monad m) =>
    (forall d. Data d => d -> m d)
    -> RecordField s a -> m (RecordField s a)
    forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> RecordField s a -> m (RecordField s a)
    forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (RecordField s a)
    forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> RecordField s a -> c (RecordField s a)
    forall s a (t :: * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (RecordField s a))
    forall s a (t :: * -> * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (RecordField s a))
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> RecordField s a -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> RecordField s a -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> RecordField s a -> m (RecordField s a)
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> RecordField s a -> m (RecordField s a)
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (RecordField s a)
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> RecordField s a -> c (RecordField s a)
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (RecordField s a))
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (RecordField s a))
    $cgfoldl :: forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> RecordField s a -> c (RecordField s a)
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> RecordField s a -> c (RecordField s a)
    $cgunfold :: forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (RecordField s a)
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (RecordField s a)
    $ctoConstr :: forall s a. (Data s, Data a) => RecordField s a -> Constr
    toConstr :: RecordField s a -> Constr
    $cdataTypeOf :: forall s a. (Data s, Data a) => RecordField s a -> DataType
    dataTypeOf :: RecordField s a -> DataType
    $cdataCast1 :: forall s a (t :: * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (RecordField s a))
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (RecordField s a))
    $cdataCast2 :: forall s a (t :: * -> * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (RecordField s a))
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (RecordField s a))
    $cgmapT :: forall s a.
    (Data s, Data a) =>
    (forall b. Data b => b -> b) -> RecordField s a -> RecordField s a
    gmapT :: (forall b. Data b => b -> b) -> RecordField s a -> RecordField s a
    $cgmapQl :: forall s a r r'.
    (Data s, Data a) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> RecordField s a -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> RecordField s a -> r
    $cgmapQr :: forall s a r r'.
    (Data s, Data a) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> RecordField s a -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> RecordField s a -> r
    $cgmapQ :: forall s a u.
    (Data s, Data a) =>
    (forall d. Data d => d -> u) -> RecordField s a -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> RecordField s a -> [u]
    $cgmapQi :: forall s a u.
    (Data s, Data a) =>
    Int -> (forall d. Data d => d -> u) -> RecordField s a -> u
    gmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> RecordField s a -> u
    $cgmapM :: forall s a (m :: * -> *).
    (Data s, Data a, Monad m) =>
    (forall d. Data d => d -> m d)
    -> RecordField s a -> m (RecordField s a)
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> RecordField s a -> m (RecordField s a)
    $cgmapMp :: forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> RecordField s a -> m (RecordField s a)
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> RecordField s a -> m (RecordField s a)
    $cgmapMo :: forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> RecordField s a -> m (RecordField s a)
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> RecordField s a -> m (RecordField s a)
    Data, RecordField s a -> RecordField s a -> Bool
    (RecordField s a -> RecordField s a -> Bool)
    -> (RecordField s a -> RecordField s a -> Bool)
    -> Eq (RecordField s a)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall s a.
    (Eq s, Eq a) =>
    RecordField s a -> RecordField s a -> Bool
    $c== :: forall s a.
    (Eq s, Eq a) =>
    RecordField s a -> RecordField s a -> Bool
    == :: RecordField s a -> RecordField s a -> Bool
    $c/= :: forall s a.
    (Eq s, Eq a) =>
    RecordField s a -> RecordField s a -> Bool
    /= :: RecordField s a -> RecordField s a -> Bool
    Eq, (forall m. Monoid m => RecordField s m -> m)
    -> (forall m a. Monoid m => (a -> m) -> RecordField s a -> m)
    -> (forall m a. Monoid m => (a -> m) -> RecordField s a -> m)
    -> (forall a b. (a -> b -> b) -> b -> RecordField s a -> b)
    -> (forall a b. (a -> b -> b) -> b -> RecordField s a -> b)
    -> (forall b a. (b -> a -> b) -> b -> RecordField s a -> b)
    -> (forall b a. (b -> a -> b) -> b -> RecordField s a -> b)
    -> (forall a. (a -> a -> a) -> RecordField s a -> a)
    -> (forall a. (a -> a -> a) -> RecordField s a -> a)
    -> (forall a. RecordField s a -> [a])
    -> (forall a. RecordField s a -> Bool)
    -> (forall a. RecordField s a -> Int)
    -> (forall a. Eq a => a -> RecordField s a -> Bool)
    -> (forall a. Ord a => RecordField s a -> a)
    -> (forall a. Ord a => RecordField s a -> a)
    -> (forall a. Num a => RecordField s a -> a)
    -> (forall a. Num a => RecordField s a -> a)
    -> Foldable (RecordField s)
    forall a. Eq a => a -> RecordField s a -> Bool
    forall a. Num a => RecordField s a -> a
    forall a. Ord a => RecordField s a -> a
    forall m. Monoid m => RecordField s m -> m
    forall a. RecordField s a -> Bool
    forall a. RecordField s a -> Int
    forall a. RecordField s a -> [a]
    forall a. (a -> a -> a) -> RecordField s a -> a
    forall s a. Eq a => a -> RecordField s a -> Bool
    forall s a. Num a => RecordField s a -> a
    forall s a. Ord a => RecordField s a -> a
    forall m a. Monoid m => (a -> m) -> RecordField s a -> m
    forall s m. Monoid m => RecordField s m -> m
    forall s a. RecordField s a -> Bool
    forall s a. RecordField s a -> Int
    forall s a. RecordField s a -> [a]
    forall b a. (b -> a -> b) -> b -> RecordField s a -> b
    forall a b. (a -> b -> b) -> b -> RecordField s a -> b
    forall s a. (a -> a -> a) -> RecordField s a -> a
    forall s m a. Monoid m => (a -> m) -> RecordField s a -> m
    forall s b a. (b -> a -> b) -> b -> RecordField s a -> b
    forall s a b. (a -> b -> b) -> b -> RecordField s a -> b
    forall (t :: * -> *).
    (forall m. Monoid m => t m -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. t a -> [a])
    -> (forall a. t a -> Bool)
    -> (forall a. t a -> Int)
    -> (forall a. Eq a => a -> t a -> Bool)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> Foldable t
    $cfold :: forall s m. Monoid m => RecordField s m -> m
    fold :: forall m. Monoid m => RecordField s m -> m
    $cfoldMap :: forall s m a. Monoid m => (a -> m) -> RecordField s a -> m
    foldMap :: forall m a. Monoid m => (a -> m) -> RecordField s a -> m
    $cfoldMap' :: forall s m a. Monoid m => (a -> m) -> RecordField s a -> m
    foldMap' :: forall m a. Monoid m => (a -> m) -> RecordField s a -> m
    $cfoldr :: forall s a b. (a -> b -> b) -> b -> RecordField s a -> b
    foldr :: forall a b. (a -> b -> b) -> b -> RecordField s a -> b
    $cfoldr' :: forall s a b. (a -> b -> b) -> b -> RecordField s a -> b
    foldr' :: forall a b. (a -> b -> b) -> b -> RecordField s a -> b
    $cfoldl :: forall s b a. (b -> a -> b) -> b -> RecordField s a -> b
    foldl :: forall b a. (b -> a -> b) -> b -> RecordField s a -> b
    $cfoldl' :: forall s b a. (b -> a -> b) -> b -> RecordField s a -> b
    foldl' :: forall b a. (b -> a -> b) -> b -> RecordField s a -> b
    $cfoldr1 :: forall s a. (a -> a -> a) -> RecordField s a -> a
    foldr1 :: forall a. (a -> a -> a) -> RecordField s a -> a
    $cfoldl1 :: forall s a. (a -> a -> a) -> RecordField s a -> a
    foldl1 :: forall a. (a -> a -> a) -> RecordField s a -> a
    $ctoList :: forall s a. RecordField s a -> [a]
    toList :: forall a. RecordField s a -> [a]
    $cnull :: forall s a. RecordField s a -> Bool
    null :: forall a. RecordField s a -> Bool
    $clength :: forall s a. RecordField s a -> Int
    length :: forall a. RecordField s a -> Int
    $celem :: forall s a. Eq a => a -> RecordField s a -> Bool
    elem :: forall a. Eq a => a -> RecordField s a -> Bool
    $cmaximum :: forall s a. Ord a => RecordField s a -> a
    maximum :: forall a. Ord a => RecordField s a -> a
    $cminimum :: forall s a. Ord a => RecordField s a -> a
    minimum :: forall a. Ord a => RecordField s a -> a
    $csum :: forall s a. Num a => RecordField s a -> a
    sum :: forall a. Num a => RecordField s a -> a
    $cproduct :: forall s a. Num a => RecordField s a -> a
    product :: forall a. Num a => RecordField s a -> a
    Foldable, (forall a b. (a -> b) -> RecordField s a -> RecordField s b)
    -> (forall a b. a -> RecordField s b -> RecordField s a)
    -> Functor (RecordField s)
    forall a b. a -> RecordField s b -> RecordField s a
    forall a b. (a -> b) -> RecordField s a -> RecordField s b
    forall s a b. a -> RecordField s b -> RecordField s a
    forall s a b. (a -> b) -> RecordField s a -> RecordField s b
    forall (f :: * -> *).
    (forall a b. (a -> b) -> f a -> f b)
    -> (forall a b. a -> f b -> f a) -> Functor f
    $cfmap :: forall s a b. (a -> b) -> RecordField s a -> RecordField s b
    fmap :: forall a b. (a -> b) -> RecordField s a -> RecordField s b
    $c<$ :: forall s a b. a -> RecordField s b -> RecordField s a
    <$ :: forall a b. a -> RecordField s b -> RecordField s a
    Functor, (forall x. RecordField s a -> Rep (RecordField s a) x)
    -> (forall x. Rep (RecordField s a) x -> RecordField s a)
    -> Generic (RecordField s a)
    forall x. Rep (RecordField s a) x -> RecordField s a
    forall x. RecordField s a -> Rep (RecordField s a) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall s a x. Rep (RecordField s a) x -> RecordField s a
    forall s a x. RecordField s a -> Rep (RecordField s a) x
    $cfrom :: forall s a x. RecordField s a -> Rep (RecordField s a) x
    from :: forall x. RecordField s a -> Rep (RecordField s a) x
    $cto :: forall s a x. Rep (RecordField s a) x -> RecordField s a
    to :: forall x. Rep (RecordField s a) x -> RecordField s a
    Generic, (forall (m :: * -> *). Quote m => RecordField s a -> m Exp)
    -> (forall (m :: * -> *).
        Quote m =>
        RecordField s a -> Code m (RecordField s a))
    -> Lift (RecordField s a)
    forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    RecordField s a -> m Exp
    forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    RecordField s a -> Code m (RecordField s a)
    forall t.
    (forall (m :: * -> *). Quote m => t -> m Exp)
    -> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
    forall (m :: * -> *). Quote m => RecordField s a -> m Exp
    forall (m :: * -> *).
    Quote m =>
    RecordField s a -> Code m (RecordField s a)
    $clift :: forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    RecordField s a -> m Exp
    lift :: forall (m :: * -> *). Quote m => RecordField s a -> m Exp
    $cliftTyped :: forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    RecordField s a -> Code m (RecordField s a)
    liftTyped :: forall (m :: * -> *).
    Quote m =>
    RecordField s a -> Code m (RecordField s a)
    Lift, RecordField s a -> ()
    (RecordField s a -> ()) -> NFData (RecordField s a)
    forall a. (a -> ()) -> NFData a
    forall s a. (NFData s, NFData a) => RecordField s a -> ()
    $crnf :: forall s a. (NFData s, NFData a) => RecordField s a -> ()
    rnf :: RecordField s a -> ()
    NFData, Eq (RecordField s a)
    Eq (RecordField s a)
    -> (RecordField s a -> RecordField s a -> Ordering)
    -> (RecordField s a -> RecordField s a -> Bool)
    -> (RecordField s a -> RecordField s a -> Bool)
    -> (RecordField s a -> RecordField s a -> Bool)
    -> (RecordField s a -> RecordField s a -> Bool)
    -> (RecordField s a -> RecordField s a -> RecordField s a)
    -> (RecordField s a -> RecordField s a -> RecordField s a)
    -> Ord (RecordField s a)
    RecordField s a -> RecordField s a -> Bool
    RecordField s a -> RecordField s a -> Ordering
    RecordField s a -> RecordField s a -> RecordField s a
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall {s} {a}. (Ord s, Ord a) => Eq (RecordField s a)
    forall s a.
    (Ord s, Ord a) =>
    RecordField s a -> RecordField s a -> Bool
    forall s a.
    (Ord s, Ord a) =>
    RecordField s a -> RecordField s a -> Ordering
    forall s a.
    (Ord s, Ord a) =>
    RecordField s a -> RecordField s a -> RecordField s a
    $ccompare :: forall s a.
    (Ord s, Ord a) =>
    RecordField s a -> RecordField s a -> Ordering
    compare :: RecordField s a -> RecordField s a -> Ordering
    $c< :: forall s a.
    (Ord s, Ord a) =>
    RecordField s a -> RecordField s a -> Bool
    < :: RecordField s a -> RecordField s a -> Bool
    $c<= :: forall s a.
    (Ord s, Ord a) =>
    RecordField s a -> RecordField s a -> Bool
    <= :: RecordField s a -> RecordField s a -> Bool
    $c> :: forall s a.
    (Ord s, Ord a) =>
    RecordField s a -> RecordField s a -> Bool
    > :: RecordField s a -> RecordField s a -> Bool
    $c>= :: forall s a.
    (Ord s, Ord a) =>
    RecordField s a -> RecordField s a -> Bool
    >= :: RecordField s a -> RecordField s a -> Bool
    $cmax :: forall s a.
    (Ord s, Ord a) =>
    RecordField s a -> RecordField s a -> RecordField s a
    max :: RecordField s a -> RecordField s a -> RecordField s a
    $cmin :: forall s a.
    (Ord s, Ord a) =>
    RecordField s a -> RecordField s a -> RecordField s a
    min :: RecordField s a -> RecordField s a -> RecordField s a
    Ord, Int -> RecordField s a -> ShowS
    [RecordField s a] -> ShowS
    RecordField s a -> String
    (Int -> RecordField s a -> ShowS)
    -> (RecordField s a -> String)
    -> ([RecordField s a] -> ShowS)
    -> Show (RecordField s a)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall s a. (Show s, Show a) => Int -> RecordField s a -> ShowS
    forall s a. (Show s, Show a) => [RecordField s a] -> ShowS
    forall s a. (Show s, Show a) => RecordField s a -> String
    $cshowsPrec :: forall s a. (Show s, Show a) => Int -> RecordField s a -> ShowS
    showsPrec :: Int -> RecordField s a -> ShowS
    $cshow :: forall s a. (Show s, Show a) => RecordField s a -> String
    show :: RecordField s a -> String
    $cshowList :: forall s a. (Show s, Show a) => [RecordField s a] -> ShowS
    showList :: [RecordField s a] -> ShowS
    Show, Functor (RecordField s)
    Foldable (RecordField s)
    Functor (RecordField s)
    -> Foldable (RecordField s)
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> RecordField s a -> f (RecordField s b))
    -> (forall (f :: * -> *) a.
        Applicative f =>
        RecordField s (f a) -> f (RecordField s a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> RecordField s a -> m (RecordField s b))
    -> (forall (m :: * -> *) a.
        Monad m =>
        RecordField s (m a) -> m (RecordField s a))
    -> Traversable (RecordField s)
    forall s. Functor (RecordField s)
    forall s. Foldable (RecordField s)
    forall s (m :: * -> *) a.
    Monad m =>
    RecordField s (m a) -> m (RecordField s a)
    forall s (f :: * -> *) a.
    Applicative f =>
    RecordField s (f a) -> f (RecordField s a)
    forall s (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> RecordField s a -> m (RecordField s b)
    forall s (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> RecordField s a -> f (RecordField s b)
    forall (t :: * -> *).
    Functor t
    -> Foldable t
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> t a -> f (t b))
    -> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> t a -> m (t b))
    -> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
    -> Traversable t
    forall (m :: * -> *) a.
    Monad m =>
    RecordField s (m a) -> m (RecordField s a)
    forall (f :: * -> *) a.
    Applicative f =>
    RecordField s (f a) -> f (RecordField s a)
    forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> RecordField s a -> m (RecordField s b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> RecordField s a -> f (RecordField s b)
    $ctraverse :: forall s (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> RecordField s a -> f (RecordField s b)
    traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> RecordField s a -> f (RecordField s b)
    $csequenceA :: forall s (f :: * -> *) a.
    Applicative f =>
    RecordField s (f a) -> f (RecordField s a)
    sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    RecordField s (f a) -> f (RecordField s a)
    $cmapM :: forall s (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> RecordField s a -> m (RecordField s b)
    mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> RecordField s a -> m (RecordField s b)
    $csequence :: forall s (m :: * -> *) a.
    Monad m =>
    RecordField s (m a) -> m (RecordField s a)
    sequence :: forall (m :: * -> *) a.
    Monad m =>
    RecordField s (m a) -> m (RecordField s a)
    Traversable)

    -- | Construct a 'RecordField' with no src information
    makeRecordField :: Expr s a -> RecordField s a
    makeRecordField :: forall s a. Expr s a -> RecordField s a
    makeRecordField Expr s a
    e = Maybe s -> Expr s a -> Maybe s -> Maybe s -> RecordField s a
    forall s a.
    Maybe s -> Expr s a -> Maybe s -> Maybe s -> RecordField s a
    RecordField Maybe s
    forall a. Maybe a
    Nothing Expr s a
    e Maybe s
    forall a. Maybe a
    Nothing Maybe s
    forall a. Maybe a
    Nothing

    instance Bifunctor RecordField where
        first :: forall a b c. (a -> b) -> RecordField a c -> RecordField b c
    first a -> b
    k (RecordField Maybe a
    s0 Expr a c
    value Maybe a
    s1 Maybe a
    s2) =
            Maybe b -> Expr b c -> Maybe b -> Maybe b -> RecordField b c
    forall s a.
    Maybe s -> Expr s a -> Maybe s -> Maybe s -> RecordField s a
    RecordField (a -> b
    k (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Maybe a
    s0) ((a -> b) -> Expr a c -> Expr b c
    forall a b c. (a -> b) -> Expr a c -> Expr b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k Expr a c
    value) (a -> b
    k (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Maybe a
    s1) (a -> b
    k (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Maybe a
    s2)
        second :: forall b c a. (b -> c) -> RecordField a b -> RecordField a c
    second = (b -> c) -> RecordField a b -> RecordField a c
    forall a b. (a -> b) -> RecordField a a -> RecordField a b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap

    -- | Record the label of a function or a function-type expression
    --
    -- For example,
    --
    -- > λ({- A -} a {- B -} : {- C -} T) -> e
    --
    -- … will be instantiated as follows:
    --
    -- * @functionBindingSrc0@ corresponds to the @A@ comment
    -- * @functionBindingVariable@ is @a@
    -- * @functionBindingSrc1@ corresponds to the @B@ comment
    -- * @functionBindingSrc2@ corresponds to the @C@ comment
    -- * @functionBindingAnnotation@ is @T@
    data FunctionBinding s a = FunctionBinding
        { forall s a. FunctionBinding s a -> Maybe s
    functionBindingSrc0 :: Maybe s
        , forall s a. FunctionBinding s a -> Text
    functionBindingVariable :: Text
        , forall s a. FunctionBinding s a -> Maybe s
    functionBindingSrc1 :: Maybe s
        , forall s a. FunctionBinding s a -> Maybe s
    functionBindingSrc2 :: Maybe s
        , forall s a. FunctionBinding s a -> Expr s a
    functionBindingAnnotation :: Expr s a
        } deriving (Typeable (FunctionBinding s a)
    Typeable (FunctionBinding s a)
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g)
        -> FunctionBinding s a
        -> c (FunctionBinding s a))
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (FunctionBinding s a))
    -> (FunctionBinding s a -> Constr)
    -> (FunctionBinding s a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (FunctionBinding s a)))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c (FunctionBinding s a)))
    -> ((forall b. Data b => b -> b)
        -> FunctionBinding s a -> FunctionBinding s a)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> FunctionBinding s a -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> FunctionBinding s a -> r)
    -> (forall u.
        (forall d. Data d => d -> u) -> FunctionBinding s a -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> FunctionBinding s a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d)
        -> FunctionBinding s a -> m (FunctionBinding s a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> FunctionBinding s a -> m (FunctionBinding s a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> FunctionBinding s a -> m (FunctionBinding s a))
    -> Data (FunctionBinding s a)
    FunctionBinding s a -> Constr
    FunctionBinding s a -> DataType
    (forall b. Data b => b -> b)
    -> FunctionBinding s a -> FunctionBinding s a
    forall a.
    Typeable a
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u.
    Int -> (forall d. Data d => d -> u) -> FunctionBinding s a -> u
    forall u.
    (forall d. Data d => d -> u) -> FunctionBinding s a -> [u]
    forall {s} {a}. (Data s, Data a) => Typeable (FunctionBinding s a)
    forall s a. (Data s, Data a) => FunctionBinding s a -> Constr
    forall s a. (Data s, Data a) => FunctionBinding s a -> DataType
    forall s a.
    (Data s, Data a) =>
    (forall b. Data b => b -> b)
    -> FunctionBinding s a -> FunctionBinding s a
    forall s a u.
    (Data s, Data a) =>
    Int -> (forall d. Data d => d -> u) -> FunctionBinding s a -> u
    forall s a u.
    (Data s, Data a) =>
    (forall d. Data d => d -> u) -> FunctionBinding s a -> [u]
    forall s a r r'.
    (Data s, Data a) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> FunctionBinding s a -> r
    forall s a r r'.
    (Data s, Data a) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> FunctionBinding s a -> r
    forall s a (m :: * -> *).
    (Data s, Data a, Monad m) =>
    (forall d. Data d => d -> m d)
    -> FunctionBinding s a -> m (FunctionBinding s a)
    forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> FunctionBinding s a -> m (FunctionBinding s a)
    forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (FunctionBinding s a)
    forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> FunctionBinding s a
    -> c (FunctionBinding s a)
    forall s a (t :: * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (FunctionBinding s a))
    forall s a (t :: * -> * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (FunctionBinding s a))
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> FunctionBinding s a -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> FunctionBinding s a -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> FunctionBinding s a -> m (FunctionBinding s a)
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> FunctionBinding s a -> m (FunctionBinding s a)
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (FunctionBinding s a)
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> FunctionBinding s a
    -> c (FunctionBinding s a)
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (FunctionBinding s a))
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (FunctionBinding s a))
    $cgfoldl :: forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> FunctionBinding s a
    -> c (FunctionBinding s a)
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> FunctionBinding s a
    -> c (FunctionBinding s a)
    $cgunfold :: forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (FunctionBinding s a)
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (FunctionBinding s a)
    $ctoConstr :: forall s a. (Data s, Data a) => FunctionBinding s a -> Constr
    toConstr :: FunctionBinding s a -> Constr
    $cdataTypeOf :: forall s a. (Data s, Data a) => FunctionBinding s a -> DataType
    dataTypeOf :: FunctionBinding s a -> DataType
    $cdataCast1 :: forall s a (t :: * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (FunctionBinding s a))
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (FunctionBinding s a))
    $cdataCast2 :: forall s a (t :: * -> * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (FunctionBinding s a))
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (FunctionBinding s a))
    $cgmapT :: forall s a.
    (Data s, Data a) =>
    (forall b. Data b => b -> b)
    -> FunctionBinding s a -> FunctionBinding s a
    gmapT :: (forall b. Data b => b -> b)
    -> FunctionBinding s a -> FunctionBinding s a
    $cgmapQl :: forall s a r r'.
    (Data s, Data a) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> FunctionBinding s a -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> FunctionBinding s a -> r
    $cgmapQr :: forall s a r r'.
    (Data s, Data a) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> FunctionBinding s a -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> FunctionBinding s a -> r
    $cgmapQ :: forall s a u.
    (Data s, Data a) =>
    (forall d. Data d => d -> u) -> FunctionBinding s a -> [u]
    gmapQ :: forall u.
    (forall d. Data d => d -> u) -> FunctionBinding s a -> [u]
    $cgmapQi :: forall s a u.
    (Data s, Data a) =>
    Int -> (forall d. Data d => d -> u) -> FunctionBinding s a -> u
    gmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> FunctionBinding s a -> u
    $cgmapM :: forall s a (m :: * -> *).
    (Data s, Data a, Monad m) =>
    (forall d. Data d => d -> m d)
    -> FunctionBinding s a -> m (FunctionBinding s a)
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> FunctionBinding s a -> m (FunctionBinding s a)
    $cgmapMp :: forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> FunctionBinding s a -> m (FunctionBinding s a)
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> FunctionBinding s a -> m (FunctionBinding s a)
    $cgmapMo :: forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> FunctionBinding s a -> m (FunctionBinding s a)
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> FunctionBinding s a -> m (FunctionBinding s a)
    Data, FunctionBinding s a -> FunctionBinding s a -> Bool
    (FunctionBinding s a -> FunctionBinding s a -> Bool)
    -> (FunctionBinding s a -> FunctionBinding s a -> Bool)
    -> Eq (FunctionBinding s a)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall s a.
    (Eq s, Eq a) =>
    FunctionBinding s a -> FunctionBinding s a -> Bool
    $c== :: forall s a.
    (Eq s, Eq a) =>
    FunctionBinding s a -> FunctionBinding s a -> Bool
    == :: FunctionBinding s a -> FunctionBinding s a -> Bool
    $c/= :: forall s a.
    (Eq s, Eq a) =>
    FunctionBinding s a -> FunctionBinding s a -> Bool
    /= :: FunctionBinding s a -> FunctionBinding s a -> Bool
    Eq, (forall m. Monoid m => FunctionBinding s m -> m)
    -> (forall m a. Monoid m => (a -> m) -> FunctionBinding s a -> m)
    -> (forall m a. Monoid m => (a -> m) -> FunctionBinding s a -> m)
    -> (forall a b. (a -> b -> b) -> b -> FunctionBinding s a -> b)
    -> (forall a b. (a -> b -> b) -> b -> FunctionBinding s a -> b)
    -> (forall b a. (b -> a -> b) -> b -> FunctionBinding s a -> b)
    -> (forall b a. (b -> a -> b) -> b -> FunctionBinding s a -> b)
    -> (forall a. (a -> a -> a) -> FunctionBinding s a -> a)
    -> (forall a. (a -> a -> a) -> FunctionBinding s a -> a)
    -> (forall a. FunctionBinding s a -> [a])
    -> (forall a. FunctionBinding s a -> Bool)
    -> (forall a. FunctionBinding s a -> Int)
    -> (forall a. Eq a => a -> FunctionBinding s a -> Bool)
    -> (forall a. Ord a => FunctionBinding s a -> a)
    -> (forall a. Ord a => FunctionBinding s a -> a)
    -> (forall a. Num a => FunctionBinding s a -> a)
    -> (forall a. Num a => FunctionBinding s a -> a)
    -> Foldable (FunctionBinding s)
    forall a. Eq a => a -> FunctionBinding s a -> Bool
    forall a. Num a => FunctionBinding s a -> a
    forall a. Ord a => FunctionBinding s a -> a
    forall m. Monoid m => FunctionBinding s m -> m
    forall a. FunctionBinding s a -> Bool
    forall a. FunctionBinding s a -> Int
    forall a. FunctionBinding s a -> [a]
    forall a. (a -> a -> a) -> FunctionBinding s a -> a
    forall s a. Eq a => a -> FunctionBinding s a -> Bool
    forall s a. Num a => FunctionBinding s a -> a
    forall s a. Ord a => FunctionBinding s a -> a
    forall m a. Monoid m => (a -> m) -> FunctionBinding s a -> m
    forall s m. Monoid m => FunctionBinding s m -> m
    forall s a. FunctionBinding s a -> Bool
    forall s a. FunctionBinding s a -> Int
    forall s a. FunctionBinding s a -> [a]
    forall b a. (b -> a -> b) -> b -> FunctionBinding s a -> b
    forall a b. (a -> b -> b) -> b -> FunctionBinding s a -> b
    forall s a. (a -> a -> a) -> FunctionBinding s a -> a
    forall s m a. Monoid m => (a -> m) -> FunctionBinding s a -> m
    forall s b a. (b -> a -> b) -> b -> FunctionBinding s a -> b
    forall s a b. (a -> b -> b) -> b -> FunctionBinding s a -> b
    forall (t :: * -> *).
    (forall m. Monoid m => t m -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. t a -> [a])
    -> (forall a. t a -> Bool)
    -> (forall a. t a -> Int)
    -> (forall a. Eq a => a -> t a -> Bool)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> Foldable t
    $cfold :: forall s m. Monoid m => FunctionBinding s m -> m
    fold :: forall m. Monoid m => FunctionBinding s m -> m
    $cfoldMap :: forall s m a. Monoid m => (a -> m) -> FunctionBinding s a -> m
    foldMap :: forall m a. Monoid m => (a -> m) -> FunctionBinding s a -> m
    $cfoldMap' :: forall s m a. Monoid m => (a -> m) -> FunctionBinding s a -> m
    foldMap' :: forall m a. Monoid m => (a -> m) -> FunctionBinding s a -> m
    $cfoldr :: forall s a b. (a -> b -> b) -> b -> FunctionBinding s a -> b
    foldr :: forall a b. (a -> b -> b) -> b -> FunctionBinding s a -> b
    $cfoldr' :: forall s a b. (a -> b -> b) -> b -> FunctionBinding s a -> b
    foldr' :: forall a b. (a -> b -> b) -> b -> FunctionBinding s a -> b
    $cfoldl :: forall s b a. (b -> a -> b) -> b -> FunctionBinding s a -> b
    foldl :: forall b a. (b -> a -> b) -> b -> FunctionBinding s a -> b
    $cfoldl' :: forall s b a. (b -> a -> b) -> b -> FunctionBinding s a -> b
    foldl' :: forall b a. (b -> a -> b) -> b -> FunctionBinding s a -> b
    $cfoldr1 :: forall s a. (a -> a -> a) -> FunctionBinding s a -> a
    foldr1 :: forall a. (a -> a -> a) -> FunctionBinding s a -> a
    $cfoldl1 :: forall s a. (a -> a -> a) -> FunctionBinding s a -> a
    foldl1 :: forall a. (a -> a -> a) -> FunctionBinding s a -> a
    $ctoList :: forall s a. FunctionBinding s a -> [a]
    toList :: forall a. FunctionBinding s a -> [a]
    $cnull :: forall s a. FunctionBinding s a -> Bool
    null :: forall a. FunctionBinding s a -> Bool
    $clength :: forall s a. FunctionBinding s a -> Int
    length :: forall a. FunctionBinding s a -> Int
    $celem :: forall s a. Eq a => a -> FunctionBinding s a -> Bool
    elem :: forall a. Eq a => a -> FunctionBinding s a -> Bool
    $cmaximum :: forall s a. Ord a => FunctionBinding s a -> a
    maximum :: forall a. Ord a => FunctionBinding s a -> a
    $cminimum :: forall s a. Ord a => FunctionBinding s a -> a
    minimum :: forall a. Ord a => FunctionBinding s a -> a
    $csum :: forall s a. Num a => FunctionBinding s a -> a
    sum :: forall a. Num a => FunctionBinding s a -> a
    $cproduct :: forall s a. Num a => FunctionBinding s a -> a
    product :: forall a. Num a => FunctionBinding s a -> a
    Foldable, (forall a b.
     (a -> b) -> FunctionBinding s a -> FunctionBinding s b)
    -> (forall a b. a -> FunctionBinding s b -> FunctionBinding s a)
    -> Functor (FunctionBinding s)
    forall a b. a -> FunctionBinding s b -> FunctionBinding s a
    forall a b. (a -> b) -> FunctionBinding s a -> FunctionBinding s b
    forall s a b. a -> FunctionBinding s b -> FunctionBinding s a
    forall s a b.
    (a -> b) -> FunctionBinding s a -> FunctionBinding s b
    forall (f :: * -> *).
    (forall a b. (a -> b) -> f a -> f b)
    -> (forall a b. a -> f b -> f a) -> Functor f
    $cfmap :: forall s a b.
    (a -> b) -> FunctionBinding s a -> FunctionBinding s b
    fmap :: forall a b. (a -> b) -> FunctionBinding s a -> FunctionBinding s b
    $c<$ :: forall s a b. a -> FunctionBinding s b -> FunctionBinding s a
    <$ :: forall a b. a -> FunctionBinding s b -> FunctionBinding s a
    Functor, (forall x. FunctionBinding s a -> Rep (FunctionBinding s a) x)
    -> (forall x. Rep (FunctionBinding s a) x -> FunctionBinding s a)
    -> Generic (FunctionBinding s a)
    forall x. Rep (FunctionBinding s a) x -> FunctionBinding s a
    forall x. FunctionBinding s a -> Rep (FunctionBinding s a) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall s a x. Rep (FunctionBinding s a) x -> FunctionBinding s a
    forall s a x. FunctionBinding s a -> Rep (FunctionBinding s a) x
    $cfrom :: forall s a x. FunctionBinding s a -> Rep (FunctionBinding s a) x
    from :: forall x. FunctionBinding s a -> Rep (FunctionBinding s a) x
    $cto :: forall s a x. Rep (FunctionBinding s a) x -> FunctionBinding s a
    to :: forall x. Rep (FunctionBinding s a) x -> FunctionBinding s a
    Generic, (forall (m :: * -> *). Quote m => FunctionBinding s a -> m Exp)
    -> (forall (m :: * -> *).
        Quote m =>
        FunctionBinding s a -> Code m (FunctionBinding s a))
    -> Lift (FunctionBinding s a)
    forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    FunctionBinding s a -> m Exp
    forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    FunctionBinding s a -> Code m (FunctionBinding s a)
    forall t.
    (forall (m :: * -> *). Quote m => t -> m Exp)
    -> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
    forall (m :: * -> *). Quote m => FunctionBinding s a -> m Exp
    forall (m :: * -> *).
    Quote m =>
    FunctionBinding s a -> Code m (FunctionBinding s a)
    $clift :: forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    FunctionBinding s a -> m Exp
    lift :: forall (m :: * -> *). Quote m => FunctionBinding s a -> m Exp
    $cliftTyped :: forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    FunctionBinding s a -> Code m (FunctionBinding s a)
    liftTyped :: forall (m :: * -> *).
    Quote m =>
    FunctionBinding s a -> Code m (FunctionBinding s a)
    Lift, FunctionBinding s a -> ()
    (FunctionBinding s a -> ()) -> NFData (FunctionBinding s a)
    forall a. (a -> ()) -> NFData a
    forall s a. (NFData s, NFData a) => FunctionBinding s a -> ()
    $crnf :: forall s a. (NFData s, NFData a) => FunctionBinding s a -> ()
    rnf :: FunctionBinding s a -> ()
    NFData, Eq (FunctionBinding s a)
    Eq (FunctionBinding s a)
    -> (FunctionBinding s a -> FunctionBinding s a -> Ordering)
    -> (FunctionBinding s a -> FunctionBinding s a -> Bool)
    -> (FunctionBinding s a -> FunctionBinding s a -> Bool)
    -> (FunctionBinding s a -> FunctionBinding s a -> Bool)
    -> (FunctionBinding s a -> FunctionBinding s a -> Bool)
    -> (FunctionBinding s a
        -> FunctionBinding s a -> FunctionBinding s a)
    -> (FunctionBinding s a
        -> FunctionBinding s a -> FunctionBinding s a)
    -> Ord (FunctionBinding s a)
    FunctionBinding s a -> FunctionBinding s a -> Bool
    FunctionBinding s a -> FunctionBinding s a -> Ordering
    FunctionBinding s a -> FunctionBinding s a -> FunctionBinding s a
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall {s} {a}. (Ord s, Ord a) => Eq (FunctionBinding s a)
    forall s a.
    (Ord s, Ord a) =>
    FunctionBinding s a -> FunctionBinding s a -> Bool
    forall s a.
    (Ord s, Ord a) =>
    FunctionBinding s a -> FunctionBinding s a -> Ordering
    forall s a.
    (Ord s, Ord a) =>
    FunctionBinding s a -> FunctionBinding s a -> FunctionBinding s a
    $ccompare :: forall s a.
    (Ord s, Ord a) =>
    FunctionBinding s a -> FunctionBinding s a -> Ordering
    compare :: FunctionBinding s a -> FunctionBinding s a -> Ordering
    $c< :: forall s a.
    (Ord s, Ord a) =>
    FunctionBinding s a -> FunctionBinding s a -> Bool
    < :: FunctionBinding s a -> FunctionBinding s a -> Bool
    $c<= :: forall s a.
    (Ord s, Ord a) =>
    FunctionBinding s a -> FunctionBinding s a -> Bool
    <= :: FunctionBinding s a -> FunctionBinding s a -> Bool
    $c> :: forall s a.
    (Ord s, Ord a) =>
    FunctionBinding s a -> FunctionBinding s a -> Bool
    > :: FunctionBinding s a -> FunctionBinding s a -> Bool
    $c>= :: forall s a.
    (Ord s, Ord a) =>
    FunctionBinding s a -> FunctionBinding s a -> Bool
    >= :: FunctionBinding s a -> FunctionBinding s a -> Bool
    $cmax :: forall s a.
    (Ord s, Ord a) =>
    FunctionBinding s a -> FunctionBinding s a -> FunctionBinding s a
    max :: FunctionBinding s a -> FunctionBinding s a -> FunctionBinding s a
    $cmin :: forall s a.
    (Ord s, Ord a) =>
    FunctionBinding s a -> FunctionBinding s a -> FunctionBinding s a
    min :: FunctionBinding s a -> FunctionBinding s a -> FunctionBinding s a
    Ord, Int -> FunctionBinding s a -> ShowS
    [FunctionBinding s a] -> ShowS
    FunctionBinding s a -> String
    (Int -> FunctionBinding s a -> ShowS)
    -> (FunctionBinding s a -> String)
    -> ([FunctionBinding s a] -> ShowS)
    -> Show (FunctionBinding s a)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall s a. (Show s, Show a) => Int -> FunctionBinding s a -> ShowS
    forall s a. (Show s, Show a) => [FunctionBinding s a] -> ShowS
    forall s a. (Show s, Show a) => FunctionBinding s a -> String
    $cshowsPrec :: forall s a. (Show s, Show a) => Int -> FunctionBinding s a -> ShowS
    showsPrec :: Int -> FunctionBinding s a -> ShowS
    $cshow :: forall s a. (Show s, Show a) => FunctionBinding s a -> String
    show :: FunctionBinding s a -> String
    $cshowList :: forall s a. (Show s, Show a) => [FunctionBinding s a] -> ShowS
    showList :: [FunctionBinding s a] -> ShowS
    Show, Functor (FunctionBinding s)
    Foldable (FunctionBinding s)
    Functor (FunctionBinding s)
    -> Foldable (FunctionBinding s)
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> FunctionBinding s a -> f (FunctionBinding s b))
    -> (forall (f :: * -> *) a.
        Applicative f =>
        FunctionBinding s (f a) -> f (FunctionBinding s a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> FunctionBinding s a -> m (FunctionBinding s b))
    -> (forall (m :: * -> *) a.
        Monad m =>
        FunctionBinding s (m a) -> m (FunctionBinding s a))
    -> Traversable (FunctionBinding s)
    forall s. Functor (FunctionBinding s)
    forall s. Foldable (FunctionBinding s)
    forall s (m :: * -> *) a.
    Monad m =>
    FunctionBinding s (m a) -> m (FunctionBinding s a)
    forall s (f :: * -> *) a.
    Applicative f =>
    FunctionBinding s (f a) -> f (FunctionBinding s a)
    forall s (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> FunctionBinding s a -> m (FunctionBinding s b)
    forall s (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> FunctionBinding s a -> f (FunctionBinding s b)
    forall (t :: * -> *).
    Functor t
    -> Foldable t
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> t a -> f (t b))
    -> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> t a -> m (t b))
    -> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
    -> Traversable t
    forall (m :: * -> *) a.
    Monad m =>
    FunctionBinding s (m a) -> m (FunctionBinding s a)
    forall (f :: * -> *) a.
    Applicative f =>
    FunctionBinding s (f a) -> f (FunctionBinding s a)
    forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> FunctionBinding s a -> m (FunctionBinding s b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> FunctionBinding s a -> f (FunctionBinding s b)
    $ctraverse :: forall s (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> FunctionBinding s a -> f (FunctionBinding s b)
    traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> FunctionBinding s a -> f (FunctionBinding s b)
    $csequenceA :: forall s (f :: * -> *) a.
    Applicative f =>
    FunctionBinding s (f a) -> f (FunctionBinding s a)
    sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    FunctionBinding s (f a) -> f (FunctionBinding s a)
    $cmapM :: forall s (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> FunctionBinding s a -> m (FunctionBinding s b)
    mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> FunctionBinding s a -> m (FunctionBinding s b)
    $csequence :: forall s (m :: * -> *) a.
    Monad m =>
    FunctionBinding s (m a) -> m (FunctionBinding s a)
    sequence :: forall (m :: * -> *) a.
    Monad m =>
    FunctionBinding s (m a) -> m (FunctionBinding s a)
    Traversable)

    -- | Smart constructor for 'FunctionBinding' with no src information
    makeFunctionBinding :: Text -> Expr s a -> FunctionBinding s a
    makeFunctionBinding :: forall s a. Text -> Expr s a -> FunctionBinding s a
    makeFunctionBinding Text
    l Expr s a
    t = Maybe s
    -> Text -> Maybe s -> Maybe s -> Expr s a -> FunctionBinding s a
    forall s a.
    Maybe s
    -> Text -> Maybe s -> Maybe s -> Expr s a -> FunctionBinding s a
    FunctionBinding Maybe s
    forall a. Maybe a
    Nothing Text
    l Maybe s
    forall a. Maybe a
    Nothing Maybe s
    forall a. Maybe a
    Nothing Expr s a
    t

    instance Bifunctor FunctionBinding where
        first :: forall a b c.
    (a -> b) -> FunctionBinding a c -> FunctionBinding b c
    first a -> b
    k (FunctionBinding Maybe a
    src0 Text
    label Maybe a
    src1 Maybe a
    src2 Expr a c
    type_) =
            Maybe b
    -> Text -> Maybe b -> Maybe b -> Expr b c -> FunctionBinding b c
    forall s a.
    Maybe s
    -> Text -> Maybe s -> Maybe s -> Expr s a -> FunctionBinding s a
    FunctionBinding (a -> b
    k (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Maybe a
    src0) Text
    label (a -> b
    k (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Maybe a
    src1) (a -> b
    k (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Maybe a
    src2) ((a -> b) -> Expr a c -> Expr b c
    forall a b c. (a -> b) -> Expr a c -> Expr b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k Expr a c
    type_)

        second :: forall b c a.
    (b -> c) -> FunctionBinding a b -> FunctionBinding a c
    second = (b -> c) -> FunctionBinding a b -> FunctionBinding a c
    forall a b. (a -> b) -> FunctionBinding a a -> FunctionBinding a b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap

    -- | Record the field on a selector-expression
    --
    -- For example,
    --
    -- > e . {- A -} x {- B -}
    --
    -- … will be instantiated as follows:
    --
    -- * @fieldSelectionSrc0@ corresponds to the @A@ comment
    -- * @fieldSelectionLabel@ corresponds to @x@
    -- * @fieldSelectionSrc1@ corresponds to the @B@ comment
    --
    -- Given our limitation that not all expressions recover their whitespaces, the
    -- purpose of @fieldSelectionSrc1@ is to save the 'Text.Megaparsec.SourcePos'
    -- where the @fieldSelectionLabel@ ends, but we /still/ use a 'Maybe Src'
    -- (@s = 'Src'@) to be consistent with similar data types such as 'Binding', for
    -- example.
    data FieldSelection s = FieldSelection
        { forall s. FieldSelection s -> Maybe s
    fieldSelectionSrc0 :: Maybe s
        , forall s. FieldSelection s -> Text
    fieldSelectionLabel :: !Text
        , forall s. FieldSelection s -> Maybe s
    fieldSelectionSrc1 :: Maybe s
        } deriving (Typeable (FieldSelection s)
    Typeable (FieldSelection s)
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g)
        -> FieldSelection s
        -> c (FieldSelection s))
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (FieldSelection s))
    -> (FieldSelection s -> Constr)
    -> (FieldSelection s -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (FieldSelection s)))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c (FieldSelection s)))
    -> ((forall b. Data b => b -> b)
        -> FieldSelection s -> FieldSelection s)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> FieldSelection s -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> FieldSelection s -> r)
    -> (forall u.
        (forall d. Data d => d -> u) -> FieldSelection s -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> FieldSelection s -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d)
        -> FieldSelection s -> m (FieldSelection s))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> FieldSelection s -> m (FieldSelection s))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> FieldSelection s -> m (FieldSelection s))
    -> Data (FieldSelection s)
    FieldSelection s -> Constr
    FieldSelection s -> DataType
    (forall b. Data b => b -> b)
    -> FieldSelection s -> FieldSelection s
    forall {s}. Data s => Typeable (FieldSelection s)
    forall s. Data s => FieldSelection s -> Constr
    forall s. Data s => FieldSelection s -> DataType
    forall s.
    Data s =>
    (forall b. Data b => b -> b)
    -> FieldSelection s -> FieldSelection s
    forall s u.
    Data s =>
    Int -> (forall d. Data d => d -> u) -> FieldSelection s -> u
    forall s u.
    Data s =>
    (forall d. Data d => d -> u) -> FieldSelection s -> [u]
    forall s r r'.
    Data s =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> FieldSelection s -> r
    forall s r r'.
    Data s =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> FieldSelection s -> r
    forall s (m :: * -> *).
    (Data s, Monad m) =>
    (forall d. Data d => d -> m d)
    -> FieldSelection s -> m (FieldSelection s)
    forall s (m :: * -> *).
    (Data s, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> FieldSelection s -> m (FieldSelection s)
    forall s (c :: * -> *).
    Data s =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (FieldSelection s)
    forall s (c :: * -> *).
    Data s =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> FieldSelection s -> c (FieldSelection s)
    forall s (t :: * -> *) (c :: * -> *).
    (Data s, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (FieldSelection s))
    forall s (t :: * -> * -> *) (c :: * -> *).
    (Data s, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (FieldSelection s))
    forall a.
    Typeable a
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u.
    Int -> (forall d. Data d => d -> u) -> FieldSelection s -> u
    forall u. (forall d. Data d => d -> u) -> FieldSelection s -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> FieldSelection s -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> FieldSelection s -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> FieldSelection s -> m (FieldSelection s)
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> FieldSelection s -> m (FieldSelection s)
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (FieldSelection s)
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> FieldSelection s -> c (FieldSelection s)
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (FieldSelection s))
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (FieldSelection s))
    $cgfoldl :: forall s (c :: * -> *).
    Data s =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> FieldSelection s -> c (FieldSelection s)
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> FieldSelection s -> c (FieldSelection s)
    $cgunfold :: forall s (c :: * -> *).
    Data s =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (FieldSelection s)
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (FieldSelection s)
    $ctoConstr :: forall s. Data s => FieldSelection s -> Constr
    toConstr :: FieldSelection s -> Constr
    $cdataTypeOf :: forall s. Data s => FieldSelection s -> DataType
    dataTypeOf :: FieldSelection s -> DataType
    $cdataCast1 :: forall s (t :: * -> *) (c :: * -> *).
    (Data s, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (FieldSelection s))
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (FieldSelection s))
    $cdataCast2 :: forall s (t :: * -> * -> *) (c :: * -> *).
    (Data s, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (FieldSelection s))
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (FieldSelection s))
    $cgmapT :: forall s.
    Data s =>
    (forall b. Data b => b -> b)
    -> FieldSelection s -> FieldSelection s
    gmapT :: (forall b. Data b => b -> b)
    -> FieldSelection s -> FieldSelection s
    $cgmapQl :: forall s r r'.
    Data s =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> FieldSelection s -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> FieldSelection s -> r
    $cgmapQr :: forall s r r'.
    Data s =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> FieldSelection s -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> FieldSelection s -> r
    $cgmapQ :: forall s u.
    Data s =>
    (forall d. Data d => d -> u) -> FieldSelection s -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> FieldSelection s -> [u]
    $cgmapQi :: forall s u.
    Data s =>
    Int -> (forall d. Data d => d -> u) -> FieldSelection s -> u
    gmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> FieldSelection s -> u
    $cgmapM :: forall s (m :: * -> *).
    (Data s, Monad m) =>
    (forall d. Data d => d -> m d)
    -> FieldSelection s -> m (FieldSelection s)
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> FieldSelection s -> m (FieldSelection s)
    $cgmapMp :: forall s (m :: * -> *).
    (Data s, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> FieldSelection s -> m (FieldSelection s)
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> FieldSelection s -> m (FieldSelection s)
    $cgmapMo :: forall s (m :: * -> *).
    (Data s, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> FieldSelection s -> m (FieldSelection s)
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> FieldSelection s -> m (FieldSelection s)
    Data, FieldSelection s -> FieldSelection s -> Bool
    (FieldSelection s -> FieldSelection s -> Bool)
    -> (FieldSelection s -> FieldSelection s -> Bool)
    -> Eq (FieldSelection s)
    forall s. Eq s => FieldSelection s -> FieldSelection s -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall s. Eq s => FieldSelection s -> FieldSelection s -> Bool
    == :: FieldSelection s -> FieldSelection s -> Bool
    $c/= :: forall s. Eq s => FieldSelection s -> FieldSelection s -> Bool
    /= :: FieldSelection s -> FieldSelection s -> Bool
    Eq, (forall m. Monoid m => FieldSelection m -> m)
    -> (forall m a. Monoid m => (a -> m) -> FieldSelection a -> m)
    -> (forall m a. Monoid m => (a -> m) -> FieldSelection a -> m)
    -> (forall a b. (a -> b -> b) -> b -> FieldSelection a -> b)
    -> (forall a b. (a -> b -> b) -> b -> FieldSelection a -> b)
    -> (forall b a. (b -> a -> b) -> b -> FieldSelection a -> b)
    -> (forall b a. (b -> a -> b) -> b -> FieldSelection a -> b)
    -> (forall a. (a -> a -> a) -> FieldSelection a -> a)
    -> (forall a. (a -> a -> a) -> FieldSelection a -> a)
    -> (forall a. FieldSelection a -> [a])
    -> (forall a. FieldSelection a -> Bool)
    -> (forall a. FieldSelection a -> Int)
    -> (forall a. Eq a => a -> FieldSelection a -> Bool)
    -> (forall a. Ord a => FieldSelection a -> a)
    -> (forall a. Ord a => FieldSelection a -> a)
    -> (forall a. Num a => FieldSelection a -> a)
    -> (forall a. Num a => FieldSelection a -> a)
    -> Foldable FieldSelection
    forall a. Eq a => a -> FieldSelection a -> Bool
    forall a. Num a => FieldSelection a -> a
    forall a. Ord a => FieldSelection a -> a
    forall m. Monoid m => FieldSelection m -> m
    forall a. FieldSelection a -> Bool
    forall a. FieldSelection a -> Int
    forall a. FieldSelection a -> [a]
    forall a. (a -> a -> a) -> FieldSelection a -> a
    forall m a. Monoid m => (a -> m) -> FieldSelection a -> m
    forall b a. (b -> a -> b) -> b -> FieldSelection a -> b
    forall a b. (a -> b -> b) -> b -> FieldSelection a -> b
    forall (t :: * -> *).
    (forall m. Monoid m => t m -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. t a -> [a])
    -> (forall a. t a -> Bool)
    -> (forall a. t a -> Int)
    -> (forall a. Eq a => a -> t a -> Bool)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> Foldable t
    $cfold :: forall m. Monoid m => FieldSelection m -> m
    fold :: forall m. Monoid m => FieldSelection m -> m
    $cfoldMap :: forall m a. Monoid m => (a -> m) -> FieldSelection a -> m
    foldMap :: forall m a. Monoid m => (a -> m) -> FieldSelection a -> m
    $cfoldMap' :: forall m a. Monoid m => (a -> m) -> FieldSelection a -> m
    foldMap' :: forall m a. Monoid m => (a -> m) -> FieldSelection a -> m
    $cfoldr :: forall a b. (a -> b -> b) -> b -> FieldSelection a -> b
    foldr :: forall a b. (a -> b -> b) -> b -> FieldSelection a -> b
    $cfoldr' :: forall a b. (a -> b -> b) -> b -> FieldSelection a -> b
    foldr' :: forall a b. (a -> b -> b) -> b -> FieldSelection a -> b
    $cfoldl :: forall b a. (b -> a -> b) -> b -> FieldSelection a -> b
    foldl :: forall b a. (b -> a -> b) -> b -> FieldSelection a -> b
    $cfoldl' :: forall b a. (b -> a -> b) -> b -> FieldSelection a -> b
    foldl' :: forall b a. (b -> a -> b) -> b -> FieldSelection a -> b
    $cfoldr1 :: forall a. (a -> a -> a) -> FieldSelection a -> a
    foldr1 :: forall a. (a -> a -> a) -> FieldSelection a -> a
    $cfoldl1 :: forall a. (a -> a -> a) -> FieldSelection a -> a
    foldl1 :: forall a. (a -> a -> a) -> FieldSelection a -> a
    $ctoList :: forall a. FieldSelection a -> [a]
    toList :: forall a. FieldSelection a -> [a]
    $cnull :: forall a. FieldSelection a -> Bool
    null :: forall a. FieldSelection a -> Bool
    $clength :: forall a. FieldSelection a -> Int
    length :: forall a. FieldSelection a -> Int
    $celem :: forall a. Eq a => a -> FieldSelection a -> Bool
    elem :: forall a. Eq a => a -> FieldSelection a -> Bool
    $cmaximum :: forall a. Ord a => FieldSelection a -> a
    maximum :: forall a. Ord a => FieldSelection a -> a
    $cminimum :: forall a. Ord a => FieldSelection a -> a
    minimum :: forall a. Ord a => FieldSelection a -> a
    $csum :: forall a. Num a => FieldSelection a -> a
    sum :: forall a. Num a => FieldSelection a -> a
    $cproduct :: forall a. Num a => FieldSelection a -> a
    product :: forall a. Num a => FieldSelection a -> a
    Foldable, (forall a b. (a -> b) -> FieldSelection a -> FieldSelection b)
    -> (forall a b. a -> FieldSelection b -> FieldSelection a)
    -> Functor FieldSelection
    forall a b. a -> FieldSelection b -> FieldSelection a
    forall a b. (a -> b) -> FieldSelection a -> FieldSelection b
    forall (f :: * -> *).
    (forall a b. (a -> b) -> f a -> f b)
    -> (forall a b. a -> f b -> f a) -> Functor f
    $cfmap :: forall a b. (a -> b) -> FieldSelection a -> FieldSelection b
    fmap :: forall a b. (a -> b) -> FieldSelection a -> FieldSelection b
    $c<$ :: forall a b. a -> FieldSelection b -> FieldSelection a
    <$ :: forall a b. a -> FieldSelection b -> FieldSelection a
    Functor, (forall x. FieldSelection s -> Rep (FieldSelection s) x)
    -> (forall x. Rep (FieldSelection s) x -> FieldSelection s)
    -> Generic (FieldSelection s)
    forall x. Rep (FieldSelection s) x -> FieldSelection s
    forall x. FieldSelection s -> Rep (FieldSelection s) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall s x. Rep (FieldSelection s) x -> FieldSelection s
    forall s x. FieldSelection s -> Rep (FieldSelection s) x
    $cfrom :: forall s x. FieldSelection s -> Rep (FieldSelection s) x
    from :: forall x. FieldSelection s -> Rep (FieldSelection s) x
    $cto :: forall s x. Rep (FieldSelection s) x -> FieldSelection s
    to :: forall x. Rep (FieldSelection s) x -> FieldSelection s
    Generic, (forall (m :: * -> *). Quote m => FieldSelection s -> m Exp)
    -> (forall (m :: * -> *).
        Quote m =>
        FieldSelection s -> Code m (FieldSelection s))
    -> Lift (FieldSelection s)
    forall s (m :: * -> *).
    (Lift s, Quote m) =>
    FieldSelection s -> m Exp
    forall s (m :: * -> *).
    (Lift s, Quote m) =>
    FieldSelection s -> Code m (FieldSelection s)
    forall t.
    (forall (m :: * -> *). Quote m => t -> m Exp)
    -> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
    forall (m :: * -> *). Quote m => FieldSelection s -> m Exp
    forall (m :: * -> *).
    Quote m =>
    FieldSelection s -> Code m (FieldSelection s)
    $clift :: forall s (m :: * -> *).
    (Lift s, Quote m) =>
    FieldSelection s -> m Exp
    lift :: forall (m :: * -> *). Quote m => FieldSelection s -> m Exp
    $cliftTyped :: forall s (m :: * -> *).
    (Lift s, Quote m) =>
    FieldSelection s -> Code m (FieldSelection s)
    liftTyped :: forall (m :: * -> *).
    Quote m =>
    FieldSelection s -> Code m (FieldSelection s)
    Lift, FieldSelection s -> ()
    (FieldSelection s -> ()) -> NFData (FieldSelection s)
    forall s. NFData s => FieldSelection s -> ()
    forall a. (a -> ()) -> NFData a
    $crnf :: forall s. NFData s => FieldSelection s -> ()
    rnf :: FieldSelection s -> ()
    NFData, Eq (FieldSelection s)
    Eq (FieldSelection s)
    -> (FieldSelection s -> FieldSelection s -> Ordering)
    -> (FieldSelection s -> FieldSelection s -> Bool)
    -> (FieldSelection s -> FieldSelection s -> Bool)
    -> (FieldSelection s -> FieldSelection s -> Bool)
    -> (FieldSelection s -> FieldSelection s -> Bool)
    -> (FieldSelection s -> FieldSelection s -> FieldSelection s)
    -> (FieldSelection s -> FieldSelection s -> FieldSelection s)
    -> Ord (FieldSelection s)
    FieldSelection s -> FieldSelection s -> Bool
    FieldSelection s -> FieldSelection s -> Ordering
    FieldSelection s -> FieldSelection s -> FieldSelection s
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall {s}. Ord s => Eq (FieldSelection s)
    forall s. Ord s => FieldSelection s -> FieldSelection s -> Bool
    forall s. Ord s => FieldSelection s -> FieldSelection s -> Ordering
    forall s.
    Ord s =>
    FieldSelection s -> FieldSelection s -> FieldSelection s
    $ccompare :: forall s. Ord s => FieldSelection s -> FieldSelection s -> Ordering
    compare :: FieldSelection s -> FieldSelection s -> Ordering
    $c< :: forall s. Ord s => FieldSelection s -> FieldSelection s -> Bool
    < :: FieldSelection s -> FieldSelection s -> Bool
    $c<= :: forall s. Ord s => FieldSelection s -> FieldSelection s -> Bool
    <= :: FieldSelection s -> FieldSelection s -> Bool
    $c> :: forall s. Ord s => FieldSelection s -> FieldSelection s -> Bool
    > :: FieldSelection s -> FieldSelection s -> Bool
    $c>= :: forall s. Ord s => FieldSelection s -> FieldSelection s -> Bool
    >= :: FieldSelection s -> FieldSelection s -> Bool
    $cmax :: forall s.
    Ord s =>
    FieldSelection s -> FieldSelection s -> FieldSelection s
    max :: FieldSelection s -> FieldSelection s -> FieldSelection s
    $cmin :: forall s.
    Ord s =>
    FieldSelection s -> FieldSelection s -> FieldSelection s
    min :: FieldSelection s -> FieldSelection s -> FieldSelection s
    Ord, Int -> FieldSelection s -> ShowS
    [FieldSelection s] -> ShowS
    FieldSelection s -> String
    (Int -> FieldSelection s -> ShowS)
    -> (FieldSelection s -> String)
    -> ([FieldSelection s] -> ShowS)
    -> Show (FieldSelection s)
    forall s. Show s => Int -> FieldSelection s -> ShowS
    forall s. Show s => [FieldSelection s] -> ShowS
    forall s. Show s => FieldSelection s -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall s. Show s => Int -> FieldSelection s -> ShowS
    showsPrec :: Int -> FieldSelection s -> ShowS
    $cshow :: forall s. Show s => FieldSelection s -> String
    show :: FieldSelection s -> String
    $cshowList :: forall s. Show s => [FieldSelection s] -> ShowS
    showList :: [FieldSelection s] -> ShowS
    Show, Functor FieldSelection
    Foldable FieldSelection
    Functor FieldSelection
    -> Foldable FieldSelection
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> FieldSelection a -> f (FieldSelection b))
    -> (forall (f :: * -> *) a.
        Applicative f =>
        FieldSelection (f a) -> f (FieldSelection a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> FieldSelection a -> m (FieldSelection b))
    -> (forall (m :: * -> *) a.
        Monad m =>
        FieldSelection (m a) -> m (FieldSelection a))
    -> Traversable FieldSelection
    forall (t :: * -> *).
    Functor t
    -> Foldable t
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> t a -> f (t b))
    -> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> t a -> m (t b))
    -> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
    -> Traversable t
    forall (m :: * -> *) a.
    Monad m =>
    FieldSelection (m a) -> m (FieldSelection a)
    forall (f :: * -> *) a.
    Applicative f =>
    FieldSelection (f a) -> f (FieldSelection a)
    forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> FieldSelection a -> m (FieldSelection b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> FieldSelection a -> f (FieldSelection b)
    $ctraverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> FieldSelection a -> f (FieldSelection b)
    traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> FieldSelection a -> f (FieldSelection b)
    $csequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    FieldSelection (f a) -> f (FieldSelection a)
    sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    FieldSelection (f a) -> f (FieldSelection a)
    $cmapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> FieldSelection a -> m (FieldSelection b)
    mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> FieldSelection a -> m (FieldSelection b)
    $csequence :: forall (m :: * -> *) a.
    Monad m =>
    FieldSelection (m a) -> m (FieldSelection a)
    sequence :: forall (m :: * -> *) a.
    Monad m =>
    FieldSelection (m a) -> m (FieldSelection a)
    Traversable)

    -- | Smart constructor for 'FieldSelection' with no src information
    makeFieldSelection :: Text -> FieldSelection s
    makeFieldSelection :: forall s. Text -> FieldSelection s
    makeFieldSelection Text
    t = Maybe s -> Text -> Maybe s -> FieldSelection s
    forall s. Maybe s -> Text -> Maybe s -> FieldSelection s
    FieldSelection Maybe s
    forall a. Maybe a
    Nothing Text
    t Maybe s
    forall a. Maybe a
    Nothing

    -- | A path component for a @with@ expression
    data WithComponent = WithLabel Text | WithQuestion
        deriving (Typeable WithComponent
    Typeable WithComponent
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> WithComponent -> c WithComponent)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c WithComponent)
    -> (WithComponent -> Constr)
    -> (WithComponent -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c WithComponent))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c WithComponent))
    -> ((forall b. Data b => b -> b) -> WithComponent -> WithComponent)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> WithComponent -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> WithComponent -> r)
    -> (forall u. (forall d. Data d => d -> u) -> WithComponent -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> WithComponent -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> WithComponent -> m WithComponent)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> WithComponent -> m WithComponent)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> WithComponent -> m WithComponent)
    -> Data WithComponent
    WithComponent -> Constr
    WithComponent -> DataType
    (forall b. Data b => b -> b) -> WithComponent -> WithComponent
    forall a.
    Typeable a
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> WithComponent -> u
    forall u. (forall d. Data d => d -> u) -> WithComponent -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> WithComponent -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> WithComponent -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> WithComponent -> m WithComponent
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> WithComponent -> m WithComponent
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c WithComponent
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> WithComponent -> c WithComponent
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c WithComponent)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c WithComponent)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> WithComponent -> c WithComponent
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> WithComponent -> c WithComponent
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c WithComponent
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c WithComponent
    $ctoConstr :: WithComponent -> Constr
    toConstr :: WithComponent -> Constr
    $cdataTypeOf :: WithComponent -> DataType
    dataTypeOf :: WithComponent -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c WithComponent)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c WithComponent)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c WithComponent)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c WithComponent)
    $cgmapT :: (forall b. Data b => b -> b) -> WithComponent -> WithComponent
    gmapT :: (forall b. Data b => b -> b) -> WithComponent -> WithComponent
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> WithComponent -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> WithComponent -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> WithComponent -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> WithComponent -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> WithComponent -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> WithComponent -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> WithComponent -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> WithComponent -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> WithComponent -> m WithComponent
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> WithComponent -> m WithComponent
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> WithComponent -> m WithComponent
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> WithComponent -> m WithComponent
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> WithComponent -> m WithComponent
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> WithComponent -> m WithComponent
    Data, WithComponent -> WithComponent -> Bool
    (WithComponent -> WithComponent -> Bool)
    -> (WithComponent -> WithComponent -> Bool) -> Eq WithComponent
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: WithComponent -> WithComponent -> Bool
    == :: WithComponent -> WithComponent -> Bool
    $c/= :: WithComponent -> WithComponent -> Bool
    /= :: WithComponent -> WithComponent -> Bool
    Eq, (forall x. WithComponent -> Rep WithComponent x)
    -> (forall x. Rep WithComponent x -> WithComponent)
    -> Generic WithComponent
    forall x. Rep WithComponent x -> WithComponent
    forall x. WithComponent -> Rep WithComponent x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. WithComponent -> Rep WithComponent x
    from :: forall x. WithComponent -> Rep WithComponent x
    $cto :: forall x. Rep WithComponent x -> WithComponent
    to :: forall x. Rep WithComponent x -> WithComponent
    Generic, (forall (m :: * -> *). Quote m => WithComponent -> m Exp)
    -> (forall (m :: * -> *).
        Quote m =>
        WithComponent -> Code m WithComponent)
    -> Lift WithComponent
    forall t.
    (forall (m :: * -> *). Quote m => t -> m Exp)
    -> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
    forall (m :: * -> *). Quote m => WithComponent -> m Exp
    forall (m :: * -> *).
    Quote m =>
    WithComponent -> Code m WithComponent
    $clift :: forall (m :: * -> *). Quote m => WithComponent -> m Exp
    lift :: forall (m :: * -> *). Quote m => WithComponent -> m Exp
    $cliftTyped :: forall (m :: * -> *).
    Quote m =>
    WithComponent -> Code m WithComponent
    liftTyped :: forall (m :: * -> *).
    Quote m =>
    WithComponent -> Code m WithComponent
    Lift, WithComponent -> ()
    (WithComponent -> ()) -> NFData WithComponent
    forall a. (a -> ()) -> NFData a
    $crnf :: WithComponent -> ()
    rnf :: WithComponent -> ()
    NFData, Eq WithComponent
    Eq WithComponent
    -> (WithComponent -> WithComponent -> Ordering)
    -> (WithComponent -> WithComponent -> Bool)
    -> (WithComponent -> WithComponent -> Bool)
    -> (WithComponent -> WithComponent -> Bool)
    -> (WithComponent -> WithComponent -> Bool)
    -> (WithComponent -> WithComponent -> WithComponent)
    -> (WithComponent -> WithComponent -> WithComponent)
    -> Ord WithComponent
    WithComponent -> WithComponent -> Bool
    WithComponent -> WithComponent -> Ordering
    WithComponent -> WithComponent -> WithComponent
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: WithComponent -> WithComponent -> Ordering
    compare :: WithComponent -> WithComponent -> Ordering
    $c< :: WithComponent -> WithComponent -> Bool
    < :: WithComponent -> WithComponent -> Bool
    $c<= :: WithComponent -> WithComponent -> Bool
    <= :: WithComponent -> WithComponent -> Bool
    $c> :: WithComponent -> WithComponent -> Bool
    > :: WithComponent -> WithComponent -> Bool
    $c>= :: WithComponent -> WithComponent -> Bool
    >= :: WithComponent -> WithComponent -> Bool
    $cmax :: WithComponent -> WithComponent -> WithComponent
    max :: WithComponent -> WithComponent -> WithComponent
    $cmin :: WithComponent -> WithComponent -> WithComponent
    min :: WithComponent -> WithComponent -> WithComponent
    Ord, Int -> WithComponent -> ShowS
    [WithComponent] -> ShowS
    WithComponent -> String
    (Int -> WithComponent -> ShowS)
    -> (WithComponent -> String)
    -> ([WithComponent] -> ShowS)
    -> Show WithComponent
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> WithComponent -> ShowS
    showsPrec :: Int -> WithComponent -> ShowS
    $cshow :: WithComponent -> String
    show :: WithComponent -> String
    $cshowList :: [WithComponent] -> ShowS
    showList :: [WithComponent] -> ShowS
    Show)

    {-| Syntax tree for expressions

        The @s@ type parameter is used to track the presence or absence of `Src`
        spans:

        * If @s = `Src`@ then the code may contains `Src` spans (either in a `Note`
          constructor or inline within another constructor, like `Let`)
        * If @s = `Void`@ then the code has no `Src` spans

        The @a@ type parameter is used to track the presence or absence of imports

        * If @a = `Import`@ then the code may contain unresolved `Import`s
        * If @a = `Void`@ then the code has no `Import`s
    -}
    data Expr s a
        -- | > Const c                                  ~  c
        = Const Const
        -- | > Var (V x 0)                              ~  x
        --   > Var (V x n)                              ~  x@n
        | Var Var
        -- | > Lam _ (FunctionBinding _ "x" _ _ A) b    ~  λ(x : A) -> b
        | Lam (Maybe CharacterSet) (FunctionBinding s a) (Expr s a)
        -- | > Pi _ "_" A B                               ~        A  -> B
        --   > Pi _ x   A B                               ~  ∀(x : A) -> B
        | Pi  (Maybe CharacterSet) Text (Expr s a) (Expr s a)
        -- | > App f a                                  ~  f a
        | App (Expr s a) (Expr s a)
        -- | > Let (Binding _ x _  Nothing  _ r) e      ~  let x     = r in e
        --   > Let (Binding _ x _ (Just t ) _ r) e      ~  let x : t = r in e
        --
        -- The difference between
        --
        -- > let x = a    let y = b in e
        --
        -- and
        --
        -- > let x = a in let y = b in e
        --
        -- is only an additional 'Note' around @'Let' "y" …@ in the second
        -- example.
        --
        -- See 'MultiLet' for a representation of let-blocks that mirrors the
        -- source code more closely.
        | Let (Binding s a) (Expr s a)
        -- | > Annot x t                                ~  x : t
        | Annot (Expr s a) (Expr s a)
        -- | > Bool                                     ~  Bool
        | Bool
        -- | > BoolLit b                                ~  b
        | BoolLit Bool
        -- | > BoolAnd x y                              ~  x && y
        | BoolAnd (Expr s a) (Expr s a)
        -- | > BoolOr  x y                              ~  x || y
        | BoolOr  (Expr s a) (Expr s a)
        -- | > BoolEQ  x y                              ~  x == y
        | BoolEQ  (Expr s a) (Expr s a)
        -- | > BoolNE  x y                              ~  x != y
        | BoolNE  (Expr s a) (Expr s a)
        -- | > BoolIf x y z                             ~  if x then y else z
        | BoolIf (Expr s a) (Expr s a) (Expr s a)
        -- | > Natural                                  ~  Natural
        | Natural
        -- | > NaturalLit n                             ~  n
        | NaturalLit Natural
        -- | > NaturalFold                              ~  Natural/fold
        | NaturalFold
        -- | > NaturalBuild                             ~  Natural/build
        | NaturalBuild
        -- | > NaturalIsZero                            ~  Natural/isZero
        | NaturalIsZero
        -- | > NaturalEven                              ~  Natural/even
        | NaturalEven
        -- | > NaturalOdd                               ~  Natural/odd
        | NaturalOdd
        -- | > NaturalToInteger                         ~  Natural/toInteger
        | NaturalToInteger
        -- | > NaturalShow                              ~  Natural/show
        | NaturalShow
        -- | > NaturalSubtract                          ~  Natural/subtract
        | NaturalSubtract
        -- | > NaturalPlus x y                          ~  x + y
        | NaturalPlus (Expr s a) (Expr s a)
        -- | > NaturalTimes x y                         ~  x * y
        | NaturalTimes (Expr s a) (Expr s a)
        -- | > Integer                                  ~  Integer
        | Integer
        -- | > IntegerLit n                             ~  ±n
        | IntegerLit Integer
        -- | > IntegerClamp                             ~  Integer/clamp
        | IntegerClamp
        -- | > IntegerNegate                            ~  Integer/negate
        | IntegerNegate
        -- | > IntegerShow                              ~  Integer/show
        | IntegerShow
        -- | > IntegerToDouble                          ~  Integer/toDouble
        | IntegerToDouble
        -- | > Double                                   ~  Double
        | Double
        -- | > DoubleLit n                              ~  n
        | DoubleLit DhallDouble
        -- | > DoubleShow                               ~  Double/show
        | DoubleShow
        -- | > Text                                     ~  Text
        | Text
        -- | > TextLit (Chunks [(t1, e1), (t2, e2)] t3) ~  "t1${e1}t2${e2}t3"
        | TextLit (Chunks s a)
        -- | > TextAppend x y                           ~  x ++ y
        | TextAppend (Expr s a) (Expr s a)
        -- | > TextReplace                              ~ Text/replace
        | TextReplace
        -- | > TextShow                                 ~  Text/show
        | TextShow
        -- | > Date                                     ~  Date
        | Date
        -- | > DateLiteral (fromGregorian _YYYY _MM _DD) ~ YYYY-MM-DD
        | DateLiteral Time.Day
        -- | > Time                                     ~  Time
        | Time
        -- | > TimeLiteral (TimeOfDay hh mm ss) _       ~  hh:mm:ss
        | TimeLiteral
            Time.TimeOfDay
            Word
            -- ^ Precision
        -- | > TimeZone                                 ~  TimeZone
        | TimeZone
        -- | > TimeZoneLiteral (TimeZone ( 60 * _HH + _MM) _ _) ~ +HH:MM
        -- | > TimeZoneLiteral (TimeZone (-60 * _HH + _MM) _ _) ~ -HH:MM
        | TimeZoneLiteral Time.TimeZone
        -- | > List                                     ~  List
        | List
        -- | > ListLit (Just t ) []                     ~  [] : t
        --   > ListLit  Nothing  [x, y, z]              ~  [x, y, z]
        --
        --   Invariant: A non-empty list literal is always represented as
        --   @ListLit Nothing xs@.
        --
        --   When an annotated, non-empty list literal is parsed, it is represented
        --   as
        --
        --   > Annot (ListLit Nothing [x, y, z]) t      ~ [x, y, z] : t

        -- Eventually we should have separate constructors for empty and non-empty
        -- list literals. For now it's easier to check the invariant in @infer@.
        -- See https://github.com/dhall-lang/dhall-haskell/issues/1359#issuecomment-537087234.
        | ListLit (Maybe (Expr s a)) (Seq (Expr s a))
        -- | > ListAppend x y                           ~  x # y
        | ListAppend (Expr s a) (Expr s a)
        -- | > ListBuild                                ~  List/build
        | ListBuild
        -- | > ListFold                                 ~  List/fold
        | ListFold
        -- | > ListLength                               ~  List/length
        | ListLength
        -- | > ListHead                                 ~  List/head
        | ListHead
        -- | > ListLast                                 ~  List/last
        | ListLast
        -- | > ListIndexed                              ~  List/indexed
        | ListIndexed
        -- | > ListReverse                              ~  List/reverse
        | ListReverse
        -- | > Optional                                 ~  Optional
        | Optional
        -- | > Some e                                   ~  Some e
        | Some (Expr s a)
        -- | > None                                     ~  None
        | None
        -- | > Record [ (k1, RecordField _ t1)          ~  { k1 : t1, k2 : t1 }
        --   >        , (k2, RecordField _ t2)
        --   >        ]
        | Record    (Map Text (RecordField s a))
        -- | > RecordLit [ (k1, RecordField _ v1)       ~  { k1 = v1, k2 = v2 }
        --   >           , (k2, RecordField _ v2)
        --   >           ]
        | RecordLit (Map Text (RecordField s a))
        -- | > Union        [(k1, Just t1), (k2, Nothing)] ~  < k1 : t1 | k2 >
        | Union     (Map Text (Maybe (Expr s a)))
        -- | > Combine _ Nothing x y                    ~  x ∧ y
        --
        -- The first field is a `Just` when the `Combine` operator is introduced
        -- as a result of desugaring duplicate record fields:
        --
        --   > RecordLit [ ( k                          ~ { k = x, k = y }
        --   >           , RecordField
        --   >              _
        --   >              (Combine (Just k) x y)
        --   >            )]
        | Combine (Maybe CharacterSet) (Maybe Text) (Expr s a) (Expr s a)
        -- | > CombineTypes _ x y                       ~  x ⩓ y
        | CombineTypes (Maybe CharacterSet) (Expr s a) (Expr s a)
        -- | > Prefer _ False x y                       ~  x ⫽ y
        --
        -- The first field is a `True` when the `Prefer` operator is introduced as a
        -- result of desugaring a @with@ expression
        | Prefer (Maybe CharacterSet) (PreferAnnotation s a) (Expr s a) (Expr s a)
        -- | > RecordCompletion x y                     ~  x::y
        | RecordCompletion (Expr s a) (Expr s a)
        -- | > Merge x y (Just t )                      ~  merge x y : t
        --   > Merge x y  Nothing                       ~  merge x y
        | Merge (Expr s a) (Expr s a) (Maybe (Expr s a))
        -- | > ToMap x (Just t)                         ~  toMap x : t
        --   > ToMap x  Nothing                         ~  toMap x
        | ToMap (Expr s a) (Maybe (Expr s a))
        -- | > ShowConstructor x                        ~  showConstructor x
        | ShowConstructor (Expr s a)
        -- | > Field e (FieldSelection _ x _)              ~  e.x
        | Field (Expr s a) (FieldSelection s)
        -- | > Project e (Left xs)                      ~  e.{ xs }
        --   > Project e (Right t)                      ~  e.(t)
        | Project (Expr s a) (Either [Text] (Expr s a))
        -- | > Assert e                                 ~  assert : e
        | Assert (Expr s a)
        -- | > Equivalent _ x y                           ~  x ≡ y
        | Equivalent (Maybe CharacterSet) (Expr s a) (Expr s a)
        -- | > With x y e                               ~  x with y = e
        | With (Expr s a) (NonEmpty WithComponent) (Expr s a)
        -- | > Note s x                                 ~  e
        | Note s (Expr s a)
        -- | > ImportAlt                                ~  e1 ? e2
        | ImportAlt (Expr s a) (Expr s a)
        -- | > Embed import                             ~  import
        | Embed a
        deriving ((forall m. Monoid m => Expr s m -> m)
    -> (forall m a. Monoid m => (a -> m) -> Expr s a -> m)
    -> (forall m a. Monoid m => (a -> m) -> Expr s a -> m)
    -> (forall a b. (a -> b -> b) -> b -> Expr s a -> b)
    -> (forall a b. (a -> b -> b) -> b -> Expr s a -> b)
    -> (forall b a. (b -> a -> b) -> b -> Expr s a -> b)
    -> (forall b a. (b -> a -> b) -> b -> Expr s a -> b)
    -> (forall a. (a -> a -> a) -> Expr s a -> a)
    -> (forall a. (a -> a -> a) -> Expr s a -> a)
    -> (forall a. Expr s a -> [a])
    -> (forall a. Expr s a -> Bool)
    -> (forall a. Expr s a -> Int)
    -> (forall a. Eq a => a -> Expr s a -> Bool)
    -> (forall a. Ord a => Expr s a -> a)
    -> (forall a. Ord a => Expr s a -> a)
    -> (forall a. Num a => Expr s a -> a)
    -> (forall a. Num a => Expr s a -> a)
    -> Foldable (Expr s)
    forall a. Eq a => a -> Expr s a -> Bool
    forall a. Num a => Expr s a -> a
    forall a. Ord a => Expr s a -> a
    forall m. Monoid m => Expr s m -> m
    forall a. Expr s a -> Bool
    forall a. Expr s a -> Int
    forall a. Expr s a -> [a]
    forall a. (a -> a -> a) -> Expr s a -> a
    forall s a. Eq a => a -> Expr s a -> Bool
    forall s a. Num a => Expr s a -> a
    forall s a. Ord a => Expr s a -> a
    forall m a. Monoid m => (a -> m) -> Expr s a -> m
    forall s m. Monoid m => Expr s m -> m
    forall s a. Expr s a -> Bool
    forall s a. Expr s a -> Int
    forall s a. Expr s a -> [a]
    forall b a. (b -> a -> b) -> b -> Expr s a -> b
    forall a b. (a -> b -> b) -> b -> Expr s a -> b
    forall s a. (a -> a -> a) -> Expr s a -> a
    forall s m a. Monoid m => (a -> m) -> Expr s a -> m
    forall s b a. (b -> a -> b) -> b -> Expr s a -> b
    forall s a b. (a -> b -> b) -> b -> Expr s a -> b
    forall (t :: * -> *).
    (forall m. Monoid m => t m -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. t a -> [a])
    -> (forall a. t a -> Bool)
    -> (forall a. t a -> Int)
    -> (forall a. Eq a => a -> t a -> Bool)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> Foldable t
    $cfold :: forall s m. Monoid m => Expr s m -> m
    fold :: forall m. Monoid m => Expr s m -> m
    $cfoldMap :: forall s m a. Monoid m => (a -> m) -> Expr s a -> m
    foldMap :: forall m a. Monoid m => (a -> m) -> Expr s a -> m
    $cfoldMap' :: forall s m a. Monoid m => (a -> m) -> Expr s a -> m
    foldMap' :: forall m a. Monoid m => (a -> m) -> Expr s a -> m
    $cfoldr :: forall s a b. (a -> b -> b) -> b -> Expr s a -> b
    foldr :: forall a b. (a -> b -> b) -> b -> Expr s a -> b
    $cfoldr' :: forall s a b. (a -> b -> b) -> b -> Expr s a -> b
    foldr' :: forall a b. (a -> b -> b) -> b -> Expr s a -> b
    $cfoldl :: forall s b a. (b -> a -> b) -> b -> Expr s a -> b
    foldl :: forall b a. (b -> a -> b) -> b -> Expr s a -> b
    $cfoldl' :: forall s b a. (b -> a -> b) -> b -> Expr s a -> b
    foldl' :: forall b a. (b -> a -> b) -> b -> Expr s a -> b
    $cfoldr1 :: forall s a. (a -> a -> a) -> Expr s a -> a
    foldr1 :: forall a. (a -> a -> a) -> Expr s a -> a
    $cfoldl1 :: forall s a. (a -> a -> a) -> Expr s a -> a
    foldl1 :: forall a. (a -> a -> a) -> Expr s a -> a
    $ctoList :: forall s a. Expr s a -> [a]
    toList :: forall a. Expr s a -> [a]
    $cnull :: forall s a. Expr s a -> Bool
    null :: forall a. Expr s a -> Bool
    $clength :: forall s a. Expr s a -> Int
    length :: forall a. Expr s a -> Int
    $celem :: forall s a. Eq a => a -> Expr s a -> Bool
    elem :: forall a. Eq a => a -> Expr s a -> Bool
    $cmaximum :: forall s a. Ord a => Expr s a -> a
    maximum :: forall a. Ord a => Expr s a -> a
    $cminimum :: forall s a. Ord a => Expr s a -> a
    minimum :: forall a. Ord a => Expr s a -> a
    $csum :: forall s a. Num a => Expr s a -> a
    sum :: forall a. Num a => Expr s a -> a
    $cproduct :: forall s a. Num a => Expr s a -> a
    product :: forall a. Num a => Expr s a -> a
    Foldable, (forall x. Expr s a -> Rep (Expr s a) x)
    -> (forall x. Rep (Expr s a) x -> Expr s a) -> Generic (Expr s a)
    forall x. Rep (Expr s a) x -> Expr s a
    forall x. Expr s a -> Rep (Expr s a) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall s a x. Rep (Expr s a) x -> Expr s a
    forall s a x. Expr s a -> Rep (Expr s a) x
    $cfrom :: forall s a x. Expr s a -> Rep (Expr s a) x
    from :: forall x. Expr s a -> Rep (Expr s a) x
    $cto :: forall s a x. Rep (Expr s a) x -> Expr s a
    to :: forall x. Rep (Expr s a) x -> Expr s a
    Generic, Functor (Expr s)
    Foldable (Expr s)
    Functor (Expr s)
    -> Foldable (Expr s)
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> Expr s a -> f (Expr s b))
    -> (forall (f :: * -> *) a.
        Applicative f =>
        Expr s (f a) -> f (Expr s a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> Expr s a -> m (Expr s b))
    -> (forall (m :: * -> *) a.
        Monad m =>
        Expr s (m a) -> m (Expr s a))
    -> Traversable (Expr s)
    forall s. Functor (Expr s)
    forall s. Foldable (Expr s)
    forall s (m :: * -> *) a. Monad m => Expr s (m a) -> m (Expr s a)
    forall s (f :: * -> *) a.
    Applicative f =>
    Expr s (f a) -> f (Expr s a)
    forall s (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Expr s a -> m (Expr s b)
    forall s (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Expr s a -> f (Expr s b)
    forall (t :: * -> *).
    Functor t
    -> Foldable t
    -> (forall (f :: * -> *) a b.
        Applicative f =>
        (a -> f b) -> t a -> f (t b))
    -> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> t a -> m (t b))
    -> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
    -> Traversable t
    forall (m :: * -> *) a. Monad m => Expr s (m a) -> m (Expr s a)
    forall (f :: * -> *) a.
    Applicative f =>
    Expr s (f a) -> f (Expr s a)
    forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Expr s a -> m (Expr s b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Expr s a -> f (Expr s b)
    $ctraverse :: forall s (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Expr s a -> f (Expr s b)
    traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Expr s a -> f (Expr s b)
    $csequenceA :: forall s (f :: * -> *) a.
    Applicative f =>
    Expr s (f a) -> f (Expr s a)
    sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    Expr s (f a) -> f (Expr s a)
    $cmapM :: forall s (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Expr s a -> m (Expr s b)
    mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Expr s a -> m (Expr s b)
    $csequence :: forall s (m :: * -> *) a. Monad m => Expr s (m a) -> m (Expr s a)
    sequence :: forall (m :: * -> *) a. Monad m => Expr s (m a) -> m (Expr s a)
    Traversable, Int -> Expr s a -> ShowS
    [Expr s a] -> ShowS
    Expr s a -> String
    (Int -> Expr s a -> ShowS)
    -> (Expr s a -> String) -> ([Expr s a] -> ShowS) -> Show (Expr s a)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall s a. (Show s, Show a) => Int -> Expr s a -> ShowS
    forall s a. (Show s, Show a) => [Expr s a] -> ShowS
    forall s a. (Show s, Show a) => Expr s a -> String
    $cshowsPrec :: forall s a. (Show s, Show a) => Int -> Expr s a -> ShowS
    showsPrec :: Int -> Expr s a -> ShowS
    $cshow :: forall s a. (Show s, Show a) => Expr s a -> String
    show :: Expr s a -> String
    $cshowList :: forall s a. (Show s, Show a) => [Expr s a] -> ShowS
    showList :: [Expr s a] -> ShowS
    Show, Typeable (Expr s a)
    Typeable (Expr s a)
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> Expr s a -> c (Expr s a))
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (Expr s a))
    -> (Expr s a -> Constr)
    -> (Expr s a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (Expr s a)))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c (Expr s a)))
    -> ((forall b. Data b => b -> b) -> Expr s a -> Expr s a)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> Expr s a -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> Expr s a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Expr s a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> Expr s a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a))
    -> Data (Expr s a)
    Expr s a -> Constr
    Expr s a -> DataType
    (forall b. Data b => b -> b) -> Expr s a -> Expr s a
    forall a.
    Typeable a
    -> (forall (c :: * -> *).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Expr s a -> u
    forall u. (forall d. Data d => d -> u) -> Expr s a -> [u]
    forall {s} {a}. (Data s, Data a) => Typeable (Expr s a)
    forall s a. (Data s, Data a) => Expr s a -> Constr
    forall s a. (Data s, Data a) => Expr s a -> DataType
    forall s a.
    (Data s, Data a) =>
    (forall b. Data b => b -> b) -> Expr s a -> Expr s a
    forall s a u.
    (Data s, Data a) =>
    Int -> (forall d. Data d => d -> u) -> Expr s a -> u
    forall s a u.
    (Data s, Data a) =>
    (forall d. Data d => d -> u) -> Expr s a -> [u]
    forall s a r r'.
    (Data s, Data a) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Expr s a -> r
    forall s a r r'.
    (Data s, Data a) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Expr s a -> r
    forall s a (m :: * -> *).
    (Data s, Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a)
    forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a)
    forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Expr s a)
    forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Expr s a -> c (Expr s a)
    forall s a (t :: * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (Expr s a))
    forall s a (t :: * -> * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expr s a))
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Expr s a -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Expr s a -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a)
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a)
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Expr s a)
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Expr s a -> c (Expr s a)
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Expr s a))
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expr s a))
    $cgfoldl :: forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Expr s a -> c (Expr s a)
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Expr s a -> c (Expr s a)
    $cgunfold :: forall s a (c :: * -> *).
    (Data s, Data a) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Expr s a)
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Expr s a)
    $ctoConstr :: forall s a. (Data s, Data a) => Expr s a -> Constr
    toConstr :: Expr s a -> Constr
    $cdataTypeOf :: forall s a. (Data s, Data a) => Expr s a -> DataType
    dataTypeOf :: Expr s a -> DataType
    $cdataCast1 :: forall s a (t :: * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (Expr s a))
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Expr s a))
    $cdataCast2 :: forall s a (t :: * -> * -> *) (c :: * -> *).
    (Data s, Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expr s a))
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expr s a))
    $cgmapT :: forall s a.
    (Data s, Data a) =>
    (forall b. Data b => b -> b) -> Expr s a -> Expr s a
    gmapT :: (forall b. Data b => b -> b) -> Expr s a -> Expr s a
    $cgmapQl :: forall s a r r'.
    (Data s, Data a) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Expr s a -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Expr s a -> r
    $cgmapQr :: forall s a r r'.
    (Data s, Data a) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Expr s a -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Expr s a -> r
    $cgmapQ :: forall s a u.
    (Data s, Data a) =>
    (forall d. Data d => d -> u) -> Expr s a -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Expr s a -> [u]
    $cgmapQi :: forall s a u.
    (Data s, Data a) =>
    Int -> (forall d. Data d => d -> u) -> Expr s a -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Expr s a -> u
    $cgmapM :: forall s a (m :: * -> *).
    (Data s, Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a)
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a)
    $cgmapMp :: forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a)
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a)
    $cgmapMo :: forall s a (m :: * -> *).
    (Data s, Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a)
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a)
    Data, (forall (m :: * -> *). Quote m => Expr s a -> m Exp)
    -> (forall (m :: * -> *). Quote m => Expr s a -> Code m (Expr s a))
    -> Lift (Expr s a)
    forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    Expr s a -> m Exp
    forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    Expr s a -> Code m (Expr s a)
    forall t.
    (forall (m :: * -> *). Quote m => t -> m Exp)
    -> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
    forall (m :: * -> *). Quote m => Expr s a -> m Exp
    forall (m :: * -> *). Quote m => Expr s a -> Code m (Expr s a)
    $clift :: forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    Expr s a -> m Exp
    lift :: forall (m :: * -> *). Quote m => Expr s a -> m Exp
    $cliftTyped :: forall s a (m :: * -> *).
    (Lift s, Lift a, Quote m) =>
    Expr s a -> Code m (Expr s a)
    liftTyped :: forall (m :: * -> *). Quote m => Expr s a -> Code m (Expr s a)
    Lift, Expr s a -> ()
    (Expr s a -> ()) -> NFData (Expr s a)
    forall a. (a -> ()) -> NFData a
    forall s a. (NFData s, NFData a) => Expr s a -> ()
    $crnf :: forall s a. (NFData s, NFData a) => Expr s a -> ()
    rnf :: Expr s a -> ()
    NFData)
    -- NB: If you add a constructor to Expr, please also update the Arbitrary
    -- instance in Dhall.Test.QuickCheck.

    -- | This instance encodes what the Dhall standard calls an \"exact match\"
    -- between two expressions.
    --
    -- Note that
    --
    -- >>> nan = DhallDouble (0/0)
    -- >>> DoubleLit nan == DoubleLit nan
    -- True
    deriving instance (Eq s, Eq a) => Eq (Expr s a)

    -- | Note that this 'Ord' instance inherits `DhallDouble`'s defects.
    deriving instance (Ord s, Ord a) => Ord (Expr s a)

    -- This instance is hand-written due to the fact that deriving
    -- it does not give us an INLINABLE pragma. We annotate this fmap
    -- implementation with this pragma below to allow GHC to, possibly,
    -- inline the implementation for performance improvements.
    instance Functor (Expr s) where
      fmap :: forall a b. (a -> b) -> Expr s a -> Expr s b
    fmap a -> b
    f (Embed a
    a) = b -> Expr s b
    forall s a. a -> Expr s a
    Embed (a -> b
    f a
    a)
      fmap a -> b
    f (Let Binding s a
    b Expr s a
    e2) = Binding s b -> Expr s b -> Expr s b
    forall s a. Binding s a -> Expr s a -> Expr s a
    Let ((a -> b) -> Binding s a -> Binding s b
    forall a b. (a -> b) -> Binding s a -> Binding s b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> b
    f Binding s a
    b) ((a -> b) -> Expr s a -> Expr s b
    forall a b. (a -> b) -> Expr s a -> Expr s b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> b
    f Expr s a
    e2)
      fmap a -> b
    f (Note s
    s Expr s a
    e1) = s -> Expr s b -> Expr s b
    forall s a. s -> Expr s a -> Expr s a
    Note s
    s ((a -> b) -> Expr s a -> Expr s b
    forall a b. (a -> b) -> Expr s a -> Expr s b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> b
    f Expr s a
    e1)
      fmap a -> b
    f (Record Map Text (RecordField s a)
    a) = Map Text (RecordField s b) -> Expr s b
    forall s a. Map Text (RecordField s a) -> Expr s a
    Record (Map Text (RecordField s b) -> Expr s b)
    -> Map Text (RecordField s b) -> Expr s b
    forall a b. (a -> b) -> a -> b
    $ (a -> b) -> RecordField s a -> RecordField s b
    forall a b. (a -> b) -> RecordField s a -> RecordField s b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> b
    f (RecordField s a -> RecordField s b)
    -> Map Text (RecordField s a) -> Map Text (RecordField s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Map Text (RecordField s a)
    a
      fmap a -> b
    f (RecordLit Map Text (RecordField s a)
    a) = Map Text (RecordField s b) -> Expr s b
    forall s a. Map Text (RecordField s a) -> Expr s a
    RecordLit (Map Text (RecordField s b) -> Expr s b)
    -> Map Text (RecordField s b) -> Expr s b
    forall a b. (a -> b) -> a -> b
    $ (a -> b) -> RecordField s a -> RecordField s b
    forall a b. (a -> b) -> RecordField s a -> RecordField s b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> b
    f (RecordField s a -> RecordField s b)
    -> Map Text (RecordField s a) -> Map Text (RecordField s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Map Text (RecordField s a)
    a
      fmap a -> b
    f (Lam Maybe CharacterSet
    cs FunctionBinding s a
    fb Expr s a
    e) = Maybe CharacterSet -> FunctionBinding s b -> Expr s b -> Expr s b
    forall s a.
    Maybe CharacterSet -> FunctionBinding s a -> Expr s a -> Expr s a
    Lam Maybe CharacterSet
    cs (a -> b
    f (a -> b) -> FunctionBinding s a -> FunctionBinding s b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> FunctionBinding s a
    fb) (a -> b
    f (a -> b) -> Expr s a -> Expr s b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a
    e)
      fmap a -> b
    f (Field Expr s a
    a FieldSelection s
    b) = Expr s b -> FieldSelection s -> Expr s b
    forall s a. Expr s a -> FieldSelection s -> Expr s a
    Field (a -> b
    f (a -> b) -> Expr s a -> Expr s b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a
    a) FieldSelection s
    b
      fmap a -> b
    f Expr s a
    expression = ASetter (Expr s a) (Expr s b) (Expr s a) (Expr s b)
    -> (Expr s a -> Expr s b) -> Expr s a -> Expr s b
    forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
    Lens.over ASetter (Expr s a) (Expr s b) (Expr s a) (Expr s b)
    forall (f :: * -> *) s a t b.
    Applicative f =>
    (Expr s a -> f (Expr t b)) -> Expr s a -> f (Expr t b)
    unsafeSubExpressions ((a -> b) -> Expr s a -> Expr s b
    forall a b. (a -> b) -> Expr s a -> Expr s b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> b
    f) Expr s a
    expression
      {-# INLINABLE fmap #-}

    instance Applicative (Expr s) where
        pure :: forall a. a -> Expr s a
    pure = a -> Expr s a
    forall s a. a -> Expr s a
    Embed

        <*> :: forall a b. Expr s (a -> b) -> Expr s a -> Expr s b
    (<*>) = Expr s (a -> b) -> Expr s a -> Expr s b
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    Control.Monad.ap

    instance Monad (Expr s) where
        return :: forall a. a -> Expr s a
    return = a -> Expr s a
    forall a. a -> Expr s a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure

        Expr s a
    expression >>= :: forall a b. Expr s a -> (a -> Expr s b) -> Expr s b
    >>= a -> Expr s b
    k = case Expr s a
    expression of
            Embed a
    a     -> a -> Expr s b
    k a
    a
            Let Binding s a
    a Expr s a
    b     -> Binding s b -> Expr s b -> Expr s b
    forall s a. Binding s a -> Expr s a -> Expr s a
    Let (Binding s a -> Binding s b
    adaptBinding Binding s a
    a) (Expr s a
    b Expr s a -> (a -> Expr s b) -> Expr s b
    forall a b. Expr s a -> (a -> Expr s b) -> Expr s b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= a -> Expr s b
    k)
            Note s
    a Expr s a
    b    -> s -> Expr s b -> Expr s b
    forall s a. s -> Expr s a -> Expr s a
    Note s
    a (Expr s a
    b Expr s a -> (a -> Expr s b) -> Expr s b
    forall a b. Expr s a -> (a -> Expr s b) -> Expr s b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= a -> Expr s b
    k)
            Record Map Text (RecordField s a)
    a    -> Map Text (RecordField s b) -> Expr s b
    forall s a. Map Text (RecordField s a) -> Expr s a
    Record (Map Text (RecordField s b) -> Expr s b)
    -> Map Text (RecordField s b) -> Expr s b
    forall a b. (a -> b) -> a -> b
    $ RecordField s a -> RecordField s b
    bindRecordKeyValues (RecordField s a -> RecordField s b)
    -> Map Text (RecordField s a) -> Map Text (RecordField s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Map Text (RecordField s a)
    a
            RecordLit Map Text (RecordField s a)
    a -> Map Text (RecordField s b) -> Expr s b
    forall s a. Map Text (RecordField s a) -> Expr s a
    RecordLit (Map Text (RecordField s b) -> Expr s b)
    -> Map Text (RecordField s b) -> Expr s b
    forall a b. (a -> b) -> a -> b
    $ RecordField s a -> RecordField s b
    bindRecordKeyValues (RecordField s a -> RecordField s b)
    -> Map Text (RecordField s a) -> Map Text (RecordField s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Map Text (RecordField s a)
    a
            Lam Maybe CharacterSet
    cs FunctionBinding s a
    a Expr s a
    b  -> Maybe CharacterSet -> FunctionBinding s b -> Expr s b -> Expr s b
    forall s a.
    Maybe CharacterSet -> FunctionBinding s a -> Expr s a -> Expr s a
    Lam Maybe CharacterSet
    cs (FunctionBinding s a -> FunctionBinding s b
    adaptFunctionBinding FunctionBinding s a
    a) (Expr s a
    b Expr s a -> (a -> Expr s b) -> Expr s b
    forall a b. Expr s a -> (a -> Expr s b) -> Expr s b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= a -> Expr s b
    k)
            Field Expr s a
    a FieldSelection s
    b   -> Expr s b -> FieldSelection s -> Expr s b
    forall s a. Expr s a -> FieldSelection s -> Expr s a
    Field (Expr s a
    a Expr s a -> (a -> Expr s b) -> Expr s b
    forall a b. Expr s a -> (a -> Expr s b) -> Expr s b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= a -> Expr s b
    k) FieldSelection s
    b
            Expr s a
    _ -> ASetter (Expr s a) (Expr s b) (Expr s a) (Expr s b)
    -> (Expr s a -> Expr s b) -> Expr s a -> Expr s b
    forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
    Lens.over ASetter (Expr s a) (Expr s b) (Expr s a) (Expr s b)
    forall (f :: * -> *) s a t b.
    Applicative f =>
    (Expr s a -> f (Expr t b)) -> Expr s a -> f (Expr t b)
    unsafeSubExpressions (Expr s a -> (a -> Expr s b) -> Expr s b
    forall a b. Expr s a -> (a -> Expr s b) -> Expr s b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= a -> Expr s b
    k) Expr s a
    expression
          where
            bindRecordKeyValues :: RecordField s a -> RecordField s b
    bindRecordKeyValues (RecordField Maybe s
    s0 Expr s a
    e Maybe s
    s1 Maybe s
    s2) =
                Maybe s -> Expr s b -> Maybe s -> Maybe s -> RecordField s b
    forall s a.
    Maybe s -> Expr s a -> Maybe s -> Maybe s -> RecordField s a
    RecordField Maybe s
    s0 (Expr s a
    e Expr s a -> (a -> Expr s b) -> Expr s b
    forall a b. Expr s a -> (a -> Expr s b) -> Expr s b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= a -> Expr s b
    k) Maybe s
    s1 Maybe s
    s2

            adaptBinding :: Binding s a -> Binding s b
    adaptBinding (Binding Maybe s
    src0 Text
    c Maybe s
    src1 Maybe (Maybe s, Expr s a)
    d Maybe s
    src2 Expr s a
    e) =
                Maybe s
    -> Text
    -> Maybe s
    -> Maybe (Maybe s, Expr s b)
    -> Maybe s
    -> Expr s b
    -> Binding s b
    forall s a.
    Maybe s
    -> Text
    -> Maybe s
    -> Maybe (Maybe s, Expr s a)
    -> Maybe s
    -> Expr s a
    -> Binding s a
    Binding Maybe s
    src0 Text
    c Maybe s
    src1 (((Maybe s, Expr s a) -> (Maybe s, Expr s b))
    -> Maybe (Maybe s, Expr s a) -> Maybe (Maybe s, Expr s b)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap (Maybe s, Expr s a) -> (Maybe s, Expr s b)
    forall {a}. (a, Expr s a) -> (a, Expr s b)
    adaptBindingAnnotation Maybe (Maybe s, Expr s a)
    d) Maybe s
    src2 (Expr s a
    e Expr s a -> (a -> Expr s b) -> Expr s b
    forall a b. Expr s a -> (a -> Expr s b) -> Expr s b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= a -> Expr s b
    k)

            adaptFunctionBinding :: FunctionBinding s a -> FunctionBinding s b
    adaptFunctionBinding (FunctionBinding Maybe s
    src0 Text
    label Maybe s
    src1 Maybe s
    src2 Expr s a
    type_) =
                Maybe s
    -> Text -> Maybe s -> Maybe s -> Expr s b -> FunctionBinding s b
    forall s a.
    Maybe s
    -> Text -> Maybe s -> Maybe s -> Expr s a -> FunctionBinding s a
    FunctionBinding Maybe s
    src0 Text
    label Maybe s
    src1 Maybe s
    src2 (Expr s a
    type_ Expr s a -> (a -> Expr s b) -> Expr s b
    forall a b. Expr s a -> (a -> Expr s b) -> Expr s b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= a -> Expr s b
    k)

            adaptBindingAnnotation :: (a, Expr s a) -> (a, Expr s b)
    adaptBindingAnnotation (a
    src3, Expr s a
    f) = (a
    src3, Expr s a
    f Expr s a -> (a -> Expr s b) -> Expr s b
    forall a b. Expr s a -> (a -> Expr s b) -> Expr s b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= a -> Expr s b
    k)

    instance Bifunctor Expr where
        first :: forall a b c. (a -> b) -> Expr a c -> Expr b c
    first a -> b
    k (Note a
    a Expr a c
    b   ) = b -> Expr b c -> Expr b c
    forall s a. s -> Expr s a -> Expr s a
    Note (a -> b
    k a
    a) ((a -> b) -> Expr a c -> Expr b c
    forall a b c. (a -> b) -> Expr a c -> Expr b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k Expr a c
    b)
        first a -> b
    _ (Embed c
    a    ) = c -> Expr b c
    forall s a. a -> Expr s a
    Embed c
    a
        first a -> b
    k (Let Binding a c
    a Expr a c
    b    ) = Binding b c -> Expr b c -> Expr b c
    forall s a. Binding s a -> Expr s a -> Expr s a
    Let ((a -> b) -> Binding a c -> Binding b c
    forall a b c. (a -> b) -> Binding a c -> Binding b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k Binding a c
    a) ((a -> b) -> Expr a c -> Expr b c
    forall a b c. (a -> b) -> Expr a c -> Expr b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k Expr a c
    b)
        first a -> b
    k (Record Map Text (RecordField a c)
    a   ) = Map Text (RecordField b c) -> Expr b c
    forall s a. Map Text (RecordField s a) -> Expr s a
    Record (Map Text (RecordField b c) -> Expr b c)
    -> Map Text (RecordField b c) -> Expr b c
    forall a b. (a -> b) -> a -> b
    $ (a -> b) -> RecordField a c -> RecordField b c
    forall a b c. (a -> b) -> RecordField a c -> RecordField b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k (RecordField a c -> RecordField b c)
    -> Map Text (RecordField a c) -> Map Text (RecordField b c)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Map Text (RecordField a c)
    a
        first a -> b
    k (RecordLit Map Text (RecordField a c)
    a) = Map Text (RecordField b c) -> Expr b c
    forall s a. Map Text (RecordField s a) -> Expr s a
    RecordLit (Map Text (RecordField b c) -> Expr b c)
    -> Map Text (RecordField b c) -> Expr b c
    forall a b. (a -> b) -> a -> b
    $ (a -> b) -> RecordField a c -> RecordField b c
    forall a b c. (a -> b) -> RecordField a c -> RecordField b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k (RecordField a c -> RecordField b c)
    -> Map Text (RecordField a c) -> Map Text (RecordField b c)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Map Text (RecordField a c)
    a
        first a -> b
    k (Lam Maybe CharacterSet
    cs FunctionBinding a c
    a Expr a c
    b ) = Maybe CharacterSet -> FunctionBinding b c -> Expr b c -> Expr b c
    forall s a.
    Maybe CharacterSet -> FunctionBinding s a -> Expr s a -> Expr s a
    Lam Maybe CharacterSet
    cs ((a -> b) -> FunctionBinding a c -> FunctionBinding b c
    forall a b c.
    (a -> b) -> FunctionBinding a c -> FunctionBinding b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k FunctionBinding a c
    a) ((a -> b) -> Expr a c -> Expr b c
    forall a b c. (a -> b) -> Expr a c -> Expr b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k Expr a c
    b)
        first a -> b
    k (Field Expr a c
    a FieldSelection a
    b  ) = Expr b c -> FieldSelection b -> Expr b c
    forall s a. Expr s a -> FieldSelection s -> Expr s a
    Field ((a -> b) -> Expr a c -> Expr b c
    forall a b c. (a -> b) -> Expr a c -> Expr b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k Expr a c
    a) (a -> b
    k (a -> b) -> FieldSelection a -> FieldSelection b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> FieldSelection a
    b)
        first a -> b
    k  Expr a c
    expression  = ASetter (Expr a c) (Expr b c) (Expr a c) (Expr b c)
    -> (Expr a c -> Expr b c) -> Expr a c -> Expr b c
    forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
    Lens.over ASetter (Expr a c) (Expr b c) (Expr a c) (Expr b c)
    forall (f :: * -> *) s a t b.
    Applicative f =>
    (Expr s a -> f (Expr t b)) -> Expr s a -> f (Expr t b)
    unsafeSubExpressions ((a -> b) -> Expr a c -> Expr b c
    forall a b c. (a -> b) -> Expr a c -> Expr b c
    forall (p :: * -> * -> *) a b c.
    Bifunctor p =>
    (a -> b) -> p a c -> p b c
    first a -> b
    k) Expr a c
    expression

        second :: forall b c a. (b -> c) -> Expr a b -> Expr a c
    second = (b -> c) -> Expr a b -> Expr a c
    forall a b. (a -> b) -> Expr a a -> Expr a b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap

    instance IsString (Expr s a) where
        fromString :: String -> Expr s a
    fromString String
    str = Var -> Expr s a
    forall s a. Var -> Expr s a
    Var (String -> Var
    forall a. IsString a => String -> a
    fromString String
    str)

    -- | Generates a syntactically valid Dhall program
    instance Pretty a => Pretty (Expr s a) where
        pretty :: forall ann. Expr s a -> Doc ann
    pretty = Doc Ann -> Doc ann
    forall ann xxx. Doc ann -> Doc xxx
    Pretty.unAnnotate (Doc Ann -> Doc ann)
    -> (Expr s a -> Doc Ann) -> Expr s a -> Doc ann
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Expr s a -> Doc Ann
    forall a s. Pretty a => Expr s a -> Doc Ann
    prettyExpr

    {-
    Instead of converting explicitly between 'Expr's and 'MultiLet', it might
    be nicer to use a pattern synonym:

    > pattern MultiLet' :: NonEmpty (Binding s a) -> Expr s a -> Expr s a
    > pattern MultiLet' as b <- (multiLetFromExpr -> Just (MultiLet as b)) where
    >   MultiLet' as b = wrapInLets as b
    >
    > multiLetFromExpr :: Expr s a -> Maybe (MultiLet s a)
    > multiLetFromExpr = \case
    >     Let x mA a b -> Just (multiLet x mA a b)
    >     _ -> Nothing

    This works in principle, but GHC as of v8.8.1 doesn't handle it well:
    https://gitlab.haskell.org/ghc/ghc/issues/17096

    This should be fixed by GHC-8.10, so it might be worth revisiting then.
    -}

    {-| Generate a 'MultiLet' from the contents of a 'Let'.

        In the resulting @'MultiLet' bs e@, @e@ is guaranteed not to be a 'Let',
        but it might be a @('Note' … ('Let' …))@.

        Given parser output, 'multiLet' consolidates @let@s that formed a
        let-block in the original source.
    -}
    multiLet :: Binding s a -> Expr s a -> MultiLet s a
    multiLet :: forall s a. Binding s a -> Expr s a -> MultiLet s a
    multiLet Binding s a
    b0 = \case
        Let Binding s a
    b1 Expr s a
    e1 ->
            let MultiLet NonEmpty (Binding s a)
    bs Expr s a
    e = Binding s a -> Expr s a -> MultiLet s a
    forall s a. Binding s a -> Expr s a -> MultiLet s a
    multiLet Binding s a
    b1 Expr s a
    e1
            in  NonEmpty (Binding s a) -> Expr s a -> MultiLet s a
    forall s a. NonEmpty (Binding s a) -> Expr s a -> MultiLet s a
    MultiLet (Binding s a -> NonEmpty (Binding s a) -> NonEmpty (Binding s a)
    forall a. a -> NonEmpty a -> NonEmpty a
    NonEmpty.cons Binding s a
    b0 NonEmpty (Binding s a)
    bs) Expr s a
    e
        Expr s a
    e -> NonEmpty (Binding s a) -> Expr s a -> MultiLet s a
    forall s a. NonEmpty (Binding s a) -> Expr s a -> MultiLet s a
    MultiLet (Binding s a
    b0 Binding s a -> [Binding s a] -> NonEmpty (Binding s a)
    forall a. a -> [a] -> NonEmpty a
    :| []) Expr s a
    e

    {-| Wrap let-'Binding's around an 'Expr'.

    'wrapInLets' can be understood as an inverse for 'multiLet':

    > let MultiLet bs e1 = multiLet b e0
    >
    > wrapInLets bs e1 == Let b e0
    -}
    wrapInLets :: Foldable f => f (Binding s a) -> Expr s a -> Expr s a
    wrapInLets :: forall (f :: * -> *) s a.
    Foldable f =>
    f (Binding s a) -> Expr s a -> Expr s a
    wrapInLets f (Binding s a)
    bs Expr s a
    e = (Binding s a -> Expr s a -> Expr s a)
    -> Expr s a -> f (Binding s a) -> Expr s a
    forall a b. (a -> b -> b) -> b -> f a -> b
    forall (t :: * -> *) a b.
    Foldable t =>
    (a -> b -> b) -> b -> t a -> b
    foldr Binding s a -> Expr s a -> Expr s a
    forall s a. Binding s a -> Expr s a -> Expr s a
    Let Expr s a
    e f (Binding s a)
    bs

    {-| This type represents 1 or more nested `Let` bindings that have been
        coalesced together for ease of manipulation
    -}
    data MultiLet s a = MultiLet (NonEmpty (Binding s a)) (Expr s a)

    -- | A traversal over the immediate sub-expressions of an expression.
    subExpressions
        :: Applicative f => (Expr s a -> f (Expr s a)) -> Expr s a -> f (Expr s a)
    subExpressions :: forall (f :: * -> *) s a.
    Applicative f =>
    (Expr s a -> f (Expr s a)) -> Expr s a -> f (Expr s a)
    subExpressions = (a -> f (Expr s a))
    -> (Expr s a -> f (Expr s a)) -> Expr s a -> f (Expr s a)
    forall (f :: * -> *) a s b.
    Applicative f =>
    (a -> f (Expr s b))
    -> (Expr s a -> f (Expr s b)) -> Expr s a -> f (Expr s b)
    subExpressionsWith (Expr s a -> f (Expr s a)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Expr s a -> f (Expr s a)) -> (a -> Expr s a) -> a -> f (Expr s a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . a -> Expr s a
    forall s a. a -> Expr s a
    Embed)
    {-# INLINABLE subExpressions #-}

    {-| A traversal over the immediate sub-expressions of an expression which
        allows mapping embedded values
    -}
    subExpressionsWith
        :: Applicative f => (a -> f (Expr s b)) -> (Expr s a -> f (Expr s b)) -> Expr s a -> f (Expr s b)
    subExpressionsWith :: forall (f :: * -> *) a s b.
    Applicative f =>
    (a -> f (Expr s b))
    -> (Expr s a -> f (Expr s b)) -> Expr s a -> f (Expr s b)
    subExpressionsWith a -> f (Expr s b)
    h Expr s a -> f (Expr s b)
    _ (Embed a
    a) = a -> f (Expr s b)
    h a
    a
    subExpressionsWith a -> f (Expr s b)
    _ Expr s a -> f (Expr s b)
    f (Note s
    a Expr s a
    b) = s -> Expr s b -> Expr s b
    forall s a. s -> Expr s a -> Expr s a
    Note s
    a (Expr s b -> Expr s b) -> f (Expr s b) -> f (Expr s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr s b)
    f Expr s a
    b
    subExpressionsWith a -> f (Expr s b)
    _ Expr s a -> f (Expr s b)
    f (Let Binding s a
    a Expr s a
    b) = Binding s b -> Expr s b -> Expr s b
    forall s a. Binding s a -> Expr s a -> Expr s a
    Let (Binding s b -> Expr s b -> Expr s b)
    -> f (Binding s b) -> f (Expr s b -> Expr s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Expr s a -> f (Expr s b)) -> Binding s a -> f (Binding s b)
    forall (f :: * -> *) s a b.
    Applicative f =>
    (Expr s a -> f (Expr s b)) -> Binding s a -> f (Binding s b)
    bindingExprs Expr s a -> f (Expr s b)
    f Binding s a
    a f (Expr s b -> Expr s b) -> f (Expr s b) -> f (Expr s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr s b)
    f Expr s a
    b
    subExpressionsWith a -> f (Expr s b)
    _ Expr s a -> f (Expr s b)
    f (Record Map Text (RecordField s a)
    a) = Map Text (RecordField s b) -> Expr s b
    forall s a. Map Text (RecordField s a) -> Expr s a
    Record (Map Text (RecordField s b) -> Expr s b)
    -> f (Map Text (RecordField s b)) -> f (Expr s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (RecordField s a -> f (RecordField s b))
    -> Map Text (RecordField s a) -> f (Map Text (RecordField s b))
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Map Text a -> f (Map Text b)
    traverse ((Expr s a -> f (Expr s b))
    -> RecordField s a -> f (RecordField s b)
    forall (f :: * -> *) s a b.
    Applicative f =>
    (Expr s a -> f (Expr s b))
    -> RecordField s a -> f (RecordField s b)
    recordFieldExprs Expr s a -> f (Expr s b)
    f) Map Text (RecordField s a)
    a
    subExpressionsWith a -> f (Expr s b)
    _ Expr s a -> f (Expr s b)
    f (RecordLit Map Text (RecordField s a)
    a) = Map Text (RecordField s b) -> Expr s b
    forall s a. Map Text (RecordField s a) -> Expr s a
    RecordLit (Map Text (RecordField s b) -> Expr s b)
    -> f (Map Text (RecordField s b)) -> f (Expr s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (RecordField s a -> f (RecordField s b))
    -> Map Text (RecordField s a) -> f (Map Text (RecordField s b))
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Map Text a -> f (Map Text b)
    traverse ((Expr s a -> f (Expr s b))
    -> RecordField s a -> f (RecordField s b)
    forall (f :: * -> *) s a b.
    Applicative f =>
    (Expr s a -> f (Expr s b))
    -> RecordField s a -> f (RecordField s b)
    recordFieldExprs Expr s a -> f (Expr s b)
    f) Map Text (RecordField s a)
    a
    subExpressionsWith a -> f (Expr s b)
    _ Expr s a -> f (Expr s b)
    f (Lam Maybe CharacterSet
    cs FunctionBinding s a
    fb Expr s a
    e) = Maybe CharacterSet -> FunctionBinding s b -> Expr s b -> Expr s b
    forall s a.
    Maybe CharacterSet -> FunctionBinding s a -> Expr s a -> Expr s a
    Lam Maybe CharacterSet
    cs (FunctionBinding s b -> Expr s b -> Expr s b)
    -> f (FunctionBinding s b) -> f (Expr s b -> Expr s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Expr s a -> f (Expr s b))
    -> FunctionBinding s a -> f (FunctionBinding s b)
    forall (f :: * -> *) s a b.
    Applicative f =>
    (Expr s a -> f (Expr s b))
    -> FunctionBinding s a -> f (FunctionBinding s b)
    functionBindingExprs Expr s a -> f (Expr s b)
    f FunctionBinding s a
    fb f (Expr s b -> Expr s b) -> f (Expr s b) -> f (Expr s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr s b)
    f Expr s a
    e
    subExpressionsWith a -> f (Expr s b)
    _ Expr s a -> f (Expr s b)
    f (Field Expr s a
    a FieldSelection s
    b) = Expr s b -> FieldSelection s -> Expr s b
    forall s a. Expr s a -> FieldSelection s -> Expr s a
    Field (Expr s b -> FieldSelection s -> Expr s b)
    -> f (Expr s b) -> f (FieldSelection s -> Expr s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr s b)
    f Expr s a
    a f (FieldSelection s -> Expr s b)
    -> f (FieldSelection s) -> f (Expr s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> FieldSelection s -> f (FieldSelection s)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure FieldSelection s
    b
    subExpressionsWith a -> f (Expr s b)
    _ Expr s a -> f (Expr s b)
    f Expr s a
    expression = (Expr s a -> f (Expr s b)) -> Expr s a -> f (Expr s b)
    forall (f :: * -> *) s a t b.
    Applicative f =>
    (Expr s a -> f (Expr t b)) -> Expr s a -> f (Expr t b)
    unsafeSubExpressions Expr s a -> f (Expr s b)
    f Expr s a
    expression
    {-# INLINABLE subExpressionsWith #-}

    {-| An internal utility used to implement transformations that require changing
        one of the type variables of the `Expr` type

        This utility only works because the implementation is partial, not
        handling the `Let`, `Note`, or `Embed` cases, which need to be handled by
        the caller.
    -}
    unsafeSubExpressions
        :: Applicative f => (Expr s a -> f (Expr t b)) -> Expr s a -> f (Expr t b)
    unsafeSubExpressions :: forall (f :: * -> *) s a t b.
    Applicative f =>
    (Expr s a -> f (Expr t b)) -> Expr s a -> f (Expr t b)
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (Const Const
    c) = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Const -> Expr t b
    forall s a. Const -> Expr s a
    Const Const
    c)
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (Var Var
    v) = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Var -> Expr t b
    forall s a. Var -> Expr s a
    Var Var
    v)
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (Pi Maybe CharacterSet
    cs Text
    a Expr s a
    b Expr s a
    c) = Maybe CharacterSet -> Text -> Expr t b -> Expr t b -> Expr t b
    forall s a.
    Maybe CharacterSet -> Text -> Expr s a -> Expr s a -> Expr s a
    Pi Maybe CharacterSet
    cs Text
    a (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    b f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    c
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (App Expr s a
    a Expr s a
    b) = Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a
    App (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (Annot Expr s a
    a Expr s a
    b) = Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a
    Annot (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    Bool = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    Bool
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (BoolLit Bool
    b) = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Bool -> Expr t b
    forall s a. Bool -> Expr s a
    BoolLit Bool
    b)
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (BoolAnd Expr s a
    a Expr s a
    b) = Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a
    BoolAnd (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (BoolOr Expr s a
    a Expr s a
    b) = Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a
    BoolOr (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (BoolEQ Expr s a
    a Expr s a
    b) = Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a
    BoolEQ (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (BoolNE Expr s a
    a Expr s a
    b) = Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a
    BoolNE (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (BoolIf Expr s a
    a Expr s a
    b Expr s a
    c) = Expr t b -> Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a -> Expr s a
    BoolIf (Expr t b -> Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    c
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    Natural = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    Natural
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (NaturalLit Natural
    n) = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Natural -> Expr t b
    forall s a. Natural -> Expr s a
    NaturalLit Natural
    n)
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    NaturalFold = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    NaturalFold
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    NaturalBuild = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    NaturalBuild
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    NaturalIsZero = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    NaturalIsZero
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    NaturalEven = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    NaturalEven
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    NaturalOdd = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    NaturalOdd
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    NaturalToInteger = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    NaturalToInteger
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    NaturalShow = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    NaturalShow
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    NaturalSubtract = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    NaturalSubtract
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (NaturalPlus Expr s a
    a Expr s a
    b) = Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a
    NaturalPlus (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (NaturalTimes Expr s a
    a Expr s a
    b) = Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a
    NaturalTimes (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    Integer = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    Integer
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (IntegerLit Integer
    n) = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Integer -> Expr t b
    forall s a. Integer -> Expr s a
    IntegerLit Integer
    n)
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    IntegerClamp = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    IntegerClamp
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    IntegerNegate = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    IntegerNegate
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    IntegerShow = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    IntegerShow
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    IntegerToDouble = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    IntegerToDouble
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    Double = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    Double
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (DoubleLit DhallDouble
    n) = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (DhallDouble -> Expr t b
    forall s a. DhallDouble -> Expr s a
    DoubleLit DhallDouble
    n)
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    DoubleShow = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    DoubleShow
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    Text = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    Text
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (TextLit Chunks s a
    chunks) =
        Chunks t b -> Expr t b
    forall s a. Chunks s a -> Expr s a
    TextLit (Chunks t b -> Expr t b) -> f (Chunks t b) -> f (Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Expr s a -> f (Expr t b)) -> Chunks s a -> f (Chunks t b)
    forall (f :: * -> *) s a t b.
    Applicative f =>
    (Expr s a -> f (Expr t b)) -> Chunks s a -> f (Chunks t b)
    chunkExprs Expr s a -> f (Expr t b)
    f Chunks s a
    chunks
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (TextAppend Expr s a
    a Expr s a
    b) = Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a
    TextAppend (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    TextReplace = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    TextReplace
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    TextShow = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    TextShow
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    Date = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    Date
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (DateLiteral Day
    a) = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Day -> Expr t b
    forall s a. Day -> Expr s a
    DateLiteral Day
    a)
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    Time = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    Time
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (TimeLiteral TimeOfDay
    a Word
    b) = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (TimeOfDay -> Word -> Expr t b
    forall s a. TimeOfDay -> Word -> Expr s a
    TimeLiteral TimeOfDay
    a Word
    b)
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    TimeZone = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    TimeZone
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (TimeZoneLiteral TimeZone
    a) = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (TimeZone -> Expr t b
    forall s a. TimeZone -> Expr s a
    TimeZoneLiteral TimeZone
    a)
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    List = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    List
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (ListLit Maybe (Expr s a)
    a Seq (Expr s a)
    b) = Maybe (Expr t b) -> Seq (Expr t b) -> Expr t b
    forall s a. Maybe (Expr s a) -> Seq (Expr s a) -> Expr s a
    ListLit (Maybe (Expr t b) -> Seq (Expr t b) -> Expr t b)
    -> f (Maybe (Expr t b)) -> f (Seq (Expr t b) -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Expr s a -> f (Expr t b))
    -> Maybe (Expr s a) -> f (Maybe (Expr t b))
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Maybe a -> f (Maybe b)
    traverse Expr s a -> f (Expr t b)
    f Maybe (Expr s a)
    a f (Seq (Expr t b) -> Expr t b)
    -> f (Seq (Expr t b)) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> (Expr s a -> f (Expr t b)) -> Seq (Expr s a) -> f (Seq (Expr t b))
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Seq a -> f (Seq b)
    traverse Expr s a -> f (Expr t b)
    f Seq (Expr s a)
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (ListAppend Expr s a
    a Expr s a
    b) = Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a
    ListAppend (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    ListBuild = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    ListBuild
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    ListFold = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    ListFold
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    ListLength = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    ListLength
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    ListHead = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    ListHead
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    ListLast = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    ListLast
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    ListIndexed = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    ListIndexed
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    ListReverse = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    ListReverse
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    Optional = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    Optional
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (Some Expr s a
    a) = Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a
    Some (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ Expr s a
    None = Expr t b -> f (Expr t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Expr t b
    forall s a. Expr s a
    None
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (Union Map Text (Maybe (Expr s a))
    a) = Map Text (Maybe (Expr t b)) -> Expr t b
    forall s a. Map Text (Maybe (Expr s a)) -> Expr s a
    Union (Map Text (Maybe (Expr t b)) -> Expr t b)
    -> f (Map Text (Maybe (Expr t b))) -> f (Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Maybe (Expr s a) -> f (Maybe (Expr t b)))
    -> Map Text (Maybe (Expr s a)) -> f (Map Text (Maybe (Expr t b)))
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Map Text a -> f (Map Text b)
    traverse ((Expr s a -> f (Expr t b))
    -> Maybe (Expr s a) -> f (Maybe (Expr t b))
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Maybe a -> f (Maybe b)
    traverse Expr s a -> f (Expr t b)
    f) Map Text (Maybe (Expr s a))
    a
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (Combine Maybe CharacterSet
    cs Maybe Text
    a Expr s a
    b Expr s a
    c) = Maybe CharacterSet
    -> Maybe Text -> Expr t b -> Expr t b -> Expr t b
    forall s a.
    Maybe CharacterSet
    -> Maybe Text -> Expr s a -> Expr s a -> Expr s a
    Combine Maybe CharacterSet
    cs Maybe Text
    a (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    b f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    c
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (CombineTypes Maybe CharacterSet
    cs Expr s a
    a Expr s a
    b) = Maybe CharacterSet -> Expr t b -> Expr t b -> Expr t b
    forall s a. Maybe CharacterSet -> Expr s a -> Expr s a -> Expr s a
    CombineTypes Maybe CharacterSet
    cs (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (Prefer Maybe CharacterSet
    cs PreferAnnotation s a
    a Expr s a
    b Expr s a
    c) = Maybe CharacterSet
    -> PreferAnnotation t b -> Expr t b -> Expr t b -> Expr t b
    forall s a.
    Maybe CharacterSet
    -> PreferAnnotation s a -> Expr s a -> Expr s a -> Expr s a
    Prefer Maybe CharacterSet
    cs (PreferAnnotation t b -> Expr t b -> Expr t b -> Expr t b)
    -> f (PreferAnnotation t b) -> f (Expr t b -> Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> f (PreferAnnotation t b)
    a' f (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    c
      where
        a' :: f (PreferAnnotation t b)
    a' = case PreferAnnotation s a
    a of
            PreferAnnotation s a
    PreferFromSource     -> PreferAnnotation t b -> f (PreferAnnotation t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure PreferAnnotation t b
    forall s a. PreferAnnotation s a
    PreferFromSource
            PreferFromWith Expr s a
    d     -> Expr t b -> PreferAnnotation t b
    forall s a. Expr s a -> PreferAnnotation s a
    PreferFromWith (Expr t b -> PreferAnnotation t b)
    -> f (Expr t b) -> f (PreferAnnotation t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    d
            PreferAnnotation s a
    PreferFromCompletion -> PreferAnnotation t b -> f (PreferAnnotation t b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure PreferAnnotation t b
    forall s a. PreferAnnotation s a
    PreferFromCompletion
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (RecordCompletion Expr s a
    a Expr s a
    b) = Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a
    RecordCompletion (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (Merge Expr s a
    a Expr s a
    b Maybe (Expr s a)
    t) = Expr t b -> Expr t b -> Maybe (Expr t b) -> Expr t b
    forall s a. Expr s a -> Expr s a -> Maybe (Expr s a) -> Expr s a
    Merge (Expr t b -> Expr t b -> Maybe (Expr t b) -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Maybe (Expr t b) -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Maybe (Expr t b) -> Expr t b)
    -> f (Expr t b) -> f (Maybe (Expr t b) -> Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b f (Maybe (Expr t b) -> Expr t b)
    -> f (Maybe (Expr t b)) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> (Expr s a -> f (Expr t b))
    -> Maybe (Expr s a) -> f (Maybe (Expr t b))
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Maybe a -> f (Maybe b)
    traverse Expr s a -> f (Expr t b)
    f Maybe (Expr s a)
    t
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (ToMap Expr s a
    a Maybe (Expr s a)
    t) = Expr t b -> Maybe (Expr t b) -> Expr t b
    forall s a. Expr s a -> Maybe (Expr s a) -> Expr s a
    ToMap (Expr t b -> Maybe (Expr t b) -> Expr t b)
    -> f (Expr t b) -> f (Maybe (Expr t b) -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Maybe (Expr t b) -> Expr t b)
    -> f (Maybe (Expr t b)) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> (Expr s a -> f (Expr t b))
    -> Maybe (Expr s a) -> f (Maybe (Expr t b))
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Maybe a -> f (Maybe b)
    traverse Expr s a -> f (Expr t b)
    f Maybe (Expr s a)
    t
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (ShowConstructor Expr s a
    a) = Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a
    ShowConstructor (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (Project Expr s a
    a Either [Text] (Expr s a)
    b) = Expr t b -> Either [Text] (Expr t b) -> Expr t b
    forall s a. Expr s a -> Either [Text] (Expr s a) -> Expr s a
    Project (Expr t b -> Either [Text] (Expr t b) -> Expr t b)
    -> f (Expr t b) -> f (Either [Text] (Expr t b) -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Either [Text] (Expr t b) -> Expr t b)
    -> f (Either [Text] (Expr t b)) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> (Expr s a -> f (Expr t b))
    -> Either [Text] (Expr s a) -> f (Either [Text] (Expr t b))
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Either [Text] a -> f (Either [Text] b)
    traverse Expr s a -> f (Expr t b)
    f Either [Text] (Expr s a)
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (Assert Expr s a
    a) = Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a
    Assert (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (Equivalent Maybe CharacterSet
    cs Expr s a
    a Expr s a
    b) = Maybe CharacterSet -> Expr t b -> Expr t b -> Expr t b
    forall s a. Maybe CharacterSet -> Expr s a -> Expr s a -> Expr s a
    Equivalent Maybe CharacterSet
    cs (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    b
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (With Expr s a
    a NonEmpty WithComponent
    b Expr s a
    c) = Expr t b -> NonEmpty WithComponent -> Expr t b -> Expr t b
    forall s a.
    Expr s a -> NonEmpty WithComponent -> Expr s a -> Expr s a
    With (Expr t b -> NonEmpty WithComponent -> Expr t b -> Expr t b)
    -> f (Expr t b)
    -> f (NonEmpty WithComponent -> Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    a f (NonEmpty WithComponent -> Expr t b -> Expr t b)
    -> f (NonEmpty WithComponent) -> f (Expr t b -> Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> NonEmpty WithComponent -> f (NonEmpty WithComponent)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure NonEmpty WithComponent
    b f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    c
    unsafeSubExpressions Expr s a -> f (Expr t b)
    f (ImportAlt Expr s a
    l Expr s a
    r) = Expr t b -> Expr t b -> Expr t b
    forall s a. Expr s a -> Expr s a -> Expr s a
    ImportAlt (Expr t b -> Expr t b -> Expr t b)
    -> f (Expr t b) -> f (Expr t b -> Expr t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Expr s a -> f (Expr t b)
    f Expr s a
    l f (Expr t b -> Expr t b) -> f (Expr t b) -> f (Expr t b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr t b)
    f Expr s a
    r
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (Let {}) = Text -> f (Expr t b)
    forall a. Text -> a
    unhandledConstructor Text
    "Let"
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (Note {}) = Text -> f (Expr t b)
    forall a. Text -> a
    unhandledConstructor Text
    "Note"
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (Embed {}) = Text -> f (Expr t b)
    forall a. Text -> a
    unhandledConstructor Text
    "Embed"
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (Record {}) = Text -> f (Expr t b)
    forall a. Text -> a
    unhandledConstructor Text
    "Record"
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (RecordLit {}) = Text -> f (Expr t b)
    forall a. Text -> a
    unhandledConstructor Text
    "RecordLit"
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (Lam {}) = Text -> f (Expr t b)
    forall a. Text -> a
    unhandledConstructor Text
    "Lam"
    unsafeSubExpressions Expr s a -> f (Expr t b)
    _ (Field {}) = Text -> f (Expr t b)
    forall a. Text -> a
    unhandledConstructor Text
    "Field"
    {-# INLINABLE unsafeSubExpressions #-}

    unhandledConstructor :: Text -> a
    unhandledConstructor :: forall a. Text -> a
    unhandledConstructor Text
    constructor =
        Text -> forall b. b
    internalError
            (   Text
    "Dhall.Syntax.unsafeSubExpressions: Unhandled "
            Text -> Text -> Text
    forall a. Semigroup a => a -> a -> a
    <>  Text
    constructor
            Text -> Text -> Text
    forall a. Semigroup a => a -> a -> a
    <>  Text
    " construtor"
            )

    {-| Traverse over the immediate 'Expr' children in a 'Binding'.
    -}
    bindingExprs
      :: (Applicative f)
      => (Expr s a -> f (Expr s b))
      -> Binding s a -> f (Binding s b)
    bindingExprs :: forall (f :: * -> *) s a b.
    Applicative f =>
    (Expr s a -> f (Expr s b)) -> Binding s a -> f (Binding s b)
    bindingExprs Expr s a -> f (Expr s b)
    f (Binding Maybe s
    s0 Text
    n Maybe s
    s1 Maybe (Maybe s, Expr s a)
    t Maybe s
    s2 Expr s a
    v) =
      Maybe s
    -> Text
    -> Maybe s
    -> Maybe (Maybe s, Expr s b)
    -> Maybe s
    -> Expr s b
    -> Binding s b
    forall s a.
    Maybe s
    -> Text
    -> Maybe s
    -> Maybe (Maybe s, Expr s a)
    -> Maybe s
    -> Expr s a
    -> Binding s a
    Binding
        (Maybe s
     -> Text
     -> Maybe s
     -> Maybe (Maybe s, Expr s b)
     -> Maybe s
     -> Expr s b
     -> Binding s b)
    -> f (Maybe s)
    -> f (Text
          -> Maybe s
          -> Maybe (Maybe s, Expr s b)
          -> Maybe s
          -> Expr s b
          -> Binding s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Maybe s -> f (Maybe s)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Maybe s
    s0
        f (Text
       -> Maybe s
       -> Maybe (Maybe s, Expr s b)
       -> Maybe s
       -> Expr s b
       -> Binding s b)
    -> f Text
    -> f (Maybe s
          -> Maybe (Maybe s, Expr s b) -> Maybe s -> Expr s b -> Binding s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Text -> f Text
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Text
    n
        f (Maybe s
       -> Maybe (Maybe s, Expr s b) -> Maybe s -> Expr s b -> Binding s b)
    -> f (Maybe s)
    -> f (Maybe (Maybe s, Expr s b)
          -> Maybe s -> Expr s b -> Binding s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Maybe s -> f (Maybe s)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Maybe s
    s1
        f (Maybe (Maybe s, Expr s b) -> Maybe s -> Expr s b -> Binding s b)
    -> f (Maybe (Maybe s, Expr s b))
    -> f (Maybe s -> Expr s b -> Binding s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> ((Maybe s, Expr s a) -> f (Maybe s, Expr s b))
    -> Maybe (Maybe s, Expr s a) -> f (Maybe (Maybe s, Expr s b))
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Maybe a -> f (Maybe b)
    traverse ((Expr s a -> f (Expr s b))
    -> (Maybe s, Expr s a) -> f (Maybe s, Expr s b)
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> (Maybe s, a) -> f (Maybe s, b)
    traverse Expr s a -> f (Expr s b)
    f) Maybe (Maybe s, Expr s a)
    t
        f (Maybe s -> Expr s b -> Binding s b)
    -> f (Maybe s) -> f (Expr s b -> Binding s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Maybe s -> f (Maybe s)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Maybe s
    s2
        f (Expr s b -> Binding s b) -> f (Expr s b) -> f (Binding s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr s b)
    f Expr s a
    v
    {-# INLINABLE bindingExprs #-}

    {-| Traverse over the immediate 'Expr' children in a 'RecordField'.
    -}
    recordFieldExprs
        :: Applicative f
        => (Expr s a -> f (Expr s b))
        -> RecordField s a -> f (RecordField s b)
    recordFieldExprs :: forall (f :: * -> *) s a b.
    Applicative f =>
    (Expr s a -> f (Expr s b))
    -> RecordField s a -> f (RecordField s b)
    recordFieldExprs Expr s a -> f (Expr s b)
    f (RecordField Maybe s
    s0 Expr s a
    e Maybe s
    s1 Maybe s
    s2) =
        Maybe s -> Expr s b -> Maybe s -> Maybe s -> RecordField s b
    forall s a.
    Maybe s -> Expr s a -> Maybe s -> Maybe s -> RecordField s a
    RecordField
            (Maybe s -> Expr s b -> Maybe s -> Maybe s -> RecordField s b)
    -> f (Maybe s)
    -> f (Expr s b -> Maybe s -> Maybe s -> RecordField s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Maybe s -> f (Maybe s)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Maybe s
    s0
            f (Expr s b -> Maybe s -> Maybe s -> RecordField s b)
    -> f (Expr s b) -> f (Maybe s -> Maybe s -> RecordField s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr s b)
    f Expr s a
    e
            f (Maybe s -> Maybe s -> RecordField s b)
    -> f (Maybe s) -> f (Maybe s -> RecordField s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Maybe s -> f (Maybe s)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Maybe s
    s1
            f (Maybe s -> RecordField s b)
    -> f (Maybe s) -> f (RecordField s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Maybe s -> f (Maybe s)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Maybe s
    s2
    {-# INLINABLE recordFieldExprs #-}

    {-| Traverse over the immediate 'Expr' children in a 'FunctionBinding'.
    -}
    functionBindingExprs
        :: Applicative f
        => (Expr s a -> f (Expr s b))
        -> FunctionBinding s a -> f (FunctionBinding s b)
    functionBindingExprs :: forall (f :: * -> *) s a b.
    Applicative f =>
    (Expr s a -> f (Expr s b))
    -> FunctionBinding s a -> f (FunctionBinding s b)
    functionBindingExprs Expr s a -> f (Expr s b)
    f (FunctionBinding Maybe s
    s0 Text
    label Maybe s
    s1 Maybe s
    s2 Expr s a
    type_) =
        Maybe s
    -> Text -> Maybe s -> Maybe s -> Expr s b -> FunctionBinding s b
    forall s a.
    Maybe s
    -> Text -> Maybe s -> Maybe s -> Expr s a -> FunctionBinding s a
    FunctionBinding
            (Maybe s
     -> Text -> Maybe s -> Maybe s -> Expr s b -> FunctionBinding s b)
    -> f (Maybe s)
    -> f (Text
          -> Maybe s -> Maybe s -> Expr s b -> FunctionBinding s b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Maybe s -> f (Maybe s)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Maybe s
    s0
            f (Text -> Maybe s -> Maybe s -> Expr s b -> FunctionBinding s b)
    -> f Text
    -> f (Maybe s -> Maybe s -> Expr s b -> FunctionBinding s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Text -> f Text
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Text
    label
            f (Maybe s -> Maybe s -> Expr s b -> FunctionBinding s b)
    -> f (Maybe s) -> f (Maybe s -> Expr s b -> FunctionBinding s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Maybe s -> f (Maybe s)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Maybe s
    s1
            f (Maybe s -> Expr s b -> FunctionBinding s b)
    -> f (Maybe s) -> f (Expr s b -> FunctionBinding s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Maybe s -> f (Maybe s)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Maybe s
    s2
            f (Expr s b -> FunctionBinding s b)
    -> f (Expr s b) -> f (FunctionBinding s b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Expr s a -> f (Expr s b)
    f Expr s a
    type_
    {-# INLINABLE functionBindingExprs #-}

    -- | A traversal over the immediate sub-expressions in 'Chunks'.
    chunkExprs
      :: Applicative f
      => (Expr s a -> f (Expr t b))
      -> Chunks s a -> f (Chunks t b)
    chunkExprs :: forall (f :: * -> *) s a t b.
    Applicative f =>
    (Expr s a -> f (Expr t b)) -> Chunks s a -> f (Chunks t b)
    chunkExprs Expr s a -> f (Expr t b)
    f (Chunks [(Text, Expr s a)]
    chunks Text
    final) =
      ([(Text, Expr t b)] -> Text -> Chunks t b)
    -> Text -> [(Text, Expr t b)] -> Chunks t b
    forall a b c. (a -> b -> c) -> b -> a -> c
    flip [(Text, Expr t b)] -> Text -> Chunks t b
    forall s a. [(Text, Expr s a)] -> Text -> Chunks s a
    Chunks Text
    final ([(Text, Expr t b)] -> Chunks t b)
    -> f [(Text, Expr t b)] -> f (Chunks t b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> ((Text, Expr s a) -> f (Text, Expr t b))
    -> [(Text, Expr s a)] -> f [(Text, Expr t b)]
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> [a] -> f [b]
    traverse ((Expr s a -> f (Expr t b))
    -> (Text, Expr s a) -> f (Text, Expr t b)
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> (Text, a) -> f (Text, b)
    traverse Expr s a -> f (Expr t b)
    f) [(Text, Expr s a)]
    chunks
    {-# INLINABLE chunkExprs #-}

    {-| Internal representation of a directory that stores the path components in
        reverse order

        In other words, the directory @\/foo\/bar\/baz@ is encoded as
        @Directory { components = [ "baz", "bar", "foo" ] }@
    -}
    newtype Directory = Directory { Directory -> [Text]
    components :: [Text] }
        deriving stock (Directory -> Directory -> Bool
    (Directory -> Directory -> Bool)
    -> (Directory -> Directory -> Bool) -> Eq Directory
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Directory -> Directory -> Bool
    == :: Directory -> Directory -> Bool
    $c/= :: Directory -> Directory -> Bool
    /= :: Directory -> Directory -> Bool
    Eq, (forall x. Directory -> Rep Directory x)
    -> (forall x. Rep Directory x -> Directory) -> Generic Directory
    forall x. Rep Directory x -> Directory
    forall x. Directory -> Rep Directory x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Directory -> Rep Directory x
    from :: forall x. Directory -> Rep Directory x
    $cto :: forall x. Rep Directory x -> Directory
    to :: forall x. Rep Directory x -> Directory
    Generic, Eq Directory
    Eq Directory
    -> (Directory -> Directory -> Ordering)
    -> (Directory -> Directory -> Bool)
    -> (Directory -> Directory -> Bool)
    -> (Directory -> Directory -> Bool)
    -> (Directory -> Directory -> Bool)
    -> (Directory -> Directory -> Directory)
    -> (Directory -> Directory -> Directory)
    -> Ord Directory
    Directory -> Directory -> Bool
    Directory -> Directory -> Ordering
    Directory -> Directory -> Directory
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: Directory -> Directory -> Ordering
    compare :: Directory -> Directory -> Ordering
    $c< :: Directory -> Directory -> Bool
    < :: Directory -> Directory -> Bool
    $c<= :: Directory -> Directory -> Bool
    <= :: Directory -> Directory -> Bool
    $c> :: Directory -> Directory -> Bool
    > :: Directory -> Directory -> Bool
    $c>= :: Directory -> Directory -> Bool
    >= :: Directory -> Directory -> Bool
    $cmax :: Directory -> Directory -> Directory
    max :: Directory -> Directory -> Directory
    $cmin :: Directory -> Directory -> Directory
    min :: Directory -> Directory -> Directory
    Ord, Int -> Directory -> ShowS
    [Directory] -> ShowS
    Directory -> String
    (Int -> Directory -> ShowS)
    -> (Directory -> String)
    -> ([Directory] -> ShowS)
    -> Show Directory
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Directory -> ShowS
    showsPrec :: Int -> Directory -> ShowS
    $cshow :: Directory -> String
    show :: Directory -> String
    $cshowList :: [Directory] -> ShowS
    showList :: [Directory] -> ShowS
    Show)
        deriving anyclass Directory -> ()
    (Directory -> ()) -> NFData Directory
    forall a. (a -> ()) -> NFData a
    $crnf :: Directory -> ()
    rnf :: Directory -> ()
    NFData

    instance Semigroup Directory where
        Directory [Text]
    components₀ <> :: Directory -> Directory -> Directory
    <> Directory [Text]
    components₁ =
            [Text] -> Directory
    Directory ([Text]
    components₁ [Text] -> [Text] -> [Text]
    forall a. Semigroup a => a -> a -> a
    <> [Text]
    components₀)

    instance Pretty Directory where
        pretty :: forall ann. Directory -> Doc ann
    pretty (Directory {[Text]
    components :: Directory -> [Text]
    components :: [Text]
    ..}) = (Text -> Doc ann) -> [Text] -> Doc ann
    forall m a. Monoid m => (a -> m) -> [a] -> m
    forall (t :: * -> *) m a.
    (Foldable t, Monoid m) =>
    (a -> m) -> t a -> m
    foldMap Text -> Doc ann
    forall ann. Text -> Doc ann
    prettyPathComponent ([Text] -> [Text]
    forall a. [a] -> [a]
    reverse [Text]
    components)

    prettyPathComponent :: Text -> Doc ann
    prettyPathComponent :: forall ann. Text -> Doc ann
    prettyPathComponent Text
    text
        | (Char -> Bool) -> Text -> Bool
    Data.Text.all Char -> Bool
    pathCharacter Text
    text =
            Doc ann
    "/" Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <> Text -> Doc ann
    forall ann. Text -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    Pretty.pretty Text
    text
        | Bool
    otherwise =
            Doc ann
    "/\"" Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <> Text -> Doc ann
    forall ann. Text -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    Pretty.pretty Text
    text Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <> Doc ann
    "\""

    {-| A `File` is a `directory` followed by one additional path component
        representing the `file` name
    -}
    data File = File
        { File -> Directory
    directory :: Directory
        , File -> Text
    file      :: Text
        } deriving (File -> File -> Bool
    (File -> File -> Bool) -> (File -> File -> Bool) -> Eq File
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: File -> File -> Bool
    == :: File -> File -> Bool
    $c/= :: File -> File -> Bool
    /= :: File -> File -> Bool
    Eq, (forall x. File -> Rep File x)
    -> (forall x. Rep File x -> File) -> Generic File
    forall x. Rep File x -> File
    forall x. File -> Rep File x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. File -> Rep File x
    from :: forall x. File -> Rep File x
    $cto :: forall x. Rep File x -> File
    to :: forall x. Rep File x -> File
    Generic, Eq File
    Eq File
    -> (File -> File -> Ordering)
    -> (File -> File -> Bool)
    -> (File -> File -> Bool)
    -> (File -> File -> Bool)
    -> (File -> File -> Bool)
    -> (File -> File -> File)
    -> (File -> File -> File)
    -> Ord File
    File -> File -> Bool
    File -> File -> Ordering
    File -> File -> File
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: File -> File -> Ordering
    compare :: File -> File -> Ordering
    $c< :: File -> File -> Bool
    < :: File -> File -> Bool
    $c<= :: File -> File -> Bool
    <= :: File -> File -> Bool
    $c> :: File -> File -> Bool
    > :: File -> File -> Bool
    $c>= :: File -> File -> Bool
    >= :: File -> File -> Bool
    $cmax :: File -> File -> File
    max :: File -> File -> File
    $cmin :: File -> File -> File
    min :: File -> File -> File
    Ord, Int -> File -> ShowS
    [File] -> ShowS
    File -> String
    (Int -> File -> ShowS)
    -> (File -> String) -> ([File] -> ShowS) -> Show File
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> File -> ShowS
    showsPrec :: Int -> File -> ShowS
    $cshow :: File -> String
    show :: File -> String
    $cshowList :: [File] -> ShowS
    showList :: [File] -> ShowS
    Show, File -> ()
    (File -> ()) -> NFData File
    forall a. (a -> ()) -> NFData a
    $crnf :: File -> ()
    rnf :: File -> ()
    NFData)

    instance Pretty File where
        pretty :: forall ann. File -> Doc ann
    pretty (File {Text
    Directory
    directory :: File -> Directory
    file :: File -> Text
    directory :: Directory
    file :: Text
    ..}) =
                Directory -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    forall ann. Directory -> Doc ann
    Pretty.pretty Directory
    directory
            Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <>  Text -> Doc ann
    forall ann. Text -> Doc ann
    prettyPathComponent Text
    file

    instance Semigroup File where
        File Directory
    directory₀ Text
    _ <> :: File -> File -> File
    <> File Directory
    directory₁ Text
    file =
            Directory -> Text -> File
    File (Directory
    directory₀ Directory -> Directory -> Directory
    forall a. Semigroup a => a -> a -> a
    <> Directory
    directory₁) Text
    file

    -- | The beginning of a file path which anchors subsequent path components
    data FilePrefix
        = Absolute
        -- ^ Absolute path
        | Here
        -- ^ Path relative to @.@
        | Parent
        -- ^ Path relative to @..@
        | Home
        -- ^ Path relative to @~@
        deriving (FilePrefix -> FilePrefix -> Bool
    (FilePrefix -> FilePrefix -> Bool)
    -> (FilePrefix -> FilePrefix -> Bool) -> Eq FilePrefix
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: FilePrefix -> FilePrefix -> Bool
    == :: FilePrefix -> FilePrefix -> Bool
    $c/= :: FilePrefix -> FilePrefix -> Bool
    /= :: FilePrefix -> FilePrefix -> Bool
    Eq, (forall x. FilePrefix -> Rep FilePrefix x)
    -> (forall x. Rep FilePrefix x -> FilePrefix) -> Generic FilePrefix
    forall x. Rep FilePrefix x -> FilePrefix
    forall x. FilePrefix -> Rep FilePrefix x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. FilePrefix -> Rep FilePrefix x
    from :: forall x. FilePrefix -> Rep FilePrefix x
    $cto :: forall x. Rep FilePrefix x -> FilePrefix
    to :: forall x. Rep FilePrefix x -> FilePrefix
    Generic, Eq FilePrefix
    Eq FilePrefix
    -> (FilePrefix -> FilePrefix -> Ordering)
    -> (FilePrefix -> FilePrefix -> Bool)
    -> (FilePrefix -> FilePrefix -> Bool)
    -> (FilePrefix -> FilePrefix -> Bool)
    -> (FilePrefix -> FilePrefix -> Bool)
    -> (FilePrefix -> FilePrefix -> FilePrefix)
    -> (FilePrefix -> FilePrefix -> FilePrefix)
    -> Ord FilePrefix
    FilePrefix -> FilePrefix -> Bool
    FilePrefix -> FilePrefix -> Ordering
    FilePrefix -> FilePrefix -> FilePrefix
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: FilePrefix -> FilePrefix -> Ordering
    compare :: FilePrefix -> FilePrefix -> Ordering
    $c< :: FilePrefix -> FilePrefix -> Bool
    < :: FilePrefix -> FilePrefix -> Bool
    $c<= :: FilePrefix -> FilePrefix -> Bool
    <= :: FilePrefix -> FilePrefix -> Bool
    $c> :: FilePrefix -> FilePrefix -> Bool
    > :: FilePrefix -> FilePrefix -> Bool
    $c>= :: FilePrefix -> FilePrefix -> Bool
    >= :: FilePrefix -> FilePrefix -> Bool
    $cmax :: FilePrefix -> FilePrefix -> FilePrefix
    max :: FilePrefix -> FilePrefix -> FilePrefix
    $cmin :: FilePrefix -> FilePrefix -> FilePrefix
    min :: FilePrefix -> FilePrefix -> FilePrefix
    Ord, Int -> FilePrefix -> ShowS
    [FilePrefix] -> ShowS
    FilePrefix -> String
    (Int -> FilePrefix -> ShowS)
    -> (FilePrefix -> String)
    -> ([FilePrefix] -> ShowS)
    -> Show FilePrefix
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> FilePrefix -> ShowS
    showsPrec :: Int -> FilePrefix -> ShowS
    $cshow :: FilePrefix -> String
    show :: FilePrefix -> String
    $cshowList :: [FilePrefix] -> ShowS
    showList :: [FilePrefix] -> ShowS
    Show, FilePrefix -> ()
    (FilePrefix -> ()) -> NFData FilePrefix
    forall a. (a -> ()) -> NFData a
    $crnf :: FilePrefix -> ()
    rnf :: FilePrefix -> ()
    NFData)

    instance Pretty FilePrefix where
        pretty :: forall ann. FilePrefix -> Doc ann
    pretty FilePrefix
    Absolute = Doc ann
    ""
        pretty FilePrefix
    Here     = Doc ann
    "."
        pretty FilePrefix
    Parent   = Doc ann
    ".."
        pretty FilePrefix
    Home     = Doc ann
    "~"

    -- | The URI scheme
    data Scheme = HTTP | HTTPS deriving (Scheme -> Scheme -> Bool
    (Scheme -> Scheme -> Bool)
    -> (Scheme -> Scheme -> Bool) -> Eq Scheme
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Scheme -> Scheme -> Bool
    == :: Scheme -> Scheme -> Bool
    $c/= :: Scheme -> Scheme -> Bool
    /= :: Scheme -> Scheme -> Bool
    Eq, (forall x. Scheme -> Rep Scheme x)
    -> (forall x. Rep Scheme x -> Scheme) -> Generic Scheme
    forall x. Rep Scheme x -> Scheme
    forall x. Scheme -> Rep Scheme x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Scheme -> Rep Scheme x
    from :: forall x. Scheme -> Rep Scheme x
    $cto :: forall x. Rep Scheme x -> Scheme
    to :: forall x. Rep Scheme x -> Scheme
    Generic, Eq Scheme
    Eq Scheme
    -> (Scheme -> Scheme -> Ordering)
    -> (Scheme -> Scheme -> Bool)
    -> (Scheme -> Scheme -> Bool)
    -> (Scheme -> Scheme -> Bool)
    -> (Scheme -> Scheme -> Bool)
    -> (Scheme -> Scheme -> Scheme)
    -> (Scheme -> Scheme -> Scheme)
    -> Ord Scheme
    Scheme -> Scheme -> Bool
    Scheme -> Scheme -> Ordering
    Scheme -> Scheme -> Scheme
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: Scheme -> Scheme -> Ordering
    compare :: Scheme -> Scheme -> Ordering
    $c< :: Scheme -> Scheme -> Bool
    < :: Scheme -> Scheme -> Bool
    $c<= :: Scheme -> Scheme -> Bool
    <= :: Scheme -> Scheme -> Bool
    $c> :: Scheme -> Scheme -> Bool
    > :: Scheme -> Scheme -> Bool
    $c>= :: Scheme -> Scheme -> Bool
    >= :: Scheme -> Scheme -> Bool
    $cmax :: Scheme -> Scheme -> Scheme
    max :: Scheme -> Scheme -> Scheme
    $cmin :: Scheme -> Scheme -> Scheme
    min :: Scheme -> Scheme -> Scheme
    Ord, Int -> Scheme -> ShowS
    [Scheme] -> ShowS
    Scheme -> String
    (Int -> Scheme -> ShowS)
    -> (Scheme -> String) -> ([Scheme] -> ShowS) -> Show Scheme
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Scheme -> ShowS
    showsPrec :: Int -> Scheme -> ShowS
    $cshow :: Scheme -> String
    show :: Scheme -> String
    $cshowList :: [Scheme] -> ShowS
    showList :: [Scheme] -> ShowS
    Show, Scheme -> ()
    (Scheme -> ()) -> NFData Scheme
    forall a. (a -> ()) -> NFData a
    $crnf :: Scheme -> ()
    rnf :: Scheme -> ()
    NFData)

    -- | This type stores all of the components of a remote import
    data URL = URL
        { URL -> Scheme
    scheme    :: Scheme
        , URL -> Text
    authority :: Text
        , URL -> File
    path      :: File
        , URL -> Maybe Text
    query     :: Maybe Text
        , URL -> Maybe (Expr Src Import)
    headers   :: Maybe (Expr Src Import)
        } deriving (URL -> URL -> Bool
    (URL -> URL -> Bool) -> (URL -> URL -> Bool) -> Eq URL
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: URL -> URL -> Bool
    == :: URL -> URL -> Bool
    $c/= :: URL -> URL -> Bool
    /= :: URL -> URL -> Bool
    Eq, (forall x. URL -> Rep URL x)
    -> (forall x. Rep URL x -> URL) -> Generic URL
    forall x. Rep URL x -> URL
    forall x. URL -> Rep URL x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. URL -> Rep URL x
    from :: forall x. URL -> Rep URL x
    $cto :: forall x. Rep URL x -> URL
    to :: forall x. Rep URL x -> URL
    Generic, Eq URL
    Eq URL
    -> (URL -> URL -> Ordering)
    -> (URL -> URL -> Bool)
    -> (URL -> URL -> Bool)
    -> (URL -> URL -> Bool)
    -> (URL -> URL -> Bool)
    -> (URL -> URL -> URL)
    -> (URL -> URL -> URL)
    -> Ord URL
    URL -> URL -> Bool
    URL -> URL -> Ordering
    URL -> URL -> URL
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: URL -> URL -> Ordering
    compare :: URL -> URL -> Ordering
    $c< :: URL -> URL -> Bool
    < :: URL -> URL -> Bool
    $c<= :: URL -> URL -> Bool
    <= :: URL -> URL -> Bool
    $c> :: URL -> URL -> Bool
    > :: URL -> URL -> Bool
    $c>= :: URL -> URL -> Bool
    >= :: URL -> URL -> Bool
    $cmax :: URL -> URL -> URL
    max :: URL -> URL -> URL
    $cmin :: URL -> URL -> URL
    min :: URL -> URL -> URL
    Ord, Int -> URL -> ShowS
    [URL] -> ShowS
    URL -> String
    (Int -> URL -> ShowS)
    -> (URL -> String) -> ([URL] -> ShowS) -> Show URL
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> URL -> ShowS
    showsPrec :: Int -> URL -> ShowS
    $cshow :: URL -> String
    show :: URL -> String
    $cshowList :: [URL] -> ShowS
    showList :: [URL] -> ShowS
    Show, URL -> ()
    (URL -> ()) -> NFData URL
    forall a. (a -> ()) -> NFData a
    $crnf :: URL -> ()
    rnf :: URL -> ()
    NFData)

    instance Pretty URL where
        pretty :: forall ann. URL -> Doc ann
    pretty (URL {Maybe Text
    Maybe (Expr Src Import)
    Text
    Scheme
    File
    scheme :: URL -> Scheme
    authority :: URL -> Text
    path :: URL -> File
    query :: URL -> Maybe Text
    headers :: URL -> Maybe (Expr Src Import)
    scheme :: Scheme
    authority :: Text
    path :: File
    query :: Maybe Text
    headers :: Maybe (Expr Src Import)
    ..}) =
                Doc ann
    schemeDoc
            Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <>  Doc ann
    "://"
            Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <>  Text -> Doc ann
    forall ann. Text -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    Pretty.pretty Text
    authority
            Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <>  Doc ann
    forall {ann}. Doc ann
    pathDoc
            Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <>  Doc ann
    forall {ann}. Doc ann
    queryDoc
            Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <>  (Expr Src Import -> Doc ann) -> Maybe (Expr Src Import) -> Doc ann
    forall m a. Monoid m => (a -> m) -> Maybe a -> m
    forall (t :: * -> *) m a.
    (Foldable t, Monoid m) =>
    (a -> m) -> t a -> m
    foldMap Expr Src Import -> Doc ann
    forall {a} {xxx}. Pretty a => a -> Doc xxx
    prettyHeaders Maybe (Expr Src Import)
    headers
          where
            prettyHeaders :: a -> Doc xxx
    prettyHeaders a
    h =
              Doc xxx
    " using (" Doc xxx -> Doc xxx -> Doc xxx
    forall a. Semigroup a => a -> a -> a
    <> Doc Any -> Doc xxx
    forall ann xxx. Doc ann -> Doc xxx
    Pretty.unAnnotate (a -> Doc Any
    forall ann. a -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    Pretty.pretty a
    h) Doc xxx -> Doc xxx -> Doc xxx
    forall a. Semigroup a => a -> a -> a
    <> Doc xxx
    ")"

            File {Text
    Directory
    directory :: File -> Directory
    file :: File -> Text
    directory :: Directory
    file :: Text
    ..} = File
    path

            Directory {[Text]
    components :: Directory -> [Text]
    components :: [Text]
    ..} = Directory
    directory

            pathDoc :: Doc ann
    pathDoc =
                    (Text -> Doc ann) -> [Text] -> Doc ann
    forall m a. Monoid m => (a -> m) -> [a] -> m
    forall (t :: * -> *) m a.
    (Foldable t, Monoid m) =>
    (a -> m) -> t a -> m
    foldMap Text -> Doc ann
    forall ann. Text -> Doc ann
    prettyURIComponent ([Text] -> [Text]
    forall a. [a] -> [a]
    reverse [Text]
    components)
                Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <>  Text -> Doc ann
    forall ann. Text -> Doc ann
    prettyURIComponent Text
    file

            schemeDoc :: Doc ann
    schemeDoc = case Scheme
    scheme of
                Scheme
    HTTP  -> Doc ann
    "http"
                Scheme
    HTTPS -> Doc ann
    "https"

            queryDoc :: Doc ann
    queryDoc = case Maybe Text
    query of
                Maybe Text
    Nothing -> Doc ann
    ""
                Just Text
    q  -> Doc ann
    "?" Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <> Text -> Doc ann
    forall ann. Text -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    Pretty.pretty Text
    q

    prettyURIComponent :: Text -> Doc ann
    prettyURIComponent :: forall ann. Text -> Doc ann
    prettyURIComponent Text
    text =
            String -> Doc ann
    forall ann. String -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    Pretty.pretty (String -> Doc ann) -> String -> Doc ann
    forall a b. (a -> b) -> a -> b
    $ ShowS
    URI.normalizeCase ShowS -> ShowS
    forall a b. (a -> b) -> a -> b
    $ ShowS
    URI.normalizeEscape ShowS -> ShowS
    forall a b. (a -> b) -> a -> b
    $ String
    "/" String -> ShowS
    forall a. Semigroup a => a -> a -> a
    <> Text -> String
    Data.Text.unpack Text
    text

    -- | The type of import (i.e. local vs. remote vs. environment)
    data ImportType
        = Local FilePrefix File
        -- ^ Local path
        | Remote URL
        -- ^ URL of remote resource and optional headers stored in an import
        | Env  Text
        -- ^ Environment variable
        | Missing
        deriving (ImportType -> ImportType -> Bool
    (ImportType -> ImportType -> Bool)
    -> (ImportType -> ImportType -> Bool) -> Eq ImportType
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ImportType -> ImportType -> Bool
    == :: ImportType -> ImportType -> Bool
    $c/= :: ImportType -> ImportType -> Bool
    /= :: ImportType -> ImportType -> Bool
    Eq, (forall x. ImportType -> Rep ImportType x)
    -> (forall x. Rep ImportType x -> ImportType) -> Generic ImportType
    forall x. Rep ImportType x -> ImportType
    forall x. ImportType -> Rep ImportType x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. ImportType -> Rep ImportType x
    from :: forall x. ImportType -> Rep ImportType x
    $cto :: forall x. Rep ImportType x -> ImportType
    to :: forall x. Rep ImportType x -> ImportType
    Generic, Eq ImportType
    Eq ImportType
    -> (ImportType -> ImportType -> Ordering)
    -> (ImportType -> ImportType -> Bool)
    -> (ImportType -> ImportType -> Bool)
    -> (ImportType -> ImportType -> Bool)
    -> (ImportType -> ImportType -> Bool)
    -> (ImportType -> ImportType -> ImportType)
    -> (ImportType -> ImportType -> ImportType)
    -> Ord ImportType
    ImportType -> ImportType -> Bool
    ImportType -> ImportType -> Ordering
    ImportType -> ImportType -> ImportType
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: ImportType -> ImportType -> Ordering
    compare :: ImportType -> ImportType -> Ordering
    $c< :: ImportType -> ImportType -> Bool
    < :: ImportType -> ImportType -> Bool
    $c<= :: ImportType -> ImportType -> Bool
    <= :: ImportType -> ImportType -> Bool
    $c> :: ImportType -> ImportType -> Bool
    > :: ImportType -> ImportType -> Bool
    $c>= :: ImportType -> ImportType -> Bool
    >= :: ImportType -> ImportType -> Bool
    $cmax :: ImportType -> ImportType -> ImportType
    max :: ImportType -> ImportType -> ImportType
    $cmin :: ImportType -> ImportType -> ImportType
    min :: ImportType -> ImportType -> ImportType
    Ord, Int -> ImportType -> ShowS
    [ImportType] -> ShowS
    ImportType -> String
    (Int -> ImportType -> ShowS)
    -> (ImportType -> String)
    -> ([ImportType] -> ShowS)
    -> Show ImportType
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ImportType -> ShowS
    showsPrec :: Int -> ImportType -> ShowS
    $cshow :: ImportType -> String
    show :: ImportType -> String
    $cshowList :: [ImportType] -> ShowS
    showList :: [ImportType] -> ShowS
    Show, ImportType -> ()
    (ImportType -> ()) -> NFData ImportType
    forall a. (a -> ()) -> NFData a
    $crnf :: ImportType -> ()
    rnf :: ImportType -> ()
    NFData)

    parent :: File
    parent :: File
    parent = File { directory :: Directory
    directory = Directory { components :: [Text]
    components = [ Text
    Item [Text]
    ".." ] }, file :: Text
    file = Text
    "" }

    instance Semigroup ImportType where
        Local FilePrefix
    prefix File
    file₀ <> :: ImportType -> ImportType -> ImportType
    <> Local FilePrefix
    Here File
    file₁ = FilePrefix -> File -> ImportType
    Local FilePrefix
    prefix (File
    file₀ File -> File -> File
    forall a. Semigroup a => a -> a -> a
    <> File
    file₁)

        Remote (URL { path :: URL -> File
    path = File
    path₀, Maybe Text
    Maybe (Expr Src Import)
    Text
    Scheme
    scheme :: URL -> Scheme
    authority :: URL -> Text
    query :: URL -> Maybe Text
    headers :: URL -> Maybe (Expr Src Import)
    scheme :: Scheme
    authority :: Text
    query :: Maybe Text
    headers :: Maybe (Expr Src Import)
    ..}) <> Local FilePrefix
    Here File
    path₁ =
            URL -> ImportType
    Remote (URL { path :: File
    path = File
    path₀ File -> File -> File
    forall a. Semigroup a => a -> a -> a
    <> File
    path₁, Maybe Text
    Maybe (Expr Src Import)
    Text
    Scheme
    scheme :: Scheme
    authority :: Text
    query :: Maybe Text
    headers :: Maybe (Expr Src Import)
    scheme :: Scheme
    authority :: Text
    query :: Maybe Text
    headers :: Maybe (Expr Src Import)
    ..})

        Local FilePrefix
    prefix File
    file₀ <> Local FilePrefix
    Parent File
    file₁ =
            FilePrefix -> File -> ImportType
    Local FilePrefix
    prefix (File
    file₀ File -> File -> File
    forall a. Semigroup a => a -> a -> a
    <> File
    parent File -> File -> File
    forall a. Semigroup a => a -> a -> a
    <> File
    file₁)

        Remote (URL { path :: URL -> File
    path = File
    path₀, Maybe Text
    Maybe (Expr Src Import)
    Text
    Scheme
    scheme :: URL -> Scheme
    authority :: URL -> Text
    query :: URL -> Maybe Text
    headers :: URL -> Maybe (Expr Src Import)
    scheme :: Scheme
    authority :: Text
    query :: Maybe Text
    headers :: Maybe (Expr Src Import)
    .. }) <> Local FilePrefix
    Parent File
    path₁ =
            URL -> ImportType
    Remote (URL { path :: File
    path = File
    path₀ File -> File -> File
    forall a. Semigroup a => a -> a -> a
    <> File
    parent File -> File -> File
    forall a. Semigroup a => a -> a -> a
    <> File
    path₁, Maybe Text
    Maybe (Expr Src Import)
    Text
    Scheme
    scheme :: Scheme
    authority :: Text
    query :: Maybe Text
    headers :: Maybe (Expr Src Import)
    scheme :: Scheme
    authority :: Text
    query :: Maybe Text
    headers :: Maybe (Expr Src Import)
    .. })

        ImportType
    import₀ <> Remote (URL { headers :: URL -> Maybe (Expr Src Import)
    headers = Maybe (Expr Src Import)
    headers₀, Maybe Text
    Text
    Scheme
    File
    scheme :: URL -> Scheme
    authority :: URL -> Text
    path :: URL -> File
    query :: URL -> Maybe Text
    scheme :: Scheme
    authority :: Text
    path :: File
    query :: Maybe Text
    .. }) =
            URL -> ImportType
    Remote (URL { headers :: Maybe (Expr Src Import)
    headers = Maybe (Expr Src Import)
    headers₁, Maybe Text
    Text
    Scheme
    File
    scheme :: Scheme
    authority :: Text
    path :: File
    query :: Maybe Text
    scheme :: Scheme
    authority :: Text
    path :: File
    query :: Maybe Text
    .. })
          where
            importHashed₀ :: Import
    importHashed₀ = ImportHashed -> ImportMode -> Import
    Import (Maybe SHA256Digest -> ImportType -> ImportHashed
    ImportHashed Maybe SHA256Digest
    forall a. Maybe a
    Nothing ImportType
    import₀) ImportMode
    Code

            headers₁ :: Maybe (Expr Src Import)
    headers₁ = (Expr Src Import -> Expr Src Import)
    -> Maybe (Expr Src Import) -> Maybe (Expr Src Import)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((Import -> Import) -> Expr Src Import -> Expr Src Import
    forall a b. (a -> b) -> Expr Src a -> Expr Src b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap (Import
    importHashed₀ Import -> Import -> Import
    forall a. Semigroup a => a -> a -> a
    <>)) Maybe (Expr Src Import)
    headers₀

        ImportType
    _ <> ImportType
    import₁ =
            ImportType
    import₁

    instance Pretty ImportType where
        pretty :: forall ann. ImportType -> Doc ann
    pretty (Local FilePrefix
    prefix File
    file) =
            FilePrefix -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    forall ann. FilePrefix -> Doc ann
    Pretty.pretty FilePrefix
    prefix Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <> File -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    forall ann. File -> Doc ann
    Pretty.pretty File
    file

        pretty (Remote URL
    url) = URL -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    forall ann. URL -> Doc ann
    Pretty.pretty URL
    url

        pretty (Env Text
    env) = Doc ann
    "env:" Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <> Text -> Doc ann
    forall ann. Text -> Doc ann
    prettyEnvironmentVariable Text
    env

        pretty ImportType
    Missing = Doc ann
    "missing"

    -- | How to interpret the import's contents (i.e. as Dhall code or raw text)
    data ImportMode = Code | RawText | Location
      deriving (ImportMode -> ImportMode -> Bool
    (ImportMode -> ImportMode -> Bool)
    -> (ImportMode -> ImportMode -> Bool) -> Eq ImportMode
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ImportMode -> ImportMode -> Bool
    == :: ImportMode -> ImportMode -> Bool
    $c/= :: ImportMode -> ImportMode -> Bool
    /= :: ImportMode -> ImportMode -> Bool
    Eq, (forall x. ImportMode -> Rep ImportMode x)
    -> (forall x. Rep ImportMode x -> ImportMode) -> Generic ImportMode
    forall x. Rep ImportMode x -> ImportMode
    forall x. ImportMode -> Rep ImportMode x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. ImportMode -> Rep ImportMode x
    from :: forall x. ImportMode -> Rep ImportMode x
    $cto :: forall x. Rep ImportMode x -> ImportMode
    to :: forall x. Rep ImportMode x -> ImportMode
    Generic, Eq ImportMode
    Eq ImportMode
    -> (ImportMode -> ImportMode -> Ordering)
    -> (ImportMode -> ImportMode -> Bool)
    -> (ImportMode -> ImportMode -> Bool)
    -> (ImportMode -> ImportMode -> Bool)
    -> (ImportMode -> ImportMode -> Bool)
    -> (ImportMode -> ImportMode -> ImportMode)
    -> (ImportMode -> ImportMode -> ImportMode)
    -> Ord ImportMode
    ImportMode -> ImportMode -> Bool
    ImportMode -> ImportMode -> Ordering
    ImportMode -> ImportMode -> ImportMode
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: ImportMode -> ImportMode -> Ordering
    compare :: ImportMode -> ImportMode -> Ordering
    $c< :: ImportMode -> ImportMode -> Bool
    < :: ImportMode -> ImportMode -> Bool
    $c<= :: ImportMode -> ImportMode -> Bool
    <= :: ImportMode -> ImportMode -> Bool
    $c> :: ImportMode -> ImportMode -> Bool
    > :: ImportMode -> ImportMode -> Bool
    $c>= :: ImportMode -> ImportMode -> Bool
    >= :: ImportMode -> ImportMode -> Bool
    $cmax :: ImportMode -> ImportMode -> ImportMode
    max :: ImportMode -> ImportMode -> ImportMode
    $cmin :: ImportMode -> ImportMode -> ImportMode
    min :: ImportMode -> ImportMode -> ImportMode
    Ord, Int -> ImportMode -> ShowS
    [ImportMode] -> ShowS
    ImportMode -> String
    (Int -> ImportMode -> ShowS)
    -> (ImportMode -> String)
    -> ([ImportMode] -> ShowS)
    -> Show ImportMode
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ImportMode -> ShowS
    showsPrec :: Int -> ImportMode -> ShowS
    $cshow :: ImportMode -> String
    show :: ImportMode -> String
    $cshowList :: [ImportMode] -> ShowS
    showList :: [ImportMode] -> ShowS
    Show, ImportMode -> ()
    (ImportMode -> ()) -> NFData ImportMode
    forall a. (a -> ()) -> NFData a
    $crnf :: ImportMode -> ()
    rnf :: ImportMode -> ()
    NFData)

    -- | A `ImportType` extended with an optional hash for semantic integrity checks
    data ImportHashed = ImportHashed
        { ImportHashed -> Maybe SHA256Digest
    hash       :: Maybe Dhall.Crypto.SHA256Digest
        , ImportHashed -> ImportType
    importType :: ImportType
        } deriving (ImportHashed -> ImportHashed -> Bool
    (ImportHashed -> ImportHashed -> Bool)
    -> (ImportHashed -> ImportHashed -> Bool) -> Eq ImportHashed
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ImportHashed -> ImportHashed -> Bool
    == :: ImportHashed -> ImportHashed -> Bool
    $c/= :: ImportHashed -> ImportHashed -> Bool
    /= :: ImportHashed -> ImportHashed -> Bool
    Eq, (forall x. ImportHashed -> Rep ImportHashed x)
    -> (forall x. Rep ImportHashed x -> ImportHashed)
    -> Generic ImportHashed
    forall x. Rep ImportHashed x -> ImportHashed
    forall x. ImportHashed -> Rep ImportHashed x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. ImportHashed -> Rep ImportHashed x
    from :: forall x. ImportHashed -> Rep ImportHashed x
    $cto :: forall x. Rep ImportHashed x -> ImportHashed
    to :: forall x. Rep ImportHashed x -> ImportHashed
    Generic, Eq ImportHashed
    Eq ImportHashed
    -> (ImportHashed -> ImportHashed -> Ordering)
    -> (ImportHashed -> ImportHashed -> Bool)
    -> (ImportHashed -> ImportHashed -> Bool)
    -> (ImportHashed -> ImportHashed -> Bool)
    -> (ImportHashed -> ImportHashed -> Bool)
    -> (ImportHashed -> ImportHashed -> ImportHashed)
    -> (ImportHashed -> ImportHashed -> ImportHashed)
    -> Ord ImportHashed
    ImportHashed -> ImportHashed -> Bool
    ImportHashed -> ImportHashed -> Ordering
    ImportHashed -> ImportHashed -> ImportHashed
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: ImportHashed -> ImportHashed -> Ordering
    compare :: ImportHashed -> ImportHashed -> Ordering
    $c< :: ImportHashed -> ImportHashed -> Bool
    < :: ImportHashed -> ImportHashed -> Bool
    $c<= :: ImportHashed -> ImportHashed -> Bool
    <= :: ImportHashed -> ImportHashed -> Bool
    $c> :: ImportHashed -> ImportHashed -> Bool
    > :: ImportHashed -> ImportHashed -> Bool
    $c>= :: ImportHashed -> ImportHashed -> Bool
    >= :: ImportHashed -> ImportHashed -> Bool
    $cmax :: ImportHashed -> ImportHashed -> ImportHashed
    max :: ImportHashed -> ImportHashed -> ImportHashed
    $cmin :: ImportHashed -> ImportHashed -> ImportHashed
    min :: ImportHashed -> ImportHashed -> ImportHashed
    Ord, Int -> ImportHashed -> ShowS
    [ImportHashed] -> ShowS
    ImportHashed -> String
    (Int -> ImportHashed -> ShowS)
    -> (ImportHashed -> String)
    -> ([ImportHashed] -> ShowS)
    -> Show ImportHashed
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ImportHashed -> ShowS
    showsPrec :: Int -> ImportHashed -> ShowS
    $cshow :: ImportHashed -> String
    show :: ImportHashed -> String
    $cshowList :: [ImportHashed] -> ShowS
    showList :: [ImportHashed] -> ShowS
    Show, ImportHashed -> ()
    (ImportHashed -> ()) -> NFData ImportHashed
    forall a. (a -> ()) -> NFData a
    $crnf :: ImportHashed -> ()
    rnf :: ImportHashed -> ()
    NFData)

    instance Semigroup ImportHashed where
        ImportHashed Maybe SHA256Digest
    _ ImportType
    importType₀ <> :: ImportHashed -> ImportHashed -> ImportHashed
    <> ImportHashed Maybe SHA256Digest
    hash ImportType
    importType₁ =
            Maybe SHA256Digest -> ImportType -> ImportHashed
    ImportHashed Maybe SHA256Digest
    hash (ImportType
    importType₀ ImportType -> ImportType -> ImportType
    forall a. Semigroup a => a -> a -> a
    <> ImportType
    importType₁)

    instance Pretty ImportHashed where
        pretty :: forall ann. ImportHashed -> Doc ann
    pretty (ImportHashed  Maybe SHA256Digest
    Nothing ImportType
    p) =
          ImportType -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    forall ann. ImportType -> Doc ann
    Pretty.pretty ImportType
    p
        pretty (ImportHashed (Just SHA256Digest
    h) ImportType
    p) =
          Doc ann -> Doc ann
    forall ann. Doc ann -> Doc ann
    Pretty.group (Doc ann -> Doc ann -> Doc ann
    forall ann. Doc ann -> Doc ann -> Doc ann
    Pretty.flatAlt Doc ann
    forall {ann}. Doc ann
    long Doc ann
    forall {ann}. Doc ann
    short)
          where
            long :: Doc ann
    long =
                Doc ann -> Doc ann
    forall ann. Doc ann -> Doc ann
    Pretty.align
                    (   ImportType -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    forall ann. ImportType -> Doc ann
    Pretty.pretty ImportType
    p Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <> Doc ann
    forall {ann}. Doc ann
    Pretty.hardline
                    Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <>  Doc ann
    "  sha256:" Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <> String -> Doc ann
    forall ann. String -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    Pretty.pretty (SHA256Digest -> String
    forall a. Show a => a -> String
    show SHA256Digest
    h)
                    )

            short :: Doc ann
    short = ImportType -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    forall ann. ImportType -> Doc ann
    Pretty.pretty ImportType
    p Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <> Doc ann
    " sha256:" Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <> String -> Doc ann
    forall ann. String -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    Pretty.pretty (SHA256Digest -> String
    forall a. Show a => a -> String
    show SHA256Digest
    h)

    -- | Reference to an external resource
    data Import = Import
        { Import -> ImportHashed
    importHashed :: ImportHashed
        , Import -> ImportMode
    importMode   :: ImportMode
        } deriving (Import -> Import -> Bool
    (Import -> Import -> Bool)
    -> (Import -> Import -> Bool) -> Eq Import
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Import -> Import -> Bool
    == :: Import -> Import -> Bool
    $c/= :: Import -> Import -> Bool
    /= :: Import -> Import -> Bool
    Eq, (forall x. Import -> Rep Import x)
    -> (forall x. Rep Import x -> Import) -> Generic Import
    forall x. Rep Import x -> Import
    forall x. Import -> Rep Import x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Import -> Rep Import x
    from :: forall x. Import -> Rep Import x
    $cto :: forall x. Rep Import x -> Import
    to :: forall x. Rep Import x -> Import
    Generic, Eq Import
    Eq Import
    -> (Import -> Import -> Ordering)
    -> (Import -> Import -> Bool)
    -> (Import -> Import -> Bool)
    -> (Import -> Import -> Bool)
    -> (Import -> Import -> Bool)
    -> (Import -> Import -> Import)
    -> (Import -> Import -> Import)
    -> Ord Import
    Import -> Import -> Bool
    Import -> Import -> Ordering
    Import -> Import -> Import
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: Import -> Import -> Ordering
    compare :: Import -> Import -> Ordering
    $c< :: Import -> Import -> Bool
    < :: Import -> Import -> Bool
    $c<= :: Import -> Import -> Bool
    <= :: Import -> Import -> Bool
    $c> :: Import -> Import -> Bool
    > :: Import -> Import -> Bool
    $c>= :: Import -> Import -> Bool
    >= :: Import -> Import -> Bool
    $cmax :: Import -> Import -> Import
    max :: Import -> Import -> Import
    $cmin :: Import -> Import -> Import
    min :: Import -> Import -> Import
    Ord, Int -> Import -> ShowS
    [Import] -> ShowS
    Import -> String
    (Int -> Import -> ShowS)
    -> (Import -> String) -> ([Import] -> ShowS) -> Show Import
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Import -> ShowS
    showsPrec :: Int -> Import -> ShowS
    $cshow :: Import -> String
    show :: Import -> String
    $cshowList :: [Import] -> ShowS
    showList :: [Import] -> ShowS
    Show, Import -> ()
    (Import -> ()) -> NFData Import
    forall a. (a -> ()) -> NFData a
    $crnf :: Import -> ()
    rnf :: Import -> ()
    NFData)

    instance Semigroup Import where
        Import ImportHashed
    importHashed₀ ImportMode
    _ <> :: Import -> Import -> Import
    <> Import ImportHashed
    importHashed₁ ImportMode
    code =
            ImportHashed -> ImportMode -> Import
    Import (ImportHashed
    importHashed₀ ImportHashed -> ImportHashed -> ImportHashed
    forall a. Semigroup a => a -> a -> a
    <> ImportHashed
    importHashed₁) ImportMode
    code

    instance Pretty Import where
        pretty :: forall ann. Import -> Doc ann
    pretty (Import {ImportHashed
    ImportMode
    importHashed :: Import -> ImportHashed
    importMode :: Import -> ImportMode
    importHashed :: ImportHashed
    importMode :: ImportMode
    ..}) = ImportHashed -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    forall ann. ImportHashed -> Doc ann
    Pretty.pretty ImportHashed
    importHashed Doc ann -> Doc ann -> Doc ann
    forall a. Semigroup a => a -> a -> a
    <> Text -> Doc ann
    forall ann. Text -> Doc ann
    forall a ann. Pretty a => a -> Doc ann
    Pretty.pretty Text
    suffix
          where
            suffix :: Text
            suffix :: Text
    suffix = case ImportMode
    importMode of
                ImportMode
    RawText  -> Text
    " as Text"
                ImportMode
    Location -> Text
    " as Location"
                ImportMode
    Code     -> Text
    ""

    {-| Returns `True` if the given `Char` is valid within an unquoted path
        component

        This is exported for reuse within the @"Dhall.Parser.Token"@ module
    -}
    pathCharacter :: Char -> Bool
    pathCharacter :: Char -> Bool
    pathCharacter Char
    c =
             Char
    '\x21' Char -> Char -> Bool
    forall a. Eq a => a -> a -> Bool
    == Char
    c
        Bool -> Bool -> Bool
    ||  (Char
    '\x24' Char -> Char -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Char
    c Bool -> Bool -> Bool
    && Char
    c Char -> Char -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Char
    '\x27')
        Bool -> Bool -> Bool
    ||  (Char
    '\x2A' Char -> Char -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Char
    c Bool -> Bool -> Bool
    && Char
    c Char -> Char -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Char
    '\x2B')
        Bool -> Bool -> Bool
    ||  (Char
    '\x2D' Char -> Char -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Char
    c Bool -> Bool -> Bool
    && Char
    c Char -> Char -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Char
    '\x2E')
        Bool -> Bool -> Bool
    ||  (Char
    '\x30' Char -> Char -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Char
    c Bool -> Bool -> Bool
    && Char
    c Char -> Char -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Char
    '\x3B')
        Bool -> Bool -> Bool
    ||  Char
    c Char -> Char -> Bool
    forall a. Eq a => a -> a -> Bool
    == Char
    '\x3D'
        Bool -> Bool -> Bool
    ||  (Char
    '\x40' Char -> Char -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Char
    c Bool -> Bool -> Bool
    && Char
    c Char -> Char -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Char
    '\x5A')
        Bool -> Bool -> Bool
    ||  (Char
    '\x5E' Char -> Char -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Char
    c Bool -> Bool -> Bool
    && Char
    c Char -> Char -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Char
    '\x7A')
        Bool -> Bool -> Bool
    ||  Char
    c Char -> Char -> Bool
    forall a. Eq a => a -> a -> Bool
    == Char
    '\x7C'
        Bool -> Bool -> Bool
    ||  Char
    c Char -> Char -> Bool
    forall a. Eq a => a -> a -> Bool
    == Char
    '\x7E'

    -- | Remove all `Note` constructors from an `Expr` (i.e. de-`Note`)
    --
    -- This also remove CharacterSet annotations.
    denote :: Expr s a -> Expr t a
    denote :: forall s a t. Expr s a -> Expr t a
    denote = \case
        Note s
    _ Expr s a
    b -> Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    b
        Let Binding s a
    a Expr s a
    b -> Binding t a -> Expr t a -> Expr t a
    forall s a. Binding s a -> Expr s a -> Expr s a
    Let (Binding s a -> Binding t a
    forall {s} {a} {s}. Binding s a -> Binding s a
    denoteBinding Binding s a
    a) (Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    b)
        Embed a
    a -> a -> Expr t a
    forall s a. a -> Expr s a
    Embed a
    a
        Combine Maybe CharacterSet
    _ Maybe Text
    _ Expr s a
    b Expr s a
    c -> Maybe CharacterSet
    -> Maybe Text -> Expr t a -> Expr t a -> Expr t a
    forall s a.
    Maybe CharacterSet
    -> Maybe Text -> Expr s a -> Expr s a -> Expr s a
    Combine Maybe CharacterSet
    forall a. Maybe a
    Nothing Maybe Text
    forall a. Maybe a
    Nothing (Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    b) (Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    c)
        CombineTypes Maybe CharacterSet
    _ Expr s a
    b Expr s a
    c -> Maybe CharacterSet -> Expr t a -> Expr t a -> Expr t a
    forall s a. Maybe CharacterSet -> Expr s a -> Expr s a -> Expr s a
    CombineTypes Maybe CharacterSet
    forall a. Maybe a
    Nothing (Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    b) (Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    c)
        Prefer Maybe CharacterSet
    _ PreferAnnotation s a
    a Expr s a
    b Expr s a
    c -> ASetter (Expr s a) (Expr t a) (Expr s a) (Expr t a)
    -> (Expr s a -> Expr t a) -> Expr s a -> Expr t a
    forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
    Lens.over ASetter (Expr s a) (Expr t a) (Expr s a) (Expr t a)
    forall (f :: * -> *) s a t b.
    Applicative f =>
    (Expr s a -> f (Expr t b)) -> Expr s a -> f (Expr t b)
    unsafeSubExpressions Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote (Expr s a -> Expr t a) -> Expr s a -> Expr t a
    forall a b. (a -> b) -> a -> b
    $ Maybe CharacterSet
    -> PreferAnnotation s a -> Expr s a -> Expr s a -> Expr s a
    forall s a.
    Maybe CharacterSet
    -> PreferAnnotation s a -> Expr s a -> Expr s a -> Expr s a
    Prefer Maybe CharacterSet
    forall a. Maybe a
    Nothing PreferAnnotation s a
    a Expr s a
    b Expr s a
    c
        Record Map Text (RecordField s a)
    a -> Map Text (RecordField t a) -> Expr t a
    forall s a. Map Text (RecordField s a) -> Expr s a
    Record (Map Text (RecordField t a) -> Expr t a)
    -> Map Text (RecordField t a) -> Expr t a
    forall a b. (a -> b) -> a -> b
    $ RecordField s a -> RecordField t a
    forall {s} {a} {s}. RecordField s a -> RecordField s a
    denoteRecordField (RecordField s a -> RecordField t a)
    -> Map Text (RecordField s a) -> Map Text (RecordField t a)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Map Text (RecordField s a)
    a
        RecordLit Map Text (RecordField s a)
    a -> Map Text (RecordField t a) -> Expr t a
    forall s a. Map Text (RecordField s a) -> Expr s a
    RecordLit (Map Text (RecordField t a) -> Expr t a)
    -> Map Text (RecordField t a) -> Expr t a
    forall a b. (a -> b) -> a -> b
    $ RecordField s a -> RecordField t a
    forall {s} {a} {s}. RecordField s a -> RecordField s a
    denoteRecordField (RecordField s a -> RecordField t a)
    -> Map Text (RecordField s a) -> Map Text (RecordField t a)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Map Text (RecordField s a)
    a
        Lam Maybe CharacterSet
    _ FunctionBinding s a
    a Expr s a
    b -> Maybe CharacterSet -> FunctionBinding t a -> Expr t a -> Expr t a
    forall s a.
    Maybe CharacterSet -> FunctionBinding s a -> Expr s a -> Expr s a
    Lam Maybe CharacterSet
    forall a. Maybe a
    Nothing (FunctionBinding s a -> FunctionBinding t a
    forall {s} {a} {s}. FunctionBinding s a -> FunctionBinding s a
    denoteFunctionBinding FunctionBinding s a
    a) (Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    b)
        Pi Maybe CharacterSet
    _ Text
    t Expr s a
    a Expr s a
    b -> Maybe CharacterSet -> Text -> Expr t a -> Expr t a -> Expr t a
    forall s a.
    Maybe CharacterSet -> Text -> Expr s a -> Expr s a -> Expr s a
    Pi Maybe CharacterSet
    forall a. Maybe a
    Nothing Text
    t (Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    a) (Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    b)
        Field Expr s a
    a (FieldSelection Maybe s
    _ Text
    b Maybe s
    _) -> Expr t a -> FieldSelection t -> Expr t a
    forall s a. Expr s a -> FieldSelection s -> Expr s a
    Field (Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    a) (Maybe t -> Text -> Maybe t -> FieldSelection t
    forall s. Maybe s -> Text -> Maybe s -> FieldSelection s
    FieldSelection Maybe t
    forall a. Maybe a
    Nothing Text
    b Maybe t
    forall a. Maybe a
    Nothing)
        Equivalent Maybe CharacterSet
    _ Expr s a
    a Expr s a
    b -> Maybe CharacterSet -> Expr t a -> Expr t a -> Expr t a
    forall s a. Maybe CharacterSet -> Expr s a -> Expr s a -> Expr s a
    Equivalent Maybe CharacterSet
    forall a. Maybe a
    Nothing (Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    a) (Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    b)
        Expr s a
    expression -> ASetter (Expr s a) (Expr t a) (Expr s a) (Expr t a)
    -> (Expr s a -> Expr t a) -> Expr s a -> Expr t a
    forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
    Lens.over ASetter (Expr s a) (Expr t a) (Expr s a) (Expr t a)
    forall (f :: * -> *) s a t b.
    Applicative f =>
    (Expr s a -> f (Expr t b)) -> Expr s a -> f (Expr t b)
    unsafeSubExpressions Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    expression
      where
        denoteRecordField :: RecordField s a -> RecordField s a
    denoteRecordField (RecordField Maybe s
    _ Expr s a
    e Maybe s
    _ Maybe s
    _) = Maybe s -> Expr s a -> Maybe s -> Maybe s -> RecordField s a
    forall s a.
    Maybe s -> Expr s a -> Maybe s -> Maybe s -> RecordField s a
    RecordField Maybe s
    forall a. Maybe a
    Nothing (Expr s a -> Expr s a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    e) Maybe s
    forall a. Maybe a
    Nothing Maybe s
    forall a. Maybe a
    Nothing
        denoteBinding :: Binding s a -> Binding s a
    denoteBinding (Binding Maybe s
    _ Text
    c Maybe s
    _ Maybe (Maybe s, Expr s a)
    d Maybe s
    _ Expr s a
    e) =
            Maybe s
    -> Text
    -> Maybe s
    -> Maybe (Maybe s, Expr s a)
    -> Maybe s
    -> Expr s a
    -> Binding s a
    forall s a.
    Maybe s
    -> Text
    -> Maybe s
    -> Maybe (Maybe s, Expr s a)
    -> Maybe s
    -> Expr s a
    -> Binding s a
    Binding Maybe s
    forall a. Maybe a
    Nothing Text
    c Maybe s
    forall a. Maybe a
    Nothing (((Maybe s, Expr s a) -> (Maybe s, Expr s a))
    -> Maybe (Maybe s, Expr s a) -> Maybe (Maybe s, Expr s a)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap (Maybe s, Expr s a) -> (Maybe s, Expr s a)
    forall {a} {s} {a} {a} {t}. (a, Expr s a) -> (Maybe a, Expr t a)
    denoteBindingAnnotation Maybe (Maybe s, Expr s a)
    d) Maybe s
    forall a. Maybe a
    Nothing (Expr s a -> Expr s a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    e)

        denoteBindingAnnotation :: (a, Expr s a) -> (Maybe a, Expr t a)
    denoteBindingAnnotation (a
    _, Expr s a
    f) = (Maybe a
    forall a. Maybe a
    Nothing, Expr s a -> Expr t a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    f)

        denoteFunctionBinding :: FunctionBinding s a -> FunctionBinding s a
    denoteFunctionBinding (FunctionBinding Maybe s
    _ Text
    l Maybe s
    _ Maybe s
    _ Expr s a
    t) =
            Maybe s
    -> Text -> Maybe s -> Maybe s -> Expr s a -> FunctionBinding s a
    forall s a.
    Maybe s
    -> Text -> Maybe s -> Maybe s -> Expr s a -> FunctionBinding s a
    FunctionBinding Maybe s
    forall a. Maybe a
    Nothing Text
    l Maybe s
    forall a. Maybe a
    Nothing Maybe s
    forall a. Maybe a
    Nothing (Expr s a -> Expr s a
    forall s a t. Expr s a -> Expr t a
    denote Expr s a
    t)

    -- | The \"opposite\" of `denote`, like @first absurd@ but faster
    renote :: Expr Void a -> Expr s a
    renote :: forall a s. Expr Void a -> Expr s a
    renote = Expr Void a -> Expr s a
    forall a b. a -> b
    unsafeCoerce
    {-# INLINE renote #-}

    {-| Remove any outermost `Note` constructors

        This is typically used when you want to get the outermost non-`Note`
        constructor without removing internal `Note` constructors
    -}
    shallowDenote :: Expr s a -> Expr s a
    shallowDenote :: forall s a. Expr s a -> Expr s a
    shallowDenote (Note s
    _ Expr s a
    e) = Expr s a -> Expr s a
    forall s a. Expr s a -> Expr s a
    shallowDenote Expr s a
    e
    shallowDenote         Expr s a
    e  = Expr s a
    e

    -- | The set of reserved keywords according to the @keyword@ rule in the grammar
    reservedKeywords :: HashSet Text
    reservedKeywords :: HashSet Text
    reservedKeywords =
        [Text] -> HashSet Text
    forall a. (Eq a, Hashable a) => [a] -> HashSet a
    Data.HashSet.fromList
            [ Text
    Item [Text]
    "if"
            , Text
    Item [Text]
    "then"
            , Text
    Item [Text]
    "else"
            , Text
    Item [Text]
    "let"
            , Text
    Item [Text]
    "in"
            , Text
    Item [Text]
    "using"
            , Text
    Item [Text]
    "missing"
            , Text
    Item [Text]
    "as"
            , Text
    Item [Text]
    "Infinity"
            , Text
    Item [Text]
    "NaN"
            , Text
    Item [Text]
    "merge"
            , Text
    Item [Text]
    "Some"
            , Text
    Item [Text]
    "toMap"
            , Text
    Item [Text]
    "assert"
            , Text
    Item [Text]
    "forall"
            , Text
    Item [Text]
    "with"
            ]

    -- | The set of reserved identifiers for the Dhall language
    -- | Contains also all keywords from "reservedKeywords"
    reservedIdentifiers :: HashSet Text
    reservedIdentifiers :: HashSet Text
    reservedIdentifiers = HashSet Text
    reservedKeywords HashSet Text -> HashSet Text -> HashSet Text
    forall a. Semigroup a => a -> a -> a
    <>
        [Text] -> HashSet Text
    forall a. (Eq a, Hashable a) => [a] -> HashSet a
    Data.HashSet.fromList
            [ -- Builtins according to the `builtin` rule in the grammar
              Text
    Item [Text]
    "Natural/fold"
            , Text
    Item [Text]
    "Natural/build"
            , Text
    Item [Text]
    "Natural/isZero"
            , Text
    Item [Text]
    "Natural/even"
            , Text
    Item [Text]
    "Natural/odd"
            , Text
    Item [Text]
    "Natural/toInteger"
            , Text
    Item [Text]
    "Natural/show"
            , Text
    Item [Text]
    "Natural/subtract"
            , Text
    Item [Text]
    "Integer"
            , Text
    Item [Text]
    "Integer/clamp"
            , Text
    Item [Text]
    "Integer/negate"
            , Text
    Item [Text]
    "Integer/show"
            , Text
    Item [Text]
    "Integer/toDouble"
            , Text
    Item [Text]
    "Integer/show"
            , Text
    Item [Text]
    "Natural/subtract"
            , Text
    Item [Text]
    "Double/show"
            , Text
    Item [Text]
    "List/build"
            , Text
    Item [Text]
    "List/fold"
            , Text
    Item [Text]
    "List/length"
            , Text
    Item [Text]
    "List/head"
            , Text
    Item [Text]
    "List/last"
            , Text
    Item [Text]
    "List/indexed"
            , Text
    Item [Text]
    "List/reverse"
            , Text
    Item [Text]
    "Text/replace"
            , Text
    Item [Text]
    "Text/show"
            , Text
    Item [Text]
    "Bool"
            , Text
    Item [Text]
    "True"
            , Text
    Item [Text]
    "False"
            , Text
    Item [Text]
    "Optional"
            , Text
    Item [Text]
    "None"
            , Text
    Item [Text]
    "Natural"
            , Text
    Item [Text]
    "Integer"
            , Text
    Item [Text]
    "Double"
            , Text
    Item [Text]
    "Text"
            , Text
    Item [Text]
    "Date"
            , Text
    Item [Text]
    "Time"
            , Text
    Item [Text]
    "TimeZone"
            , Text
    Item [Text]
    "List"
            , Text
    Item [Text]
    "Type"
            , Text
    Item [Text]
    "Kind"
            , Text
    Item [Text]
    "Sort"
            ]

    -- | Same as @Data.Text.splitOn@, except always returning a `NonEmpty` result
    splitOn :: Text -> Text -> NonEmpty Text
    splitOn :: Text -> Text -> NonEmpty Text
    splitOn Text
    needle Text
    haystack =
        case HasCallStack => Text -> Text -> [Text]
    Text -> Text -> [Text]
    Data.Text.splitOn Text
    needle Text
    haystack of
            []     -> Text
    "" Text -> [Text] -> NonEmpty Text
    forall a. a -> [a] -> NonEmpty a
    :| []
            Text
    t : [Text]
    ts -> Text
    t  Text -> [Text] -> NonEmpty Text
    forall a. a -> [a] -> NonEmpty a
    :| [Text]
    ts

    -- | Split `Chunks` by lines
    linesLiteral :: Chunks s a -> NonEmpty (Chunks s a)
    linesLiteral :: forall s a. Chunks s a -> NonEmpty (Chunks s a)
    linesLiteral (Chunks [] Text
    suffix) =
        (Text -> Chunks s a) -> NonEmpty Text -> NonEmpty (Chunks s a)
    forall a b. (a -> b) -> NonEmpty a -> NonEmpty b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ([(Text, Expr s a)] -> Text -> Chunks s a
    forall s a. [(Text, Expr s a)] -> Text -> Chunks s a
    Chunks []) (Text -> Text -> NonEmpty Text
    splitOn Text
    "\n" Text
    suffix)
    linesLiteral (Chunks ((Text
    prefix, Expr s a
    interpolation) : [(Text, Expr s a)]
    pairs₀) Text
    suffix₀) =
        (Chunks s a -> NonEmpty (Chunks s a) -> NonEmpty (Chunks s a))
    -> NonEmpty (Chunks s a) -> [Chunks s a] -> NonEmpty (Chunks s a)
    forall a b. (a -> b -> b) -> b -> [a] -> b
    forall (t :: * -> *) a b.
    Foldable t =>
    (a -> b -> b) -> b -> t a -> b
    foldr
            Chunks s a -> NonEmpty (Chunks s a) -> NonEmpty (Chunks s a)
    forall a. a -> NonEmpty a -> NonEmpty a
    NonEmpty.cons
            ([(Text, Expr s a)] -> Text -> Chunks s a
    forall s a. [(Text, Expr s a)] -> Text -> Chunks s a
    Chunks ((Text
    lastLine, Expr s a
    interpolation) (Text, Expr s a) -> [(Text, Expr s a)] -> [(Text, Expr s a)]
    forall a. a -> [a] -> [a]
    : [(Text, Expr s a)]
    pairs₁) Text
    suffix₁ Chunks s a -> [Chunks s a] -> NonEmpty (Chunks s a)
    forall a. a -> [a] -> NonEmpty a
    :| [Chunks s a]
    chunks)
            ((Text -> Chunks s a) -> [Text] -> [Chunks s a]
    forall a b. (a -> b) -> [a] -> [b]
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ([(Text, Expr s a)] -> Text -> Chunks s a
    forall s a. [(Text, Expr s a)] -> Text -> Chunks s a
    Chunks []) [Text]
    initLines)
      where
        splitLines :: NonEmpty Text
    splitLines = Text -> Text -> NonEmpty Text
    splitOn Text
    "\n" Text
    prefix

        initLines :: [Text]
    initLines = NonEmpty Text -> [Text]
    forall a. NonEmpty a -> [a]
    NonEmpty.init NonEmpty Text
    splitLines
        lastLine :: Text
    lastLine  = NonEmpty Text -> Text
    forall a. NonEmpty a -> a
    NonEmpty.last NonEmpty Text
    splitLines

        Chunks [(Text, Expr s a)]
    pairs₁ Text
    suffix₁ :| [Chunks s a]
    chunks = Chunks s a -> NonEmpty (Chunks s a)
    forall s a. Chunks s a -> NonEmpty (Chunks s a)
    linesLiteral ([(Text, Expr s a)] -> Text -> Chunks s a
    forall s a. [(Text, Expr s a)] -> Text -> Chunks s a
    Chunks [(Text, Expr s a)]
    pairs₀ Text
    suffix₀)

    -- | Flatten several `Chunks` back into a single `Chunks` by inserting newlines
    unlinesLiteral :: NonEmpty (Chunks s a) -> Chunks s a
    unlinesLiteral :: forall s a. NonEmpty (Chunks s a) -> Chunks s a
    unlinesLiteral NonEmpty (Chunks s a)
    chunks =
        NonEmpty (Chunks s a) -> Chunks s a
    forall m. Monoid m => NonEmpty m -> m
    forall (t :: * -> *) m. (Foldable t, Monoid m) => t m -> m
    Data.Foldable.fold (Chunks s a -> NonEmpty (Chunks s a) -> NonEmpty (Chunks s a)
    forall a. a -> NonEmpty a -> NonEmpty a
    NonEmpty.intersperse Chunks s a
    "\n" NonEmpty (Chunks s a)
    chunks)

    -- | Returns `True` if the `Chunks` represents a blank line
    emptyLine :: Chunks s a -> Bool
    emptyLine :: forall s a. Chunks s a -> Bool
    emptyLine (Chunks [] Text
    ""  ) = Bool
    True
    emptyLine (Chunks [] Text
    "\r") = Bool
    True  -- So that `\r\n` is treated as a blank line
    emptyLine  Chunks s a
    _               = Bool
    False

    -- | Return the leading whitespace for a `Chunks` literal
    leadingSpaces :: Chunks s a -> Text
    leadingSpaces :: forall s a. Chunks s a -> Text
    leadingSpaces Chunks s a
    chunks = (Char -> Bool) -> Text -> Text
    Data.Text.takeWhile Char -> Bool
    isSpace Text
    firstText
      where
        isSpace :: Char -> Bool
    isSpace Char
    c = Char
    c Char -> Char -> Bool
    forall a. Eq a => a -> a -> Bool
    == Char
    ' ' Bool -> Bool -> Bool
    || Char
    c Char -> Char -> Bool
    forall a. Eq a => a -> a -> Bool
    == Char
    '\t'

        firstText :: Text
    firstText =
            case Chunks s a
    chunks of
                Chunks                []  Text
    suffix -> Text
    suffix
                Chunks ((Text
    prefix, Expr s a
    _) : [(Text, Expr s a)]
    _ ) Text
    _      -> Text
    prefix

    {-| Compute the longest shared whitespace prefix for the purposes of stripping
        leading indentation
    -}
    longestSharedWhitespacePrefix :: NonEmpty (Chunks s a) -> Text
    longestSharedWhitespacePrefix :: forall s a. NonEmpty (Chunks s a) -> Text
    longestSharedWhitespacePrefix NonEmpty (Chunks s a)
    literals =
        case (Chunks s a -> Text) -> [Chunks s a] -> [Text]
    forall a b. (a -> b) -> [a] -> [b]
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap Chunks s a -> Text
    forall s a. Chunks s a -> Text
    leadingSpaces [Chunks s a]
    filteredLines of
            Text
    l : [Text]
    ls -> (Text -> Text -> Text) -> Text -> [Text] -> Text
    forall b a. (b -> a -> b) -> b -> [a] -> b
    forall (t :: * -> *) b a.
    Foldable t =>
    (b -> a -> b) -> b -> t a -> b
    Data.Foldable.foldl' Text -> Text -> Text
    sharedPrefix Text
    l [Text]
    ls
            []     -> Text
    ""
      where
        sharedPrefix :: Text -> Text -> Text
    sharedPrefix Text
    ab Text
    ac =
            case Text -> Text -> Maybe (Text, Text, Text)
    Data.Text.commonPrefixes Text
    ab Text
    ac of
                Just (Text
    a, Text
    _b, Text
    _c) -> Text
    a
                Maybe (Text, Text, Text)
    Nothing          -> Text
    ""

        -- The standard specifies to filter out blank lines for all lines *except*
        -- for the last line
        filteredLines :: [Chunks s a]
    filteredLines = [Chunks s a]
    newInit [Chunks s a] -> [Chunks s a] -> [Chunks s a]
    forall a. Semigroup a => a -> a -> a
    <> Chunks s a -> [Chunks s a]
    forall a. a -> [a]
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Chunks s a
    oldLast
          where
            oldInit :: [Chunks s a]
    oldInit = NonEmpty (Chunks s a) -> [Chunks s a]
    forall a. NonEmpty a -> [a]
    NonEmpty.init NonEmpty (Chunks s a)
    literals

            oldLast :: Chunks s a
    oldLast = NonEmpty (Chunks s a) -> Chunks s a
    forall a. NonEmpty a -> a
    NonEmpty.last NonEmpty (Chunks s a)
    literals

            newInit :: [Chunks s a]
    newInit = (Chunks s a -> Bool) -> [Chunks s a] -> [Chunks s a]
    forall a. (a -> Bool) -> [a] -> [a]
    filter (Bool -> Bool
    not (Bool -> Bool) -> (Chunks s a -> Bool) -> Chunks s a -> Bool
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Chunks s a -> Bool
    forall s a. Chunks s a -> Bool
    emptyLine) [Chunks s a]
    oldInit

    -- | Drop the first @n@ characters for a `Chunks` literal
    dropLiteral :: Int -> Chunks s a -> Chunks s a
    dropLiteral :: forall s a. Int -> Chunks s a -> Chunks s a
    dropLiteral Int
    n (Chunks [] Text
    suffix) =
        [(Text, Expr s a)] -> Text -> Chunks s a
    forall s a. [(Text, Expr s a)] -> Text -> Chunks s a
    Chunks [] (Int -> Text -> Text
    Data.Text.drop Int
    n Text
    suffix)
    dropLiteral Int
    n (Chunks ((Text
    prefix, Expr s a
    interpolation) : [(Text, Expr s a)]
    rest) Text
    suffix) =
        [(Text, Expr s a)] -> Text -> Chunks s a
    forall s a. [(Text, Expr s a)] -> Text -> Chunks s a
    Chunks ((Int -> Text -> Text
    Data.Text.drop Int
    n Text
    prefix, Expr s a
    interpolation) (Text, Expr s a) -> [(Text, Expr s a)] -> [(Text, Expr s a)]
    forall a. a -> [a] -> [a]
    : [(Text, Expr s a)]
    rest) Text
    suffix

    {-| Convert a single-quoted `Chunks` literal to the equivalent double-quoted
        `Chunks` literal
    -}
    toDoubleQuoted :: Chunks Src a -> Chunks Src a
    toDoubleQuoted :: forall a. Chunks Src a -> Chunks Src a
    toDoubleQuoted Chunks Src a
    literal =
        NonEmpty (Chunks Src a) -> Chunks Src a
    forall s a. NonEmpty (Chunks s a) -> Chunks s a
    unlinesLiteral ((Chunks Src a -> Chunks Src a)
    -> NonEmpty (Chunks Src a) -> NonEmpty (Chunks Src a)
    forall a b. (a -> b) -> NonEmpty a -> NonEmpty b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap (Int -> Chunks Src a -> Chunks Src a
    forall s a. Int -> Chunks s a -> Chunks s a
    dropLiteral Int
    indent) NonEmpty (Chunks Src a)
    literals)
      where
        literals :: NonEmpty (Chunks Src a)
    literals = Chunks Src a -> NonEmpty (Chunks Src a)
    forall s a. Chunks s a -> NonEmpty (Chunks s a)
    linesLiteral Chunks Src a
    literal

        longestSharedPrefix :: Text
    longestSharedPrefix = NonEmpty (Chunks Src a) -> Text
    forall s a. NonEmpty (Chunks s a) -> Text
    longestSharedWhitespacePrefix NonEmpty (Chunks Src a)
    literals

        indent :: Int
    indent = Text -> Int
    Data.Text.length Text
    longestSharedPrefix

    {-| `shift` is used by both normalization and type-checking to avoid variable
        capture by shifting variable indices

        For example, suppose that you were to normalize the following expression:

    > λ(a : Type) → λ(x : a) → (λ(y : a) → λ(x : a) → y) x

        If you were to substitute @y@ with @x@ without shifting any variable
        indices, then you would get the following incorrect result:

    > λ(a : Type) → λ(x : a) → λ(x : a) → x  -- Incorrect normalized form

        In order to substitute @x@ in place of @y@ we need to `shift` @x@ by @1@ in
        order to avoid being misinterpreted as the @x@ bound by the innermost
        lambda.  If we perform that `shift` then we get the correct result:

    > λ(a : Type) → λ(x : a) → λ(x : a) → x@1

        As a more worked example, suppose that you were to normalize the following
        expression:

    >     λ(a : Type)
    > →   λ(f : a → a → a)
    > →   λ(x : a)
    > →   λ(x : a)
    > →   (λ(x : a) → f x x@1) x@1

        The correct normalized result would be:

    >     λ(a : Type)
    > →   λ(f : a → a → a)
    > →   λ(x : a)
    > →   λ(x : a)
    > →   f x@1 x

        The above example illustrates how we need to both increase and decrease
        variable indices as part of substitution:

        * We need to increase the index of the outer @x\@1@ to @x\@2@ before we
          substitute it into the body of the innermost lambda expression in order
          to avoid variable capture.  This substitution changes the body of the
          lambda expression to @(f x\@2 x\@1)@

        * We then remove the innermost lambda and therefore decrease the indices of
          both @x@s in @(f x\@2 x\@1)@ to @(f x\@1 x)@ in order to reflect that one
          less @x@ variable is now bound within that scope

        Formally, @(shift d (V x n) e)@ modifies the expression @e@ by adding @d@ to
        the indices of all variables named @x@ whose indices are greater than
        @(n + m)@, where @m@ is the number of bound variables of the same name
        within that scope

        In practice, @d@ is always @1@ or @-1@ because we either:

        * increment variables by @1@ to avoid variable capture during substitution
        * decrement variables by @1@ when deleting lambdas after substitution

        @n@ starts off at @0@ when substitution begins and increments every time we
        descend into a lambda or let expression that binds a variable of the same
        name in order to avoid shifting the bound variables by mistake.
    -}
    shift :: Int -> Var -> Expr s a -> Expr s a
    shift :: forall s a. Int -> Var -> Expr s a -> Expr s a
    shift Int
    d (V Text
    x Int
    n) (Var (V Text
    x' Int
    n')) = Var -> Expr s a
    forall s a. Var -> Expr s a
    Var (Text -> Int -> Var
    V Text
    x' Int
    n'')
      where
        n'' :: Int
    n'' = if Text
    x Text -> Text -> Bool
    forall a. Eq a => a -> a -> Bool
    == Text
    x' Bool -> Bool -> Bool
    && Int
    n Int -> Int -> Bool
    forall a. Ord a => a -> a -> Bool
    <= Int
    n' then Int
    n' Int -> Int -> Int
    forall a. Num a => a -> a -> a
    + Int
    d else Int
    n'
    shift Int
    d (V Text
    x Int
    n) (Lam Maybe CharacterSet
    cs (FunctionBinding Maybe s
    src0 Text
    x' Maybe s
    src1 Maybe s
    src2 Expr s a
    _A) Expr s a
    b) =
        Maybe CharacterSet -> FunctionBinding s a -> Expr s a -> Expr s a
    forall s a.
    Maybe CharacterSet -> FunctionBinding s a -> Expr s a -> Expr s a
    Lam Maybe CharacterSet
    cs (Maybe s
    -> Text -> Maybe s -> Maybe s -> Expr s a -> FunctionBinding s a
    forall s a.
    Maybe s
    -> Text -> Maybe s -> Maybe s -> Expr s a -> FunctionBinding s a
    FunctionBinding Maybe s
    src0 Text
    x' Maybe s
    src1 Maybe s
    src2 Expr s a
    _A') Expr s a
    b'
      where
        _A' :: Expr s a
    _A' = Int -> Var -> Expr s a -> Expr s a
    forall s a. Int -> Var -> Expr s a -> Expr s a
    shift Int
    d (Text -> Int -> Var
    V Text
    x Int
    n ) Expr s a
    _A
        b' :: Expr s a
    b'  = Int -> Var -> Expr s a -> Expr s a
    forall s a. Int -> Var -> Expr s a -> Expr s a
    shift Int
    d (Text -> Int -> Var
    V Text
    x Int
    n') Expr s a
    b
          where
            n' :: Int
    n' = if Text
    x Text -> Text -> Bool
    forall a. Eq a => a -> a -> Bool
    == Text
    x' then Int
    n Int -> Int -> Int
    forall a. Num a => a -> a -> a
    + Int
    1 else Int
    n
    shift Int
    d (V Text
    x Int
    n) (Pi Maybe CharacterSet
    cs Text
    x' Expr s a
    _A Expr s a
    _B) = Maybe CharacterSet -> Text -> Expr s a -> Expr s a -> Expr s a
    forall s a.
    Maybe CharacterSet -> Text -> Expr s a -> Expr s a -> Expr s a
    Pi Maybe CharacterSet
    cs Text
    x' Expr s a
    _A' Expr s a
    _B'
      where
        _A' :: Expr s a
    _A' = Int -> Var -> Expr s a -> Expr s a
    forall s a. Int -> Var -> Expr s a -> Expr s a
    shift Int
    d (Text -> Int -> Var
    V Text
    x Int
    n ) Expr s a
    _A
        _B' :: Expr s a
    _B' = Int -> Var -> Expr s a -> Expr s a
    forall s a. Int -> Var -> Expr s a -> Expr s a
    shift Int
    d (Text -> Int -> Var
    V Text
    x Int
    n') Expr s a
    _B
          where
            n' :: Int
    n' = if Text
    x Text -> Text -> Bool
    forall a. Eq a => a -> a -> Bool
    == Text
    x' then Int
    n Int -> Int -> Int
    forall a. Num a => a -> a -> a
    + Int
    1 else Int
    n
    shift Int
    d (V Text
    x Int
    n) (Let (Binding Maybe s
    src0 Text
    f Maybe s
    src1 Maybe (Maybe s, Expr s a)
    mt Maybe s
    src2 Expr s a
    r) Expr s a
    e) =
        Binding s a -> Expr s a -> Expr s a
    forall s a. Binding s a -> Expr s a -> Expr s a
    Let (Maybe s
    -> Text
    -> Maybe s
    -> Maybe (Maybe s, Expr s a)
    -> Maybe s
    -> Expr s a
    -> Binding s a
    forall s a.
    Maybe s
    -> Text
    -> Maybe s
    -> Maybe (Maybe s, Expr s a)
    -> Maybe s
    -> Expr s a
    -> Binding s a
    Binding Maybe s
    src0 Text
    f Maybe s
    src1 Maybe (Maybe s, Expr s a)
    mt' Maybe s
    src2 Expr s a
    r') Expr s a
    e'
      where
        e' :: Expr s a
    e' = Int -> Var -> Expr s a -> Expr s a
    forall s a. Int -> Var -> Expr s a -> Expr s a
    shift Int
    d (Text -> Int -> Var
    V Text
    x Int
    n') Expr s a
    e
          where
            n' :: Int
    n' = if Text
    x Text -> Text -> Bool
    forall a. Eq a => a -> a -> Bool
    == Text
    f then Int
    n Int -> Int -> Int
    forall a. Num a => a -> a -> a
    + Int
    1 else Int
    n

        mt' :: Maybe (Maybe s, Expr s a)
    mt' = ((Maybe s, Expr s a) -> (Maybe s, Expr s a))
    -> Maybe (Maybe s, Expr s a) -> Maybe (Maybe s, Expr s a)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((Expr s a -> Expr s a)
    -> (Maybe s, Expr s a) -> (Maybe s, Expr s a)
    forall a b. (a -> b) -> (Maybe s, a) -> (Maybe s, b)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap (Int -> Var -> Expr s a -> Expr s a
    forall s a. Int -> Var -> Expr s a -> Expr s a
    shift Int
    d (Text -> Int -> Var
    V Text
    x Int
    n))) Maybe (Maybe s, Expr s a)
    mt
        r' :: Expr s a
    r'  =             Int -> Var -> Expr s a -> Expr s a
    forall s a. Int -> Var -> Expr s a -> Expr s a
    shift Int
    d (Text -> Int -> Var
    V Text
    x Int
    n)  Expr s a
    r
    shift Int
    d Var
    v Expr s a
    expression = ASetter (Expr s a) (Expr s a) (Expr s a) (Expr s a)
    -> (Expr s a -> Expr s a) -> Expr s a -> Expr s a
    forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
    Lens.over ASetter (Expr s a) (Expr s a) (Expr s a) (Expr s a)
    forall (f :: * -> *) s a.
    Applicative f =>
    (Expr s a -> f (Expr s a)) -> Expr s a -> f (Expr s a)
    subExpressions (Int -> Var -> Expr s a -> Expr s a
    forall s a. Int -> Var -> Expr s a -> Expr s a
    shift Int
    d Var
    v) Expr s a
    expression

    _ERROR :: String
    _ERROR :: String
    _ERROR = String
    "\ESC[1;31mError\ESC[0m"

    {-| Utility function used to throw internal errors that should never happen
        (in theory) but that are not enforced by the type system
    -}
    internalError :: Data.Text.Text -> forall b . b
    internalError :: Text -> forall b. b
    internalError Text
    text = String -> b
    forall a. HasCallStack => String -> a
    error ([String] -> String
    unlines
        [ String
    _ERROR String -> ShowS
    forall a. Semigroup a => a -> a -> a
    <> String
    ": Compiler bug                                                        "
        , String
    Item [String]
    "                                                                                "
        , String
    Item [String]
    "Explanation: This error message means that there is a bug in the Dhall compiler."
        , String
    Item [String]
    "You didn't do anything wrong, but if you would like to see this problem fixed   "
        , String
    Item [String]
    "then you should report the bug at:                                              "
        , String
    Item [String]
    "                                                                                "
        , String
    Item [String]
    "https://github.com/dhall-lang/dhall-haskell/issues                              "
        , String
    Item [String]
    "                                                                                "
        , String
    Item [String]
    "Please include the following text in your bug report:                           "
        , String
    Item [String]
    "                                                                                "
        , String
    Item [String]
    "```                                                                             "
        , Text -> String
    Data.Text.unpack Text
    text String -> ShowS
    forall a. Semigroup a => a -> a -> a
    <> String
    "                                                       "
        , String
    Item [String]
    "```                                                                             "
        ] )