{-# 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 #-}
module Dhall.Syntax (
Const(..)
, Var(..)
, Binding(..)
, makeBinding
, CharacterSet(..)
, Chunks(..)
, DhallDouble(..)
, PreferAnnotation(..)
, Expr(..)
, RecordField(..)
, makeRecordField
, FunctionBinding(..)
, makeFunctionBinding
, FieldSelection(..)
, makeFieldSelection
, WithComponent(..)
, MultiLet(..)
, multiLet
, wrapInLets
, subExpressions
, subExpressionsWith
, unsafeSubExpressions
, chunkExprs
, bindingExprs
, recordFieldExprs
, functionBindingExprs
, denote
, renote
, shallowDenote
, Directory(..)
, File(..)
, FilePrefix(..)
, Import(..)
, ImportHashed(..)
, ImportMode(..)
, ImportType(..)
, URL(..)
, Scheme(..)
, pathCharacter
, reservedIdentifiers
, reservedKeywords
, toDoubleQuoted
, longestSharedWhitespacePrefix
, linesLiteral
, unlinesLiteral
, internalError
, 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)
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
showList :: [Const] -> ShowS
$cshowList :: [Const] -> ShowS
show :: Const -> String
$cshow :: Const -> String
showsPrec :: Int -> Const -> ShowS
$cshowsPrec :: Int -> Const -> ShowS
Show, Const -> Const -> Bool
(Const -> Const -> Bool) -> (Const -> Const -> Bool) -> Eq Const
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Const -> Const -> Bool
$c/= :: Const -> Const -> Bool
== :: Const -> Const -> Bool
$c== :: 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
min :: Const -> Const -> Const
$cmin :: Const -> Const -> Const
max :: Const -> Const -> Const
$cmax :: Const -> Const -> Const
>= :: Const -> Const -> Bool
$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
compare :: Const -> Const -> Ordering
$ccompare :: Const -> Const -> Ordering
$cp1Ord :: Eq Const
Ord, Typeable Const
DataType
Constr
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 -> DataType
Const -> Constr
(forall b. Data b => b -> b) -> Const -> Const
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Const -> c Const
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c 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)
$cSort :: Constr
$cKind :: Constr
$cType :: Constr
$tConst :: DataType
gmapMo :: (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
gmapMp :: (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
gmapM :: (forall d. Data d => d -> m d) -> Const -> m Const
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Const -> m Const
gmapQi :: Int -> (forall d. Data d => d -> u) -> Const -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Const -> u
gmapQ :: (forall d. Data d => d -> u) -> Const -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Const -> [u]
gmapQr :: (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
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const -> r
gmapT :: (forall b. Data b => b -> b) -> Const -> Const
$cgmapT :: (forall b. Data b => b -> b) -> Const -> Const
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Const)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Const)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Const)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Const)
dataTypeOf :: Const -> DataType
$cdataTypeOf :: Const -> DataType
toConstr :: Const -> Constr
$ctoConstr :: Const -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Const
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Const
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Const -> c Const
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Const -> c Const
$cp1Data :: Typeable Const
Data, Const
Const -> Const -> Bounded Const
forall a. a -> a -> Bounded a
maxBound :: Const
$cmaxBound :: Const
minBound :: Const
$cminBound :: 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
enumFromThenTo :: Const -> Const -> Const -> [Const]
$cenumFromThenTo :: Const -> Const -> Const -> [Const]
enumFromTo :: Const -> Const -> [Const]
$cenumFromTo :: Const -> Const -> [Const]
enumFromThen :: Const -> Const -> [Const]
$cenumFromThen :: Const -> Const -> [Const]
enumFrom :: Const -> [Const]
$cenumFrom :: Const -> [Const]
fromEnum :: Const -> Int
$cfromEnum :: Const -> Int
toEnum :: Int -> Const
$ctoEnum :: Int -> Const
pred :: Const -> Const
$cpred :: Const -> Const
succ :: Const -> Const
$csucc :: 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
$cto :: forall x. Rep Const x -> Const
$cfrom :: forall x. Const -> Rep Const x
Generic, Const -> Q Exp
Const -> Q (TExp Const)
(Const -> Q Exp) -> (Const -> Q (TExp Const)) -> Lift Const
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Const -> Q (TExp Const)
$cliftTyped :: Const -> Q (TExp Const)
lift :: Const -> Q Exp
$clift :: Const -> Q Exp
Lift, Const -> ()
(Const -> ()) -> NFData Const
forall a. (a -> ()) -> NFData a
rnf :: Const -> ()
$crnf :: Const -> ()
NFData)
instance Pretty Const where
pretty :: 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
data Var = V Text !Int
deriving (Typeable Var
DataType
Constr
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 -> DataType
Var -> Constr
(forall b. Data b => b -> b) -> Var -> Var
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Var -> c Var
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c 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)
$cV :: Constr
$tVar :: DataType
gmapMo :: (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
gmapMp :: (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
gmapM :: (forall d. Data d => d -> m d) -> Var -> m Var
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Var -> m Var
gmapQi :: Int -> (forall d. Data d => d -> u) -> Var -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Var -> u
gmapQ :: (forall d. Data d => d -> u) -> Var -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Var -> [u]
gmapQr :: (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
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
gmapT :: (forall b. Data b => b -> b) -> Var -> Var
$cgmapT :: (forall b. Data b => b -> b) -> Var -> Var
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Var)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Var)
dataTypeOf :: Var -> DataType
$cdataTypeOf :: Var -> DataType
toConstr :: Var -> Constr
$ctoConstr :: Var -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Var
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Var
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Var -> c Var
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Var -> c Var
$cp1Data :: Typeable 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
$cto :: forall x. Rep Var x -> Var
$cfrom :: forall x. Var -> Rep Var x
Generic, Var -> Var -> Bool
(Var -> Var -> Bool) -> (Var -> Var -> Bool) -> Eq Var
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Var -> Var -> Bool
$c/= :: Var -> Var -> Bool
== :: Var -> Var -> Bool
$c== :: 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
min :: Var -> Var -> Var
$cmin :: Var -> Var -> Var
max :: Var -> Var -> Var
$cmax :: Var -> Var -> Var
>= :: Var -> Var -> Bool
$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
compare :: Var -> Var -> Ordering
$ccompare :: Var -> Var -> Ordering
$cp1Ord :: Eq 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
showList :: [Var] -> ShowS
$cshowList :: [Var] -> ShowS
show :: Var -> String
$cshow :: Var -> String
showsPrec :: Int -> Var -> ShowS
$cshowsPrec :: Int -> Var -> ShowS
Show, Var -> Q Exp
Var -> Q (TExp Var)
(Var -> Q Exp) -> (Var -> Q (TExp Var)) -> Lift Var
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Var -> Q (TExp Var)
$cliftTyped :: Var -> Q (TExp Var)
lift :: Var -> Q Exp
$clift :: Var -> Q Exp
Lift, Var -> ()
(Var -> ()) -> NFData Var
forall a. (a -> ()) -> NFData a
rnf :: Var -> ()
$crnf :: 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 :: 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
data Binding s a = Binding
{ Binding s a -> Maybe s
bindingSrc0 :: Maybe s
, Binding s a -> Text
variable :: Text
, Binding s a -> Maybe s
bindingSrc1 :: Maybe s
, Binding s a -> Maybe (Maybe s, Expr s a)
annotation :: Maybe (Maybe s, Expr s a)
, Binding s a -> Maybe s
bindingSrc2 :: Maybe s
, Binding s a -> Expr s a
value :: Expr s a
} deriving (Typeable (Binding s a)
DataType
Constr
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 -> DataType
Binding s a -> Constr
(forall b. Data b => b -> b) -> Binding s a -> Binding s 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 b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Binding s a)
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (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 -> DataType
forall s a. (Data s, Data a) => Binding s a -> Constr
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))
$cBinding :: Constr
$tBinding :: DataType
gmapMo :: (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)
gmapMp :: (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)
gmapM :: (forall d. Data d => d -> m d) -> Binding s a -> m (Binding s a)
$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)
gmapQi :: Int -> (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
gmapQ :: (forall d. Data d => d -> u) -> Binding s a -> [u]
$cgmapQ :: forall s a u.
(Data s, Data a) =>
(forall d. Data d => d -> u) -> Binding s a -> [u]
gmapQr :: (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
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Binding s a -> r
$cgmapQl :: forall s a r r'.
(Data s, Data a) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Binding s a -> r
gmapT :: (forall b. Data b => b -> b) -> Binding s a -> Binding s a
$cgmapT :: forall s a.
(Data s, Data a) =>
(forall b. Data b => b -> b) -> Binding s a -> Binding s a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> 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))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Binding s a))
$cdataCast1 :: forall s a (t :: * -> *) (c :: * -> *).
(Data s, Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Binding s a))
dataTypeOf :: Binding s a -> DataType
$cdataTypeOf :: forall s a. (Data s, Data a) => Binding s a -> DataType
toConstr :: Binding s a -> Constr
$ctoConstr :: forall s a. (Data s, Data a) => Binding s a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> 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)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Binding s a -> 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)
$cp1Data :: forall s a. (Data s, Data a) => Typeable (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
/= :: 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
Eq, Binding s a -> Bool
(a -> m) -> Binding s a -> m
(a -> b -> b) -> b -> Binding s a -> b
(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
product :: Binding s a -> a
$cproduct :: forall s a. Num a => Binding s a -> a
sum :: Binding s a -> a
$csum :: forall s a. Num a => Binding s a -> a
minimum :: Binding s a -> a
$cminimum :: forall s a. Ord a => Binding s a -> a
maximum :: Binding s a -> a
$cmaximum :: forall s a. Ord a => Binding s a -> a
elem :: a -> Binding s a -> Bool
$celem :: forall s a. Eq a => a -> Binding s a -> Bool
length :: Binding s a -> Int
$clength :: forall s a. Binding s a -> Int
null :: Binding s a -> Bool
$cnull :: forall s a. Binding s a -> Bool
toList :: Binding s a -> [a]
$ctoList :: forall s a. Binding s a -> [a]
foldl1 :: (a -> a -> a) -> Binding s a -> a
$cfoldl1 :: forall s a. (a -> a -> a) -> Binding s a -> a
foldr1 :: (a -> a -> a) -> Binding s a -> a
$cfoldr1 :: forall s a. (a -> a -> a) -> Binding s a -> a
foldl' :: (b -> a -> b) -> b -> Binding s a -> b
$cfoldl' :: forall s b a. (b -> a -> b) -> b -> Binding s a -> b
foldl :: (b -> a -> b) -> b -> Binding s a -> b
$cfoldl :: forall s b a. (b -> a -> b) -> b -> Binding s a -> b
foldr' :: (a -> b -> b) -> b -> Binding s a -> b
$cfoldr' :: forall s a b. (a -> b -> b) -> b -> Binding s a -> b
foldr :: (a -> b -> b) -> b -> Binding s a -> b
$cfoldr :: forall s a b. (a -> b -> b) -> b -> Binding s a -> b
foldMap' :: (a -> m) -> Binding s a -> m
$cfoldMap' :: forall s m a. Monoid m => (a -> m) -> Binding s a -> m
foldMap :: (a -> m) -> Binding s a -> m
$cfoldMap :: forall s m a. Monoid m => (a -> m) -> Binding s a -> m
fold :: Binding s m -> m
$cfold :: forall s m. Monoid m => Binding s m -> m
Foldable, a -> Binding s b -> Binding s a
(a -> b) -> Binding s a -> Binding s b
(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
<$ :: a -> Binding s b -> Binding s a
$c<$ :: forall s a b. a -> Binding s b -> Binding s a
fmap :: (a -> b) -> Binding s a -> Binding s b
$cfmap :: forall s a b. (a -> b) -> Binding s a -> Binding s b
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
$cto :: forall s a x. Rep (Binding s a) x -> Binding s a
$cfrom :: forall s a x. Binding s a -> Rep (Binding s a) x
Generic, Binding s a -> Q Exp
Binding s a -> Q (TExp (Binding s a))
(Binding s a -> Q Exp)
-> (Binding s a -> Q (TExp (Binding s a))) -> Lift (Binding s a)
forall s a. (Lift s, Lift a) => Binding s a -> Q Exp
forall s a.
(Lift s, Lift a) =>
Binding s a -> Q (TExp (Binding s a))
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Binding s a -> Q (TExp (Binding s a))
$cliftTyped :: forall s a.
(Lift s, Lift a) =>
Binding s a -> Q (TExp (Binding s a))
lift :: Binding s a -> Q Exp
$clift :: forall s a. (Lift s, Lift a) => Binding s a -> Q Exp
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 -> ()
rnf :: Binding s a -> ()
$crnf :: forall s a. (NFData s, NFData a) => 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
min :: 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
max :: Binding s a -> Binding s a -> Binding s a
$cmax :: forall s a.
(Ord s, Ord a) =>
Binding s a -> Binding s a -> Binding s a
>= :: 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
$c< :: forall s a. (Ord s, Ord a) => Binding s a -> Binding s a -> Bool
compare :: Binding s a -> Binding s a -> Ordering
$ccompare :: forall s a.
(Ord s, Ord a) =>
Binding s a -> Binding s a -> Ordering
$cp1Ord :: forall s a. (Ord s, Ord a) => Eq (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
showList :: [Binding s a] -> ShowS
$cshowList :: forall s a. (Show s, Show a) => [Binding s a] -> ShowS
show :: Binding s a -> String
$cshow :: forall s a. (Show s, Show a) => Binding s a -> String
showsPrec :: Int -> Binding s a -> ShowS
$cshowsPrec :: forall s a. (Show s, Show a) => Int -> 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)
(a -> f b) -> Binding s a -> f (Binding s b)
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)
sequence :: Binding s (m a) -> m (Binding s a)
$csequence :: forall s (m :: * -> *) a.
Monad m =>
Binding s (m a) -> m (Binding s a)
mapM :: (a -> m b) -> Binding s a -> m (Binding s b)
$cmapM :: forall s (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Binding s a -> m (Binding s b)
sequenceA :: Binding s (f a) -> f (Binding s a)
$csequenceA :: forall s (f :: * -> *) a.
Applicative f =>
Binding s (f a) -> f (Binding s a)
traverse :: (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)
$cp2Traversable :: forall s. Foldable (Binding s)
$cp1Traversable :: forall s. Functor (Binding s)
Traversable)
instance Bifunctor Binding where
first :: (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 (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 (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 (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 (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 (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 (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 (p :: * -> * -> *) a b c.
Bifunctor p =>
(a -> b) -> p a c -> p b c
first a -> b
k p a c
d)
second :: (b -> c) -> Binding a b -> Binding a c
second = (b -> c) -> Binding a b -> Binding a c
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
makeBinding :: Text -> Expr s a -> Binding s a
makeBinding :: 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
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
showList :: [DhallDouble] -> ShowS
$cshowList :: [DhallDouble] -> ShowS
show :: DhallDouble -> String
$cshow :: DhallDouble -> String
showsPrec :: Int -> DhallDouble -> ShowS
$cshowsPrec :: Int -> DhallDouble -> ShowS
Show, Typeable DhallDouble
DataType
Constr
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 -> DataType
DhallDouble -> Constr
(forall b. Data b => b -> b) -> DhallDouble -> DhallDouble
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DhallDouble -> c DhallDouble
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c 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)
$cDhallDouble :: Constr
$tDhallDouble :: DataType
gmapMo :: (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
gmapMp :: (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
gmapM :: (forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DhallDouble -> m DhallDouble
gmapQi :: Int -> (forall d. Data d => d -> u) -> DhallDouble -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DhallDouble -> u
gmapQ :: (forall d. Data d => d -> u) -> DhallDouble -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> DhallDouble -> [u]
gmapQr :: (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
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DhallDouble -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DhallDouble -> r
gmapT :: (forall b. Data b => b -> b) -> DhallDouble -> DhallDouble
$cgmapT :: (forall b. Data b => b -> b) -> DhallDouble -> DhallDouble
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DhallDouble)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DhallDouble)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c DhallDouble)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DhallDouble)
dataTypeOf :: DhallDouble -> DataType
$cdataTypeOf :: DhallDouble -> DataType
toConstr :: DhallDouble -> Constr
$ctoConstr :: DhallDouble -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DhallDouble
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DhallDouble
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DhallDouble -> c DhallDouble
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DhallDouble -> c DhallDouble
$cp1Data :: Typeable DhallDouble
Data, DhallDouble -> Q Exp
DhallDouble -> Q (TExp DhallDouble)
(DhallDouble -> Q Exp)
-> (DhallDouble -> Q (TExp DhallDouble)) -> Lift DhallDouble
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: DhallDouble -> Q (TExp DhallDouble)
$cliftTyped :: DhallDouble -> Q (TExp DhallDouble)
lift :: DhallDouble -> Q Exp
$clift :: DhallDouble -> Q Exp
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
$cto :: forall x. Rep DhallDouble x -> DhallDouble
$cfrom :: forall x. DhallDouble -> Rep DhallDouble x
Generic)
deriving anyclass DhallDouble -> ()
(DhallDouble -> ()) -> NFData DhallDouble
forall a. (a -> ()) -> NFData a
rnf :: DhallDouble -> ()
$crnf :: DhallDouble -> ()
NFData
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
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'
data Chunks s a = Chunks [(Text, Expr s a)] Text
deriving (a -> Chunks s b -> Chunks s a
(a -> b) -> Chunks s a -> Chunks s b
(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
<$ :: a -> Chunks s b -> Chunks s a
$c<$ :: forall s a b. a -> Chunks s b -> Chunks s a
fmap :: (a -> b) -> Chunks s a -> Chunks s b
$cfmap :: forall s a b. (a -> b) -> Chunks s a -> Chunks s b
Functor, Chunks s a -> Bool
(a -> m) -> Chunks s a -> m
(a -> b -> b) -> b -> Chunks s a -> b
(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
product :: Chunks s a -> a
$cproduct :: forall s a. Num a => Chunks s a -> a
sum :: Chunks s a -> a
$csum :: forall s a. Num a => Chunks s a -> a
minimum :: Chunks s a -> a
$cminimum :: forall s a. Ord a => Chunks s a -> a
maximum :: Chunks s a -> a
$cmaximum :: forall s a. Ord a => Chunks s a -> a
elem :: a -> Chunks s a -> Bool
$celem :: forall s a. Eq a => a -> Chunks s a -> Bool
length :: Chunks s a -> Int
$clength :: forall s a. Chunks s a -> Int
null :: Chunks s a -> Bool
$cnull :: forall s a. Chunks s a -> Bool
toList :: Chunks s a -> [a]
$ctoList :: forall s a. Chunks s a -> [a]
foldl1 :: (a -> a -> a) -> Chunks s a -> a
$cfoldl1 :: forall s a. (a -> a -> a) -> Chunks s a -> a
foldr1 :: (a -> a -> a) -> Chunks s a -> a
$cfoldr1 :: forall s a. (a -> a -> a) -> Chunks s a -> a
foldl' :: (b -> a -> b) -> b -> Chunks s a -> b
$cfoldl' :: forall s b a. (b -> a -> b) -> b -> Chunks s a -> b
foldl :: (b -> a -> b) -> b -> Chunks s a -> b
$cfoldl :: forall s b a. (b -> a -> b) -> b -> Chunks s a -> b
foldr' :: (a -> b -> b) -> b -> Chunks s a -> b
$cfoldr' :: forall s a b. (a -> b -> b) -> b -> Chunks s a -> b
foldr :: (a -> b -> b) -> b -> Chunks s a -> b
$cfoldr :: forall s a b. (a -> b -> b) -> b -> Chunks s a -> b
foldMap' :: (a -> m) -> Chunks s a -> m
$cfoldMap' :: forall s m a. Monoid m => (a -> m) -> Chunks s a -> m
foldMap :: (a -> m) -> Chunks s a -> m
$cfoldMap :: forall s m a. Monoid m => (a -> m) -> Chunks s a -> m
fold :: Chunks s m -> m
$cfold :: forall s m. Monoid m => Chunks s m -> m
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
$cto :: forall s a x. Rep (Chunks s a) x -> Chunks s a
$cfrom :: forall s a x. Chunks s a -> Rep (Chunks s a) x
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)
(a -> f b) -> Chunks s a -> f (Chunks s b)
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)
sequence :: Chunks s (m a) -> m (Chunks s a)
$csequence :: forall s (m :: * -> *) a.
Monad m =>
Chunks s (m a) -> m (Chunks s a)
mapM :: (a -> m b) -> Chunks s a -> m (Chunks s b)
$cmapM :: forall s (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Chunks s a -> m (Chunks s b)
sequenceA :: Chunks s (f a) -> f (Chunks s a)
$csequenceA :: forall s (f :: * -> *) a.
Applicative f =>
Chunks s (f a) -> f (Chunks s a)
traverse :: (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)
$cp2Traversable :: forall s. Foldable (Chunks s)
$cp1Traversable :: forall s. Functor (Chunks s)
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
showList :: [Chunks s a] -> ShowS
$cshowList :: forall s a. (Show s, Show a) => [Chunks s a] -> ShowS
show :: Chunks s a -> String
$cshow :: forall s a. (Show s, Show a) => Chunks s a -> String
showsPrec :: Int -> Chunks s a -> ShowS
$cshowsPrec :: forall s a. (Show s, Show a) => Int -> 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
/= :: 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
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
min :: 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
max :: Chunks s a -> Chunks s a -> Chunks s a
$cmax :: forall s a.
(Ord s, Ord a) =>
Chunks s a -> Chunks s a -> Chunks s a
>= :: 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
$c< :: forall s a. (Ord s, Ord a) => Chunks s a -> Chunks s a -> Bool
compare :: Chunks s a -> Chunks s a -> Ordering
$ccompare :: forall s a. (Ord s, Ord a) => Chunks s a -> Chunks s a -> Ordering
$cp1Ord :: forall s a. (Ord s, Ord a) => Eq (Chunks s a)
Ord, Typeable (Chunks s a)
DataType
Constr
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 -> DataType
Chunks s a -> Constr
(forall b. Data b => b -> b) -> Chunks s a -> Chunks s 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 b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Chunks s a)
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (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 -> DataType
forall s a. (Data s, Data a) => Chunks s a -> Constr
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))
$cChunks :: Constr
$tChunks :: DataType
gmapMo :: (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)
gmapMp :: (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)
gmapM :: (forall d. Data d => d -> m d) -> Chunks s a -> m (Chunks s a)
$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)
gmapQi :: Int -> (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
gmapQ :: (forall d. Data d => d -> u) -> Chunks s a -> [u]
$cgmapQ :: forall s a u.
(Data s, Data a) =>
(forall d. Data d => d -> u) -> Chunks s a -> [u]
gmapQr :: (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
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Chunks s a -> r
$cgmapQl :: forall s a r r'.
(Data s, Data a) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Chunks s a -> r
gmapT :: (forall b. Data b => b -> b) -> Chunks s a -> Chunks s a
$cgmapT :: forall s a.
(Data s, Data a) =>
(forall b. Data b => b -> b) -> Chunks s a -> Chunks s a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> 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))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Chunks s a))
$cdataCast1 :: forall s a (t :: * -> *) (c :: * -> *).
(Data s, Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Chunks s a))
dataTypeOf :: Chunks s a -> DataType
$cdataTypeOf :: forall s a. (Data s, Data a) => Chunks s a -> DataType
toConstr :: Chunks s a -> Constr
$ctoConstr :: forall s a. (Data s, Data a) => Chunks s a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> 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)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Chunks s a -> 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)
$cp1Data :: forall s a. (Data s, Data a) => Typeable (Chunks s a)
Data, Chunks s a -> Q Exp
Chunks s a -> Q (TExp (Chunks s a))
(Chunks s a -> Q Exp)
-> (Chunks s a -> Q (TExp (Chunks s a))) -> Lift (Chunks s a)
forall s a. (Lift s, Lift a) => Chunks s a -> Q Exp
forall s a. (Lift s, Lift a) => Chunks s a -> Q (TExp (Chunks s a))
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Chunks s a -> Q (TExp (Chunks s a))
$cliftTyped :: forall s a. (Lift s, Lift a) => Chunks s a -> Q (TExp (Chunks s a))
lift :: Chunks s a -> Q Exp
$clift :: forall s a. (Lift s, Lift a) => Chunks s a -> Q Exp
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 -> ()
rnf :: Chunks s a -> ()
$crnf :: forall s a. (NFData s, NFData a) => 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)
data PreferAnnotation s a
= PreferFromSource
| PreferFromWith (Expr s a)
| PreferFromCompletion
deriving (Typeable (PreferAnnotation s a)
DataType
Constr
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 -> DataType
PreferAnnotation s a -> Constr
(forall b. Data b => b -> b)
-> PreferAnnotation s a -> PreferAnnotation s 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 b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PreferAnnotation s a)
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (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 -> DataType
forall s a. (Data s, Data a) => PreferAnnotation s a -> Constr
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))
$cPreferFromCompletion :: Constr
$cPreferFromWith :: Constr
$cPreferFromSource :: Constr
$tPreferAnnotation :: DataType
gmapMo :: (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)
gmapMp :: (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)
gmapM :: (forall d. Data d => d -> m d)
-> PreferAnnotation s a -> m (PreferAnnotation s a)
$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)
gmapQi :: Int -> (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
gmapQ :: (forall d. Data d => d -> u) -> PreferAnnotation s a -> [u]
$cgmapQ :: forall s a u.
(Data s, Data a) =>
(forall d. Data d => d -> u) -> PreferAnnotation s a -> [u]
gmapQr :: (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
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PreferAnnotation s a -> r
$cgmapQl :: forall s a r r'.
(Data s, Data a) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PreferAnnotation s a -> r
gmapT :: (forall b. Data b => b -> b)
-> PreferAnnotation s a -> PreferAnnotation s a
$cgmapT :: forall s a.
(Data s, Data a) =>
(forall b. Data b => b -> b)
-> PreferAnnotation s a -> PreferAnnotation s a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> 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))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (PreferAnnotation s a))
$cdataCast1 :: forall s a (t :: * -> *) (c :: * -> *).
(Data s, Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (PreferAnnotation s a))
dataTypeOf :: PreferAnnotation s a -> DataType
$cdataTypeOf :: forall s a. (Data s, Data a) => PreferAnnotation s a -> DataType
toConstr :: PreferAnnotation s a -> Constr
$ctoConstr :: forall s a. (Data s, Data a) => PreferAnnotation s a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> 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)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PreferAnnotation s a
-> 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)
$cp1Data :: forall s a. (Data s, Data a) => Typeable (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
/= :: 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
Eq, PreferAnnotation s a -> Bool
(a -> m) -> PreferAnnotation s a -> m
(a -> b -> b) -> b -> PreferAnnotation s a -> b
(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
product :: PreferAnnotation s a -> a
$cproduct :: forall s a. Num a => PreferAnnotation s a -> a
sum :: PreferAnnotation s a -> a
$csum :: forall s a. Num a => PreferAnnotation s a -> a
minimum :: PreferAnnotation s a -> a
$cminimum :: forall s a. Ord a => PreferAnnotation s a -> a
maximum :: PreferAnnotation s a -> a
$cmaximum :: forall s a. Ord a => PreferAnnotation s a -> a
elem :: a -> PreferAnnotation s a -> Bool
$celem :: forall s a. Eq a => a -> PreferAnnotation s a -> Bool
length :: PreferAnnotation s a -> Int
$clength :: forall s a. PreferAnnotation s a -> Int
null :: PreferAnnotation s a -> Bool
$cnull :: forall s a. PreferAnnotation s a -> Bool
toList :: PreferAnnotation s a -> [a]
$ctoList :: forall s a. PreferAnnotation s a -> [a]
foldl1 :: (a -> a -> a) -> PreferAnnotation s a -> a
$cfoldl1 :: forall s a. (a -> a -> a) -> PreferAnnotation s a -> a
foldr1 :: (a -> a -> a) -> PreferAnnotation s a -> a
$cfoldr1 :: forall s a. (a -> a -> a) -> PreferAnnotation s a -> a
foldl' :: (b -> a -> b) -> b -> PreferAnnotation s a -> b
$cfoldl' :: forall s b a. (b -> a -> b) -> b -> PreferAnnotation s a -> b
foldl :: (b -> a -> b) -> b -> PreferAnnotation s a -> b
$cfoldl :: forall s b a. (b -> a -> b) -> b -> PreferAnnotation s a -> b
foldr' :: (a -> b -> b) -> b -> PreferAnnotation s a -> b
$cfoldr' :: forall s a b. (a -> b -> b) -> b -> PreferAnnotation s a -> b
foldr :: (a -> b -> b) -> b -> PreferAnnotation s a -> b
$cfoldr :: forall s a b. (a -> b -> b) -> b -> PreferAnnotation s a -> b
foldMap' :: (a -> m) -> PreferAnnotation s a -> m
$cfoldMap' :: forall s m a. Monoid m => (a -> m) -> PreferAnnotation s a -> m
foldMap :: (a -> m) -> PreferAnnotation s a -> m
$cfoldMap :: forall s m a. Monoid m => (a -> m) -> PreferAnnotation s a -> m
fold :: PreferAnnotation s m -> m
$cfold :: forall s m. Monoid m => PreferAnnotation s m -> m
Foldable, a -> PreferAnnotation s b -> PreferAnnotation s a
(a -> b) -> PreferAnnotation s a -> PreferAnnotation s b
(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
<$ :: a -> PreferAnnotation s b -> PreferAnnotation s a
$c<$ :: forall s a b. a -> PreferAnnotation s b -> PreferAnnotation s a
fmap :: (a -> b) -> PreferAnnotation s a -> PreferAnnotation s b
$cfmap :: forall s a b.
(a -> b) -> PreferAnnotation s a -> PreferAnnotation s b
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
$cto :: forall s a x. Rep (PreferAnnotation s a) x -> PreferAnnotation s a
$cfrom :: forall s a x. PreferAnnotation s a -> Rep (PreferAnnotation s a) x
Generic, PreferAnnotation s a -> Q Exp
PreferAnnotation s a -> Q (TExp (PreferAnnotation s a))
(PreferAnnotation s a -> Q Exp)
-> (PreferAnnotation s a -> Q (TExp (PreferAnnotation s a)))
-> Lift (PreferAnnotation s a)
forall s a. (Lift s, Lift a) => PreferAnnotation s a -> Q Exp
forall s a.
(Lift s, Lift a) =>
PreferAnnotation s a -> Q (TExp (PreferAnnotation s a))
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: PreferAnnotation s a -> Q (TExp (PreferAnnotation s a))
$cliftTyped :: forall s a.
(Lift s, Lift a) =>
PreferAnnotation s a -> Q (TExp (PreferAnnotation s a))
lift :: PreferAnnotation s a -> Q Exp
$clift :: forall s a. (Lift s, Lift a) => PreferAnnotation s a -> Q Exp
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 -> ()
rnf :: PreferAnnotation s a -> ()
$crnf :: forall s a. (NFData s, NFData a) => 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
min :: 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
max :: PreferAnnotation s a
-> PreferAnnotation s a -> PreferAnnotation s a
$cmax :: forall s a.
(Ord s, Ord a) =>
PreferAnnotation s a
-> PreferAnnotation s a -> PreferAnnotation s a
>= :: 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
$c< :: forall s a.
(Ord s, Ord a) =>
PreferAnnotation s a -> PreferAnnotation s a -> Bool
compare :: PreferAnnotation s a -> PreferAnnotation s a -> Ordering
$ccompare :: forall s a.
(Ord s, Ord a) =>
PreferAnnotation s a -> PreferAnnotation s a -> Ordering
$cp1Ord :: forall s a. (Ord s, Ord a) => Eq (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
showList :: [PreferAnnotation s a] -> ShowS
$cshowList :: forall s a. (Show s, Show a) => [PreferAnnotation s a] -> ShowS
show :: PreferAnnotation s a -> String
$cshow :: forall s a. (Show s, Show a) => PreferAnnotation s a -> String
showsPrec :: Int -> PreferAnnotation s a -> ShowS
$cshowsPrec :: forall s a.
(Show s, Show a) =>
Int -> 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)
(a -> f b) -> PreferAnnotation s a -> f (PreferAnnotation s b)
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)
sequence :: PreferAnnotation s (m a) -> m (PreferAnnotation s a)
$csequence :: forall s (m :: * -> *) a.
Monad m =>
PreferAnnotation s (m a) -> m (PreferAnnotation s a)
mapM :: (a -> m b) -> PreferAnnotation s a -> m (PreferAnnotation s b)
$cmapM :: forall s (m :: * -> *) a b.
Monad m =>
(a -> m b) -> PreferAnnotation s a -> m (PreferAnnotation s b)
sequenceA :: PreferAnnotation s (f a) -> f (PreferAnnotation s a)
$csequenceA :: forall s (f :: * -> *) a.
Applicative f =>
PreferAnnotation s (f a) -> f (PreferAnnotation s a)
traverse :: (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)
$cp2Traversable :: forall s. Foldable (PreferAnnotation s)
$cp1Traversable :: forall s. Functor (PreferAnnotation s)
Traversable)
instance Bifunctor PreferAnnotation where
first :: (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 (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 :: (b -> c) -> PreferAnnotation a b -> PreferAnnotation a c
second = (b -> c) -> PreferAnnotation a b -> PreferAnnotation a c
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
data RecordField s a = RecordField
{ RecordField s a -> Maybe s
recordFieldSrc0 :: Maybe s
, RecordField s a -> Expr s a
recordFieldValue :: Expr s a
, RecordField s a -> Maybe s
recordFieldSrc1 :: Maybe s
, RecordField s a -> Maybe s
recordFieldSrc2 :: Maybe s
} deriving (Typeable (RecordField s a)
DataType
Constr
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 -> DataType
RecordField s a -> Constr
(forall b. Data b => b -> b) -> RecordField s a -> RecordField s 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 b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (RecordField s a)
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (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 -> DataType
forall s a. (Data s, Data a) => RecordField s a -> Constr
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))
$cRecordField :: Constr
$tRecordField :: DataType
gmapMo :: (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)
gmapMp :: (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)
gmapM :: (forall d. Data d => d -> m d)
-> RecordField s a -> m (RecordField s a)
$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)
gmapQi :: Int -> (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
gmapQ :: (forall d. Data d => d -> u) -> RecordField s a -> [u]
$cgmapQ :: forall s a u.
(Data s, Data a) =>
(forall d. Data d => d -> u) -> RecordField s a -> [u]
gmapQr :: (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
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RecordField s a -> r
$cgmapQl :: forall s a r r'.
(Data s, Data a) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RecordField s a -> r
gmapT :: (forall b. Data b => b -> b) -> RecordField s a -> RecordField s a
$cgmapT :: forall s a.
(Data s, Data a) =>
(forall b. Data b => b -> b) -> RecordField s a -> RecordField s a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> 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))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (RecordField s a))
$cdataCast1 :: forall s a (t :: * -> *) (c :: * -> *).
(Data s, Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (RecordField s a))
dataTypeOf :: RecordField s a -> DataType
$cdataTypeOf :: forall s a. (Data s, Data a) => RecordField s a -> DataType
toConstr :: RecordField s a -> Constr
$ctoConstr :: forall s a. (Data s, Data a) => RecordField s a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> 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)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RecordField s a -> 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)
$cp1Data :: forall s a. (Data s, Data a) => Typeable (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
/= :: 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
Eq, RecordField s a -> Bool
(a -> m) -> RecordField s a -> m
(a -> b -> b) -> b -> RecordField s a -> b
(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
product :: RecordField s a -> a
$cproduct :: forall s a. Num a => RecordField s a -> a
sum :: RecordField s a -> a
$csum :: forall s a. Num a => RecordField s a -> a
minimum :: RecordField s a -> a
$cminimum :: forall s a. Ord a => RecordField s a -> a
maximum :: RecordField s a -> a
$cmaximum :: forall s a. Ord a => RecordField s a -> a
elem :: a -> RecordField s a -> Bool
$celem :: forall s a. Eq a => a -> RecordField s a -> Bool
length :: RecordField s a -> Int
$clength :: forall s a. RecordField s a -> Int
null :: RecordField s a -> Bool
$cnull :: forall s a. RecordField s a -> Bool
toList :: RecordField s a -> [a]
$ctoList :: forall s a. RecordField s a -> [a]
foldl1 :: (a -> a -> a) -> RecordField s a -> a
$cfoldl1 :: forall s a. (a -> a -> a) -> RecordField s a -> a
foldr1 :: (a -> a -> a) -> RecordField s a -> a
$cfoldr1 :: forall s a. (a -> a -> a) -> RecordField s a -> a
foldl' :: (b -> a -> b) -> b -> RecordField s a -> b
$cfoldl' :: forall s b a. (b -> a -> b) -> b -> RecordField s a -> b
foldl :: (b -> a -> b) -> b -> RecordField s a -> b
$cfoldl :: forall s b a. (b -> a -> b) -> b -> RecordField s a -> b
foldr' :: (a -> b -> b) -> b -> RecordField s a -> b
$cfoldr' :: forall s a b. (a -> b -> b) -> b -> RecordField s a -> b
foldr :: (a -> b -> b) -> b -> RecordField s a -> b
$cfoldr :: forall s a b. (a -> b -> b) -> b -> RecordField s a -> b
foldMap' :: (a -> m) -> RecordField s a -> m
$cfoldMap' :: forall s m a. Monoid m => (a -> m) -> RecordField s a -> m
foldMap :: (a -> m) -> RecordField s a -> m
$cfoldMap :: forall s m a. Monoid m => (a -> m) -> RecordField s a -> m
fold :: RecordField s m -> m
$cfold :: forall s m. Monoid m => RecordField s m -> m
Foldable, a -> RecordField s b -> RecordField s a
(a -> b) -> RecordField s a -> RecordField s b
(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
<$ :: a -> RecordField s b -> RecordField s a
$c<$ :: forall s a b. a -> RecordField s b -> RecordField s a
fmap :: (a -> b) -> RecordField s a -> RecordField s b
$cfmap :: forall s a b. (a -> b) -> RecordField s a -> RecordField s b
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
$cto :: forall s a x. Rep (RecordField s a) x -> RecordField s a
$cfrom :: forall s a x. RecordField s a -> Rep (RecordField s a) x
Generic, RecordField s a -> Q Exp
RecordField s a -> Q (TExp (RecordField s a))
(RecordField s a -> Q Exp)
-> (RecordField s a -> Q (TExp (RecordField s a)))
-> Lift (RecordField s a)
forall s a. (Lift s, Lift a) => RecordField s a -> Q Exp
forall s a.
(Lift s, Lift a) =>
RecordField s a -> Q (TExp (RecordField s a))
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: RecordField s a -> Q (TExp (RecordField s a))
$cliftTyped :: forall s a.
(Lift s, Lift a) =>
RecordField s a -> Q (TExp (RecordField s a))
lift :: RecordField s a -> Q Exp
$clift :: forall s a. (Lift s, Lift a) => RecordField s a -> Q Exp
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 -> ()
rnf :: RecordField s a -> ()
$crnf :: forall s a. (NFData s, NFData a) => 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
min :: 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
max :: RecordField s a -> RecordField s a -> RecordField s a
$cmax :: forall s a.
(Ord s, Ord a) =>
RecordField s a -> RecordField s a -> RecordField s a
>= :: 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
$c< :: forall s a.
(Ord s, Ord a) =>
RecordField s a -> RecordField s a -> Bool
compare :: RecordField s a -> RecordField s a -> Ordering
$ccompare :: forall s a.
(Ord s, Ord a) =>
RecordField s a -> RecordField s a -> Ordering
$cp1Ord :: forall s a. (Ord s, Ord a) => Eq (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
showList :: [RecordField s a] -> ShowS
$cshowList :: forall s a. (Show s, Show a) => [RecordField s a] -> ShowS
show :: RecordField s a -> String
$cshow :: forall s a. (Show s, Show a) => RecordField s a -> String
showsPrec :: Int -> RecordField s a -> ShowS
$cshowsPrec :: forall s a. (Show s, Show a) => Int -> 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)
(a -> f b) -> RecordField s a -> f (RecordField s b)
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)
sequence :: RecordField s (m a) -> m (RecordField s a)
$csequence :: forall s (m :: * -> *) a.
Monad m =>
RecordField s (m a) -> m (RecordField s a)
mapM :: (a -> m b) -> RecordField s a -> m (RecordField s b)
$cmapM :: forall s (m :: * -> *) a b.
Monad m =>
(a -> m b) -> RecordField s a -> m (RecordField s b)
sequenceA :: RecordField s (f a) -> f (RecordField s a)
$csequenceA :: forall s (f :: * -> *) a.
Applicative f =>
RecordField s (f a) -> f (RecordField s a)
traverse :: (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)
$cp2Traversable :: forall s. Foldable (RecordField s)
$cp1Traversable :: forall s. Functor (RecordField s)
Traversable)
makeRecordField :: Expr s a -> RecordField s a
makeRecordField :: 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 :: (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 (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 :: (b -> c) -> RecordField a b -> RecordField a c
second = (b -> c) -> RecordField a b -> RecordField a c
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
data FunctionBinding s a = FunctionBinding
{ FunctionBinding s a -> Maybe s
functionBindingSrc0 :: Maybe s
, FunctionBinding s a -> Text
functionBindingVariable :: Text
, FunctionBinding s a -> Maybe s
functionBindingSrc1 :: Maybe s
, FunctionBinding s a -> Maybe s
functionBindingSrc2 :: Maybe s
, FunctionBinding s a -> Expr s a
functionBindingAnnotation :: Expr s a
} deriving (Typeable (FunctionBinding s a)
DataType
Constr
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 -> DataType
FunctionBinding s a -> Constr
(forall b. Data b => b -> b)
-> FunctionBinding s a -> FunctionBinding s 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 b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (FunctionBinding s a)
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (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 -> DataType
forall s a. (Data s, Data a) => FunctionBinding s a -> Constr
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))
$cFunctionBinding :: Constr
$tFunctionBinding :: DataType
gmapMo :: (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)
gmapMp :: (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)
gmapM :: (forall d. Data d => d -> m d)
-> FunctionBinding s a -> m (FunctionBinding s a)
$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)
gmapQi :: Int -> (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
gmapQ :: (forall d. Data d => d -> u) -> FunctionBinding s a -> [u]
$cgmapQ :: forall s a u.
(Data s, Data a) =>
(forall d. Data d => d -> u) -> FunctionBinding s a -> [u]
gmapQr :: (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
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FunctionBinding s a -> r
$cgmapQl :: forall s a r r'.
(Data s, Data a) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FunctionBinding s a -> r
gmapT :: (forall b. Data b => b -> b)
-> FunctionBinding s a -> FunctionBinding s a
$cgmapT :: forall s a.
(Data s, Data a) =>
(forall b. Data b => b -> b)
-> FunctionBinding s a -> FunctionBinding s a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> 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))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (FunctionBinding s a))
$cdataCast1 :: forall s a (t :: * -> *) (c :: * -> *).
(Data s, Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (FunctionBinding s a))
dataTypeOf :: FunctionBinding s a -> DataType
$cdataTypeOf :: forall s a. (Data s, Data a) => FunctionBinding s a -> DataType
toConstr :: FunctionBinding s a -> Constr
$ctoConstr :: forall s a. (Data s, Data a) => FunctionBinding s a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> 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)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> FunctionBinding s a
-> 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)
$cp1Data :: forall s a. (Data s, Data a) => Typeable (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
/= :: 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
Eq, FunctionBinding s a -> Bool
(a -> m) -> FunctionBinding s a -> m
(a -> b -> b) -> b -> FunctionBinding s a -> b
(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
product :: FunctionBinding s a -> a
$cproduct :: forall s a. Num a => FunctionBinding s a -> a
sum :: FunctionBinding s a -> a
$csum :: forall s a. Num a => FunctionBinding s a -> a
minimum :: FunctionBinding s a -> a
$cminimum :: forall s a. Ord a => FunctionBinding s a -> a
maximum :: FunctionBinding s a -> a
$cmaximum :: forall s a. Ord a => FunctionBinding s a -> a
elem :: a -> FunctionBinding s a -> Bool
$celem :: forall s a. Eq a => a -> FunctionBinding s a -> Bool
length :: FunctionBinding s a -> Int
$clength :: forall s a. FunctionBinding s a -> Int
null :: FunctionBinding s a -> Bool
$cnull :: forall s a. FunctionBinding s a -> Bool
toList :: FunctionBinding s a -> [a]
$ctoList :: forall s a. FunctionBinding s a -> [a]
foldl1 :: (a -> a -> a) -> FunctionBinding s a -> a
$cfoldl1 :: forall s a. (a -> a -> a) -> FunctionBinding s a -> a
foldr1 :: (a -> a -> a) -> FunctionBinding s a -> a
$cfoldr1 :: forall s a. (a -> a -> a) -> FunctionBinding s a -> a
foldl' :: (b -> a -> b) -> b -> FunctionBinding s a -> b
$cfoldl' :: forall s b a. (b -> a -> b) -> b -> FunctionBinding s a -> b
foldl :: (b -> a -> b) -> b -> FunctionBinding s a -> b
$cfoldl :: forall s b a. (b -> a -> b) -> b -> FunctionBinding s a -> b
foldr' :: (a -> b -> b) -> b -> FunctionBinding s a -> b
$cfoldr' :: forall s a b. (a -> b -> b) -> b -> FunctionBinding s a -> b
foldr :: (a -> b -> b) -> b -> FunctionBinding s a -> b
$cfoldr :: forall s a b. (a -> b -> b) -> b -> FunctionBinding s a -> b
foldMap' :: (a -> m) -> FunctionBinding s a -> m
$cfoldMap' :: forall s m a. Monoid m => (a -> m) -> FunctionBinding s a -> m
foldMap :: (a -> m) -> FunctionBinding s a -> m
$cfoldMap :: forall s m a. Monoid m => (a -> m) -> FunctionBinding s a -> m
fold :: FunctionBinding s m -> m
$cfold :: forall s m. Monoid m => FunctionBinding s m -> m
Foldable, a -> FunctionBinding s b -> FunctionBinding s a
(a -> b) -> FunctionBinding s a -> FunctionBinding s b
(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
<$ :: a -> FunctionBinding s b -> FunctionBinding s a
$c<$ :: forall s a b. a -> FunctionBinding s b -> FunctionBinding s a
fmap :: (a -> b) -> FunctionBinding s a -> FunctionBinding s b
$cfmap :: forall s a b.
(a -> b) -> FunctionBinding s a -> FunctionBinding s b
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
$cto :: forall s a x. Rep (FunctionBinding s a) x -> FunctionBinding s a
$cfrom :: forall s a x. FunctionBinding s a -> Rep (FunctionBinding s a) x
Generic, FunctionBinding s a -> Q Exp
FunctionBinding s a -> Q (TExp (FunctionBinding s a))
(FunctionBinding s a -> Q Exp)
-> (FunctionBinding s a -> Q (TExp (FunctionBinding s a)))
-> Lift (FunctionBinding s a)
forall s a. (Lift s, Lift a) => FunctionBinding s a -> Q Exp
forall s a.
(Lift s, Lift a) =>
FunctionBinding s a -> Q (TExp (FunctionBinding s a))
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: FunctionBinding s a -> Q (TExp (FunctionBinding s a))
$cliftTyped :: forall s a.
(Lift s, Lift a) =>
FunctionBinding s a -> Q (TExp (FunctionBinding s a))
lift :: FunctionBinding s a -> Q Exp
$clift :: forall s a. (Lift s, Lift a) => FunctionBinding s a -> Q Exp
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 -> ()
rnf :: FunctionBinding s a -> ()
$crnf :: forall s a. (NFData s, NFData a) => 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
min :: 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
max :: FunctionBinding s a -> FunctionBinding s a -> FunctionBinding s a
$cmax :: forall s a.
(Ord s, Ord a) =>
FunctionBinding s a -> FunctionBinding s a -> FunctionBinding s a
>= :: 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
$c< :: forall s a.
(Ord s, Ord a) =>
FunctionBinding s a -> FunctionBinding s a -> Bool
compare :: FunctionBinding s a -> FunctionBinding s a -> Ordering
$ccompare :: forall s a.
(Ord s, Ord a) =>
FunctionBinding s a -> FunctionBinding s a -> Ordering
$cp1Ord :: forall s a. (Ord s, Ord a) => Eq (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
showList :: [FunctionBinding s a] -> ShowS
$cshowList :: forall s a. (Show s, Show a) => [FunctionBinding s a] -> ShowS
show :: FunctionBinding s a -> String
$cshow :: forall s a. (Show s, Show a) => FunctionBinding s a -> String
showsPrec :: Int -> FunctionBinding s a -> ShowS
$cshowsPrec :: forall s a. (Show s, Show a) => Int -> 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)
(a -> f b) -> FunctionBinding s a -> f (FunctionBinding s b)
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)
sequence :: FunctionBinding s (m a) -> m (FunctionBinding s a)
$csequence :: forall s (m :: * -> *) a.
Monad m =>
FunctionBinding s (m a) -> m (FunctionBinding s a)
mapM :: (a -> m b) -> FunctionBinding s a -> m (FunctionBinding s b)
$cmapM :: forall s (m :: * -> *) a b.
Monad m =>
(a -> m b) -> FunctionBinding s a -> m (FunctionBinding s b)
sequenceA :: FunctionBinding s (f a) -> f (FunctionBinding s a)
$csequenceA :: forall s (f :: * -> *) a.
Applicative f =>
FunctionBinding s (f a) -> f (FunctionBinding s a)
traverse :: (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)
$cp2Traversable :: forall s. Foldable (FunctionBinding s)
$cp1Traversable :: forall s. Functor (FunctionBinding s)
Traversable)
makeFunctionBinding :: Text -> Expr s a -> FunctionBinding s a
makeFunctionBinding :: 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 :: (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 (p :: * -> * -> *) a b c.
Bifunctor p =>
(a -> b) -> p a c -> p b c
first a -> b
k Expr a c
type_)
second :: (b -> c) -> FunctionBinding a b -> FunctionBinding a c
second = (b -> c) -> FunctionBinding a b -> FunctionBinding a c
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
data FieldSelection s = FieldSelection
{ FieldSelection s -> Maybe s
fieldSelectionSrc0 :: Maybe s
, FieldSelection s -> Text
fieldSelectionLabel :: !Text
, FieldSelection s -> Maybe s
fieldSelectionSrc1 :: Maybe s
} deriving (Typeable (FieldSelection s)
DataType
Constr
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 -> DataType
FieldSelection s -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (FieldSelection s))
(forall b. Data b => b -> b)
-> FieldSelection s -> FieldSelection s
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FieldSelection s -> c (FieldSelection s)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (FieldSelection s)
forall s. Data s => Typeable (FieldSelection s)
forall s. Data s => FieldSelection s -> DataType
forall s. Data s => FieldSelection s -> Constr
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))
$cFieldSelection :: Constr
$tFieldSelection :: DataType
gmapMo :: (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)
gmapMp :: (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)
gmapM :: (forall d. Data d => d -> m d)
-> FieldSelection s -> m (FieldSelection s)
$cgmapM :: forall s (m :: * -> *).
(Data s, Monad m) =>
(forall d. Data d => d -> m d)
-> FieldSelection s -> m (FieldSelection s)
gmapQi :: Int -> (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
gmapQ :: (forall d. Data d => d -> u) -> FieldSelection s -> [u]
$cgmapQ :: forall s u.
Data s =>
(forall d. Data d => d -> u) -> FieldSelection s -> [u]
gmapQr :: (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
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FieldSelection s -> r
$cgmapQl :: forall s r r'.
Data s =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FieldSelection s -> r
gmapT :: (forall b. Data b => b -> b)
-> FieldSelection s -> FieldSelection s
$cgmapT :: forall s.
Data s =>
(forall b. Data b => b -> b)
-> FieldSelection s -> FieldSelection s
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> 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))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (FieldSelection s))
$cdataCast1 :: forall s (t :: * -> *) (c :: * -> *).
(Data s, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (FieldSelection s))
dataTypeOf :: FieldSelection s -> DataType
$cdataTypeOf :: forall s. Data s => FieldSelection s -> DataType
toConstr :: FieldSelection s -> Constr
$ctoConstr :: forall s. Data s => FieldSelection s -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> 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)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FieldSelection s -> 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)
$cp1Data :: forall s. Data s => Typeable (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
/= :: FieldSelection s -> FieldSelection s -> Bool
$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
Eq, FieldSelection a -> Bool
(a -> m) -> FieldSelection a -> m
(a -> b -> b) -> b -> FieldSelection a -> b
(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
product :: FieldSelection a -> a
$cproduct :: forall a. Num a => FieldSelection a -> a
sum :: FieldSelection a -> a
$csum :: forall a. Num a => FieldSelection a -> a
minimum :: FieldSelection a -> a
$cminimum :: forall a. Ord a => FieldSelection a -> a
maximum :: FieldSelection a -> a
$cmaximum :: forall a. Ord a => FieldSelection a -> a
elem :: a -> FieldSelection a -> Bool
$celem :: forall a. Eq a => a -> FieldSelection a -> Bool
length :: FieldSelection a -> Int
$clength :: forall a. FieldSelection a -> Int
null :: FieldSelection a -> Bool
$cnull :: forall a. FieldSelection a -> Bool
toList :: FieldSelection a -> [a]
$ctoList :: forall a. FieldSelection a -> [a]
foldl1 :: (a -> a -> a) -> FieldSelection a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> FieldSelection a -> a
foldr1 :: (a -> a -> a) -> FieldSelection a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> FieldSelection a -> a
foldl' :: (b -> a -> b) -> b -> FieldSelection a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> FieldSelection a -> b
foldl :: (b -> a -> b) -> b -> FieldSelection a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> FieldSelection a -> b
foldr' :: (a -> b -> b) -> b -> FieldSelection a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> FieldSelection a -> b
foldr :: (a -> b -> b) -> b -> FieldSelection a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> FieldSelection a -> b
foldMap' :: (a -> m) -> FieldSelection a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> FieldSelection a -> m
foldMap :: (a -> m) -> FieldSelection a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> FieldSelection a -> m
fold :: FieldSelection m -> m
$cfold :: forall m. Monoid m => FieldSelection m -> m
Foldable, a -> FieldSelection b -> FieldSelection a
(a -> b) -> FieldSelection a -> FieldSelection b
(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
<$ :: a -> FieldSelection b -> FieldSelection a
$c<$ :: forall a b. a -> FieldSelection b -> FieldSelection a
fmap :: (a -> b) -> FieldSelection a -> FieldSelection b
$cfmap :: forall a b. (a -> b) -> FieldSelection a -> FieldSelection b
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
$cto :: forall s x. Rep (FieldSelection s) x -> FieldSelection s
$cfrom :: forall s x. FieldSelection s -> Rep (FieldSelection s) x
Generic, FieldSelection s -> Q Exp
FieldSelection s -> Q (TExp (FieldSelection s))
(FieldSelection s -> Q Exp)
-> (FieldSelection s -> Q (TExp (FieldSelection s)))
-> Lift (FieldSelection s)
forall s. Lift s => FieldSelection s -> Q Exp
forall s. Lift s => FieldSelection s -> Q (TExp (FieldSelection s))
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: FieldSelection s -> Q (TExp (FieldSelection s))
$cliftTyped :: forall s. Lift s => FieldSelection s -> Q (TExp (FieldSelection s))
lift :: FieldSelection s -> Q Exp
$clift :: forall s. Lift s => FieldSelection s -> Q Exp
Lift, FieldSelection s -> ()
(FieldSelection s -> ()) -> NFData (FieldSelection s)
forall s. NFData s => FieldSelection s -> ()
forall a. (a -> ()) -> NFData a
rnf :: FieldSelection s -> ()
$crnf :: forall s. NFData s => 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
min :: FieldSelection s -> FieldSelection s -> FieldSelection s
$cmin :: forall s.
Ord s =>
FieldSelection s -> FieldSelection s -> FieldSelection s
max :: FieldSelection s -> FieldSelection s -> FieldSelection s
$cmax :: forall s.
Ord s =>
FieldSelection s -> FieldSelection s -> FieldSelection s
>= :: 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
$c< :: forall s. Ord s => FieldSelection s -> FieldSelection s -> Bool
compare :: FieldSelection s -> FieldSelection s -> Ordering
$ccompare :: forall s. Ord s => FieldSelection s -> FieldSelection s -> Ordering
$cp1Ord :: forall s. Ord s => Eq (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
showList :: [FieldSelection s] -> ShowS
$cshowList :: forall s. Show s => [FieldSelection s] -> ShowS
show :: FieldSelection s -> String
$cshow :: forall s. Show s => FieldSelection s -> String
showsPrec :: Int -> FieldSelection s -> ShowS
$cshowsPrec :: forall s. Show s => Int -> 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
(a -> f b) -> FieldSelection a -> f (FieldSelection 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 =>
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)
sequence :: FieldSelection (m a) -> m (FieldSelection a)
$csequence :: forall (m :: * -> *) a.
Monad m =>
FieldSelection (m a) -> m (FieldSelection a)
mapM :: (a -> m b) -> FieldSelection a -> m (FieldSelection b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> FieldSelection a -> m (FieldSelection b)
sequenceA :: FieldSelection (f a) -> f (FieldSelection a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
FieldSelection (f a) -> f (FieldSelection a)
traverse :: (a -> f b) -> FieldSelection a -> f (FieldSelection b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> FieldSelection a -> f (FieldSelection b)
$cp2Traversable :: Foldable FieldSelection
$cp1Traversable :: Functor FieldSelection
Traversable)
makeFieldSelection :: Text -> FieldSelection s
makeFieldSelection :: 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
data WithComponent = WithLabel Text | WithQuestion
deriving (Typeable WithComponent
DataType
Constr
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 -> DataType
WithComponent -> Constr
(forall b. Data b => b -> b) -> WithComponent -> WithComponent
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WithComponent -> c WithComponent
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c 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)
$cWithQuestion :: Constr
$cWithLabel :: Constr
$tWithComponent :: DataType
gmapMo :: (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
gmapMp :: (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
gmapM :: (forall d. Data d => d -> m d) -> WithComponent -> m WithComponent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> WithComponent -> m WithComponent
gmapQi :: Int -> (forall d. Data d => d -> u) -> WithComponent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> WithComponent -> u
gmapQ :: (forall d. Data d => d -> u) -> WithComponent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> WithComponent -> [u]
gmapQr :: (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
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WithComponent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WithComponent -> r
gmapT :: (forall b. Data b => b -> b) -> WithComponent -> WithComponent
$cgmapT :: (forall b. Data b => b -> b) -> WithComponent -> WithComponent
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c WithComponent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c WithComponent)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c WithComponent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WithComponent)
dataTypeOf :: WithComponent -> DataType
$cdataTypeOf :: WithComponent -> DataType
toConstr :: WithComponent -> Constr
$ctoConstr :: WithComponent -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WithComponent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WithComponent
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WithComponent -> c WithComponent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WithComponent -> c WithComponent
$cp1Data :: Typeable WithComponent
Data, WithComponent -> WithComponent -> Bool
(WithComponent -> WithComponent -> Bool)
-> (WithComponent -> WithComponent -> Bool) -> Eq WithComponent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WithComponent -> WithComponent -> Bool
$c/= :: WithComponent -> WithComponent -> Bool
== :: WithComponent -> WithComponent -> Bool
$c== :: 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
$cto :: forall x. Rep WithComponent x -> WithComponent
$cfrom :: forall x. WithComponent -> Rep WithComponent x
Generic, WithComponent -> Q Exp
WithComponent -> Q (TExp WithComponent)
(WithComponent -> Q Exp)
-> (WithComponent -> Q (TExp WithComponent)) -> Lift WithComponent
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: WithComponent -> Q (TExp WithComponent)
$cliftTyped :: WithComponent -> Q (TExp WithComponent)
lift :: WithComponent -> Q Exp
$clift :: WithComponent -> Q Exp
Lift, WithComponent -> ()
(WithComponent -> ()) -> NFData WithComponent
forall a. (a -> ()) -> NFData a
rnf :: WithComponent -> ()
$crnf :: 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
min :: WithComponent -> WithComponent -> WithComponent
$cmin :: WithComponent -> WithComponent -> WithComponent
max :: WithComponent -> WithComponent -> WithComponent
$cmax :: WithComponent -> WithComponent -> WithComponent
>= :: WithComponent -> WithComponent -> Bool
$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
compare :: WithComponent -> WithComponent -> Ordering
$ccompare :: WithComponent -> WithComponent -> Ordering
$cp1Ord :: Eq 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
showList :: [WithComponent] -> ShowS
$cshowList :: [WithComponent] -> ShowS
show :: WithComponent -> String
$cshow :: WithComponent -> String
showsPrec :: Int -> WithComponent -> ShowS
$cshowsPrec :: Int -> WithComponent -> ShowS
Show)
data Expr s a
= Const Const
| Var Var
| Lam (Maybe CharacterSet) (FunctionBinding s a) (Expr s a)
| Pi (Maybe CharacterSet) Text (Expr s a) (Expr s a)
| App (Expr s a) (Expr s a)
| Let (Binding s a) (Expr s a)
| Annot (Expr s a) (Expr s a)
| Bool
| BoolLit Bool
| BoolAnd (Expr s a) (Expr s a)
| BoolOr (Expr s a) (Expr s a)
| BoolEQ (Expr s a) (Expr s a)
| BoolNE (Expr s a) (Expr s a)
| BoolIf (Expr s a) (Expr s a) (Expr s a)
| Natural
| NaturalLit Natural
| NaturalFold
| NaturalBuild
| NaturalIsZero
| NaturalEven
| NaturalOdd
| NaturalToInteger
| NaturalShow
| NaturalSubtract
| NaturalPlus (Expr s a) (Expr s a)
| NaturalTimes (Expr s a) (Expr s a)
| Integer
| IntegerLit Integer
| IntegerClamp
| IntegerNegate
| IntegerShow
| IntegerToDouble
| Double
| DoubleLit DhallDouble
| DoubleShow
| Text
| TextLit (Chunks s a)
| TextAppend (Expr s a) (Expr s a)
| TextReplace
| TextShow
| Date
| DateLiteral Time.Day
| Time
| TimeLiteral
Time.TimeOfDay
Word
| TimeZone
| TimeZoneLiteral Time.TimeZone
| List
| ListLit (Maybe (Expr s a)) (Seq (Expr s a))
| ListAppend (Expr s a) (Expr s a)
| ListBuild
| ListFold
| ListLength
| ListHead
| ListLast
| ListIndexed
| ListReverse
| Optional
| Some (Expr s a)
| None
| Record (Map Text (RecordField s a))
| RecordLit (Map Text (RecordField s a))
| Union (Map Text (Maybe (Expr s a)))
| Combine (Maybe CharacterSet) (Maybe Text) (Expr s a) (Expr s a)
| CombineTypes (Maybe CharacterSet) (Expr s a) (Expr s a)
| Prefer (Maybe CharacterSet) (PreferAnnotation s a) (Expr s a) (Expr s a)
| RecordCompletion (Expr s a) (Expr s a)
| Merge (Expr s a) (Expr s a) (Maybe (Expr s a))
| ToMap (Expr s a) (Maybe (Expr s a))
| ShowConstructor (Expr s a)
| Field (Expr s a) (FieldSelection s)
| Project (Expr s a) (Either [Text] (Expr s a))
| Assert (Expr s a)
| Equivalent (Maybe CharacterSet) (Expr s a) (Expr s a)
| With (Expr s a) (NonEmpty WithComponent) (Expr s a)
| Note s (Expr s a)
| ImportAlt (Expr s a) (Expr s a)
| Embed a
deriving (Expr s a -> Bool
(a -> m) -> Expr s a -> m
(a -> b -> b) -> b -> Expr s a -> b
(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
product :: Expr s a -> a
$cproduct :: forall s a. Num a => Expr s a -> a
sum :: Expr s a -> a
$csum :: forall s a. Num a => Expr s a -> a
minimum :: Expr s a -> a
$cminimum :: forall s a. Ord a => Expr s a -> a
maximum :: Expr s a -> a
$cmaximum :: forall s a. Ord a => Expr s a -> a
elem :: a -> Expr s a -> Bool
$celem :: forall s a. Eq a => a -> Expr s a -> Bool
length :: Expr s a -> Int
$clength :: forall s a. Expr s a -> Int
null :: Expr s a -> Bool
$cnull :: forall s a. Expr s a -> Bool
toList :: Expr s a -> [a]
$ctoList :: forall s a. Expr s a -> [a]
foldl1 :: (a -> a -> a) -> Expr s a -> a
$cfoldl1 :: forall s a. (a -> a -> a) -> Expr s a -> a
foldr1 :: (a -> a -> a) -> Expr s a -> a
$cfoldr1 :: forall s a. (a -> a -> a) -> Expr s a -> a
foldl' :: (b -> a -> b) -> b -> Expr s a -> b
$cfoldl' :: forall s b a. (b -> a -> b) -> b -> Expr s a -> b
foldl :: (b -> a -> b) -> b -> Expr s a -> b
$cfoldl :: forall s b a. (b -> a -> b) -> b -> Expr s a -> b
foldr' :: (a -> b -> b) -> b -> Expr s a -> b
$cfoldr' :: forall s a b. (a -> b -> b) -> b -> Expr s a -> b
foldr :: (a -> b -> b) -> b -> Expr s a -> b
$cfoldr :: forall s a b. (a -> b -> b) -> b -> Expr s a -> b
foldMap' :: (a -> m) -> Expr s a -> m
$cfoldMap' :: forall s m a. Monoid m => (a -> m) -> Expr s a -> m
foldMap :: (a -> m) -> Expr s a -> m
$cfoldMap :: forall s m a. Monoid m => (a -> m) -> Expr s a -> m
fold :: Expr s m -> m
$cfold :: forall s m. Monoid m => Expr s m -> m
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
$cto :: forall s a x. Rep (Expr s a) x -> Expr s a
$cfrom :: forall s a x. Expr s a -> Rep (Expr s a) x
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)
(a -> f b) -> Expr s a -> f (Expr s b)
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)
sequence :: Expr s (m a) -> m (Expr s a)
$csequence :: forall s (m :: * -> *) a. Monad m => Expr s (m a) -> m (Expr s a)
mapM :: (a -> m b) -> Expr s a -> m (Expr s b)
$cmapM :: forall s (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Expr s a -> m (Expr s b)
sequenceA :: Expr s (f a) -> f (Expr s a)
$csequenceA :: forall s (f :: * -> *) a.
Applicative f =>
Expr s (f a) -> f (Expr s a)
traverse :: (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)
$cp2Traversable :: forall s. Foldable (Expr s)
$cp1Traversable :: forall s. Functor (Expr s)
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
showList :: [Expr s a] -> ShowS
$cshowList :: forall s a. (Show s, Show a) => [Expr s a] -> ShowS
show :: Expr s a -> String
$cshow :: forall s a. (Show s, Show a) => Expr s a -> String
showsPrec :: Int -> Expr s a -> ShowS
$cshowsPrec :: forall s a. (Show s, Show a) => Int -> Expr s a -> ShowS
Show, Typeable (Expr s a)
DataType
Constr
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 -> DataType
Expr s a -> Constr
(forall b. Data b => b -> b) -> Expr s a -> Expr s 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 b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Expr s a)
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (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 -> DataType
forall s a. (Data s, Data a) => Expr s a -> Constr
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))
$cEmbed :: Constr
$cImportAlt :: Constr
$cNote :: Constr
$cWith :: Constr
$cEquivalent :: Constr
$cAssert :: Constr
$cProject :: Constr
$cField :: Constr
$cShowConstructor :: Constr
$cToMap :: Constr
$cMerge :: Constr
$cRecordCompletion :: Constr
$cPrefer :: Constr
$cCombineTypes :: Constr
$cCombine :: Constr
$cUnion :: Constr
$cRecordLit :: Constr
$cRecord :: Constr
$cNone :: Constr
$cSome :: Constr
$cOptional :: Constr
$cListReverse :: Constr
$cListIndexed :: Constr
$cListLast :: Constr
$cListHead :: Constr
$cListLength :: Constr
$cListFold :: Constr
$cListBuild :: Constr
$cListAppend :: Constr
$cListLit :: Constr
$cList :: Constr
$cTimeZoneLiteral :: Constr
$cTimeZone :: Constr
$cTimeLiteral :: Constr
$cTime :: Constr
$cDateLiteral :: Constr
$cDate :: Constr
$cTextShow :: Constr
$cTextReplace :: Constr
$cTextAppend :: Constr
$cTextLit :: Constr
$cText :: Constr
$cDoubleShow :: Constr
$cDoubleLit :: Constr
$cDouble :: Constr
$cIntegerToDouble :: Constr
$cIntegerShow :: Constr
$cIntegerNegate :: Constr
$cIntegerClamp :: Constr
$cIntegerLit :: Constr
$cInteger :: Constr
$cNaturalTimes :: Constr
$cNaturalPlus :: Constr
$cNaturalSubtract :: Constr
$cNaturalShow :: Constr
$cNaturalToInteger :: Constr
$cNaturalOdd :: Constr
$cNaturalEven :: Constr
$cNaturalIsZero :: Constr
$cNaturalBuild :: Constr
$cNaturalFold :: Constr
$cNaturalLit :: Constr
$cNatural :: Constr
$cBoolIf :: Constr
$cBoolNE :: Constr
$cBoolEQ :: Constr
$cBoolOr :: Constr
$cBoolAnd :: Constr
$cBoolLit :: Constr
$cBool :: Constr
$cAnnot :: Constr
$cLet :: Constr
$cApp :: Constr
$cPi :: Constr
$cLam :: Constr
$cVar :: Constr
$cConst :: Constr
$tExpr :: DataType
gmapMo :: (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)
gmapMp :: (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)
gmapM :: (forall d. Data d => d -> m d) -> Expr s a -> m (Expr s a)
$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)
gmapQi :: Int -> (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
gmapQ :: (forall d. Data d => d -> u) -> Expr s a -> [u]
$cgmapQ :: forall s a u.
(Data s, Data a) =>
(forall d. Data d => d -> u) -> Expr s a -> [u]
gmapQr :: (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
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Expr s a -> r
$cgmapQl :: forall s a r r'.
(Data s, Data a) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Expr s a -> r
gmapT :: (forall b. Data b => b -> b) -> Expr s a -> Expr s a
$cgmapT :: forall s a.
(Data s, Data a) =>
(forall b. Data b => b -> b) -> Expr s a -> Expr s a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> 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))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Expr s a))
$cdataCast1 :: forall s a (t :: * -> *) (c :: * -> *).
(Data s, Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Expr s a))
dataTypeOf :: Expr s a -> DataType
$cdataTypeOf :: forall s a. (Data s, Data a) => Expr s a -> DataType
toConstr :: Expr s a -> Constr
$ctoConstr :: forall s a. (Data s, Data a) => Expr s a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> 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)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Expr s a -> 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)
$cp1Data :: forall s a. (Data s, Data a) => Typeable (Expr s a)
Data, Expr s a -> Q Exp
Expr s a -> Q (TExp (Expr s a))
(Expr s a -> Q Exp)
-> (Expr s a -> Q (TExp (Expr s a))) -> Lift (Expr s a)
forall s a. (Lift s, Lift a) => Expr s a -> Q Exp
forall s a. (Lift s, Lift a) => Expr s a -> Q (TExp (Expr s a))
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Expr s a -> Q (TExp (Expr s a))
$cliftTyped :: forall s a. (Lift s, Lift a) => Expr s a -> Q (TExp (Expr s a))
lift :: Expr s a -> Q Exp
$clift :: forall s a. (Lift s, Lift a) => Expr s a -> Q Exp
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 -> ()
rnf :: Expr s a -> ()
$crnf :: forall s a. (NFData s, NFData a) => Expr s a -> ()
NFData)
deriving instance (Eq s, Eq a) => Eq (Expr s a)
deriving instance (Ord s, Ord a) => Ord (Expr s a)
instance Functor (Expr s) where
fmap :: (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 (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 (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 (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 (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 (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 (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 :: a -> Expr s a
pure = a -> Expr s a
forall s a. a -> Expr s a
Embed
<*> :: 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 :: a -> Expr s a
return = a -> Expr s a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
Expr s a
expression >>= :: 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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= a -> Expr s b
k)
instance Bifunctor Expr where
first :: (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 (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 (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 (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 (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 (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 (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 (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 (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 (p :: * -> * -> *) a b c.
Bifunctor p =>
(a -> b) -> p a c -> p b c
first a -> b
k) Expr a c
expression
second :: (b -> c) -> Expr a b -> Expr a c
second = (b -> c) -> Expr a b -> Expr a c
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)
instance Pretty a => Pretty (Expr s a) where
pretty :: 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
multiLet :: Binding s a -> Expr s a -> MultiLet s a
multiLet :: 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
wrapInLets :: Foldable f => f (Binding s a) -> Expr s a -> Expr s a
wrapInLets :: 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 (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
data MultiLet s a = MultiLet (NonEmpty (Binding s a)) (Expr s a)
subExpressions
:: Applicative f => (Expr s a -> f (Expr s a)) -> Expr s a -> f (Expr s a)
subExpressions :: (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 (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 #-}
subExpressionsWith
:: 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))
-> (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 (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)
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)
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 (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 (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> FieldSelection s -> f (FieldSelection s)
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 #-}
unsafeSubExpressions
:: Applicative f => (Expr s a -> f (Expr t b)) -> Expr s a -> f (Expr t b)
unsafeSubExpressions :: (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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)
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 (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)
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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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)
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)
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 (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 (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 (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 (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 (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 (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 (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 (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 (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)
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 (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)
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 (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)
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 (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 (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> NonEmpty WithComponent -> f (NonEmpty WithComponent)
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 (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 (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 :: 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"
)
bindingExprs
:: (Applicative f)
=> (Expr s a -> f (Expr s b))
-> Binding s a -> f (Binding s b)
bindingExprs :: (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 (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 (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Text -> f Text
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 (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe s -> f (Maybe s)
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 (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)
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)
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 (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe s -> f (Maybe s)
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 (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 #-}
recordFieldExprs
:: Applicative f
=> (Expr s a -> f (Expr s b))
-> RecordField s a -> f (RecordField s b)
recordFieldExprs :: (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 (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 (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 (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe s -> f (Maybe s)
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 (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe s -> f (Maybe s)
forall (f :: * -> *) a. Applicative f => a -> f a
pure Maybe s
s2
{-# INLINABLE recordFieldExprs #-}
functionBindingExprs
:: Applicative f
=> (Expr s a -> f (Expr s b))
-> FunctionBinding s a -> f (FunctionBinding s b)
functionBindingExprs :: (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 (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 (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Text -> f Text
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 (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe s -> f (Maybe s)
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 (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe s -> f (Maybe s)
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 (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 #-}
chunkExprs
:: Applicative f
=> (Expr s a -> f (Expr t b))
-> Chunks s a -> f (Chunks t b)
chunkExprs :: (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)
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)
traverse Expr s a -> f (Expr t b)
f) [(Text, Expr s a)]
chunks
{-# INLINABLE chunkExprs #-}
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
/= :: Directory -> Directory -> Bool
$c/= :: Directory -> Directory -> Bool
== :: Directory -> Directory -> Bool
$c== :: 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
$cto :: forall x. Rep Directory x -> Directory
$cfrom :: forall x. Directory -> Rep Directory x
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
min :: Directory -> Directory -> Directory
$cmin :: Directory -> Directory -> Directory
max :: Directory -> Directory -> Directory
$cmax :: Directory -> Directory -> Directory
>= :: Directory -> Directory -> Bool
$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
compare :: Directory -> Directory -> Ordering
$ccompare :: Directory -> Directory -> Ordering
$cp1Ord :: Eq 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
showList :: [Directory] -> ShowS
$cshowList :: [Directory] -> ShowS
show :: Directory -> String
$cshow :: Directory -> String
showsPrec :: Int -> Directory -> ShowS
$cshowsPrec :: Int -> Directory -> ShowS
Show)
deriving anyclass Directory -> ()
(Directory -> ()) -> NFData Directory
forall a. (a -> ()) -> NFData a
rnf :: Directory -> ()
$crnf :: 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 :: Directory -> Doc ann
pretty (Directory {[Text]
components :: [Text]
components :: Directory -> [Text]
..}) = (Text -> Doc ann) -> [Text] -> Doc ann
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 :: 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 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 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
"\""
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
/= :: File -> File -> Bool
$c/= :: File -> File -> Bool
== :: File -> File -> Bool
$c== :: 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
$cto :: forall x. Rep File x -> File
$cfrom :: forall x. File -> Rep File x
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
min :: File -> File -> File
$cmin :: File -> File -> File
max :: File -> File -> File
$cmax :: File -> File -> File
>= :: File -> File -> Bool
$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
compare :: File -> File -> Ordering
$ccompare :: File -> File -> Ordering
$cp1Ord :: Eq 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
showList :: [File] -> ShowS
$cshowList :: [File] -> ShowS
show :: File -> String
$cshow :: File -> String
showsPrec :: Int -> File -> ShowS
$cshowsPrec :: Int -> File -> ShowS
Show, File -> ()
(File -> ()) -> NFData File
forall a. (a -> ()) -> NFData a
rnf :: File -> ()
$crnf :: File -> ()
NFData)
instance Pretty File where
pretty :: File -> Doc ann
pretty (File {Text
Directory
file :: Text
directory :: Directory
file :: File -> Text
directory :: File -> Directory
..}) =
Directory -> Doc ann
forall a ann. Pretty a => a -> 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
data FilePrefix
= Absolute
| Here
| Parent
| Home
deriving (FilePrefix -> FilePrefix -> Bool
(FilePrefix -> FilePrefix -> Bool)
-> (FilePrefix -> FilePrefix -> Bool) -> Eq FilePrefix
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FilePrefix -> FilePrefix -> Bool
$c/= :: FilePrefix -> FilePrefix -> Bool
== :: FilePrefix -> FilePrefix -> Bool
$c== :: 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
$cto :: forall x. Rep FilePrefix x -> FilePrefix
$cfrom :: forall x. FilePrefix -> Rep FilePrefix x
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
min :: FilePrefix -> FilePrefix -> FilePrefix
$cmin :: FilePrefix -> FilePrefix -> FilePrefix
max :: FilePrefix -> FilePrefix -> FilePrefix
$cmax :: FilePrefix -> FilePrefix -> FilePrefix
>= :: FilePrefix -> FilePrefix -> Bool
$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
compare :: FilePrefix -> FilePrefix -> Ordering
$ccompare :: FilePrefix -> FilePrefix -> Ordering
$cp1Ord :: Eq 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
showList :: [FilePrefix] -> ShowS
$cshowList :: [FilePrefix] -> ShowS
show :: FilePrefix -> String
$cshow :: FilePrefix -> String
showsPrec :: Int -> FilePrefix -> ShowS
$cshowsPrec :: Int -> FilePrefix -> ShowS
Show, FilePrefix -> ()
(FilePrefix -> ()) -> NFData FilePrefix
forall a. (a -> ()) -> NFData a
rnf :: FilePrefix -> ()
$crnf :: FilePrefix -> ()
NFData)
instance Pretty FilePrefix where
pretty :: FilePrefix -> Doc ann
pretty FilePrefix
Absolute = Doc ann
""
pretty FilePrefix
Here = Doc ann
"."
pretty FilePrefix
Parent = Doc ann
".."
pretty FilePrefix
Home = Doc ann
"~"
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
/= :: Scheme -> Scheme -> Bool
$c/= :: Scheme -> Scheme -> Bool
== :: Scheme -> Scheme -> Bool
$c== :: 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
$cto :: forall x. Rep Scheme x -> Scheme
$cfrom :: forall x. Scheme -> Rep Scheme x
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
min :: Scheme -> Scheme -> Scheme
$cmin :: Scheme -> Scheme -> Scheme
max :: Scheme -> Scheme -> Scheme
$cmax :: Scheme -> Scheme -> Scheme
>= :: Scheme -> Scheme -> Bool
$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
compare :: Scheme -> Scheme -> Ordering
$ccompare :: Scheme -> Scheme -> Ordering
$cp1Ord :: Eq 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
showList :: [Scheme] -> ShowS
$cshowList :: [Scheme] -> ShowS
show :: Scheme -> String
$cshow :: Scheme -> String
showsPrec :: Int -> Scheme -> ShowS
$cshowsPrec :: Int -> Scheme -> ShowS
Show, Scheme -> ()
(Scheme -> ()) -> NFData Scheme
forall a. (a -> ()) -> NFData a
rnf :: Scheme -> ()
$crnf :: Scheme -> ()
NFData)
data URL = URL
{ URL -> Scheme
scheme :: Scheme
, URL -> Text
authority :: Text
, URL -> File
path :: File
, URL -> Maybe Text
query :: Maybe Text
, :: 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
/= :: URL -> URL -> Bool
$c/= :: URL -> URL -> Bool
== :: URL -> URL -> Bool
$c== :: 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
$cto :: forall x. Rep URL x -> URL
$cfrom :: forall x. URL -> Rep URL x
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
min :: URL -> URL -> URL
$cmin :: URL -> URL -> URL
max :: URL -> URL -> URL
$cmax :: URL -> URL -> URL
>= :: URL -> URL -> Bool
$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
compare :: URL -> URL -> Ordering
$ccompare :: URL -> URL -> Ordering
$cp1Ord :: Eq 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
showList :: [URL] -> ShowS
$cshowList :: [URL] -> ShowS
show :: URL -> String
$cshow :: URL -> String
showsPrec :: Int -> URL -> ShowS
$cshowsPrec :: Int -> URL -> ShowS
Show, URL -> ()
(URL -> ()) -> NFData URL
forall a. (a -> ()) -> NFData a
rnf :: URL -> ()
$crnf :: URL -> ()
NFData)
instance Pretty URL where
pretty :: URL -> Doc ann
pretty (URL {Maybe Text
Maybe (Expr Src Import)
Text
Scheme
File
headers :: Maybe (Expr Src Import)
query :: Maybe Text
path :: File
authority :: Text
scheme :: Scheme
headers :: URL -> Maybe (Expr Src Import)
query :: URL -> Maybe Text
path :: URL -> File
authority :: URL -> Text
scheme :: URL -> Scheme
..}) =
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 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 (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 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
file :: Text
directory :: Directory
file :: File -> Text
directory :: File -> Directory
..} = File
path
Directory {[Text]
components :: [Text]
components :: Directory -> [Text]
..} = Directory
directory
pathDoc :: Doc ann
pathDoc =
(Text -> Doc ann) -> [Text] -> Doc ann
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 a ann. Pretty a => a -> Doc ann
Pretty.pretty Text
q
prettyURIComponent :: Text -> Doc ann
prettyURIComponent :: Text -> Doc ann
prettyURIComponent Text
text =
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
data ImportType
= Local FilePrefix File
| Remote URL
| Env Text
| Missing
deriving (ImportType -> ImportType -> Bool
(ImportType -> ImportType -> Bool)
-> (ImportType -> ImportType -> Bool) -> Eq ImportType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportType -> ImportType -> Bool
$c/= :: ImportType -> ImportType -> Bool
== :: ImportType -> ImportType -> Bool
$c== :: 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
$cto :: forall x. Rep ImportType x -> ImportType
$cfrom :: forall x. ImportType -> Rep ImportType x
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
min :: ImportType -> ImportType -> ImportType
$cmin :: ImportType -> ImportType -> ImportType
max :: ImportType -> ImportType -> ImportType
$cmax :: ImportType -> ImportType -> ImportType
>= :: ImportType -> ImportType -> Bool
$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
compare :: ImportType -> ImportType -> Ordering
$ccompare :: ImportType -> ImportType -> Ordering
$cp1Ord :: Eq 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
showList :: [ImportType] -> ShowS
$cshowList :: [ImportType] -> ShowS
show :: ImportType -> String
$cshow :: ImportType -> String
showsPrec :: Int -> ImportType -> ShowS
$cshowsPrec :: Int -> ImportType -> ShowS
Show, ImportType -> ()
(ImportType -> ()) -> NFData ImportType
forall a. (a -> ()) -> NFData a
rnf :: ImportType -> ()
$crnf :: ImportType -> ()
NFData)
parent :: File
parent :: File
parent = File :: Directory -> Text -> File
File { directory :: Directory
directory = Directory :: [Text] -> Directory
Directory { components :: [Text]
components = [ 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
headers :: Maybe (Expr Src Import)
query :: Maybe Text
authority :: Text
scheme :: Scheme
headers :: URL -> Maybe (Expr Src Import)
query :: URL -> Maybe Text
authority :: URL -> Text
scheme :: URL -> Scheme
..}) <> Local FilePrefix
Here File
path₁ =
URL -> ImportType
Remote (URL :: Scheme
-> Text -> File -> Maybe Text -> Maybe (Expr Src Import) -> URL
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
headers :: Maybe (Expr Src Import)
query :: Maybe Text
authority :: Text
scheme :: Scheme
headers :: Maybe (Expr Src Import)
query :: Maybe Text
authority :: Text
scheme :: Scheme
..})
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
headers :: Maybe (Expr Src Import)
query :: Maybe Text
authority :: Text
scheme :: Scheme
headers :: URL -> Maybe (Expr Src Import)
query :: URL -> Maybe Text
authority :: URL -> Text
scheme :: URL -> Scheme
.. }) <> Local FilePrefix
Parent File
path₁ =
URL -> ImportType
Remote (URL :: Scheme
-> Text -> File -> Maybe Text -> Maybe (Expr Src Import) -> URL
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
headers :: Maybe (Expr Src Import)
query :: Maybe Text
authority :: Text
scheme :: Scheme
headers :: Maybe (Expr Src Import)
query :: Maybe Text
authority :: Text
scheme :: Scheme
.. })
ImportType
import₀ <> Remote (URL { headers :: URL -> Maybe (Expr Src Import)
headers = Maybe (Expr Src Import)
headers₀, Maybe Text
Text
Scheme
File
query :: Maybe Text
path :: File
authority :: Text
scheme :: Scheme
query :: URL -> Maybe Text
path :: URL -> File
authority :: URL -> Text
scheme :: URL -> Scheme
.. }) =
URL -> ImportType
Remote (URL :: Scheme
-> Text -> File -> Maybe Text -> Maybe (Expr Src Import) -> URL
URL { headers :: Maybe (Expr Src Import)
headers = Maybe (Expr Src Import)
headers₁, Maybe Text
Text
Scheme
File
query :: Maybe Text
path :: File
authority :: Text
scheme :: Scheme
query :: Maybe Text
path :: File
authority :: Text
scheme :: Scheme
.. })
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 (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ((Import -> Import) -> Expr Src Import -> Expr Src Import
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 :: ImportType -> Doc ann
pretty (Local FilePrefix
prefix File
file) =
FilePrefix -> Doc ann
forall a ann. Pretty a => a -> 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
Pretty.pretty File
file
pretty (Remote URL
url) = URL -> Doc ann
forall a ann. Pretty a => a -> 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"
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
/= :: ImportMode -> ImportMode -> Bool
$c/= :: ImportMode -> ImportMode -> Bool
== :: ImportMode -> ImportMode -> Bool
$c== :: 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
$cto :: forall x. Rep ImportMode x -> ImportMode
$cfrom :: forall x. ImportMode -> Rep ImportMode x
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
min :: ImportMode -> ImportMode -> ImportMode
$cmin :: ImportMode -> ImportMode -> ImportMode
max :: ImportMode -> ImportMode -> ImportMode
$cmax :: ImportMode -> ImportMode -> ImportMode
>= :: ImportMode -> ImportMode -> Bool
$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
compare :: ImportMode -> ImportMode -> Ordering
$ccompare :: ImportMode -> ImportMode -> Ordering
$cp1Ord :: Eq 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
showList :: [ImportMode] -> ShowS
$cshowList :: [ImportMode] -> ShowS
show :: ImportMode -> String
$cshow :: ImportMode -> String
showsPrec :: Int -> ImportMode -> ShowS
$cshowsPrec :: Int -> ImportMode -> ShowS
Show, ImportMode -> ()
(ImportMode -> ()) -> NFData ImportMode
forall a. (a -> ()) -> NFData a
rnf :: ImportMode -> ()
$crnf :: ImportMode -> ()
NFData)
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
/= :: ImportHashed -> ImportHashed -> Bool
$c/= :: ImportHashed -> ImportHashed -> Bool
== :: ImportHashed -> ImportHashed -> Bool
$c== :: 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
$cto :: forall x. Rep ImportHashed x -> ImportHashed
$cfrom :: forall x. ImportHashed -> Rep ImportHashed x
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
min :: ImportHashed -> ImportHashed -> ImportHashed
$cmin :: ImportHashed -> ImportHashed -> ImportHashed
max :: ImportHashed -> ImportHashed -> ImportHashed
$cmax :: ImportHashed -> ImportHashed -> ImportHashed
>= :: ImportHashed -> ImportHashed -> Bool
$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
compare :: ImportHashed -> ImportHashed -> Ordering
$ccompare :: ImportHashed -> ImportHashed -> Ordering
$cp1Ord :: Eq 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
showList :: [ImportHashed] -> ShowS
$cshowList :: [ImportHashed] -> ShowS
show :: ImportHashed -> String
$cshow :: ImportHashed -> String
showsPrec :: Int -> ImportHashed -> ShowS
$cshowsPrec :: Int -> ImportHashed -> ShowS
Show, ImportHashed -> ()
(ImportHashed -> ()) -> NFData ImportHashed
forall a. (a -> ()) -> NFData a
rnf :: ImportHashed -> ()
$crnf :: 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 :: ImportHashed -> Doc ann
pretty (ImportHashed Maybe SHA256Digest
Nothing ImportType
p) =
ImportType -> Doc ann
forall a ann. Pretty a => a -> 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
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 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
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 a ann. Pretty a => a -> Doc ann
Pretty.pretty (SHA256Digest -> String
forall a. Show a => a -> String
show SHA256Digest
h)
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
/= :: Import -> Import -> Bool
$c/= :: Import -> Import -> Bool
== :: Import -> Import -> Bool
$c== :: 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
$cto :: forall x. Rep Import x -> Import
$cfrom :: forall x. Import -> Rep Import x
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
min :: Import -> Import -> Import
$cmin :: Import -> Import -> Import
max :: Import -> Import -> Import
$cmax :: Import -> Import -> Import
>= :: Import -> Import -> Bool
$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
compare :: Import -> Import -> Ordering
$ccompare :: Import -> Import -> Ordering
$cp1Ord :: Eq 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
showList :: [Import] -> ShowS
$cshowList :: [Import] -> ShowS
show :: Import -> String
$cshow :: Import -> String
showsPrec :: Int -> Import -> ShowS
$cshowsPrec :: Int -> Import -> ShowS
Show, Import -> ()
(Import -> ()) -> NFData Import
forall a. (a -> ()) -> NFData a
rnf :: Import -> ()
$crnf :: 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 :: Import -> Doc ann
pretty (Import {ImportHashed
ImportMode
importMode :: ImportMode
importHashed :: ImportHashed
importMode :: Import -> ImportMode
importHashed :: Import -> ImportHashed
..}) = ImportHashed -> Doc ann
forall a ann. Pretty a => a -> Doc ann
Pretty.pretty ImportHashed
importHashed Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> 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
""
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'
denote :: Expr s a -> Expr t a
denote :: 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 (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)
renote :: Expr Void a -> Expr s a
renote :: Expr Void a -> Expr s a
renote = Expr Void a -> Expr s a
forall a b. a -> b
unsafeCoerce
{-# INLINE renote #-}
shallowDenote :: Expr s a -> Expr s a
shallowDenote :: 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
reservedKeywords :: HashSet Text
reservedKeywords :: HashSet Text
reservedKeywords =
[Text] -> HashSet Text
forall a. (Eq a, Hashable a) => [a] -> HashSet a
Data.HashSet.fromList
[ Item [Text]
"if"
, Item [Text]
"then"
, Item [Text]
"else"
, Item [Text]
"let"
, Item [Text]
"in"
, Item [Text]
"using"
, Item [Text]
"missing"
, Item [Text]
"as"
, Item [Text]
"Infinity"
, Item [Text]
"NaN"
, Item [Text]
"merge"
, Item [Text]
"Some"
, Item [Text]
"toMap"
, Item [Text]
"assert"
, Item [Text]
"forall"
, Item [Text]
"with"
]
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
[
Item [Text]
"Natural/fold"
, Item [Text]
"Natural/build"
, Item [Text]
"Natural/isZero"
, Item [Text]
"Natural/even"
, Item [Text]
"Natural/odd"
, Item [Text]
"Natural/toInteger"
, Item [Text]
"Natural/show"
, Item [Text]
"Natural/subtract"
, Item [Text]
"Integer"
, Item [Text]
"Integer/clamp"
, Item [Text]
"Integer/negate"
, Item [Text]
"Integer/show"
, Item [Text]
"Integer/toDouble"
, Item [Text]
"Integer/show"
, Item [Text]
"Natural/subtract"
, Item [Text]
"Double/show"
, Item [Text]
"List/build"
, Item [Text]
"List/fold"
, Item [Text]
"List/length"
, Item [Text]
"List/head"
, Item [Text]
"List/last"
, Item [Text]
"List/indexed"
, Item [Text]
"List/reverse"
, Item [Text]
"Text/replace"
, Item [Text]
"Text/show"
, Item [Text]
"Bool"
, Item [Text]
"True"
, Item [Text]
"False"
, Item [Text]
"Optional"
, Item [Text]
"None"
, Item [Text]
"Natural"
, Item [Text]
"Integer"
, Item [Text]
"Double"
, Item [Text]
"Text"
, Item [Text]
"Date"
, Item [Text]
"Time"
, Item [Text]
"TimeZone"
, Item [Text]
"List"
, Item [Text]
"Type"
, Item [Text]
"Kind"
, Item [Text]
"Sort"
]
splitOn :: Text -> Text -> NonEmpty Text
splitOn :: Text -> Text -> NonEmpty Text
splitOn Text
needle Text
haystack =
case 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
linesLiteral :: Chunks s a -> NonEmpty (Chunks s a)
linesLiteral :: Chunks s a -> NonEmpty (Chunks s a)
linesLiteral (Chunks [] Text
suffix) =
(Text -> Chunks s a) -> NonEmpty Text -> NonEmpty (Chunks s a)
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 (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 (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₀)
unlinesLiteral :: NonEmpty (Chunks s a) -> Chunks s a
unlinesLiteral :: NonEmpty (Chunks s a) -> Chunks s a
unlinesLiteral NonEmpty (Chunks s a)
chunks =
NonEmpty (Chunks s a) -> Chunks s a
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)
emptyLine :: Chunks s a -> Bool
emptyLine :: Chunks s a -> Bool
emptyLine (Chunks [] Text
"" ) = Bool
True
emptyLine (Chunks [] Text
"\r") = Bool
True
emptyLine Chunks s a
_ = Bool
False
leadingSpaces :: Chunks s a -> Text
leadingSpaces :: 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
longestSharedWhitespacePrefix :: NonEmpty (Chunks s a) -> Text
longestSharedWhitespacePrefix :: NonEmpty (Chunks s a) -> Text
longestSharedWhitespacePrefix NonEmpty (Chunks s a)
literals =
case (Chunks s a -> Text) -> [Chunks s a] -> [Text]
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 (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
""
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 (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
dropLiteral :: Int -> Chunks s a -> Chunks s a
dropLiteral :: 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
toDoubleQuoted :: Chunks Src a -> Chunks Src a
toDoubleQuoted :: 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 (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 :: Int -> Var -> Expr s a -> Expr s a
shift :: 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 (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 (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"
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 "
, Item [String]
" "
, Item [String]
"Explanation: This error message means that there is a bug in the Dhall compiler."
, Item [String]
"You didn't do anything wrong, but if you would like to see this problem fixed "
, Item [String]
"then you should report the bug at: "
, Item [String]
" "
, Item [String]
"https://github.com/dhall-lang/dhall-haskell/issues "
, Item [String]
" "
, Item [String]
"Please include the following text in your bug report: "
, Item [String]
" "
, Item [String]
"``` "
, Text -> String
Data.Text.unpack Text
text String -> ShowS
forall a. Semigroup a => a -> a -> a
<> String
" "
, Item [String]
"``` "
] )