{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} module Dhall.JSON.Util ( pattern V , pattern FA ) where import Data.Text (Text) import Dhall.Core (Expr, FieldSelection) import qualified Dhall.Core as Core pattern V :: Int -> Expr s a pattern $bV :: forall s a. Int -> Expr s a $mV :: forall {r} {s} {a}. Expr s a -> (Int -> r) -> ((# #) -> r) -> r V n = Core.Var (Core.V "_" n) pattern FA :: Text -> FieldSelection s pattern $bFA :: forall s. Text -> FieldSelection s $mFA :: forall {r} {s}. FieldSelection s -> (Text -> r) -> ((# #) -> r) -> r FA t <- Core.FieldSelection _ t _ where FA = forall s. Text -> FieldSelection s Core.makeFieldSelection